Advertisement
Guest User

Arquivo

a guest
May 21st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw -- Prevents CTRL+T shortcut
  2.  
  3. term.clear() -- Clears the screen
  4. term.setCursorPos(1, 1) -- The places the print position to the top of screen
  5.  
  6. username = {"Tody", "Detona", "Poteto", "zirkin"}  -- Here you need to define all usernames avaible
  7. password = {"ABCD", "EUSOMITO", "LOL", "z0k2n7"}  -- Here you define what password each user has, remember to put user1's password in the first row and so on.
  8.  
  9. write("Login: ")
  10. user = read()
  11.  
  12. write("Senha: ")
  13. pass = read('*') -- This prevents people from reading the password as you put it in
  14. for i=1, #username do -- Starts a loop
  15.  if user == username[i] and pass == password[i] then
  16.    access = true
  17.  end
  18. end
  19.  
  20. if access == true then
  21. print("Logando...")
  22. sleep(1)
  23. print("Bem vindo a ilha "..user)
  24. else
  25. print("Username e senha incorreta")
  26. sleep(2)
  27. os.reboot()
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement