Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Title: BlueLock
- --Version: 1.1
- --Author: BlueZero (AKA Stevenmcl)
- --Platform: ComputerCraft LUA Environment
- ospullEvent = os.pullEventRaw
- protectmode = true
- opentime = 5
- maxtries = 3
- tries = 0
- pass = "Temp"
- function bluelock()
- password()
- if user == pass then
- correct()
- end
- if user == "credits" then
- print ("BlueLock v1.1")
- print ("This lock was created by BlueZero (AKA Stevenmcl)")
- sleep(2)
- bluelock()
- end
- if not (user == pass) or (user == "credits") then
- if tries == maxtries -1 then
- if protectmode then
- protect()
- else
- print ("Too many incorrect passwords.")
- print ("Shutting the computer down.")
- sleep(2)
- os.shutdown()
- end
- else
- print ("Wrong password.")
- tries = tries+1
- print ("Tries left; ", maxtries - tries)
- sleep(1)
- bluelock()
- end
- end
- end
- function correct()
- shell.run("clear")
- print("Password Accepted.")
- sleep(1)
- shell.run("clear")
- shell.run("shell")
- end
- function protect()
- sleep(1)
- os.shutdown()
- end
- function password()
- shell.run("clear")
- print ("BlueLock 1.1 running on computer ", os.getComputerID())
- print ("CraftOS Version: ", os.version())
- print ("To view credits, type 'credits'.")
- print ("")
- write ("Password: ")
- user=io.read()
- end
- function splash()
- shell.run("clear")
- print("")
- print("")
- print("")
- print("")
- print([[ __________ .__ ]])
- print([[ \______ \| | __ __ ____ ]])
- print([[ | | _/| | | | \_/ __ \ ]])
- print([[ | | \| |__| | /\ ___/ ]])
- print([[ |______ /|____/|____/ \___ >]])
- print([[ .____ \/ __ \/ ]])
- print([[ | | ____ ____ | | __]])
- print([[ | | / _ \ _/ ___\ | |/ /]])
- print([[ | |___( <_> )\ \___ | < ]])
- print([[ |_______ \\____/ \___ >|__|_ \]])
- print([[ \/ \/ \/]])
- sleep(2)
- shell.run("clear")
- bluelock()
- end
- splash()
Advertisement
Add Comment
Please, Sign In to add comment