It's called pseudo-random numbers.
Obligatory Wikipedia linkOn the Roblox Wiki, they used to have a script for
truly random numbers, but the script has been since... DELETED! For some reason, I couldn't find it in the Page History either. I think it was along the lines of:
Code:
function DoSomeSortOfWhatsit(part)
if game.Players:findFirstChild(part.Parent.Name) ~= nil then --Is the button-toucher a Player or an NPC?
players = game.Players:GetChildren()
wait(math.random(1, #players)) --Random wait randomizes the Randomizer because #players is truly random.
thisplayer = game.Players:findFirstChild(part.Parent.Name)
thisplayer.Coins.Value = thisplayer.Coins.Value + math.random(1, 9001)
end
end
script.Parent.Touched:connect(DoSomeSortOfWhatsit)
Edit: Not that it's relevant to rando, but I found the real script. It's a standalone that constantly randomizes the math.random() function, which is global.
Code:
while true do
players = game.Players:getChildren()
wait(math.random(1, #players)) --Though this would technically break if no one's on the server.
if #players > 0 then math.random(1, #players) end
end
Maybe TBC could set it up so that (and I have no idea how the crap HTML and Flash work on the inside) it rerandomizes the rando button by doing, say,
math.random(1, numberOfUsersConnectedToServer).
But by probabilities of getting something from a particular category, it is almost guaranteed that you will see more sbemails than Toons, Marzipan's Answering Machines, etc. in a given test set. But each sbemail, Toon, etc. in a category has the same probablity of being picked: 1 in however many HTMLs and SWFs are listed by rando.