MagicRevealer09, jackster35-1's script is popup-menu based and has nothing to do with the on text event you're suggesting.
For your suggestion, I'd do this if I were you:
on $@1:TEXT:/!(un)?(lock)$/iS:#YourChannel: {
if ($nick isop #) {
var %+ $iif(m !isincs $chan(#).mode,+), %- $iif(m isincs $chan(#).mode,-)
mode # $replace($regml(1),un,%-,lock,%+) $+ m
}
}
You also have to make sure the +m has been set or unset, or else some ops may abuse it by way of flooding...just in case.