Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local users={"orloc","vsandrew"}
- local side = "right"
- local opentime = 4
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Username: ")
- local name = read()
- for i=0, 1 do
- if users[i] ~= name then
- write("Username not in our records! Forcing Logout")
- sleep(2)
- os.reboot()
- end
- end
- if name == "orloc" then
- local password = "jak3"
- elseif name =="vsandrew" then
- local password ="password")
- end
- write("Password: ")
- local input = read("*")
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- print("Password correct!")
- rs.setOutput(side,true)
- sleep(opentime)
- rs.setOutput(side,false)
- else
- print("Password incorrect!")
- sleep(2)
- end
- end
Add Comment
Please, Sign In to add comment