Why is my ex acting like this? And how do I move on without being mean?

I am a teenager who is so confused. I fell in love for the first time a year ago. This boy had a player reputation and he had some drug issues. I tried to stay away but couldnt. We dated for 7 months and got extremely close. We were very close emotinally. He had a lot of issues with his home life and he always told me that I was the one good thing in his life that he could count on. He had problems with drugs that caused him to blow me off, stand me up for dates and jsut basically drop off the radar for a while. I tried to love him through that and let him make his own choices about his using. He had to quit for himself not me. After about 4 months of dating little things strted to happen. He would break plans with me to hang wtih his guy friends and other girls. He would sext other gilrs...etc. I tried to address these things when they happend without being mean or a bitch about them. I was at all his sport events and was a pretty laid back non clingy girlfriend. things got a little better, then towards the end he started lieing to me and breaking plans. After the breaking of plans and lies, he would follow with how much he loved me and how amazing I was. I fell for it all the time...I mean I loved him! I found out that he was hanging and texting with one of my best friends. She was going after him and he wasn't really stopping her. I finally made the painfull decision to walk away. I wasn't mean or ugly, I just simply said that it was obvious he wanted his freedom. It was the hardest thing I have ever done. I really loved him, but couldn't handle being treated badly anymore. I have tried to be nice and supportive and be his friend. He now wants me back and says that I was the best thing that ever happened to him. He is telliing me all of this while having a girlfriend. He has a freaking girlfriend and tells me he loves me like everyday. I told him that I wanted to be his friend and he said OK we will be best friends. He will text me before and after hanging out with his gilrfriend telling me he loved me. Last night he got really ugly and started acting mean after sending me a text telling me he loves me and I'm amazing! please help me becuase I do not understand why he is acting this way. He always text in the mornings telling me to have a good day. Of course today he didn't. I have chosen not tot text him, because I feel like he is playing games with me and I honestly don't know how to handle it anymore. I am trying to be nice and be his friend, because I hate being mean...but I feel like I'm being manipulated.
Why is my ex acting like this? And how do I move on without being mean?
Post Opinion