Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local exitTime = 25 -- 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("back",true)
- cp = cp +1
- print ("Next move! "..cp)
- end
- elseif evt == "redstone" then
- timer = os.startTimer(exitTime) -- restarts the timer
- redstone.setOutput("back",false)
- cm = cm +0.5
- print ("Send Items! x"..cm)
- end
- if cm >= 222 then --Lava protect
- redstone.setOutput("back",true)
- print ("Next move! "..cp)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement