Without all the stories and known problems/opinions etc.
If I had $30k and wanted to spend most or all of it, I would look in this order if I was willing to delete a truck if it had emissions issues.
1. Early 4th Gen Ram
2. LML Duramax (tie for 1st and second place, pick which color you like)
3. Late 3rd Gen Ram 09
4. Late LLY/LBZ Dmax
5. 3rd Gen 5.9 Dodge with 6 speed manual (Again, tie for 4 and 5th place, pick the one best cared for.
If I wasn't willing to delete, I'd use most of $30k to buy a garage queen, low mile, 4 or 5 from above and save $3-5k for impending repairs that wouldn't be needed on a new truck.