Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullEvent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- local pass, admin, root = "ineptmad", "madinept", "rootim"
- textutils.slowPrint ("Loading...")
- textutils.slowPrint ("Done Loading!")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- textutils.slowPrint ("Welcome to SecurityDoorWatch")
- textutils.slowPrint ("v0.5")
- sleep(0.5)
- term.clear()
- print ("Door Lock v0.5")
- print ("Coded by Madster")
- write "Passcode: "
- input = read("*")
- if input == pass then
- print ("Access Granted for 5 Seconds, better hurry!")
- redstone.setOutput ("left", true )
- sleep(5)
- os.shutdown()
- elseif input == admin then
- print ("Door will remain open, remember to close!")
- redstone.setOutput ("left", true )
- write "Passcode: "
- input2 = read("*")
- if input2 == admin then
- redstone.setOutput ("left", false )
- os.shutdown()
- else
- textutils.slowPrint ("Incorrect Admin passcode, force-closing door!")
- sleep( 3 )
- os.shutdown()
- end
- elseif input == root then
- textutils.slowPrint ("Welcome, you may now edit the programs/files on this computer!")
- term.clear()
- os.pullEvent = pullEvent
- print ("Root permissions enabled")
- return
- else
- print ("Uhhm... Wrong password..")
- sleep(2)
- os.shutdown()
- end
Advertisement
Add Comment
Please, Sign In to add comment