function os.pullEvent()
local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
if event == "terminate" then
os.reboot()
end
return event, p1, p2, p3, p4, p5
end
local function clearScreen()
term.clear()
term.setCursorPos(1,1)
end
clearScreen()
print("ChopTerminal 1.0")
print("Door Lock System")
print("----------------")
sleep(1)
local user1 = "<NAME>"
local user2 = "<NAME2>"
local pass1 = "<PASSWORD1>"
local pass2 = "<PASSWORD2>"
local override = "<OVERRIDE CODE>"
local input = " "
write("Please enter your name: ")
input = read("*")
if input == user1 then
sleep(1)
print("Welcome, Choppie!")
write("Please enter your password: ")
input2 = read("*")
if input2 == pass1 then
print("Access Granted!")
rs.setOutput("left",true)
sleep(2)
rs.setOutput("left",false)
os.reboot()
else
print("Wrong Password!")
sleep(1)
os.reboot()
end
elseif input == user2 then
sleep(1)
print("Welcome, Guy!")
write("Please enter your password: ")
input3 = read("*")
if input3 == pass2 then
print("Access Granted!")
rs.setOutput("left",true)
sleep(2)
rs.setOutput("left",false)
os.reboot()
else
print("Wrong Password!")
sleep(1)
os.reboot()
end
else
print("Wrong User!")
sleep(1)
os.shutdown()
end