You have be approved by a lender for a mortgage however determine by agreed sales price from owner and you. Bank might consider a short sale .
Regarding other laws in your state confer with attorney . In many cases once a home is foreclosed lender will provide cash incentive for family vacate prior to eviction process.
GOOD LUCK !