I have a old Trek 870 mountain bike ('89) with Shimano components and crankshaft. I've upgraded the components over the years but still have the same frame. I want to get a new frame and want to use my crankshaft, but would want a new bottom bracket. My question is if I get a new frame, will a BB that fits that frame work with my crankshaft or am I now having to buy all new. I just want to upgrade the frame as I like all the other items on my bike that I have upraded over the years (i.e. brakes, shifters, drivetrain, etc.). Don't want to spend $800 for a bike with low end components and start all over. I think the crankshaft is a square taper but I could be wrong since I know Shimano has their own style but I don't know if that came out after my bike.
Yes, you can transfer your old "crankset" to your new frame IF you purchase the correct bottom bracket. The correct BB is one which uses the same attachment type as your current bottom bracket and results in
a proper chain line.
Yes, just get one with the right type of crank connections (square tube vs a spline type of connection).
Whats wrong with the frame? Those older Trek steel frames are pretty bullet proof (I have a 1987 Trek 330 and a 1992 Trek 950, along with a few other bikes). If you have some rust, just treat it with oxalic (do a search there are a lot of threads on that topic already). It works!
A Trek 870 is probably not worth a professional paint job. Either touch it up selectively (go to Hobby Lobby or similar and get some model enamel paint) or do a rattle can spray paint job. Do a search on paint and you can find out more.
I did a touch up on my Trek 950, fortunately, the bike is black so matching was not a problem.