✓ Accepted answer
This should be quite easy using math.random(). When I said that, you may have thought "That generates a whole number, not a value based on probability", but if you think outside of the box, it becomes very basic. All you would have to do is set a variable for math.random(1,10) like so:
local choice = math.random(1,10)
and tell the script that if it is 1, 2, 3, 4, or 5 (5/10 numbers aka 50%), do option A, if it is 2, 3, or 4, do option B (3/10 numbers aka 30%), etc, like so:
local choice = math.random(1,10)
if choice == 1 or choice == 2 or choice == 3 or choice == 4 or choice == 5 then
elseif choice == 6 or choice == 7 or choice == 8 then
elseif choice == 9 then
elseif choice == 10 then
end
Hope this helped.
-Cmgtotalyawesome
2 comments
You can simplify this by using the 'greater than or equals' and 'less than or equals' operators. if choice >= 1 and choice is <= 5 etc
@vector3_zero thanks, didn't think of that xD