Find a mechanic you can trust and get an estimate for repair. Forget what the car is worth. If the repair is less than you can replace the vehicle for, fix it. If not, sell it to a private buyer for the best price you can get and then buy a replacement in your budget range.