rainbow isnt just 2 colors it's 7 but as u like i dont know :)
use menu * is not a good idea u may have a picwin game and this will be appear into menu!! so, better to use menu status,channel,query,nicklist,menubar
you can use $regsubex, u dont have to repeat "Turn Raindows on/off", and variable can be 1 or 0 to return true or false so your code can be like this
menu status,channel,query,nicklist,menubar {
Turn Rainbows $iif(%rainbows,On,Off) : set %rainbows $iif(%rainbows,0,1)
}
on *:input:*:{
if ($left($1-,1) != / && %rainbows) {
haltdef
msg $active $regsubex($1-,/([^\s])/g,$+($chr(3),$gettok(4 12,$r(1,2),32),\t))
}
}