Why do guys act nice towards a girl then start being mean to her?

fanzaya
so a guy i like has been really nice and kinda flirting with me until a couple days ago when he'd only talk to my best friend and completly ignore me. today i was doing a REALLY HARD TASK and he turns around and says-anyone can do that- then after a couple of hours he went back to normal... then he lied and said that he wasn't talking to me when he was staring at me... then he started talking to me, holding eye contact, leaning towards me, teasing me/trying to get me to laugh and he even poked me... WHAT DOES THIS MEAN AND WHY DO GUYS DO THIS?
Why do guys act nice towards a girl then start being mean to her?
2 Opinion