How to make a chance script

while task.wait(1) do
	local t = {
		Bronze = {.1, 29.2};
		Rust = {29.3, 100}
	}
	local nt = {}
	for i,v in pairs(t) do
		for ii = v[1],v[2],.1 do
			table.insert(nt, i)
		end
	end
	local random = math.random(1,1000)
	local tierGained = nt[random]
	print(tierGained)
end

This looks like the 4th post you’ve made on this and there are solid answers in all of them. Forum Rules indicate that multiple posts of the same topic could be deleted. It might be good to change the topic to asking for help understanding the math behind the code or something to keep from running afoul of the moderators.

1 Like
local chance = math.random(1,1000)

if chance == 1000 then

      —- give something 

end

Is this script a 1 in 1,000?

Yes but it still calculates it as if it’s math.random(1, 100).

? Wdym by this it isn’t 1 in 1000