Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Title: TangentLock
- --Version: Ver. 4
- --Last Revised: 1/6/2012
- --Last Revised By: TangentDelta (alias Hydrogen)
- --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!
- right = "password"
- debug = "debug"
- outputface = "right"
- protectmode = true
- protectside = "left"
- opentime = 5
- maxtries = 3
- tries = 0
- hint = "for debugging purposes"
- function TangentLock()
- password()
- if user == debug then
- print "Leaving TangentLock. Entering CraftOS"
- shell.run"shell"
- end
- if user == right then
- print "Password Correct"
- correct()
- end
- if user == "credits" then
- print "TangentLock Version 4.0"
- print "A program by TangentDelta (Alias Hydrogen)"
- print "Please don't edit/remove this text right here."
- print "This is my signature on my artwork."
- sleep(10)
- TangentLock()
- end
- if user == "hint" then
- print (hint)
- sleep(5)
- end
- if not(user == right) or (user == debug) or (user == "credits") or (user == "hint") then
- if tries == maxtries -1 then
- if protectmode then
- protect()
- else
- print "Too Many Wrong Tries"
- print "Shutting Down Now"
- sleep (3)
- os.shutdown()
- end
- else
- print "Incorrect Password."
- tries = tries+1
- print ("Tries Left: ", maxtries - tries)
- sleep(5)
- TangentLock()
- end
- end
- end
- function correct()
- sleep(1)
- shell.run("clear")
- rs.setOutput(outputface, true)
- sleep(opentime)
- rs.setOutput(outputface, false)
- os.shutdown()
- end
- function protect()
- rs.setOutput(protectside, true)
- sleep(1)
- rs.setOutput(protectside, false)
- os.shutdown()
- end
- function password()
- shell.run("clear")
- print ("TangentLock 4.0 Running On Computer ", os.getComputerID())
- print "To view copyright and credits, type ' credits'"
- write "Password: "
- user=io.read()
- end
- TangentLock()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement