There are a number of ways to do that depending on how you want it to work. If it was me, I would want a single command for on/off that could be accessed via Twitch chat by any mod.

Code:
on *:TEXT:!capsprotection:#:{
  if ($nick !isop) { return }
  if (%capsprotection = $null) { set %capsprotection 1 }
  if (%capsprotection = 1) { 
    set %capsprotection 0
    msg $chan Caps lock protection disabled
  }
  else if (%capsprotection = 0) { 
    set %capsprotection 1
    msg $chan Caps lock protection enabled 
  }
}


on *:text:*:#:{
  if ($nick isop #) { halt }
  if ( $len($1-) >= 10 ) && ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) && ( %capsprotection = 1 ) {
    var %capsblock = $rand(1,3)
    if (%capsblock == 1) { msg $chan $nick -> stop typing in caps! [caps] [warning] }
    if (%capsblock == 2) { msg $chan $nick -> Ey! stop yelling! [caps] [warning] }
    if (%capsblock == 3) { msg $chan $nick -> stop typing in BIG LETTERS! [caps] [warning] }
    write capsban.txt $nick
    msg $chan .timeout $nick 120
  }
}