Guys, Is my boyfriend stringing me along or does he want to work things out?

My ex broke up with me about a month ago. At first he said he couldn't be with me anymore because he was developing a crush on one of my friends and that he was also hiding a drug problem. He couldn't be with me because he felt so guilty about his feelings for her and lying to me all the time about doing drugs. We kept talking after the break up and slowly different things came out as to why we were ending things, including me talking to one of my ex-boyfriends. My ex contacted me because his parents were going though a divorce and he wanted to talk to somebody about it, but had nobody he felt comfortable talking about it with. I explained this to my boyfriend at the time before I went to meet my ex, but eventually called off the lunch date because it made him upset. We had been fighting a lot since that conversation and he would blow up at the smallest things.Since the break up, he has been pretty adimate about not getting back together but recently while I was away he messaged me saying he had screwed up and that I was his biggest regret, and he wished we hadn't ended things like we did. When I returned he said he had changed his mind back and that we shouldn't work things out becasue he feared that we would end up resenting each other from all the things that happened during our breakup. Its been about a week now without any contact from each other, and he randomly showed up at an event with some mutual friends, even when asked not to come because I would be there. He ended up driving me home, to my discomfort, after a misunderstanding about rides. After he dropped me off he texted me saying "looking great by the way :P".

I'm a little confused about what he wants. Is he just keeping me on the side as a back up plan, or is he changing his mind about the situation and doens't know how to approach it properly?