Thackeray died Saturday.
"If Godfather was not there, I wouldn't have made 'Sarkar'...if Bala Saheb wasn't there, I couldn't have made 'Sarkar' (sic)," Varma tweeted.
"Many of the dialogue from both 'Sarkar' and 'Sarkar Raj' are actually Bala Saheb's lines which I copied from what he said. He actually told me, 'Mujhe jo sahi lagta hai main wahi karta hoon!', which I copied and made Amitji (Amitabh Bachchan) say it in 'Sarkar'," he further posted.
Released in 2005, "Sarkar", a crime thriller, was set in the backdrop of politics and crime.
The film starred Amitabh Bachchan in the title role and it also featured Abhishek Bachchan, Kay Kay Menon, Katrina Kaif, Anupam Kher, Supriya Pathak and Tanisha Mukherjee.
Its sequel, "Sarkar Raj", came out in 2008.
Photos: Kareena Kapoor Khan and Aamir Khan at Mumbai airport
Photos: SRK, wife Gauri, Aishwarya Rai, Shweta Bachchan at Vogue Awards
Photos: Harbhajan Singh-Geeta Basra's TV outing with daughter Hinaya
Photos: Malaika Arora flaunts ripped jeans like a boss!
Photos: Vaani Kapoor, Kriti Sanon, Dia Mirza sizzle on the ramp