By using a while loop you save yourself from the multiple-if-thens. I also moved the kick code to a separate alias, so that in the event there is a word in a name which is offensive, but not part of your %badlist
you can type /kickbad [nick] [channel] to manually invoke it. If you want, you can make %badlist a permanent variable, and add an alias to allow you to add new badwords to it at will.

Code:
on *:join:#:{
/*
[color:red]Set this values below:[/color]
%badlist = word1'word2'word3'...'wordn
*/
  var %badlist = [color:red]ugly'stupid'dumb[/color]
  var %bad = $gettok(%badlist,0,39)
  while (%bad > 0) {
/*
Although you could use iswm, the code with isin is slightly cleaner.
See afterwards for the iswm code, if you want it.
*/
    if ($gettok(%badlist,%bad,39) isin $nick) {
      kickbad $nick $chan
    }
    dec %bad
  }  
}
alias kickbad {
  .kick $$2 $$1 $$1 $+ , Kicked for Inappropriate nickname.
  write KickLogs.txt $+($chr(40),$date,-,$time,$chr(41)) $+($$1,$chr(44)) Kicked for Inappropriate nickname.
  msg $$1 Change your Name and try again.
} 
/*
this is the iswm code:
    if ($+($chr(42),$gettok(%badlist,%bad,39),$chr(42)) iswm $nick) {
      kickbad $nick $chan
    }
*/