Bought my friend's Samsung S6 but can't restore with new Google account
It's a new Anti-Theft feature of Android since 5.1. Your variants:


Wait 72 hours and try again.
If that didn't help, you should find 5.0 stock ROM, flash it and then upgrade back to Marshmallow or what have been previously there.


P.S. Of course, the fastest way is to cooperate with your friend, log in to his account and then enter the new account :)