Sorry, but none of us can answer because we don't know the details of sale (e.g. purchase price, seller concessions, comparable values, features, etc.) Perhaps most important, we don't your financial capacity to replace the roof, and/or the Seller's willingness to do so.
The person who would know??? Your agent. Don't hesitate to ask him or her the question you've posted here.