Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local exitTime = 22 -- change to whatever you want
- local timer = os.startTimer(exitTime) -- starts the timer
- local cp = 0
- local cm = 0
- 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)
- cp = cp +1
- textutils.slowPrint ("Send redstonsignal! "..cp)
- end
- elseif evt == "redstone" then
- timer = os.startTimer(exitTime) -- restarts the timer
- redstone.setOutput("top",false)
- cm = cm +0,5
- textutils.slowPrint ("Dont send redstonsignal! "..cm)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement