Ok, quick (dirty) fix:
Code:
    if ($2 != %mnum) { 
      inc %counter
      var %gfnum = $mid($2, 1, 1), %gsnum = $mid($2, 2, 1), %gtnum = $mid($2, 3, 1), %ghnum = $mid($2, 4, 1)
      var %correct = 0, %close = 0
      var %numbers = $+(%fnum,.,%snum,.,%tnum,.,%hnum)
      if (%gfnum == %fnum)      { inc %correct | var %gfnum = x | var %numbers = $remtok(%numbers,%gfnum,1,46) }
      if (%gsnum == %snum)      { inc %correct | var %gsnum = x | var %numbers = $remtok(%numbers,%gsnum,1,46) }
      if (%gtnum == %tnum)      { inc %correct | var %gtnum = x | var %numbers = $remtok(%numbers,%gtnum,1,46) }
      if (%ghnum == %hnum)      { inc %correct | var %ghnum = x | var %numbers = $remtok(%numbers,%ghnum,1,46) }
      if (%gfnum isin %numbers) { inc %close | var %numbers = $remtok(%numbers,%gfnum,1,46) }
      if (%gsnum isin %numbers) { inc %close | var %numbers = $remtok(%numbers,%gsnum,1,46) }
      if (%gtnum isin %numbers) { inc %close | var %numbers = $remtok(%numbers,%gtnum,1,46) }
      if (%ghnum isin %numbers) { inc %close | var %numbers = $remtok(%numbers,%ghnum,1,46) }
      msg $chan You have %correct correct.
      msg $chan You have %close out of place.
    }

And...
Code:
on 1:text:*score:#: {
  if ($1 == %c $+ score) {
    if ($2) {
      set %sname $2
      if ($readini(ini\mastermind.rank,Rank,%sname)) { msg $chan %sname $+ 's current record is $v1 guesses. }
      else { msg $chan I don't have any records for nick %sname $+ . }
    }
    elseif ($readini(ini\mastermind.rank,Rank,$nick)) { msg $chan $nick $+ , your current record is $v1 guesses. }
    else { msg $chan ...Who the hell are you again? I don't have any records for $nick $+ . }    
  }
}

Your initial code wasn't exactly wrong, I just made it look nicer/more efficient. Your problem was the matchtext section of the on TEXT event:
Code:
on 1:text:*score:#: {

You're matching *score so any sentence ending in score, like !score, flooblescore, highscore, but not score Fernin or scoresofwomen.