You all are making it so complex, but with GS2, you can tackle this problem simply.
PHP Code:
function onCreated() {
this.possibilities = { "5", "10" };
drawRandomNumber();
}
function drawRandomNumber() {
this.number = randomstring(this.possibilities);
}
While this is not good practice for other engines, GS2 supports inputting a string as an integer, so this script would work smoothly.