4-5 grand for a motor. you have to weigh it out your self. can you replace the car for 5 grand?? Are you ready for a huge outlay of money for a new car?? Only you can answer these questions and you must decide.
If it was me, I would put the motor in and drive it for a couple of years to get my moneys worth.
Roy's points are valid, also look at www.kkb.com and see what fair value for your car is. Prior to deciding to put an engine in your car have the rest of the car looked at, does it need tires, will it need brakes, suspension work, any rust......... ?