This is for anti bot and I whant to do a way for the bots stop joining the server because my server was attack like 10 times and still attaking me and I do thist but just ban the bots I whant them to stop joining the server
code_language.skript:
options:
prefix: &9[&6Captcha&9]&a
activate: true # true or false if is false is no goin to work
bot: &aOn join click the yellow glass %player% #message for kick
on-join: false #True if every time you join need to do the captcha false for just on first join
join-message: true #if is false no join message
on load:
if {@activate} is true:
set {antibot} to true
send "{@prefix}&aAntibot &btrue" to console
if {@activate} is false:
delete {antibot}
send "{@prefix}&aAntibot &cfalse" to console
if {@on-join} is false:
delete {join}
send "{@prefix}On join &cFalse" to console
if {@on-join} is true:
set {join} to true
send "{@prefix}On join &bTrue" to console
if {@join-message} is true:
set {join.message} to false
send "{@prefix}Join message &bTrue" to console
if {@join-message} is false:
set {join.message} to true
send "{@prefix}Join message &bFalse" to console
on join:
if {join.message} is false:
set join message to ""
on quit:
if {join.message} is false:
set quit message to ""
on death:
if {join.message} is false:
set death message to ""
on join:
if {antibot} is true:
if {join} is true:
wait 2 second
open chest with 1 rows named "&b&lAntibot" to the player
format slot 1 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 0 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 2 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 3 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 4 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 5 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 6 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 7 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 8 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
wait 10 second
if {antibot.%player%} is true:
execute console command "/kick %player% {@prefix}{@bot}"
else:
stop
else:
stop
on join:
if {antibot} is true:
if {antibot.%player%} is true:
wait 2 second
open chest with 1 rows named "&b&lAntibot" to the player
format slot 1 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 0 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 2 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 3 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 4 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 5 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 6 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 7 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 8 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
wait 10 second
if {antibot.%player%} is true:
execute console command "/kick %player% {@prefix}{@bot}"
else:
stop
else:
stop
on first join:
if {antibot} is true:
set {antibot.%player%} to true
wait 2 second
open chest with 1 rows named "&b&lAntibot" to the player
format slot 0 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 1 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 2 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 3 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 4 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 5 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 6 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 7 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
format slot 8 of the player with a yellow glass named "&eNo soy un bot" to close then run [execute console command "/captcha %player%"]
wait 10 second
if {antibot.%player%} is true:
execute console command "/kick %player% {@prefix}{@bot}"
else:
stop
command /captcha <player>:
executable by: console
trigger:
delete {antibot.%arg 1%}
send "{@prefix}&aAntibot Complete" to arg 1
on chat:
if {antibot.%player%} is true:
cancel event
execute console command "/kick %player% {@prefix}{@bot}"
add 1 to {antibot.2.%player%}
if {antibot.2.%player%} is more than or equal to 4:
execute console command "/ban %player% {@prefix}{@bot}"
execute console command "/kick %player% {@prefix}{@bot}"
delete {antibot.2.%player%}