Guest User

Untitled

a guest
Jan 25th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. local valid
  2. local accounts = {
  3. ["username"] = "password",
  4. ["foo"] = "bar",
  5. ["xolbor"] = "roblox",
  6. ["anavrin"] = "nirvana"
  7. }
  8.  
  9. term.clear()
  10. term.setCursorPos(1, 1)
  11.  
  12. print("Enter username")
  13. write("> ")
  14. local input_user = read()
  15.  
  16. print("Enter password")
  17. write("> ")
  18. local input_pass = read("*")
  19.  
  20. for valid_user, valid_pass in pairs(accounts) do
  21. if (input_user == valid_user and input_pass == valid_pass) then valid = true end
  22. end
  23.  
  24. if valid then print("Access Granted") else print("Access Denied") end
Add Comment
Please, Sign In to add comment