Advertisement
Guest User

Untitled

a guest
Jun 20th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. username = "Your Username"
  2. password = "Your Password"
  3.  
  4. write("Welcome please enter your username and password")
  5. term.setCursorPos(12,5) -- put screen cords here
  6. print("Username: ")
  7. term.setCursorPos(12,6) -- and here
  8. print("Password: ")
  9. term.setCursorPos(23,5) -- same as first ones but over right
  10. input = read()
  11. if input == username
  12. term.setCursorPos(23,6) -- and here
  13. else
  14. term.setCursorPos(23,6)
  15. input = read
  16. if input == password then
  17. term.clear()
  18. term.setCursorPos(1,1)
  19. write("Username Or Password Incorrrect Try Again")
  20. sleep(2)
  21. os.reboot()
  22. end
  23. input = read()
  24. if input == password
  25. term.clear()
  26. term.setCursorPos(1,1)
  27. print("Access Granted!")
  28. sleep(2)
  29. term.clear()
  30. term.setCursorPos(1,1)
  31.  
  32. end
  33.  
  34. else
  35. term.clear()
  36. term.setCursorPos(1,1)
  37. print("Access Denied, System Shutting Down!!!")
  38. sleep(2)
  39. os.reboot()
  40.  
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement