Did he have feelings for me if so why would he betray me like this?

I had a crush on this guy and I was too afraid to talk to him so one day I talked to him for the whole day and asked him for his Instagram and he asked me for mine. He told me to write it down so he can't remember it when he goes home so he can put it in.
The same day he puts it in front of me. I waited a week to text him and ever since then, we've texted every day. He always texts me no matter what he's doing and he texts back really fast no matter if he's at work on his lunch break, going to the bathroom, or hanging out with his friends, he always texts me or even sends voice memos. Sometimes he'll look for me and just stand by me doing nothing and watching me when I'm doing stuff he just always likes to be around me. Sometimes he looks at me from far away and walks straight to me and when I look at him when we're talking, he looks away quickly then looks back at me. He likes it when I do stuff for him even if it’s silly tiny things. I told him how I felt about him and he said that he was not ready for a relationship and that I deserved better and he was working on his self. He even has two kids so we decided to be friends. He said that he likes the way the food that I cook looks and that he wanted me to make him food. I already cooked for myself so I was fine with it because that’s just me I'm just a cool person. I provided him with lunch for two days in a row. Recently I cut off my friend group because they were toxic and they always talk shit about me and l got tired of it. He asked me what was wrong and why I looked so sad and was on my mind so I told him about all about what I went through. One day he was talking to one of the guys in the friend group that I dislike. I asked him if was he talking about me and he said no he doesn't talk about you. Continuing reading the updates⬇️⬇️⬇️
Updates
1 y
Two days later he asked why do you always ask if he's talking about you and I told him because that's what they do. talk shit about people he said they didn't say anything about and you shouldn't think negatively maybe they're talking about something else. So the next week came and I found out that he told the guy in the friend group everything I’ve told him about the situation even private stuff.
Updates
1 y
I confronted him about it and he got defensive and gaslighted me and said things like I’m not interested in you I told you that already, you be getting mad but I can talk to whoever I wanna talk to and I don’t even wanna be your friend anymore because you have a lot of problems and I don’t wanna be part of them, he goes on and says I heard a lot of things about you, but I didn’t say nothing, and you’re dumb if you think I said anything, and then he blocks me.
Did he have feelings for me if so why would he betray me like this?
Post Opinion