21 lines
373 B
Lua
21 lines
373 B
Lua
sfx = require("sfx")
|
|
return
|
|
parallel.waitForAll(
|
|
function()
|
|
while true do
|
|
sleep(math.random(10, 100))
|
|
if math.random(10) > 5 then
|
|
sfx.fail()
|
|
else
|
|
sfx.success()
|
|
end
|
|
event = { os.pullEventRaw() }
|
|
if event[1] == "terminate" then
|
|
shell.exit()
|
|
os.shutdown()
|
|
end
|
|
end
|
|
end, function()
|
|
term.setCursorPos(1, 1)
|
|
shell.run("shell")
|
|
end)
|