Advertisement
asteroidsteam

login

Sep 22nd, 2016
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. login = { ... }
  2. function incorrect()
  3. term.setTextColor(colors.red)
  4. print("Incorrect Username or password")
  5. term.setTextColor(colors.white)
  6. end
  7. function usage()
  8. term.setTextColor(colors.red)
  9. print("Usage: login <user> <password>")
  10. term.setTextColor(colors.white)
  11. end
  12. if #login < 1 then
  13. usage()
  14. else
  15. if #login > 2 then
  16. usage()
  17. else
  18. if #login == 1 then
  19. usage()
  20. else
  21. --
  22. if #login[1] == "lua" then
  23. if #login[2] == "b33" then
  24. shell.run("/rom/programs/lua")
  25. else
  26. incorrect()
  27. end
  28. else
  29. incorrect()
  30. end
  31. --
  32. end
  33. end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement