Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hMonitor = peripheral.wrap("back")
- -- Monitor is on the back of the computer
- term.redirect(hMonitor) --redirect console output to monitor
- while true do
- event = os.pullEvent()
- --if an redstone event is pulled and the input from
- --the pressure plate (left) is TRUE, increase count
- if event == "redstone" and rs.getInput("bottom") then
- term.clear()
- term.setCursorPos(1,1)
- write("Decontamination in progress.")
- rs.setOutput("top",true)
- sleep("0.5")
- rs.setOutput("top",false)
- sleep("0.5")
- write("3")
- rs.setOutput("top",true)
- sleep("0.5")
- rs.setOutput("top",false)
- sleep("0.5")
- write("2")
- rs.setOutput("top",true)
- sleep("0.5")
- rs.setOutput("top",false)
- sleep("0.5")
- write("1")
- rs.setOutput("top",true)
- sleep("0.5")
- rs.setOutput("top",false)
- sleep("0.5")
- write("Decontamination completed.")
- rs.setOutput("right",true)
- sleep("2")
- rs.setOutput("right",false)
- end
- --this doesn't get called because there is no abort
- --condition, but term.restore() will reset the console
- --output to the computer screen itself
- term.clear()
- term.restore()
Add Comment
Please, Sign In to add comment