local num = 0
local rng = 0
local best = 0
repeat
repeat
    local r = math.random(0, 2000)
    if num < 1 then
        num = 1
    else
        num = num*2000/1.999/1000
    end
until r >= 2000
rng = math.floor(num)
if rng > best then
    best = rng
end
print("Rng: "..math.floor(rng))
print("Best: "..best)
print("------------")
rng = 0
until false

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: