Advertisement
Guest User

Untitled

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