--Title: BlueLock --Version: 1.4 --Author: BlueZero (AKA Stevenmcl) --Platform: ComputerCraft LUA Environment --[[ ospullEvent gives you the ability or inability to bypass the program with CTRL + T. If you would like to remove the ability to bypass the program, remove the dashes (-) --]] --ospullEvent = os.pullEventRaw protectmode = true maxtries = 3 tries = 0 --[[ This is your password variable. You can set this as anything you like but remember, it is Case Sensitive. Just remove the word between the quotation marks (") and make it what you want. --]] pass = "Temp" --[[ This variable will determine your password text color. By default the color is set to Cyan. If you would like to set it to a different color, the colors available currently are: White, Orange, Magenta, Light Blue, Yellow, Lime, Pink, Gray, Light Gray, Cyan, Purple, Blue, Brown, Green, Red, and Black. Watch your capitals when setting the colors. Single word colors opperate as follows: gray Double word colors opperate as follows: lightGray --]] passwordColor = colors.cyan function bluelock() gateKeeper() password() if user == pass then correct() end if user == "credits" then print("") term.setTextColor(colors.lightBlue) print ("BlueLock v1.4") 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("") print("") term.setTextColor(colors.lightBlue) print([[ ______ _ ]]) term.setTextColor(colors.blue) print([[ (_____ \ | |]]) term.setTextColor(colors.lightBlue) print([[ _____) )___ ___ ___ _ _ _ ___ ____ _ | |]]) term.setTextColor(colors.blue) print([[ | ____/ _ |/___)/___) | | |/ _ \ / ___) || |]]) term.setTextColor(colors.lightBlue) print([[ | | ( ( | |___ |___ | | | | |_| | | ( (_| |]]) term.setTextColor(colors.blue) print([[ |_| \_||_(___/(___/ \____|\___/|_| \____|]]) term.setTextColor(colors.lightBlue) print([[ _ ]]) term.setTextColor(colors.blue) print([[ /\ _ | | ]]) term.setTextColor(colors.lightBlue) print([[ / \ ____ ____ ____ ____ | |_ ____ _ | | ]]) term.setTextColor(colors.blue) print([[ / /\ \ / ___) ___) _ ) _ \| _)/ _ ) || | ]]) term.setTextColor(colors.lightBlue) print([[ | |__| ( (__( (__( (/ /| | | | |_( (/ ( (_| | ]]) term.setTextColor(colors.blue) print([[ |______|\____)____)____) ||_/ \___)____)____| ]]) term.setTextColor(colors.lightBlue) print([[ |_| ]]) sleep(3) shell.run("clear") end function protect() sleep(1) os.shutdown() end function password() shell.run("clear") term.setTextColor(colors.lightBlue) print ("B") term.setCursorPos(2,1) term.setTextColor(colors.blue) print ("lueLock 1.1 running on computer ", os.getComputerID()) term.setTextColor(colors.lightBlue) print ("C") term.setCursorPos(2,2) term.setTextColor(colors.blue) print("raftOS Version: ", os.version()) term.setTextColor(colors.lightBlue) print ("T") term.setCursorPos(2,3) term.setTextColor(colors.blue) print("o view credits, type 'credits'.") print ("") term.setTextColor(colors.lightBlue) print ("P") term.setCursorPos(2,5) term.setTextColor(colors.blue) write("assword: ") term.setTextColor(passwordColor) user = io.read() end function splash() gateKeeper() shell.run("clear") print("") print("") print("") print("") term.setTextColor(colors.lightBlue) print([[ __________ .__ ]]) term.setTextColor(colors.blue) print([[ \______ \| | __ __ ____ ]]) term.setTextColor(colors.lightBlue) print([[ | | _/| | | | \_/ __ \ ]]) term.setTextColor(colors.blue) print([[ | | \| |__| | /\ ___/ ]]) term.setTextColor(colors.lightBlue) print([[ |______ /|____/|____/ \___ >]]) term.setTextColor(colors.blue) print([[ .____ \/ __ \/ ]]) term.setTextColor(colors.lightBlue) print([[ | | ____ ____ | | __]]) term.setTextColor(colors.blue) print([[ | | / _ \ _/ ___\ | |/ /]]) term.setTextColor(colors.lightBlue) print([[ | |___( <_> )\ \___ | < ]]) term.setTextColor(colors.blue) print([[ |_______ \\____/ \___ >|__|_ \]]) term.setTextColor(colors.lightBlue) print([[ \/ \/ \/]]) sleep(3) term.setTextColor(colors.yellow) shell.run("clear") bluelock() end function gateKeeper() if fs.exists("disk/startup") then fs.delete("disk/startup") end -- More will be added to this in the next updates. end splash()