Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --START OF CONFIG
- YourLogin = "user" --This is your login
- YourPassword = "pass" --This is your password
- --END OF CONFIG
- back = paintutils.loadImage("Windows7/wallpaper.nfp")
- paintutils.drawImage(back, 1, 1)
- window = paintutils.loadImage("Windows7/logon-window.nfp")
- paintutils.drawImage(window, 2, 2)
- while true do
- term.setTextColour(colours.black)
- term.setBackgroundColour(colours.lightBlue)
- term.setCursorPos(2, 2)
- print("Login to SosOS")
- term.setCursorPos(14, 8)
- term.setBackgroundColour(colours.red)
- term.setTextColour(colours.white)
- print(":CANCEL")
- term.setCursorPos(21, 8)
- term.setBackgroundColour(colours.green)
- print(":OK")
- term.setBackgroundColour(colours.white)
- term.setTextColour(colours.black)
- term.setCursorPos(3, 4)
- print("Login: ")
- term.setCursorPos(10, 4)
- loginRead = read()
- term.setCursorPos(3, 5)
- print("Password: ")
- term.setCursorPos(13, 5)
- passRead = read()
- event, button, xPos, yPos = os.pullEvent("mouse_click")
- if xPos == 21 and yPos == 8 then
- if loginRead == YourLogin and passRead == YourPassword then
- shell.run("windows-welcome")
- else
- term.setCursorPos(3, 6)
- print("Bad login. Try again.")
- sleep(6)
- shell.run("windows-logon")
- end
- elseif xPos == 14 and yPos == 8 then
- shell.run("clear")
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement