Why does guy friend act all toward me then say don't like me?

Hi a guy I work with who has a girlfriend, and me a boyfriend, I have grown close too.

We speak every day on teams at work, and he likes me to go gym and spa with him alone.

In the gym he randomly got naked and said moment of weakness but is attracted to me. He likes to flirt tease a lot with me, also nice and tells me everything , as he a closed book, really opened up. But why now has he said no feelings for you, I am getting too much, but not changed and still stares at me, rings me wants to talk constant. I did go to loan him lot money too. i feel hurt as a friend?

Updates
1 y
Sorry to add on a couple years back we did do stuff I feel very bad about it, and his girlfriend saw messages, so he had to stop contact from me, but still insists meet at gym and spa, why is so bothered, and money it's 45k as a loan. I was wary doing but I offered him he not put pressure or anything, starting own business up. But it's Bern a hassle to do and I feel he not always grateful, I don't get him does he like me more than friends to act like this, constant messaging too,
Why does guy friend act all toward me then say don't like me?
Post Opinion