I think it is best two use both. Most people don't have enough cash laying around to cover both the cost of buying a home and repaired it. I would say to use the loan to buy the home and pay for the repairs out of your own pocket though so you can pace yourself.
Both if possible. I agree with the comment above about using your own money for the repairs because you can always take time off from that, you can't take time off from paying off a house.