Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local username = "kylian"
- local username2 = "sanne"
- local password = "bacon"
- -- Location
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.gray)
- print("[--Location Unknown--]")
- -- Username settings
- term.setCursorPos(1,2)
- term.setTextColor(colors.blue)
- write("Username: ")
- term.setCursorPos(11,2)
- term.setTextColor(colors.white)
- input = read()
- if input == username then
- term.setCursorPos(1,3)
- elseif input == username2 then
- term.setCursorPos(1,3)
- else
- term.setTextColor(colors.red)
- textutils.slowPrint("Username incorrect")
- sleep(2)
- shell.run("startup")
- end
- -- Password settings
- term.setTextColor(colors.blue)
- write("Password: ")
- term.setCursorPos(11,3)
- term.setTextColor(colors.white)
- input = read("*")
- if input == password then
- term.setCursorPos(19,4)
- term.setTextColor(colors.green)
- textutils.slowPrint("Acces granted")
- rs.setOutput("left", true)
- sleep(5)
- rs.setOutput("left", false)
- os.reboot()
- else
- term.setCursorPos(19,4)
- term.setTextColor(colors.red)
- textutils.slowPrint("Access Denied!")
- sleep(2)
- shell.run("startup")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement