alias scramble {
  set %schan #
  scramble.start                 
}
alias scramble.start {
  set %sword $$?="   !"
  set %shint $$?="   !"
  scramble.enter
}
alias scramble.rscore {
  set %delscore $$?!="  ?"  
  if (%delscore == $true) { unset %score.* | unset %delscore }
  if (%delscore == $false) { unset %delscore | halt }
}
alias scramble.tellans {
  set %tell $$?!="  ?"  
  if (%tell == $true) { /msg %schan 7,1 :))79    %sword 0,0 6B14y 6Y14o6u14-6A14n6d14-6I | unset  %tell | unset  %shint }
  if (%tell == $false) { unset %tell | halt }
}
alias scramble.stop {
  set %sstop $$?!="  ?"  
  if (%sstop == $true) { 
    msg %schan 7  6B14y 6Y14o6u14-6A14n6d14-6I
    unset %sstop
    /unset %sword
    /unset %shint
    /unset %schan
    /unset %sranword
    /unset %score.*
  }
  if (%sstop == $false) { unset %sstop | halt }
}
alias scramble.enter {
  set %sword $lower( %sword )
  set %sranword $waroeng7( %sword )
  /msg %schan 7,1* You-And-I     *
  /msg %schan 7,1[* *]11 %shint
  /msg %schan 7,1[*  *]11 %sranword
}
alias waroeng7 {
  unset %w7.* 
  %w7.w = 1 
  :1
  inc %w7.i 
  if (%w7.i > $len($gettok($1-,%w7.w,32))) goto 2 
  %w7.ls = %w7.ls $mid($gettok($1-,%w7.w,32),%w7.i,1) 
  goto 1 
  :2 
  %w7.l = $r(1,$gettok(%w7.ls,0,32)) 
  if (%w7.i) { 
    %w7.wrd = %w7.wrd $gettok(%w7.ls,%w7.l,32) 
    unset %w7.i 
  } 
  else %w7.wrd = %w7.wrd $+ $gettok(%w7.ls,%w7.l,32) 
  if ($len($gettok(%w7.wrd,%w7.w,32)) == $len($gettok($1-,%w7.w,32))) { 
    if ($len(%w7.wrd) == $len($1-)) return %w7.wrd 
    inc %w7.w | %w7.ls = "" 
    goto 1
  } 
  %w7.ls = $deltok(%w7.ls,%w7.l,32) 
  goto 2
}
on 1:text:%sword:%schan: {
inc %score. [ $+ [ $nick ] ]
/msg %schan 11,1 $nick 7,1   %sword   $+ **** 79 !!
/msg %schan 11,1 $nick 7,1   %score. [ $+ [ $nick ] ]     8,1 79!!!
/msg %schan 11,1Type7 /ctcp $me 9Score
unset %sword
unset %shint
}
ctcp 1:score: {
/notice $nick 11,1 $nick 7,1   %score. [ $+ [ $nick ] ]     8,1 79!!!  
/notice $nick 6B14y 6Y14o6u14-6A14n6d14-6I
}
menu channel {
 Scramble 
.Start Playing:/scramble
.-
.Repeat Result:/scramble.rscore
.Stop The Game:/scramble.stop
.Tell Them The Answer:/scramble.tellans
}
