Okay, so I'n trying to make it so my bot will join the channel if it's only a halfop/op. And say a message if a voice and regular invited it, and then part. Well then here's the script.

Code:
on *:INVITE:#:{ 
  join $chan
  msg $chan 12Hello, Im 14 $+ $me $+ 12, and I was invited by 14 $+ $nick $+ 12, type !commands for my commands.
}   
elseif ($nick isvoice # || $nick isreg #)  {
  part $chan Only ops/halfops can invite me.
  notice $nick Only ops/halfops can invite me.
}