EDITED
Howdy Judd:
Yes it can be done but the buyer and lender have to approve and the title company will have to approve holding the funds as they are usually asked to be the trustee of the money until the job gets done. I have seen the buyer actually get the money as a credit but bad roofs may not apply. Most of the time the credit is for carpet or paint.
Why not just credit say $7500 or whatever amount you like from the sales price for deferred maintenance?
the bigger issue is the insurance. they are REALLY picky about roofs. No insurance= no loan. Also, they do go out and do spot checks. I had one insurance company threaten to cancel becuase I had one small branch touching the roof. I had to cut it and then send a picture to keep my policy in force.