For every server block, I have a code that every second has a 50% chance of turning a light on or off.
local lights = script.Parent
local light_table = {lights.One, lights.Two, lights.Three}
while true do
task.wait(1)
local a = math.random(1,2)
local b = math.random(1,2)
local c = math.random(1,2)
if a == 2 then
light_table[1].Color = Color3.new(1, 1, 1)
elseif a == 1 then
light_table[1].Color = Color3.new(0, 0, 0)
end
if b == 2 then
light_table[2].Color = Color3.new(1, 1, 1)
elseif b == 1 then
light_table[2].Color = Color3.new(0, 0, 0)
end
if c == 2 then
light_table[3].Color = Color3.new(1, 1, 1)
elseif c == 1 then
light_table[3].Color = Color3.new(0, 0, 0)
end
end```
** You are now Level 2! **