Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sleepTime = 0.1
- timeLeft = 3
- gateTime = 3
- while true do
- --shell.run("clear")
- if rs.getInput("bottom") or rs.getInput("back") then
- timeLeft = gateTime
- end
- while timeLeft > 0 do
- print(timeLeft)
- if rs.getInput("bottom") or rs.getInput("back") then
- timeLeft = gateTime
- print("redstone ON")
- rs.setOutput("top", true)
- else
- print("redstone OFF")
- end
- sleep(sleepTime)
- timeLeft = timeLeft - sleepTime
- end
- rs.setOutput("top", false)
- os.pullEvent("redstone")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement