resetting to factory settings
hey I bought a iPhone 4 8gb off someone over a year ago and now I'm currently selling it due to an upgrade of a iPhone 5 but I really need to reset it to factory settings but the person i bought it off had put a restriction code in the settings and I can't get in contact with him in any way, I just need to reset the device so the hardwear will be faster due to it not being reset for over a year, is there any way I can reset it without the password, any help is fine, thankyou
iPhone 4, iOS 7.1.2, pls help