carrots084

Untitled

Jul 28th, 2014
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. while true do -- start infinite loop
  2. shell.run("clear")
  3. print (" Panic Room Door control 0.2v")
  4. print (" ----------------------------")
  5. print (" [1] Open Door ")
  6. print (" [2] Close Door ")
  7. print (" [3] Exit ")
  8. print (" [4] Shutdown Computer ")
  9. input = read()
  10. yes = "1"
  11. no = "2"
  12. yo = "3"
  13. la = "4"
  14. if input == yes then
  15. redstone.setOutput ("back", false)
  16. redstone.setOutput ("down", false)
  17. shell.run("startup") break -- break loop before continuing
  18. end
  19. if input == no then redstone.setOutput ("back", true)
  20. redstone.setOutput ("down", true)
  21. shell.run("startup")
  22. break -- break the loop before proceeding
  23. end
  24. if input == yo then
  25. sleep(0)
  26. end-- to avoid an error
  27. if input == la then
  28. sleep(1)
  29. os.shutdown()
  30. end
  31. end -- end the loop
Advertisement
Add Comment
Please, Sign In to add comment