Sometimes, I know its true for me, a person will be nice to someone else but only when its just you and them. Sometimes they're afraid if they act like a friend with you around other friends, they may lose those friends. I think he's just insecure. You should try and hang around (in school) with your friend and his group. Once you gain their trust and prove that you're worthy to be their friend, they'll let you in. Give it some time. Also, if you're really unsure as to whether he wants to be your friend or not, try hanging out with other people. At my school, I have a lot of interests, so I fit in with a lot of groups. See if you can find a different group of people who share interests with you. If you want more friends, try playing a sport, or doing some activities outside of school. I know that these suggestions helped me get friends, so I hope they help you too. Good Luck!