spenk

Untitled

May 22nd, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.pullEvent = os.pullEventRaw
  2. local password = "pwd"
  3. local debug = "pwd"
  4.  
  5. print("Enter password")
  6. local pass = read("*")
  7.  
  8. function openDoor()
  9. for i = 0, 3, 1 do
  10. rs.setBundledOutput("side",colors.green)
  11. sleep(0.5)
  12. rs.setBundledOutput("side",0)
  13. sleep(0.5)
  14. end--green
  15. end
  16.  
  17. function closeDoor()
  18. for i = 0, 3, 1 do
  19. rs.setBundledOutput("side", colors.lightBlue)
  20. sleep(0.5)
  21. rs.setBundledOutput("side", 0)
  22. sleep(0.5)
  23. end--lightblue
  24. end
  25.  
  26. if password == pass then
  27. print("welcome")
  28. print(":D")
  29. openDoor()
  30. sleep(10)
  31. closeDoor()
  32. end
  33.  
  34. if debug == pass then
  35. print("Debug Mode!")
  36. end
  37.  
  38. if debug ~= pass and password ~= pass then
  39. print("Wrong password, try again in 5 seconds")
  40. sleep(5)
  41. os.reboot()
  42. end
Advertisement
Add Comment
Please, Sign In to add comment