Advice?

It's hard to explain but this guy that I really like doesn't like me back. I don't really know what to do. he's my ex and we really didn't go out for long and he hurt me alot. After that, I finally got over him and now he's back and talking to me again and I fell for him harder than i did before. he says he only wants to be friends but when we hang out, he always wants me to hug him and cuddle him and he always likes to comfort me but then when he leaves, he acts like he hates me like he doesn't even see us as friends at the least. when he's around I always feel like nothing is wrong and I'm actually happy. but some of my friends are saying "It's not meant to be. just leave it" while others say, "try to get him to like you" And I just don't know what to do. do I leave it? do i go for it? it just really hurts and I don't know what to do. what do should I do? what do you think he's thinking? does he like me or does he not like me?