Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pruf()
- if disk.hasData("left") == true then
- ask = fs.open("disk/username", "w")
- n = ask.readAll()
- if n == nil then
- shell.run("clear")
- print("Bitte Username eingeben")
- name = io.read()
- ask.writeLine(username)
- ask.close()
- print("Name eingetragen")
- sleep(1)
- shell.run("clear")
- else
- print(" Bitte Accountnamen eingeben")
- aname = io.read()
- na = ask.readAll()
- fs.close()
- if na == aname then
- ask2 = fs.open("disk/password", "w")
- n2 = ask2.readAll
- if n2 == nil then
- shell.run("clear")
- print("Bitte Password eingeben")
- password = io.read()
- ask2.write(password)
- ask2.close()
- print("Password eingetragen")
- shell.run("clear")
- else
- print("Bitte Accountpassword eingeben")
- pa = ask.readAll()
- apass = io.read()
- if apass == pa then
- ask2.close()
- ask3 = fs.open("/disk/money", "read")
- mon = ask3.read()
- if mon == nil then
- mon = 0
- print("Derzeitger Kontostand:" .. mon .. "$")
- sleep(4)
- print("Was wollen sie tun?")
- print("Abheben, Einzahlen, Kontostand")
- else
- print("Derzeitger Kontostand:" .. mon .. "$")
- sleep(4)
- print("Was wollen sie tun?")
- print("Abheben, Einzahlen, Kontostand")
- end
- else
- fs.close()
- print("Falsches Password. Bitte erneut eingeben")
- Shell.run("reboot")
- end
- end
- else
- fs.close()
- print("Falscher Username. Bitte erneut eingeben")
- shell.run("reboot")
- end
- end
- else
- print("Keine KK eingelegt. Bitte einlegen!")
- end
- end
- while true do
- print(" Willkommen in der MazeBank.")
- pruf()
- end
Add Comment
Please, Sign In to add comment