Can't turn off Find My iPhone?

A few days ago my friend gave me his old iPhone 4 and I'm attempting to restore it to factory settings but Find My iPhone is on and I can't do that, and he doesn't know the password to the iCloud account because it was a relatives iPhone to begin with. Is there any way I can restore it or set up as new without turning it off

Nope, you're completely locked out unless you get that password.

Nope. It's iCloud activation lock doing what it does. Virtually impossible to work around. Friend either gets ahold of uh, his relative, and relative gives you the code, or relative enters the code in his iCloud account and lets go of the phone, or it's basically just a paperweight. Hope it works out. Best luck.