Code:
options:
Server: &8Lobby 23 &7>> &r
on right click on entity:
if name of clicked entity is "&b&lBattleship":
if {lobby1players} < 2:
if {wait} = true:
send "{@Server}&4&lHey! &r&cyou are sending request to fast!" to player
execute console command "/kick %player% Spam of request to lag the server"
else:
set {wait} to true
send "{@Server}&3Sending you to lobby-1" to player
set {lobby1players} to {lobby1player}
add 1 to {lobby1players}
send "{@Server}&3Sent you to lobby-1!" to player
if {lobby1players} is 0:
teleport player to location (-210, 24, -40)
wait 1.5 seconds
set {wait} to false
send "{@Server}&aYou may now send more requests" to player
if {lobby1players} is 1:
teleport player to location (-210, 24, -60)
wait 1.5 seconds
set {wait} to false
send "{@Server}&aYou may now send more requests" to player
else:
remove 1 from {lobby1players}
send "{@Server}&cThe Game you are trying to join is currently &4&lfull&r&c if you suspect this being a &4&lbug&r&c contact an admin or moderator!" to player
command /setplayers1 <integer>:
trigger:
set {lobby1players} to arg-1
set {wait} to false
send "{@Server}&3Set players to %arg-1%" to player
command /checkplayers1:
trigger:
send "{@Server}&3%{lobby1players}%" to player
no errors