Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Hackproof Door
- -- Written by Cacher97, using basic "lock" code and modified to suit needs
- -- Posted to 'The Tekkit Wiki' on 15/11/2012
- oldPullEvent = os.pullEvent
- os.pullEvent =os.pullEventRaw
- local password = {"cacher97", "cacher"}
- local consolePassword = "admin"
- term.clear()
- term.setCursorPos(1,1)
- write("Password: ")
- local input = read("*")
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- print("Door Open")
- rs.setOutput("bottom",true)
- sleep(2)
- rs.setOutput("bottom",false)
- os.reboot()
- else
- if input == consolePassword then
- term.clear()
- term.setCursorPos(1,1)
- print("Console Access Granted")
- else
- term.clear()
- term.setCursorPos(1,1)
- print("Incorrect Password")
- sleep(2)
- term.clear()
- term.setCursorPos(1,1)
- textutils.slowPrint("Terminal Locking Down in 3...2...1...")
- sleep(.5)
- os.reboot()
- end
- end
- os.pullEvent = oldPullEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement