
startup
By: a guest on
Aug 1st, 2012 | syntax:
Lua | size: 0.91 KB | hits: 10 | expires: Never
os.pullEvent = os.pullEventRaw
function printloginS()
local w, h = term.getSize()
term.clear()
term.setCursorPos(1,17)
print("==================================================")
term.setCursorPos(1,18)
print("DSC Password Program v2 Copyright 2012")
end
local password = "lolcat"
local opentime = 2
local side = "back"
local crash = "divine"
term.clear()
printloginS()
term.setCursorPos(4,4)
print("Avengera's Room")
term.setCursorPos(4,6)
print("Password: ")
term.setCursorPos(4,7)
local input = read("*")
if input == crash then
term.clear()
term.setCursorPos(1,1)
return
end
if input == password then
term.clear()
printloginS()
rs.setOutput(side,true)
term.setCursorPos(4,4)
print("Password Correct!")
sleep(opentime)
rs.setOutput(side,false)
os.reboot()
else
term.clear()
printloginS()
term.setCursorPos(4,4)
print("Password Incorrect!")
sleep(2)
os.reboot()
end