Infinite loop lua

This article is tagged with: Infinite loop lua and lua

infinite loop lua

function wait(seconds) -- We need to create a wait function to slow down the loop.
local start = os.time() -- The loop will run so fast, that we need to lose it down. Otherwise, it'll crash.
repeat until os.time() > start + seconds
end
while true do -- Create the infinite loop
print("Hello World")

wait(1) -- The number you place here, is how many seconds it will wait until looping again.
-- Decimals will work also. simply type 0.1 for 0.1 miliseconds.
end

This article is tagged with: Infinite loop lua and lua