STATEDLIGHT

defencegrid

Nov 29th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(16, 1)
  3.  
  4. while true do
  5. term.setCursorPos(1, 3)
  6. term.clearLine()
  7. write "Lab Defence System 1.0"
  8. term.setCursorPos(1, 4)
  9. write "1.Power up defence grid"
  10. term.setCursorPos(1, 5)
  11. write "2.Power down defence grid"
  12. term.setCursorPos(1, 7)
  13. local input = string.lower( read() )
  14.  
  15. if input == "1" then
  16. term.setCursorPos(1, 8)
  17. print("Re-enter Password:")
  18. term.setCursorPos(10, 9)
  19. input = read("*")
  20.  
  21. if input == "jebend" then
  22. rs.setOutput("bottom", false)
  23. print ("Defence grid online")
  24. sleep(6)
  25. term.clear()
  26. end
  27.  
  28. if input == "2" then
  29. if input == "1" then
  30. term.setCursorPos(1, 8)
  31. print("Re-enter Password:")
  32. term.setCursorPos(10, 9)
  33. input = read("*")
  34.  
  35. if input == "jebend" then
  36. term.clear()
  37. rs.setOutput("bottom", true)
  38. print ("Defence grid offline")
  39. sleep(6)
  40. term.clear()
  41. end
  42.  
  43. if input == "exit" then
  44. break
  45. end
  46. sleep(20)
  47. term.clear()
  48. shell.run('startup')
  49. end
Advertisement
Add Comment
Please, Sign In to add comment