zequan

Untitled

Jun 18th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. -- IF YOU USE THIS FOR MY TUTORIAL SAVE THE FILE AS "door" WITHOUT EXTENSION
  2. -- DON'T TOUCH THE CODE IF YOU DON'T UNDERSTAND IT!
  3. -- IF YOU USE MY CODE AND RELEASE IT ATLREAST GIVE ME SOME CREDIT ^^
  4.  
  5. term.clear()
  6. term.setCursorPos(5,1)
  7. print "[Door Terminal]"
  8. term.setCursorPos(2,2)
  9. print "Please select an option"
  10. term.setCursorPos(2,3)
  11. print "[1] Open Door"
  12. term.setCursorPos(2,4)
  13. print "[2] Close Door"
  14. term.setCursorPos(2,5)
  15. print "[3] Lock system"
  16. term.setCursorPos(2,6)
  17. print "[4] Shutdown system"
  18. term.setCursorPos(2,8)
  19. write "Option: "
  20. input = read()
  21.  
  22. if input == '1' then
  23. redstone.setOutput("back", false)
  24. term.clear()
  25. shell.run("door")
  26. elseif input == '2' then
  27. redstone.setOutput("back", true)
  28. term.clear()
  29. shell.run("door")
  30. elseif input == '3' then
  31. term.setCursorPos(2,11)
  32. print "Locking the system"
  33. sleep(1)
  34. shell.run("startup")
  35. elseif input == '4' then
  36. term.setCursorPos(2,11)
  37. print "System shutdown detected"
  38. sleep(0.5)
  39. term.setCursorPos(2,12)
  40. print "[Closing/Locking door]"
  41. sleep(1)
  42. os.shutdown()
  43. end
  44. term.clear()
  45. shell.run("door")
Advertisement
Add Comment
Please, Sign In to add comment