Advertisement
Guest User

Untitled

a guest
Jul 14th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. while true do
  2. term.clear()
  3. term.setCursorPosition(1, 1)
  4. print("Username:")
  5. local usrName = read()
  6. file = fs.open("saves/",,usrName,"r")
  7. local dataBase = {}
  8. local line = file.readLine()
  9. repeat
  10. table.insert(dataBase, line)
  11. line = file.readLine()
  12. until line == nil
  13. file.close()
  14. print("password:")
  15. local usrPass = read()
  16.  
  17.  
  18. if usrPass == dataBase[1] then
  19. redstone.setOutput("right", true)
  20. sleep(3)
  21. redstone.setOutput("right", false)
  22. end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement