I agree that the scoring system needs a total overhaul. I think for some just the definitions of the numbers is the problem, as they are quite vague.
As for the script, yeah it could be a bit neater, but this one was done on the fly, and I have never been one to really like using multistep variable definitions because it is easier to get lost that way.
Surely I could have done something like:
%a = $rand(0,9), %b = $str(%a,4), %c = $calc($int($asin($rand(1,%b))))
and so on and so on....