I received a 3 day notice a few days ago from my landlord. But today he left me a message stating that he will be by tomorrow to get the keys and that i need to vacate by 12 am that night is this legal?
Because I told him I would be moving this month and I did not pay the rent to him. The condo is in foreclosure and he will not repair the bathroom floor that is going to fall in any day.
In your state a landlord can present a tenant who fails to pay rent a 3 notice of eviction. This is not an actual "eviction" (only a court can grant that) but it is typically the first step in the legal process of eviction.
In a foreclosure situation, rent obligations continue as long as the property remains in the owners (i.e., landlords name). Again, failure to do so can begin the eviction process.
The issue of repair in California is covered in the attached (under number 5):
A tenant does have rights in terms of withholding rent, terminating a lease, paying for the repairs and deducting this from the rent, etc. but typically only after notifying the landlord in writing for the need for repairs and providing them with an adequate amount of time to respond to this.