You can locate the leaks on your transmission, and maybe decide if it needs replaced....
You can get an used 4.0 from a salvage yard for around $400, have it put in for probably in the neighborhood of a thousand bucks. The transmission, if you need to replace it, is going to cost you another few hundred, and a few hundred more to put in.
If there is nothing wrong with your engine though, aside from your head gasket leak, (are you sure it is a head gasket and not a valve cover gasket leaking?) then you should just replace the head gasket. You can do it yourself with the resources on this site and all the members willing to answer your questions. The cost of the gaskets, bolts, and even the few tools you would need to buy to do the job if you don't have tools should be under $350-400. If you need valves or head work, just buy some remanufactured heads, and you are only another 400-500 into the job.
A transmission is a little harder to replace, just because it is big, heavy and hard to reach. But, if it is just something like the pan gasket leaking, then you can change the tranny fluid while you are at it, and have only $100 into that job.
How do you know you need valves or a harmonic balancer? Exhaust leak? Well, for that you are just going to have to feel around a bit when you first start the engine up. If you have something to make smoke, or know a smoker, you can use the smoke to find a leak too. What is wrong with your exhaust manifolds? The only thing that could be wrong with them is that they are cracked, and if they are, then that is where your leak is..... Sounds a lot like you are just getting emo about the problems your truck is having.....
Anyways, let's see if we can figure out EXACTLY what your problems are, because I have my doubts that you know at this point. From there, we can tell you exactly how to fix them, what tools you need, or what you should expect to pay someone else to fix them, and whether or not it is worth keeping the truck.
Honestly, unless you have some type of emotional attachment to this truck though, I have no idea why you would want to keep it if your repair bills are going to be as high as you think. You can find good 1st gens for under $1500 all day. I buy them all the time for between $300 and $1000. You can even find some decent second gens for under $2000.... These trucks are getting old.... But, your truck probably won't cost that much to fix, you sound like you are just a little over-excited.
Don't be offended by the things I am saying, you just don't sound very mechanically inclined or very sure about what is going on with your truck. I just want to help you out.