3459
to this:
0003459
To use just add this code:
whateveriwanttocallthefunction = require("score")
The function has 2 parameters the total score and how many digits are in the final string.
EXAMPLE:
score(1456,6) would return the string "001456"
Edit:
I modified this so that it uses string.format. 3 params now! The first 2 are the same as before, the last one is optional and is maxscore.
2 return values the string of score, and the score itself.
Happy coding
-Sheepman
