I combined an old badword script i had, with yours to make one with .txt file

You need to create the "badwords.txt" on the mirc folder, you can change the location on the code. The words have to be on a list, 1 per line, you can use "*" in case the word have variations, exemple *motherfu*, it'll trigger anytime someone say something with "motherfu" on it, not just the complete word.

Code:
on *:text:*:#:{
  if ($me isop #) && ($nick isreg $chan) {
    var %warns = 2
    var %y = 1
    while ($read(badwords.txt,%y) != $null) {
      if ($read(badwords.txt,%y) iswm $strip($1-)) {
        inc $+(%,swear.,$wildsite)
        var %n = $($+(%,swear.,$wildsite),2)
        if (%n <= %warns) {
          notice $nick $nick $+ , this is your $ord(%n) warning for using forbidden language in this channel. $iif(%n = %warns,Breaking the channel rules one more time will result in ban.)
        }
        elseif (%n > %warns) {
          ban -ku300 $chan $nick 2 Using forbidden language
          unset $+(%,swear.,$wildsite)
        }
      }
      inc %y
    } 
  }
  halt
}

on *:START: { unset %swear.* }


Enjoy smile