Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --BauJob by Muzze77--
- rednet.open("back")
- function cut()
- sleep(0.5)
- shell.run("clear")
- sleep(0.5)
- end
- function beenden()
- shell.run("delete " .. a)
- print("Account geloescht!")
- sleep(2)
- cut()
- start()
- end
- function load()
- shell.run("clear")
- print(" Bitte Usernamen eingeben: ")
- user = (read())
- dem = fs.exists(user)
- if dem == true then
- rfile = fs.open(user, "r")
- a = rfile.readLine(1)
- b = rfile.readLine(2)
- c = rfile.readLine(3)
- d = rfile.readLine(4)
- rfile.close()
- if user == a then
- print(" Bitte Password eingeben")
- pass = (read("*"))
- if pass == b then
- print(" Password Akzeptiert")
- cut()
- print(" Den Job wirklich beenden oder Password wechseln? ")
- print(" [J] Ja | [N] Nein | [P]Password")
- local evt, key2 = os.pullEvent("char")
- if key2 == "j" then
- beenden()
- elseif key2 == "n" then
- shell.run("reboot")
- elseif key2 == "p" then
- cut()
- print(" Neues Password eingeben:")
- nPass = (read("*"))
- wfile = fs.open(a, "w")
- wfile.writeLine(a)
- wfile.writeLine(nPass)
- wfile.writeLine(c)
- wfile.writeLine(d)
- wfile.close()
- print("Password gewechselt")
- sleep(2)
- start()
- end
- else
- print(" Falsches Passwort")
- sleep(2)
- end
- else
- print(" Falscher Username")
- sleep(2)
- end
- elseif dem == false then
- print(" Der Account " .. user .. " exsistiert nicht")
- sleep(2)
- end
- end
- function send()
- shell.run("clear")
- print("Welcher User soll gesendet werden?")
- sending = io.read()
- if fs.exists(sending) == false then
- print("User existiert nicht")
- else
- rednet.broadcast(sending)
- print("Wurde gesendet")
- sleep(1)
- test()
- end
- end
- function new()
- cut()
- print(" Namen Eingeben :")
- Name = read()
- if fs.exists(Name) then
- print(" Account existiert bereits")
- print(" Bitte waehlen Sie einen anderen Accountnamen")
- else
- print(" Name " .. Name .. " gewaehlt")
- sleep(2)
- cut()
- print(" Password Eingeben:")
- print(" Keine Passwoerter von Emails, Accouns \n und Co ( In meiner Datei nachlesbar!)" )
- Password = (read("*"))
- cut()
- print(" Alter angeben:")
- Age = (read())
- Age = tonumber(Age)
- print(" Weshalb willst du bei Muzze77 Arbeiten ?")
- grund = io.read()
- file = fs.open(Name, "w")
- file.writeLine(Name)
- file.writeLine(Password)
- file.writeLine(Age)
- file.writeLine(grund)
- file.close()
- print(" Done!")
- print(" Name: " .. Name .. " Account erstellt.")
- sleep(2)
- cut()
- end
- end
- function test()
- cut()
- t = fs.list("/")
- for m, n in pairs (t) do
- if n == "rom" then
- elseif n == "1" then
- elseif n == "startup" then
- else
- write(n .. " | ")
- end
- end
- print("\n\n Welchen Namen oeffnen?: ")
- Idle = (read())
- fileT = fs.open(Idle, "r")
- ra = fileT.readAll()
- fileT.close()
- print(ra)
- sleep(4)
- print(" [B]Beenden oder [W]weiter schauen? [S]Senden")
- evt, key4 = os.pullEvent("char")
- if key4 == "b" then
- start()
- elseif key4 == "w" then
- test()
- elseif key4 == "s" then
- send()
- elseif key1 == "e" then
- shell.run("edit 1")
- end
- end
- function masterkey()
- cut()
- print(" Masterkey Eingeben: ")
- term.setCursorPos(21, 1)
- mkey = (read("*"))
- if mkey == "daremon22" then
- term.setCursorPos(1,3)
- print(" Password akzepiert")
- cut()
- test()
- else
- term.setCursorPos(1,2)
- print(" Falsches Password")
- cut()
- end
- end
- function LoadNew()
- local evt, key1 = os.pullEvent("char")
- if key1 == "l" then
- load()
- elseif key1 == "n" then
- new()
- elseif key1 == "m" then
- masterkey()
- end
- end
- function TerminalStart()
- local evt, key = os.pullEvent("char")
- if key == "w" then
- cut()
- print(" Bitte waehle eine Aktion:\n [L]Benutzer Laden - Job aufgeben\n [N]Neuer User - Bewerbung\n [M]Masterkey - Muzze77")
- LoadNew()
- end
- end
- function start()
- shell.run("clear")
- sleep(0.2)
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.white)
- shell.run("clear")
- sleep(0.2)
- print(" Willkommen bei der Anmeldung fuer Manarolas Jobs\n")
- print(" Hier kannst du dich anmelden um als ")
- print(" Arbeiter bei Muzze77 zu arbeiten")
- print(" Wenn du angenommen wurdest steht ")
- print(" es am Rechner Links von hier")
- print("\n")
- print(" Mit W bekommst du zugriff aufs Terminal")
- TerminalStart()
- end
- while true do
- os.pullEvent = os.pullEventRaw
- start()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement