Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Personal Use (Among Us)
local roles = { {"Judge", 3}, {"Suicide Artist (Imposter)", 4}, {"CEO", 2}, {"Bounty Hunter", 3}, {"Psycho", 1} } local u = 0 local function random(x, y) u = u + 1 if x ~= nil and y ~= nil then return math.floor(x +(math.random(math.randomseed(os.time()+u))*999999 %y)) else return math.floor((math.random(math.randomseed(os.time()+u))*1000)) end end print("Roles in this round: ") local x = 0 for _ ,v in pairs (roles) do if random(1, v[2]) == 1 then x = x + 1 print(v[1]) end end if x == 0 then print("No Roles this round") end
run
|
edit
|
history
|
help
0
Show current system clock
фыв
Random number generation with ranges (Lua)
char2int & int2char encoding
wwww
bf-asm compiler test 2
مكسر
Lua properties
PAID HACK PuBG
Fibonacci in Lua (Inspired)