Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loop = 1
- try = 0
- while loop == 1 do
- term.setBackgroundColor(colors.lightBlue)
- paintutils.drawFilledBox(1,1,51,19)
- term.setTextColor(colors.white)
- term.setCursorPos(15,9)
- write("Username: ")
- term.setBackgroundColor(colors.cyan)
- write(" ")
- term.setBackgroundColor(colors.lightBlue)
- term.setCursorPos(15,11)
- write("Password: ")
- term.setBackgroundColor(colors.cyan)
- write(" ")
- if try > 0 then
- term.setCursorPos(15,17)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.red)
- write("Wrong username or password.")
- term.setCursorPos(20,19)
- write(3-try .."tries left")
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.cyan)
- end
- term.setCursorPos(25,9)
- name = read()
- term.setCursorPos(25,11)
- pass = read("*")
- if name == "Lotuska" and pass == "123457" then
- loop = 0
- term.setBackgroundColor(colors.black)
- shell.run("desktop.lua")
- else
- try = try+1
- if try == 3 then
- time = 3600
- while time > 0 do
- time2 = time/60
- time2 = math.floor(time2 + 0.5)
- term.setCursorPos(18,10)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.red)
- write("Locked for more " ..time2.. " minutes.")
- time = time-1
- sleep(1)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement