Guest User

Untitled

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