Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make randomilzer with luck stuff, which will work with math.random thing?

Asked by 3 years ago
Edited 3 years ago

i wants like if the number like 1515623 so it's will print your luck is 15% and i wants it to work on any number.

here an example how i wants it to looks like..

total = 100 -- any number even with mil
number = total
repeat
    a = math.random(1,total)
    if a == 1 then
        -- your luck.. 52% , 10%..
    else
        number = number - 1
    end
until a == 1

Answer this question