xxangel17xx

doorlock

Nov 1st, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.57 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. term.clear()
  3. term.setCursorPos(1,1)
  4.  
  5. local side = "bottom"--change bottom to the bundeledwire output
  6. local pass1 = "opendoor1"--Change to door 1's password
  7. local pass2 = "opendoor2"--Change to door 2's password
  8. local pass3 = "opendoor3"--Change to door 3's password
  9. local pass4 = "opendoor4"--Change to door 4's password
  10. local pass5 = "opendoor5"--Change to door 5's password
  11. local pass6 = "opendoor6"--Change to door 6's password
  12. local pass7 = "opendoor7"--Change to door 7's password
  13. local pass8 = "opendoor8"--Change to door 8's password
  14. local pass9 = "opendoor9"--Change to door 9's password
  15. local passwordadmin = "passadmin"--change to admins password
  16.  
  17. print("Welcome to Evolution-Labs")
  18. print("Please Enter a Door password")
  19. print("=[roomname]=[roomname]=[roomname]=")--Change [roomname] to the name of your room's
  20. print("=[roomname]=[roomname]=[roomname]=")--Change [roomname] to the name of your room's
  21. print("=[roomname]=[roomname]=[roomname]=")--Change [roomname] to the name of your room's
  22. write("Password: ")
  23.  
  24. local input = read("*")
  25.  
  26. if input == pass1 then
  27. rs.setBundledOutput(side, colors.red)--change red to your wire color
  28. sleep(7)
  29. shell.run ("reboot")
  30. end
  31. if input == pass2 then
  32. rs.setBundledOutput(side, colors.green)--change green to your wire color
  33. sleep(7)
  34. shell.run ("reboot")
  35. end
  36. if input == pass3 then
  37. rs.setBundledOutput(side, colors.blue)--change blue to your wire color
  38. sleep(7)
  39. shell.run ("reboot")
  40. end
  41. if input == pass4 then
  42. rs.setBundledOutput(side, colors.yellow)--change yellow to your wire color
  43. sleep(7)
  44. shell.run ("reboot")
  45. end
  46. if input == pass5 then
  47. rs.setBundledOutput(side, colors.lime)--change lime to your wire color
  48. sleep(7)
  49. shell.run ("reboot")
  50. end
  51. if input == pass6 then
  52. rs.setBundledOutput(side, colors.white)--change white to your wire color
  53. sleep(7)
  54. shell.run ("reboot")
  55. end
  56. if input == pass7 then
  57. rs.setBundledOutput(side, colors.pink)--change pink to your wire color
  58. sleep(7)
  59. shell.run ("reboot")
  60. end
  61. if input == pass8 then
  62. rs.setBundledOutput(side, colors.black)--change black to your wire color
  63. sleep(7)
  64. shell.run ("reboot")
  65. end
  66. if input == pass9 then
  67. rs.setBundledOutput(side, colors.brown)--change brown to your wire color
  68. sleep(7)
  69. shell.run ("reboot")
  70. end
  71. if input == passwordadmin then
  72.  term.clear()
  73.  term.setCursorPos(1,1)
  74.  print("Password correct!")
  75.  print("Computer unlocking...")
  76.  print("Please type 'reboot' or 'shutdown' before leaving")
  77.  os.pullEvent(terminate)
  78.  
  79. else
  80.  term.clear()
  81.  term.setCursorPos(1,1)
  82.  print("Goodbye!")
  83.  sleep(2)
  84.  os.reboot()
  85.  end
Advertisement
Add Comment
Please, Sign In to add comment