Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local exitTime = 20 -- change to whatever you want
- local timer = os.startTimer(exitTime) -- starts the timer
- while true do
- local evt, arg = os.pullEvent() -- wait for an event
- if evt == "timer" then
- if arg == timer then -- check if it's the correct timer
- redstone.setOutput("top",true)
- end
- elseif evt == "redstone" then
- timer = os.startTimer(exitTime) -- restarts the timer
- redstone.setOutput("top",false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement