Unless you have, or are expecting, multiple catastrophic failures back-to-back-to-back (which is pretty rare regardless, but especially rare in a 15 year old 170k mile GM truck), it's virtually always cheaper to repair than to buy something new. What's $6500, 6-8 months of payments on a 50k truck? And $50k doesn't get a whole lot of truck these days...
I was just laughing about this the other day with a coworker. I recently had something break on my 20-year-old Honda beater car. It cost me an honest $70 and 1 hour of my time to fix. He asked me if I was going to trade it in for a newer car "because it was breaking down all the time". LoL, NO! 6 months of payments on a new car would be way more than I've spent on repairs in the last 250k miles. And even if it needed something catastrophic like a new motor, that would still be less than a year's worth of payments (or depreciation if I paid cash).