It's potentially a giant headache and the price needs to reflect the risk premium. As a point of reference, last week I test drove a 2007 supercharged full fat Range Rover with 91,000 miles, complete air suspension replacement, new tires, fully documented dealer service history, absofuckinglutely immaculate. Asking price was $15,000. Granted, that is an older model with the 4.2 instead of 5.0, so not a perfect comparison, but something to consider. Keep looking, you'll either find a better deal or an example in better shape.
Another way to look at it is "How much am I prepared to spend on repairs if I bought it?" If your budget for bringing the truck up to your standard is $5,000, then you could alternatively shop for something in the $16,000 range that doesn't have overheating issues. Maybe you'd get lucky and repairs would be cheap and you'd end up with a deal. But it's a gamble and the outcome could also go the other way. Depends on your risk tolerance.
The thing is fucked. You overheat a 5.0 and it's a boat anchor. If you did decide to fix it, that's a gamble for sure. I would want to know what size headbolts it has in it. The smaller thread size bolt will pull the threads out of the block. You can fix the small ones, not sure about the big ones.
Your going to want to replace the engine. If you do get it fixed and not overheating, it will more than likely be noisy as hell. Last time I quoted out an engine for a warranty job the price had come down to $28,000.
No that's not a typo. Twenty eight thousand dollars.