Advertisement
OMan100

Untitled

Jun 26th, 2019
825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. on load:
  2. delete {captcha::string::*}
  3. set {_num} to 0
  4. loop 10 times:
  5. add "%{_num}%" to {captcha::string::*}
  6. add 1 to {_num}
  7. add "q" and "w" and "e" and "r" and "t" and "y" and "u" and "i" and "o" and "p" and "a" and "s" and "d" and "f" and "g" and "h" and "j" and "k" and "l" and "z" and "x" and "c" and "v" and "b" and "n" and "m" to {captcha::string::*}
  8.  
  9. on join:
  10. if {captcha::done::%uuid of player%} isn't true:
  11. set {_captcha} to ""
  12. loop 6 times:
  13. set {_captcha} to "%{_captcha}%%a random element out of {captcha::string::*}%"
  14. set {captcha::player::%uuid of player%} to {_captcha}
  15. send "&cPlease type &7%{captcha::player::%uuid of player%}% &cin chat to continue, you have 2 minutes"
  16. set {captcha::start::%uuid of player%} to now
  17.  
  18. every second:
  19. loop all players:
  20. if {captcha::player::%uuid of loop-player%} is set:
  21. if difference between now and {captcha::start::%uuid of loop-player%} >= 1 minute:
  22. kick loop-player due to "You didn't complete your capcha, this is done to prevent bot attacks"
  23.  
  24. on command:
  25. if {captcha::player::%uuid of player%} is set:
  26. if command doesn't contain "hub" or "server":
  27. cancel event
  28. set {_wait} to difference between now and {captcha::start::%uuid of player%}
  29. send "&cType the captcha &7%{captcha::player::%uuid of player%}% &cin chat to play, you have %difference between {_wait} and 1 minute% to do this"
  30.  
  31. on any movement:
  32. if {captcha::player::%uuid of player%} is set:
  33. cancel event
  34. set {_wait} to difference between now and {captcha::start::%uuid of player%}
  35. send "&cType the captcha &7%{captcha::player::%uuid of player%}% &cin chat to play, you have %difference between {_wait} and 1 minute% to do this"
  36.  
  37. on chat:
  38. if {captcha::player::%uuid of player%} is set:
  39. cancel event
  40. if message == {captcha::player::%uuid of player%}:
  41. delete {captcha::player::%uuid of player%}
  42. send "&aSuccessfully completed the captcha, you can now play"
  43. set {captcha::done::%uuid of player%} to true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement