Say two things:

  1. You're not interested in him.
  2. Threaten to show the messages to his girlfriend.


These should work, if not then just ignore his texts and block his number if it's bothering you.