The answer to your question is already in that script. The percent of caps that is included in the message can be used as the condition.
on *:text:*:#:{
  if (!%caps.floodprotection) {
    inc -u2 %caps.floodprotection
    if ($calc($regex($1-,/[A-Z]/g) / $len($1-) * 100) > [color:green]50[/color]) msg $chan Stop talking in $round($ifmatch,2) $+ % and stuff $nick 

The green 50 can be altered to the desired level in percent.