Advertisement
neo32100

NeoCC System Login !

Apr 12th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. -- Stop Termination
  2. os.pullEvent = os.pullEventRaw
  3. -- Clear Screen
  4. term.clear()
  5. term.setCursorPos(20,8)
  6.  
  7. -- Username
  8. username = "admin"
  9. -- Password
  10. password = "admin"
  11. -- Get User Info
  12. print("LOGIN")
  13. term.setCursorPos(11,9)
  14. write("Username: ")
  15. user = read()
  16. term.setCursorPos(11,10)
  17. write("Password: ")
  18. pass = read("*")
  19. -- Verify
  20. term.setCursorPos(14,11)
  21. textutils.slowPrint("Verifying...")
  22. if (user == username) then
  23. if (pass == pass) then
  24. term.setCursorPos(13,12)
  25. print("Logged In!")
  26. sleep(1)
  27. term.clear()
  28. term.setCursorPos(1,1)
  29. else
  30. term.setCursorPos(14,12)
  31. print("Wrong!")
  32. sleep(10)
  33. os.reboot()
  34. end
  35. else
  36. term.setCursorPos(14,12)
  37. print("Wrong!")
  38. sleep(10)
  39. os.reboot()
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement