I have so far spent about $13k on my 88 Bronco 2, including purchase price, transmission rebuild, engine replacement...and its still 30+ years old. However, nothing on the market today has gained any interest from me and I don't plan on getting rid of my Bronco 2 anytime soon. It still needs painted though, which is another $5k. Still cheaper than a new SUV which I wouldn't be happy in at all. I enjoy driving my Bronco 2 and my recently acquired 87 Ranger...so figure out what a new truck costs, then figure in the immediate depreciation as you drive it off the lot, but still owe $40k+ on. Now, figure out what it would cost to repair the truck you want to put $12k in, and double that number because trust me its never going to cost what you think, it'll inevitably cost more...much more due to breaking of components during the process of repair, and finding further issues as you dig into the project.
If you plan on keeping the truck you want to put $12k into for another 20 years fine, if its something you are trying to make pretty to try and get rich by reselling it, save your time, and money and sell it as is before you end up with a $12k+ lawn ornament when you run out of money 1/2 way through the project and your wife gets mad and divorces you for spending every dime you make on an old truck.
In the end I don't have a loan payment on a truck even though I have slowly put $13K into mine. I did it over time, something you could of course do with your truck if you have time, patience, and a space to keep it stored. I had a shop do the work on mine because I don't have a place to work on vehicles and it would never get finished with everything else I have to deal with. I'd go with no car payment and have the work done if you need to over the course of months or years, rather than a 7 year truck payment that I wouldn't want, and don't care to drive.