Hi,
Hope You are doing well!
Since you are buying the entire company it also includes assets as well as liabilities.
Pursuant to sec 79 of IT Act, 1961, if transfer of shareholding from existing shareholders exceeding 51% then in my opinion you would not able to carry forward or set off the losses of that company.
Merely appointing new directors will not change the position.
Thanks & Regards,
Payal Chhajed