@ReQueST: You can do this with regex and it does the same thing:
on @$*:TEXT:/(.\s)\1{10}/:#:if ($nick !isop #) kick # $nick Stop repeating!
@fahabalboa: If you want to use the author's script above, all you need to do is change >= 10 to >= 4 The same goes the one I'm showing here change it to {4}
The above version will match space between repeated words. If you want to match letters like 11111111111111 aaaaaaaaaaaaaaa mmmmmmmmmmmmmmmmmmmm without spaces, just remove \s as such:
on @$*:TEXT:/(.)\1{10}/:#:if ($nick !isop #) kick # $nick Stop repeating!