Guest User

Untitled

a guest
May 12th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. print("---------------------------------------------")
  2. print("Username")
  3. print("---------------------------------------------")
  4. username = read()
  5. auser = "???"
  6. apass = "???"
  7. j = 0
  8. k = 0
  9. if fs.exists( "user" ) then
  10.         local file = io.open( "user", "r" )
  11.         local sLine = file:read()
  12.         while j == 0 do
  13.             auser = SLine
  14.             j = 1
  15.        
  16.         file:close()
  17. end        
  18. if fs.exists( "pass" ) then
  19.         local files = io.open( "pass", "r" )
  20.         local sLine = files:read()
  21.         while k == 0 do
  22.             auser = SLine
  23.             k = 1
  24.         end
  25.         files:close()
  26. end
  27. username = read()      
  28. if username == auser then
  29. print("---------------------------------------------")
  30. print("Password")
  31. print("---------------------------------------------")
  32. password = read()
  33. if password == apass then
  34. print("---------------------------------------------")
  35. print("Welcome" ..auser)
  36. print("---------------------------------------------")
  37. end
  38. end
Add Comment
Please, Sign In to add comment