SHOW:
|
|
- or go back to the newest paste.
| 1 | local exitTime = 20 -- change to whatever you want | |
| 2 | local timer = os.startTimer(exitTime) -- starts the timer | |
| 3 | while true do | |
| 4 | local evt, arg = os.pullEvent() -- wait for an event | |
| 5 | if evt == "timer" then | |
| 6 | if arg == timer then -- check if it's the correct timer | |
| 7 | - | redstone.setOutput("top",1)
|
| 7 | + | redstone.setOutput("top",true)
|
| 8 | end | |
| 9 | elseif evt == "redstone" then | |
| 10 | timer = os.startTimer(exitTime) -- restarts the timer | |
| 11 | - | redstone.setOutput("top",0)
|
| 11 | + | redstone.setOutput("top",false)
|
| 12 | end | |
| 13 | end |