Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function login()
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.lightBlue)
- print("***CES-Login***")
- term.setTextColor(colors.gray)
- print("---------------")
- print("Username:")
- write("Password:")
- term.setCursorPos(11,3)
- username = read()
- term.setCursorPos(11,4)
- password = read("*")
- if username == "Cripe" and password == "12" then
- term.clear()
- logo = paintutils.loadImage("ces_menu_logo")
- paintutils.drawImage(logo,1,1)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.lightGray)
- term.setCursorPos(21, 13)
- write("neustarten")
- term.setCursorPos(38,13)
- write("abmelden")
- while true do
- event, mouse, x, y = os.pullEvent("mouse_click")
- if y >= 8 and y <= 12 then
- if x >= 37 and x <= 46 then
- login()
- elseif x >= 21 and x <= 31 then
- os.reboot()
- end
- end
- end
- else
- term.setCursorPos(1,6)
- print("-Falsches Eingabe")
- sleep(1.5)
- term.clear()
- login()
- end
- end
- login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement