Baaaad roof! Best option to fix
First, stop the leaking. Use tarps or whatever. Next, I’d try to dry the roof structure out before installing the metal roofing. (Yes, the roof structure should be dry before installing the roofing.) I’d also check for mold, (as you say the roof has been leaking for 3 years). It may not be safe to stay in the house and continue breathing that air.