Your rights vis-a-vis the new owner are the same as those you have with your landlord. If you have a lease term, you can continue to rent through the end of the lease term and negotiate for renewal or extension. If you are month-to-month, then either you or your landlord may give a month's notice to termiate the tenancy.
As for the condition of the premises, you have rights to repair and extermination. They apply with the existing landlord and with any future landlord. Read this.

