If somebody really and truly likes you, then they would not be influenced by their surroundings and friends.
You say he is mean when he is around other people, yet nice when he is alone with you.
In all my experience, this is a fucckboy. He's playing with you. I know this because I was like that. They prey on your vulnerabilities. The best thing you can do is to just refuse him. Two things will happen:
1 - He will get more and more antagonised by what you're doing and he'll just become a horrible person, the person he actually is
2 - If he truly likes you, he will see that what he is doing is not working, and will try to change his crappy behaviour in order to appreciate you as a person.
My only advice for you, without knowing who you are or what your life is like, is just to stick to your own guns and focus on yourself.
Good luck, and message me if you'd like to talk.