Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Title: TangentLock
- --Version: Ver. 3
- --Last Revised: 12/26/2011
- --Last Revised By: Streetstar5 / FuzzyPurp187
- --Author: TangentDelta (alias Hydrogen)
- --Platform: ComputerCraft LUA Virtual Machine
- --Notes: Please don't claim this as your own, give me credit if you use this!
- code = "minecraft" --the password to "unlock" it
- debug = "debug" --password to enter the terminal
- output = "left" --the side that will send out the "unlock" signal
- tries = 5 --how many times you can guess before it ends your session
- pulsout = 5 --how long you want the redstone to be on for. I think it's in seconds.
- hax = true --set to true if you want it to send out a redstone signal if password is wrong
- haxout = "right" --side that you want the "incorrect password" signal to be on
- print "Norton Security System Initialized"
- write "Password: "
- for triescnt = 1,tries,1 do
- password = read()
- if password == debug then
- print "Debug Mode Activated"
- break
- end
- if password == (code) then
- print "Access Granted!"
- redstone.setOutput(output, true)
- sleep(pulsout)
- redstone.setOutput(output, false)
- os.shutdown()
- else
- if hax then
- print "Acces Denied! \nLaunching Anti-Grief Security.."
- print "Stand still.. This won't hurt : )"
- redstone.setOutput(haxout, true)
- sleep(pulsout)
- redstone.setOutput(haxout, false)
- os.shutdown()
- else
- print ("Access Denied. Attempts left: ",tries-triescnt)
- write "Password: "
- end
- end
- if triescnt == tries then
- print "Maximum Attempts Reached. \nJust who the fuck are you?"
- sleep(2)
- print "System is shutting down.."
- sleep(1)
- os.shutdown()
- else
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement