Advertisement
Muzze77

TEst1

Mar 24th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.47 KB | None | 0 0
  1. function cut()
  2. sleep(3)
  3. shell.run("clear")
  4. sleep(1)
  5. end
  6. while true do
  7.     print("Willkommen in der MaceBank Manarola")
  8.     print("Bitte wähle eine Aktion: [L]Lade Account|[N]Erstelle Neuen Account")
  9.     local evt, key1 = os.pullEvent("char") -- wait for a key press
  10.     key1 = string.lower(key1) -- convert to lower case, so you can press o or O
  11.  
  12.         if key1 == "l" then
  13.             print("Bitte Usernamen eingeben: ")
  14.             user = io.read()
  15.             Name = user
  16.             for Name, list in ipairs (acc.Name) do
  17.                
  18.                     print(list)
  19.                
  20.                 if list == nil then
  21.                
  22.                     print("Username Exzestiert nicht")
  23.                     shell.run("reboot")
  24.                 elseif list == user then
  25.                
  26.                     print("Bitte Password eingeben")
  27.                     pass = io.read()
  28.                     for pass, list2 in pairs (acc) do
  29.                     print(list2)
  30.                         if list2 == pass then
  31.                             print("Password Akzeptiert")
  32.                             cut()
  33.                             print("Was wollen Sie Machen?")
  34.                             print("Baustelle")
  35.                         elseif list2 == nil then
  36.                             print("Falsches oder kein Password eingegeben")
  37.                             shell.run("reboot")
  38.                         end
  39.                     end
  40.                 end
  41.             end
  42.         elseif key1 == "n" then
  43.             print("Namen Eingeben :")
  44.             Name = io.read()
  45.             print("Name " .. Name .. " gewaehlt")
  46.             cut()
  47.             print("Password Eingeben")
  48.             Password = io.read()
  49.             print("Password " .. Password .. " gewaehlt")
  50.             cut()
  51.             acc = {}
  52.             acc.Name = {}
  53.             acc.Name.Name = Name
  54.             acc.Name.Password = Password
  55.             acc.Name.Geld = 0
  56.             print("Done")
  57.             print(acc)
  58.             cut()
  59.             shell.run("reboot")
  60.         end
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement