Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on load:
- delete {captcha::string::*}
- set {_num} to 0
- loop 10 times:
- add "%{_num}%" to {captcha::string::*}
- add 1 to {_num}
- 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::*}
- on join:
- if {captcha::done::%uuid of player%} isn't true:
- set {_captcha} to ""
- loop 6 times:
- set {_captcha} to "%{_captcha}%%a random element out of {captcha::string::*}%"
- set {captcha::player::%uuid of player%} to {_captcha}
- send "&cPlease type &7%{captcha::player::%uuid of player%}% &cin chat to continue, you have 2 minutes"
- set {captcha::start::%uuid of player%} to now
- every second:
- loop all players:
- if {captcha::player::%uuid of loop-player%} is set:
- if difference between now and {captcha::start::%uuid of loop-player%} >= 1 minute:
- kick loop-player due to "You didn't complete your capcha, this is done to prevent bot attacks"
- on command:
- if {captcha::player::%uuid of player%} is set:
- if command doesn't contain "hub" or "server":
- cancel event
- set {_wait} to difference between now and {captcha::start::%uuid of player%}
- 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"
- on any movement:
- if {captcha::player::%uuid of player%} is set:
- cancel event
- set {_wait} to difference between now and {captcha::start::%uuid of player%}
- 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"
- on chat:
- if {captcha::player::%uuid of player%} is set:
- cancel event
- if message == {captcha::player::%uuid of player%}:
- delete {captcha::player::%uuid of player%}
- send "&aSuccessfully completed the captcha, you can now play"
- set {captcha::done::%uuid of player%} to true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement