Muzze77

TestforBank

Mar 23rd, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.73 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.     cut()
  9.     print("Bitte waehle eine Aktion:\n[L]Lade Account\n[N]Erstelle Neuen Account")
  10.     local evt, key1 = os.pullEvent("char") -- wait for a key press
  11.     key1 = string.lower(key1) -- convert to lower case, so you can press o or O
  12.  
  13.         if key1 == "l" then
  14.             shell.run("clear")
  15.             print("Bitte Usernamen eingeben: ")
  16.             user = io.read()
  17.             user1 = acc.user.user
  18.                     if user1 == user then
  19.                         print("Bitte Password eingeben")
  20.                         pass = io.read()
  21.                         pass1 = acc.user.pass
  22.                             if pass1 == pass then
  23.                                     print("Password Akzeptiert")
  24.                                     cut()
  25.                                     print("Was wollen Sie Machen?")
  26.                                     print("Baustelle")
  27.                             else
  28.                                     print("Falsches oder kein Password eingegeben")
  29.                                     shell.run("reboot")
  30.                             end
  31.                    
  32.                     else
  33.                         print("Username Exzestiert nicht")
  34.                         shell.run("reboot")
  35.                     end
  36.                    
  37.                
  38.                    
  39.                    
  40.  
  41.         elseif key1 == "n" then
  42.             print("Namen Eingeben :")
  43.             Name = io.read()
  44.             print("Name " .. Name .. " gewaehlt")
  45.             sleep(2)
  46.             cut()
  47.             print("Password Eingeben")
  48.             Password = io.read()
  49.             print("Password " .. Password .. " gewaehlt")
  50.             cut()
  51.             Username = Name
  52.             Name = {}
  53.             Name.Username = Name
  54.             Name.Password = Password
  55.             Name.Geld = 0
  56.             print("Done")
  57.             print(Name.Name)
  58.             print(Name.Password)
  59.             print(Name.Geld)
  60.             files = fs.open(tostring(Name), "w")
  61.            
  62.             files.write(Name.Name)
  63.             files.write(Name.Password)
  64.             files.write(Name.Geld)
  65.    
  66.  
  67.             sleep(2)
  68.             files.close()
  69.  
  70.             file = fs.open(tostring(Name),"r")
  71.             data = file.readAll()
  72.             print(data)
  73.             file.close()
  74.  
  75.             cut()
  76.             shell.run("reboot")
  77.         end
  78. end
Add Comment
Please, Sign In to add comment