Advertisement
Guest User

Computercraft Login System

a guest
Oct 8th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. term.clear()
  3. term.setCursorPos(20,8)
  4.  
  5.  
  6. username = " "
  7. password = " "
  8. print("Login")
  9. term.setCursorPos(11,9)
  10. write("Username: ")
  11. user = read()
  12. term.setCursorPos(11,10)
  13. write("Password: ")
  14. pass = read("*")
  15. term.setCursorPos(14,11)
  16. textutils.slowPrint("Verifying...")
  17. if (user == Username) then
  18. if (pass == password) then
  19. term.setCursorPos(13,12)
  20. print("Logged In")
  21. sleep(2)
  22. term.clear()
  23. term.setCursorPos(1,1)
  24. print(user.. "'s PC")
  25. else
  26. term.setCursorPos(14,12)
  27. print("I'm sorry man, but thats incorrect.")
  28. sleep(2)
  29. os.reboot()
  30. end
  31. else
  32. term.setCursorPos(14,12)
  33. print("I'm sorry man, but thats incorrect.")
  34. sleep(2)
  35. os.reboot()
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement