I hope I understood correctly, you want something if someone says a word more than once, within 30 seconds it will kick ban them?
Code:
on 1:TEXT:*:#:{
  if ($me ! isop #) return 
  if ($nick isop #) return
  else {
    var %x = $strip($1-)
    inc -u30 %i. [ $+ [ $hash($nick $chan %x,32) ] ]
    if (%i. [ $+ [ $hash($nick $chan %x,32) ] ] == 5) {
      ban -u30 # $nick 2
      kick # $nick  Your kick message here.
    }
  }
}