Posted 30 April 2014 - 12:10 AM
This is kinda just a cool password protection for computercraft computers! :)/>
Pastebin Link: http://pastebin.com/uG1BqCtR
-- To change the password look for "if input == "password" then" and change "password" to what you want the password to be.
os.pullEvent = os.pullEventRaw
term.clear()
term.setCursorPos(1, 1)
term.setTextColor(colors.blue)
term.setBackgroundColor(colors.red)
write("Please enter password: ")
local input = read ("*")
if input == "password" then
term.clear()
term.setCursorPos(1, 1)
print("Logging in, Please wait...")
sleep(3)
term.setCursorPos(1, 1)
term.setTextColor(colors.yellow)
term.setBackgroundColor(colors.black)
term.clear()
print("CraftOS 1.5 -- Password Secured")
else
term.clear()
term.setCursorPos(1, 1)
term.setTextColor(colors.red)
term.setBackgroundColor(colors.blue)
term.clear()
print("FATAL ERROR")
print("")
print("")
print("")
print("")
print("")
print("")
print("Password Wrong")
print("")
print("")
print("Shutting down CraftOS 1.5...")
print("")
print("")
print("")
print("")
print("")
print("")
print("")
sleep(3)
os.shutdown()
end
Pastebin Link: http://pastebin.com/uG1BqCtR