Originally Posted by Epic
I reworked your script and added what you asked for. This code is not perfect and could be even better if I had more time, but it is better than the previous one.

Try using this script code:
Code
on *:TEXT:*:#Alessandra:{
  if ($1 == !game) {
    if ($2) { var %tn $2 | set %number $rand(1,%tn) }
    else { var %tn 100 | set %number $rand(1,%tn) }
    msg $chan Guess the number 1 to %tn | hfree -w number *
  }
  if ($1 == !number) {
    if (!%number) { msg $chan Come up with a new number: !game [number] | return }
    if (!$2) { notice $nick Correct syntax: !number <number> | return }
    if ($hget(number,$nick)) { notice $nick The next attempt is possible in $+(,$v1,) secs. | return }
    if ($2 > %number) { msg $chan The number is higher than $2 }
    if ($2 < %number) { msg $chan The number is lower than $2 }
    if ($2 == %number) {
      msg $chan $nick $read(you.txt) you win! The number was $+(,%number,)
      if ($read(win.txt,w,$+($nick,$chr(32),*))) {
        var %rn $readn, %score $gettok($read(win.txt,%rn),2,32)
        write $+(-l,%rn) win.txt $nick $calc(%score + 1)
      }
      else { write -i win.txt $nick 1 } | unset %number | hfree -w number * | return
    }
    hadd -mz number $nick 300 
  }
  if ($1 == !score) {
    if ($2) { 
      if ($read(win.txt,w,$+($2,$chr(32),*))) { msg $chan Score for $+(,$2,:) $read(win.txt,s,$2) points }
      else msg $chan here is no record for the player under the nickname: $+(,$2,)
    }
    else { notice $nick Nick: --- Score: | play -n $nick win.txt 1000 }
  }
}

It looks it works. What if I want only owner can start it?
Thanks sir