Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do -- start infinite loop
- shell.run("clear")
- print (" Panic Room Door control 0.2v")
- print (" ----------------------------")
- print (" [1] Open Door ")
- print (" [2] Close Door ")
- print (" [3] Exit ")
- print (" [4] Shutdown Computer ")
- input = read()
- yes = "1"
- no = "2"
- yo = "3"
- la = "4"
- if input == yes then
- redstone.setOutput ("back", false)
- redstone.setOutput ("down", false)
- shell.run("startup") break -- break loop before continuing
- end
- if input == no then redstone.setOutput ("back", true)
- redstone.setOutput ("down", true)
- shell.run("startup")
- break -- break the loop before proceeding
- end
- if input == yo then
- sleep(0)
- end-- to avoid an error
- if input == la then
- sleep(1)
- os.shutdown()
- end
- end -- end the loop
Advertisement
Add Comment
Please, Sign In to add comment