Madster

DoorLock

Feb 16th, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. local pullEvent = os.pullEvent
  2. os.pullEvent = os.pullEventRaw
  3.  
  4. pass = "ineptmad"
  5. admin = "madinept"
  6. root = "rootim"
  7.  
  8. textutils.slowPrint ("Loading...")
  9. textutils.slowPrint ("Done Loading!")
  10. sleep(1)
  11. term.clear()
  12. term.setCursorPos(1,1)
  13.  
  14. textutils.slowPrint ("Welcome to SecurityDoorWatch")
  15. textutils.slowPrint ("v0.4")
  16. sleep(0.5)
  17. term.clear()
  18.  
  19. print ("Door Lock v0.4")
  20. print ("Coded by Madster")
  21. write "Passcode: "
  22. input = read("*")
  23. if input == pass then
  24. print ("Access Granted for 5 Seconds, better hurry!")
  25. redstone.setOutput ("left", true )
  26. sleep(5)
  27. os.shutdown()
  28. end
  29. if input == admin then
  30. print ("Door will remain open, remember to close!")
  31. redstone.setOutput ("left", true )
  32. write "Passcode: "
  33. input2 = read("*")
  34. if input2 == admin then
  35. redstone.setOutput ("left", false )
  36. os.shutdown()
  37. else
  38. textutils.slowPrint ("Incorrect Admin passcode, force-closing door!")
  39. sleep( 3 )
  40. os.shutdown()
  41. end
  42. if input == root then
  43. --textutils.slowPrint ("Welcome, you may now edit the programs/files on this computer!")
  44. --term.clear()
  45. -- os.pullEvent = pullEvent
  46. -- print ("Root permissions enabled")
  47. return
  48. end
  49. else
  50. print ("Uhhm... Wrong password..")
  51. sleep(2)
  52. os.shutdown()
  53. end
Advertisement
Add Comment
Please, Sign In to add comment