Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variables
- local debug = 3
- local slang = 1.5
- local snorm = 0.7
- local skurz = 0.5
- local passwort = "adm-sup"
- local username = "Admteam"
- local color_white = 1
- local color_orange = 2
- local color_lgreen = 32
- local color_grey = 128
- local color_green = 8192
- local color_red = 16384
- local color_black = 32768
- tries = 3
- os.pullEvent = os.pullEventRaw
- PW_Anzeige1 = function()
- shell.run ("clear")
- term.setTextColor(color_green)
- term.setCursorPos (11, 2) print "------------------------------"
- term.setCursorPos (11, 4) print "------------------------------"
- sleep (skurz)
- term.setTextColor(color_green)
- term.setCursorPos (15, 3) textutils.slowPrint "Administrations Login"
- sleep (snorm)
- term.setBackgroundColor(color_black)
- term.setTextColor(color_green)
- term.setCursorPos (15, 9) print "Username:"
- term.setCursorPos (15,11) print "Passwort:"
- PW_Anzeige2 ()
- end
- PW_Anzeige2 = function()
- term.setBackgroundColor(color_green)
- term.setTextColor(color_black)
- term.setCursorPos (25, 9) print " "
- term.setCursorPos (25,11) print " "
- PW_Abfrage ()
- end
- PW_Abfrage = function()
- sleep (skurz)
- term.setCursorPos (26, 9) user = read()
- term.setCursorPos (26,11) pw = read("*")
- if pw == passwort and user == username then
- sleep (snorm)
- shell.run ("/os/cmd_new")
- else
- tries = tries -1
- if tries >= 1 then
- term.setBackgroundColor(color_black)
- term.setTextColor(color_green)
- term.setCursorPos (15, 8) print "-----------------------"
- term.setCursorPos (14, 9) print "| |"
- term.setCursorPos (14,10) print "| |!| Error |!| |"
- term.setCursorPos (14,11) print "| |"
- term.setCursorPos (15,12) print "-----------------------"
- sleep (skurz)
- if tries > 1 then
- term.setCursorPos (14,3) write "Sie haben noch " write(tries) write " Versuche."
- sleep (slang)
- PW_Anzeige1 ()
- else
- term.setCursorPos (14,3) write "Sie haben noch " write(tries) write " Versuch."
- sleep (slang)
- PW_Anzeige1 ()
- end
- else
- term.setBackgroundColor(color_black)
- term.setTextColor(color_green)
- term.setCursorPos (13, 8) print "--------------------------"
- term.setCursorPos (13, 9) print " "
- term.setCursorPos (13,10) print "|!| Zugriff verweigert |!|"
- term.setCursorPos (13,11) print " "
- term.setCursorPos (13,12) print "--------------------------"
- sleep (slang)
- shell.run ("/os/main_new")
- end
- end
- end
- PW_Anzeige1 ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement