Most Helpful Guy
See, this the the only point where I might suggest being more upfront and mean about it. Not a complete jerk or anything...
Or this might work: "Look, I mentioned I have a boyfriend several times. I've said No. many times." I've been kind to you, but no more."
Or the diplomatic way: A combination of avoiding him for a while, if possible. Unfriend on Facebook. Block on Facebook. Block his number if you have it. Go a different route. Ghost him. Tell your boyfriend (if you have one). Not to make him jealous, but so he knows how to handle it if this guy keeps sniffing around while he's nearby.
Personally, I've never been that persistent. I've tried to make sure I don't pester or become nasty to girls; I get nasty behavior from the first time I ask them out. I'm not for that, but I think there's a time and place for not being quite so nice.
Also, let friends know, and let any guy friends know about what's going on. Not necessarily to get any confrontation (though that's an option) between them, but to swoop in if you needed some help.
One thing I did was kind of watch out for "girl friends." If some guy was making them uncomfortable, I'd swoop in as the super friendly outgoing guy and distract while the girl gets away.
Most Helpful Girl
In which case you have to be cruel to be kind and block/ignore him. I had this with this guy who was part of a sports club i was in. He would not accept that i was not interested, so i had to block him. I know this sounds mean... but after weeks of him texting flirty texts, i was at my wits end.1