There are many possible reasons for a loud noise. I would suspect an exhaust problem first if the truck is otherwise running fine. I would have a competent mechanic do a more thorough inspection of this vehicle and provide a written list and estimate of everything it needs or will soon need. That is the only way to assess if it is worth doing any repairs. Be sure the inspection includes a compression test. And find out specifically why it "needs a new motor". Spending approx $100 for an inspection at a qualified independent shop (please - no quickie lube or national chains...) would be a wise investment.
If/when it does need a new motor, it could be replaced with a salvage unit fairly inexpensively - especially if you do it yourself (which is what I would do).