Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- user = "cyborg"
- pass = "cyborgtwins"
- lock = 0
- logicArt = function()
- term.clear()
- paintutils.drawFilledBox(1, 1, 51, 19, colors.yellow)
- paintutils.drawFilledBox(6, 4, 45, 15, colors.white)
- paintutils.drawLine(9, 8, 25, 8, colors.gray)
- paintutils.drawLine(9, 11, 25, 11, colors.gray)
- term.setTextColor(colors.blue)
- term.setBackgroundColor(colors.white)
- term.setCursorPos(27,8)
- print("Username")
- term.setCursorPos(27,11)
- print("Password")
- term.setBackgroundColor(colors.gray)
- term.setCursorPos(17,2)
- term.setTextColor(colors.red)
- print(" Welcome to Login! ")
- end
- logicBad = function()
- lock = lock + 1
- term.setTextColor(colors.red)
- term.setCursorPos(15,13)
- print("You are not me master!")
- sleep(1)
- if lock == 3 then
- logicLockdown();
- else
- run();
- end
- end
- logicUser = function()
- term.setCursorPos(9, 11)
- term.setTextColor(colors.yellow)
- term.setBackgroundColor(colors.gray)
- print(">")
- term.setCursorPos(9, 8)
- write(">")
- redOne = read()
- if redOne == user then
- logicPass();
- else
- logicPass();
- end
- end
- logicPass = function()
- term.setCursorPos(9, 11)
- write(">")
- redTwo = read("*")
- if redTwo == pass then
- logicAcess();
- else
- logicBad();
- end
- end
- logicAcess = function()
- lock = 0
- term.setCursorPos(12, 13)
- term.setTextColor(colors.green)
- print("Welcome", redOne, "to code land!")
- sleep(3)
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- shell.run("shell")
- end
- logicLockdown = function()
- lock = lock - 3
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setTextColor(colors.red)
- term.setCursorPos(1,1)
- for i=1,30 do
- print("BAD")
- sleep(1)
- end
- term.clear()
- run();
- end
- run = function()
- logicArt();
- logicUser();
- end
- run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement