Not trying to scare you, but this is just my view and opinion.
1. Foundational issues, did the house settle or does it actually have structural integrity issues. You might want to get a structural engineer or someone who has more knowledge than yourself in that field.
2. A bad roof, the problem isn’t just going to be your roof. Gravity forces water to travel down the building and it destroys anything in its way. Look at the Grand Canyon.
3. If the seller has allowed the property to have these problems then it tells how much he cared about the property. Go to the basement and look at the electric wiring, look at the plumbing, and HBAC. Do your lines look go through the rafters, do they look straight? This is an easy way to tell if the properties PEH was installed right.
4. Rather than asking the seller to make repairs have your contractor write and invoice for the work. Ask the seller to put funds in escrow at closing, add 20% to contractors estimate. You will probably spend 20% more guaranteed if it is your first house. If there are left over funds return them to the seller.