What I am trying to do tho is every play has there own kits. I know it sounds strange but it is needed for my minigame. I have not tried but I can prob find out how to put this into a gui like my code had.
Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
What I am trying to do tho is every play has there own kits. I know it sounds strange but it is needed for my minigame. I have not tried but I can prob find out how to put this into a gui like my code had.
command /kit [<text>] [<number>]:
trigger:
if arg-1 is "create":
if arg-2 is set:
loop all items in player's inventory:
add loop-item to {sf::kit-%arg-2%::%player%::*}
message "Created."
if arg-1 is "delete":
if arg-2 is set:
clear {sf::kit-%arg-2%::%player%::*}
message "Deleted."
if arg-1 is "use":
if arg-2 is set:
loop {sf::kit-%arg-2%::%player%::*}:
add loop-value to the player's inventory
message "Loaded."
on rightclick holding nether star:
if {sf.join::%player%} is true:
open chest with 3 rows named "&4Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is set:
format slot 0 of player with Dirt named "Kit 1" to close then run [make player execute command "/kit use 1"]
if {sf::kit-2::%player%::*} is set:
format slot 1 of player with Dirt named "Kit 2" to close then run [make player execute command "/kit use 2"]
if {sf::kit-3::%player%::*} is set:
format slot 2 of player with Dirt named "Kit 3" to close then run [make player execute command "/kit use 3"]
command /sfkit [<text>] [<number>]:
trigger:
if arg-1 is "create":
if arg-2 is set:
message "{@logo}&bKit %arg 2% Created!"
loop all items in player's inventory:
add loop-item to {sf::kit-%arg-2%::%player%::*}
if arg-1 is "delete":
if arg-2 is set:
message "{@logo}&bKit %arg 2% Deleted!"
clear {sf::kit-%arg-2%::%player%::*}
if arg-1 is "use":
if arg-2 is set:
if {sf.join::%player%} is true:
message "{@logo}&bKit %arg 2% Loaded!"
clear the player's inventory
give player nether star named "&4Kits"
loop {sf::kit-%arg-2%::%player%::*}:
add loop-value to the player's inventory
on rightclick holding nether star:
if {sf.join::%player%} is true:
open chest with 1 rows named "&4Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is set:
format slot 0 of player with iron ingot named "&8Iron" to close then run [make player execute command "/sfkit use 1"]
if {sf::kit-2::%player%::*} is set:
format slot 1 of player with gold ingot named "&eGold" to close then run [make player execute command "/sfkit use 2"]
if {sf::kit-3::%player%::*} is set:
format slot 2 of player with diamond named "&bDiamond" to close then run [make player execute command "/sfkit use 3"]
command /sfkit [<text=helpmenu>] [<number>]:
trigger:
if arg 1 is "helpmenu":
message "{@logo} &6SfKit"
message "&7/sfkit create <KitName> -> Create a kit."
message "&7/sfkit delete <KitName> -> Delete a kit."
message "&7/sfkit use <KitName> -> Load a kit."
if arg 1 is "create":
if arg 2 is set:
message "{@logo}&bKit %arg 2% Created!"
loop all items in player's inventory:
add loop-item to {sf::kit-%arg-2%::%player%::*}
if arg 1 is "delete":
if arg 2 is set:
message "{@logo}&bKit %arg 2% Deleted!"
clear {sf::kit-%arg-2%::%player%::*}
if arg 1 is "use":
if arg 2 is set:
if {sf.join::%player%} is true:
message "{@logo}&bKit %arg 2% Loaded!"
clear the player's inventory
give player nether star named "&4Kits"
loop {sf::kit-%arg-2%::%player%::*}:
add loop-value to the player's inventory
on rightclick holding nether star:
if {sf.join::%player%} is true:
open chest with 1 rows named "&4Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is set:
format slot 0 of player with iron ingot named "&8Iron" to close then run [make player execute command "/sfkit use 1"]
if {sf::kit-2::%player%::*} is set:
format slot 1 of player with gold ingot named "&eGold" to close then run [make player execute command "/sfkit use 2"]
if {sf::kit-3::%player%::*} is set:
format slot 2 of player with diamond named "&bDiamond" to close then run [make player execute command "/sfkit use 3"]
on break:
add type of event-block to {minigame.arenaname.breakblocks::*}
add location of event-block to {minigame.arenaname.breaklocations::*}
command /mapreset:
trigger:
loop {minigame.arenaname.breakblocks::*}:
loop {minigame.arenaname.breaklocations::*}:
set {_loc} to loop-value-2
set block at {_loc} to {minigame.arenaname.breakblocks::%loop-index-2%}
options:
logo: &8[&9Sky&3Fight&8]
#--------------------------------------#
variables:
{sf.game} = false
{sf.world} = false
{sf.players} = 0
{sf.pb} = false
{sf.delay} = false
{sf.join::%player%} = false
{sf.enter} = false
{sf.amount} = true
{sf.pvp} = false
#-----------------------------------LEAVE-COMMAND#
command /leave:
trigger:
if {sf.join::%player%} is true:
if {sf.game} is true:
clear {sf::*}'s inventory
teleport {sf::*} to {sf.hub}
set {sf.game} to false
set {sf.world} to false
set {sf.players} to 0
set {sf.pb} to false
set {sf.delay} to false
set {sf.join::%player%} to false
message "{@logo}&4You left the game!"
delete {sf::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
if {sf.game} is false:
set {sf.game} to false
set {sf.world} to false
set {sf.players} to 0
set {sf.pb} to false
set {sf.delay} to false
set {sf.join::%player%} to false
message "{@logo}&4You left the game!"
clear the player's inventory
teleport the player to {sf.hub}
delete {sf::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
else:
message "{@logo}&4You are not in a game!"
#----------------------------MAIN-COMMAND#
command /sf <text> <text> <text>:
usage: &9/&3sf "&2join&9" "&bmap&9" "&amode&9"
trigger:
#------------------------------ADMIN-COMMAND#
if arg 1 is "admin":
player has permission "sf.admin":
if arg 2 is "sethub":
set {sf.hub} to location of player
message "{@logo}&bYou set the hub!"
if arg 2 is "setspawn1":
set {sf.spawn1.%arg 3%} to location of player
message "{@logo}&bYou set spawn1 for %arg 3%!"
if arg 2 is "setspawn2":
set {sf.spawn2.%arg 3%} to location of player
message "{@logo}&bYou set spawn2 for %arg 3%!"
if arg 2 is "setspawn3":
set {sf.spawn3.%arg 3%} to location of player
message "{@logo}&bYou set spawn3 for %arg 3%!"
if arg 2 is "setspawn4":
set {sf.spawn4.%arg 3%} to location of player
message "{@logo}&bYou set spawn4 for %arg 3%!"
if arg 2 is "remake":
loop {sf.%world%.breakblocks::*}:
loop {sf.%world%.breaklocations::*}:
set {_loc} to loop-value-2
set block at {_loc} to {sf.%world%.breakblocks::%loop-index-2%}
else:
message "&4You are not a admin!"
#---------------------------------------------NORMAL-COMMAND#
if arg 1 is "join":
if arg 2 is "simple":
if {sf.join::%player%} is true:
message "&4You are already in a game!"
if {sf.game} is true:
message "&4That game has already started!"
if {sf.delay} is true:
message "&4That game needs to cool down!"
if {sf.world} is true:
message "&4That game needs to restart!"
if {sf.join::%player%} is false:
if {sf.game} is false:
if {sf.delay} is false:
if {sf.world} is false:
if {sf.players} is 0:
teleport the player to {sf.spawn1.%arg 2%}
if {sf.players} is 1:
teleport the player to {sf.spawn2.%arg 2%}
if {sf.players} is 2:
teleport the player to {sf.spawn3.%arg 2%}
set {sf.amount} to false
if {sf.players} is 3:
teleport the player to {sf.spawn4.%arg 2%}
execute console command "/day day simple"
set {_count} to 0
loop 41 times:
set {inv.%player%::%{_count}%} to slot {_count} of player
add 1 to {_count}
clear the player's inventory
add player to {sf::*}
add 1 to {sf.players}
send "{@logo}&b%player% Joined the game!" to {sf::*}
execute console command "gamemode s %player%"
give player nether star named "&bKits"
set {sf.join::%player%} to true
set {sf.pb} to false
#----------------------------------------------------------------GAME-START#
if {sf.players} is 2:
wait 10 ticks
if {sf.amount} is true:
set {sf.game} to true
set {sf.pvp} to false
send "{@logo}&bThe game is starting in 20 seconds!" to {sf::*}
wait 10 seconds
send "{@logo}&b10 seconds till the game starts" to {sf::*}
wait 5 seconds
send "{@logo}&b5!" to {sf::*}
wait 1 second
send "{@logo}&b4!" to {sf::*}
wait 1 second
send "{@logo}&b3!" to {sf::*}
wait 1 second
send "{@logo}&b2!" to {sf::*}
wait 1 second
send "{@logo}&b1!" to {sf::*}
wait 1 second
send "{@logo}&bGO!" to {sf::*}
set {sf.pb} to true
remove 1 nether star from the inventory of {sf::*}
send "{@logo}&bIn 5 minutes you will be allowed to fight!" to {sf::*}
wait 3 minutes
send "{@logo}&bIn 2 minutes you will be allowed to fight!" to {sf::*}
wait 2 minutes
send "{@logo}&bTHE PVP GODS ARE TAKING A NAP! THERE ARE NO RULES!" to {sf::*}
set {sf.pvp} to true
#------------------------------------------------------KITS#
command /sfkit [<text=helpmenu>] [<number>]:
trigger:
if arg 1 is "helpmenu":
message "{@logo} &6SfKit"
message "&7/sfkit create <KitName> -> Create a kit."
message "&7/sfkit delete <KitName> -> Delete a kit."
message "&7/sfkit use <KitName> -> Load a kit."
if arg 1 is "create":
if arg 2 is set:
wait 2 ticks
message "{@logo}&bKit %arg 2% Created!"
loop all items in player's inventory:
add loop-item to {sf::kit-%arg-2%::%player%::*}
if arg 1 is "delete":
if arg 2 is set:
message "{@logo}&bKit %arg 2% Deleted!"
clear {sf::kit-%arg-2%::%player%::*}
if arg 1 is "use":
if arg 2 is set:
if {sf.join::%player%} is true:
message "{@logo}&bKit %arg 2% Loaded!"
clear the player's inventory
give player nether star named "&4Kits"
loop {sf::kit-%arg-2%::%player%::*}:
add loop-value to the player's inventory
on rightclick holding nether star:
if {sf.join::%player%} is true:
open chest with 1 rows named "&4Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is set:
format slot 0 of player with iron ingot named "&8Iron" to close then run [make player execute command "/sfkit use 1"]
if {sf::kit-2::%player%::*} is set:
format slot 1 of player with gold ingot named "&eGold" to close then run [make player execute command "/sfkit use 2"]
if {sf::kit-3::%player%::*} is set:
format slot 2 of player with diamond named "&bDiamond" to close then run [make player execute command "/sfkit use 3"]
#-----------------------------------------------------------------KIT-OPTIONS#
command /sfkitdelete:
trigger:
wait 2 ticks
if {sf.join::%player%} is false:
open chest with 1 rows named "&4Delete Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is set:
format slot 0 of player with iron ingot named "&8Delete Kit Iron" to close then run [make player execute command "/sfkit delete 1"]
if {sf::kit-2::%player%::*} is set:
format slot 1 of player with gold ingot named "&eDelete Kit Gold" to close then run [make player execute command "/sfkit delete 2"]
if {sf::kit-3::%player%::*} is set:
format slot 2 of player with diamond named "&bDelete Kit Diamond" to close then run [make player execute command "/sfkit delete 3"]
format slot 8 of player with nether star named "&9Create" to close then run [make player execute command "/sfkitcreate"]
command /sfkitcreate:
trigger:
wait 2 ticks
if {sf.join::%player%} is false:
open chest with 1 rows named "&9Create Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is not set:
format slot 0 of player with iron ingot named "&8Create Kit Iron" to close then run [make player execute command "/sfkit create 1"]
if {sf::kit-2::%player%::*} is not set:
format slot 1 of player with gold ingot named "&eCreate Kit Gold" to close then run [make player execute command "/sfkit create 2"]
if {sf::kit-3::%player%::*} is not set:
format slot 2 of player with diamond named "&bCreate Kit Diamond" to close then run [make player execute command "/sfkit create 3"]
format slot 8 of player with barrier named "&4Delete" to close then run [make player execute command "/sfkitdelete"]
on rightclick holding arrow:
make player execute command "/sfkitcreate"
#--------------------------------------------------------------------GAME-END#
on death of player:
if {sf.join::%player%} is true:
remove 1 from {sf.players}
if {sf.players} is 1:
teleport {sf::*} to {sf.hub}
send "{@logo}&4%player% Has died!" to {sf::*}
send "{@logo}&aThe other player wins!" to {sf::*}
set {sf.join::*} to false
set {sf.game} to false
set {sf.players} to 0
delete {sf::*}
clear inventory of {sf::*}
execute console command "/heal WimpyLlama"
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
#-------------------------------------------------------------------------#
on quit:
if {sf.join::%player%} is true:
remove 1 from {sf.players}
if {sf.players} is 1:
teleport {sf::*} to {sf.hub}
send "{@logo}&4%player% Has died!" to {sf::*}
send "{@logo}&aThe other player wins!" to {sf::*}
set {sf.join::*} to false
set {sf.game} to false
set {sf.players} to 0
delete {sf::*}
clear inventory of {sf::*}
execute console command "/heal WimpyLlama"
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
on place:
if {sf.join::%player%} is true:
if {sf.pb} is false:
cancel event
on break:
if {sf.join::%player%} is true:
if {sf.pb} is false:
cancel event
on damage:
if attacker is {sf::*}:
if {sf.pvp} is false:
cancel event
message "&4You can't do that right now!"
on first join:
give player 1 arrow named "&9Create&8/&4Delete &bKits"
on break:
add type of event-block to {minigame.arenaname.breakblocks::*}
add location of event-block to {minigame.arenaname.breaklocations::*}
command /mapreset:
trigger:
loop {minigame.arenaname.breakblocks::*}:
loop {minigame.arenaname.breaklocations::*}:
set {_loc} to loop-value-2
set block at {_loc} to {minigame.arenaname.breakblocks::%loop-index-2%}
on place:
add type of event-block to {minigame.arenaname.placeblocks::*}
add location of event-block to {minigame.arenaname.placelocations::*}
loop {minigame.arenaname.placeblocks::*}:
loop {minigame.arenaname.placelocations::*}:
set {_loc} to loop-value-2
set block at {_loc} to air
options:
logo: &8[&9Sky&3Fight&8]
#--------------------------------------#
variables:
{sf.game} = false
{sf.world} = false
{sf.players} = 0
{sf.pb} = false
{sf.delay} = false
{sf.join::%player%} = false
{sf.enter} = false
{sf.amount} = true
{sf.pvp} = false
#-----------------------------------LEAVE-COMMAND#
command /leave:
trigger:
if {sf.join::%player%} is true:
if {sf.game} is true:
clear {sf::*}'s inventory
teleport {sf::*} to {sf.hub}
set {sf.game} to false
set {sf.world} to false
set {sf.players} to 0
set {sf.pb} to false
set {sf.delay} to false
set {sf.join::%player%} to false
message "{@logo}&4You left the game!"
delete {sf::*}
execute console command "/mapreset"
delete {minigame.arenaname.breakblocks::*}
delete {minigame.arenaname.breaklocations::*}
delete {minigame.arenaname.placeblocks::*}
delete {minigame.arenaname.placelocations::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
if {sf.game} is false:
set {sf.game} to false
set {sf.world} to false
set {sf.players} to 0
set {sf.pb} to false
set {sf.delay} to false
set {sf.join::*} to false
message "{@logo}&4You left the game!"
clear the player's inventory
teleport the player to {sf.hub}
delete {sf::*}
execute console command "/mapreset"
delete {minigame.arenaname.breakblocks::*}
delete {minigame.arenaname.breaklocations::*}
delete {minigame.arenaname.placeblocks::*}
delete {minigame.arenaname.placelocations::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
else:
message "{@logo}&4You are not in a game!"
#----------------------------MAIN-COMMAND#
command /sf <text> <text> <text>:
usage: &9/&3sf "&2join&9" "&bmap&9" "&amode&9"
trigger:
#------------------------------ADMIN-COMMAND#
if arg 1 is "admin":
player has permission "sf.admin":
if arg 2 is "sethub":
set {sf.hub} to location of player
message "{@logo}&bYou set the hub!"
if arg 2 is "setspawn1":
set {sf.spawn1.%arg 3%} to location of player
message "{@logo}&bYou set spawn1 for %arg 3%!"
if arg 2 is "setspawn2":
set {sf.spawn2.%arg 3%} to location of player
message "{@logo}&bYou set spawn2 for %arg 3%!"
if arg 2 is "remake":
loop {sf.%world%.breakblocks::*}:
loop {sf.%world%.breaklocations::*}:
set {_loc} to loop-value-2
set block at {_loc} to {sf.%world%.breakblocks::%loop-index-2%}
else:
message "&4You are not a admin!"
#---------------------------------------------NORMAL-COMMAND#
if arg 1 is "join":
if arg 2 is "simple":
if {sf.join::%player%} is true:
message "&4You are already in a game!"
if {sf.game} is true:
message "&4That game has already started!"
if {sf.delay} is true:
message "&4That game needs to cool down!"
if {sf.world} is true:
message "&4That game needs to restart!"
if {sf.join::%player%} is false:
if {sf.game} is false:
if {sf.delay} is false:
if {sf.world} is false:
if {sf.players} is 0:
teleport the player to {sf.spawn1.%arg 2%}
if {sf.players} is 1:
teleport the player to {sf.spawn2.%arg 2%}
execute console command "/day day simple"
set {_count} to 0
loop 41 times:
set {inv.%player%::%{_count}%} to slot {_count} of player
add 1 to {_count}
clear the player's inventory
add player to {sf::*}
add 1 to {sf.players}
send "{@logo}&b%player% Joined the game!" to {sf::*}
execute console command "gamemode s %player%"
give player nether star named "&bKits"
set {sf.join::%player%} to true
set {sf.pb} to false
#----------------------------------------------------------------GAME-START#
if {sf.players} is 2:
wait 10 ticks
set {sf.game} to true
set {sf.pvp} to false
send "{@logo}&bThe game is starting in 20 seconds!" to {sf::*}
wait 10 seconds
send "{@logo}&b10 seconds till the game starts" to {sf::*}
wait 5 seconds
send "{@logo}&b5!" to {sf::*}
wait 1 second
send "{@logo}&b4!" to {sf::*}
wait 1 second
send "{@logo}&b3!" to {sf::*}
wait 1 second
send "{@logo}&b2!" to {sf::*}
wait 1 second
send "{@logo}&b1!" to {sf::*}
wait 1 second
send "{@logo}&bGO!" to {sf::*}
set {sf.pb} to true
remove 1 nether star from the inventory of {sf::*}
send "{@logo}&bIn 5 minutes you will be allowed to fight!" to {sf::*}
wait 3 minutes
send "{@logo}&bIn 2 minutes you will be allowed to fight!" to {sf::*}
wait 2 minutes
send "{@logo}&bTHE PVP GODS ARE TAKING A NAP! THERE ARE NO RULES!" to {sf::*}
set {sf.pvp} to true
#------------------------------------------------------KITS#
command /sfkit [<text>] [<number>]:
trigger:
if arg 1 is "create":
if arg 2 is set:
wait 2 ticks
message "{@logo}&bKit %arg 2% Created!"
loop all items in player's inventory:
add loop-item to {sf::kit-%arg-2%::%player%::*}
if arg 1 is "delete":
if arg 2 is set:
message "{@logo}&bKit %arg 2% Deleted!"
clear {sf::kit-%arg-2%::%player%::*}
if arg 1 is "use":
if arg 2 is set:
if {sf.join::%player%} is true:
message "{@logo}&bKit %arg 2% Loaded!"
clear the player's inventory
give player nether star named "&4Kits"
loop {sf::kit-%arg-2%::%player%::*}:
add loop-value to the player's inventory
on rightclick holding nether star:
if {sf.join::%player%} is true:
open chest with 1 rows named "&4Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is set:
format slot 0 of player with iron ingot named "&8Iron" to close then run [make player execute command "/sfkit use 1"]
if {sf::kit-2::%player%::*} is set:
format slot 1 of player with gold ingot named "&eGold" to close then run [make player execute command "/sfkit use 2"]
if {sf::kit-3::%player%::*} is set:
format slot 2 of player with diamond named "&bDiamond" to close then run [make player execute command "/sfkit use 3"]
#-----------------------------------------------------------------KIT-OPTIONS#
command /sfkitdelete:
trigger:
wait 2 ticks
if {sf.join::%player%} is false:
open chest with 1 rows named "&4Delete Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is set:
format slot 0 of player with iron ingot named "&8Delete Kit Iron" to close then run [make player execute command "/sfkit delete 1"]
if {sf::kit-2::%player%::*} is set:
format slot 1 of player with gold ingot named "&eDelete Kit Gold" to close then run [make player execute command "/sfkit delete 2"]
if {sf::kit-3::%player%::*} is set:
format slot 2 of player with diamond named "&bDelete Kit Diamond" to close then run [make player execute command "/sfkit delete 3"]
format slot 8 of player with nether star named "&9Create" to close then run [make player execute command "/sfkitcreate"]
command /sfkitcreate:
trigger:
wait 2 ticks
if {sf.join::%player%} is false:
open chest with 1 rows named "&9Create Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is not set:
format slot 0 of player with iron ingot named "&8Create Kit Iron" to close then run [make player execute command "/sfkit create 1"]
if {sf::kit-2::%player%::*} is not set:
format slot 1 of player with gold ingot named "&eCreate Kit Gold" to close then run [make player execute command "/sfkit create 2"]
if {sf::kit-3::%player%::*} is not set:
format slot 2 of player with diamond named "&bCreate Kit Diamond" to close then run [make player execute command "/sfkit create 3"]
format slot 8 of player with barrier named "&4Delete" to close then run [make player execute command "/sfkitdelete"]
on rightclick holding arrow:
make player execute command "/sfkitcreate"
#--------------------------------------------------------------------GAME-END#
on death of player:
if {sf.join::%player%} is true:
remove 1 from {sf.players}
if {sf.players} is 1:
teleport {sf::*} to {sf.hub}
send "{@logo}&4%player% Has died!" to {sf::*}
send "{@logo}&aThe other player wins!" to {sf::*}
set {sf.join::*} to false
set {sf.game} to false
set {sf.players} to 0
delete {sf::*}
clear inventory of {sf::*}
execute console command "/heal WimpyLlama"
execute console command "/mapreset"
delete {minigame.arenaname.breakblocks::*}
delete {minigame.arenaname.breaklocations::*}
delete {minigame.arenaname.placeblocks::*}
delete {minigame.arenaname.placelocations::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
#-------------------------------------------------------------------------#
on quit:
if {sf.join::%player%} is true:
remove 1 from {sf.players}
if {sf.players} is 1:
teleport {sf::*} to {sf.hub}
send "{@logo}&4%player% Has died!" to {sf::*}
send "{@logo}&aThe other player wins!" to {sf::*}
set {sf.join::*} to false
set {sf.game} to false
set {sf.players} to 0
delete {sf::*}
clear inventory of {sf::*}
execute console command "/heal WimpyLlama"
execute console command "/mapreset"
delete {minigame.arenaname.breakblocks::*}
delete {minigame.arenaname.breaklocations::*}
delete {minigame.arenaname.placeblocks::*}
delete {minigame.arenaname.placelocations::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
on place:
if {sf.join::%player%} is true:
if {sf.pb} is false:
cancel event
on break:
if {sf.join::%player%} is true:
if {sf.pb} is false:
cancel event
on damage:
if attacker is {sf::*}:
if {sf.pvp} is false:
cancel event
message "&4You can't do that right now!"
on first join:
give player 1 arrow named "&9Create&8/&4Delete &bKits"
on break:
if {sf.join::%player%} is true:
add type of event-block to {minigame.arenaname.breakblocks::*}
add location of event-block to {minigame.arenaname.breaklocations::*}
on place:
if {sf.join::%player%} is true:
add type of event-block to {minigame.arenaname.placeblocks::*}
add location of event-block to {minigame.arenaname.placelocations::*}
command /mapreset:
trigger:
loop {minigame.arenaname.breakblocks::*}:
wait 3 ticks
loop {minigame.arenaname.breaklocations::*}:
wait 3 ticks
set {_loc} to loop-value-2
set block at {_loc} to {minigame.arenaname.breakblocks::%loop-index-2%}
loop {minigame.arenaname.placeblocks::*}:
wait 3 ticks
loop {minigame.arenaname.placelocations::*}:
wait 3 ticks
set {_loc} to loop-value-2
set block at {_loc} to air
message "{@logo}&bYou reset the map!"
You said you were advanced at coding yet you can't debug a really simple script. We are here to help, but there is a limit to how much we'll do before it becomes too much. We are not going to go through something as big as that with not even a hint as to where the problem occurs. Saying 'i can't show you without it being in game' really doesn't help at all. If you're an advanced skript user as you say you are, try using process of elimination to find at least the section of the bug.My entire script is just not working. It's hard to explain without playing in the server it self so if you want to help just say so and I will give the ip for you to help. Here is my script.
code_language.skript:options: logo: &8[&9Sky&3Fight&8] #--------------------------------------# variables: {sf.game} = false {sf.world} = false {sf.players} = 0 {sf.pb} = false {sf.delay} = false {sf.join::%player%} = false {sf.enter} = false {sf.amount} = true {sf.pvp} = false #-----------------------------------LEAVE-COMMAND# command /leave: trigger: if {sf.join::%player%} is true: if {sf.game} is true: clear {sf::*}'s inventory teleport {sf::*} to {sf.hub} set {sf.game} to false set {sf.world} to false set {sf.players} to 0 set {sf.pb} to false set {sf.delay} to false set {sf.join::%player%} to false message "{@logo}&4You left the game!" delete {sf::*} execute console command "/mapreset" delete {minigame.arenaname.breakblocks::*} delete {minigame.arenaname.breaklocations::*} delete {minigame.arenaname.placeblocks::*} delete {minigame.arenaname.placelocations::*} set {_count} to 0 loop 41 times: set slot {_count} of player to {inv.%player%::%{_count}%} add 1 to {_count} if {sf.game} is false: set {sf.game} to false set {sf.world} to false set {sf.players} to 0 set {sf.pb} to false set {sf.delay} to false set {sf.join::*} to false message "{@logo}&4You left the game!" clear the player's inventory teleport the player to {sf.hub} delete {sf::*} execute console command "/mapreset" delete {minigame.arenaname.breakblocks::*} delete {minigame.arenaname.breaklocations::*} delete {minigame.arenaname.placeblocks::*} delete {minigame.arenaname.placelocations::*} set {_count} to 0 loop 41 times: set slot {_count} of player to {inv.%player%::%{_count}%} add 1 to {_count} else: message "{@logo}&4You are not in a game!" #----------------------------MAIN-COMMAND# command /sf <text> <text> <text>: usage: &9/&3sf "&2join&9" "&bmap&9" "&amode&9" trigger: #------------------------------ADMIN-COMMAND# if arg 1 is "admin": player has permission "sf.admin": if arg 2 is "sethub": set {sf.hub} to location of player message "{@logo}&bYou set the hub!" if arg 2 is "setspawn1": set {sf.spawn1.%arg 3%} to location of player message "{@logo}&bYou set spawn1 for %arg 3%!" if arg 2 is "setspawn2": set {sf.spawn2.%arg 3%} to location of player message "{@logo}&bYou set spawn2 for %arg 3%!" if arg 2 is "remake": loop {sf.%world%.breakblocks::*}: loop {sf.%world%.breaklocations::*}: set {_loc} to loop-value-2 set block at {_loc} to {sf.%world%.breakblocks::%loop-index-2%} else: message "&4You are not a admin!" #---------------------------------------------NORMAL-COMMAND# if arg 1 is "join": if arg 2 is "simple": if {sf.join::%player%} is true: message "&4You are already in a game!" if {sf.game} is true: message "&4That game has already started!" if {sf.delay} is true: message "&4That game needs to cool down!" if {sf.world} is true: message "&4That game needs to restart!" if {sf.join::%player%} is false: if {sf.game} is false: if {sf.delay} is false: if {sf.world} is false: if {sf.players} is 0: teleport the player to {sf.spawn1.%arg 2%} if {sf.players} is 1: teleport the player to {sf.spawn2.%arg 2%} execute console command "/day day simple" set {_count} to 0 loop 41 times: set {inv.%player%::%{_count}%} to slot {_count} of player add 1 to {_count} clear the player's inventory add player to {sf::*} add 1 to {sf.players} send "{@logo}&b%player% Joined the game!" to {sf::*} execute console command "gamemode s %player%" give player nether star named "&bKits" set {sf.join::%player%} to true set {sf.pb} to false #----------------------------------------------------------------GAME-START# if {sf.players} is 2: wait 10 ticks set {sf.game} to true set {sf.pvp} to false send "{@logo}&bThe game is starting in 20 seconds!" to {sf::*} wait 10 seconds send "{@logo}&b10 seconds till the game starts" to {sf::*} wait 5 seconds send "{@logo}&b5!" to {sf::*} wait 1 second send "{@logo}&b4!" to {sf::*} wait 1 second send "{@logo}&b3!" to {sf::*} wait 1 second send "{@logo}&b2!" to {sf::*} wait 1 second send "{@logo}&b1!" to {sf::*} wait 1 second send "{@logo}&bGO!" to {sf::*} set {sf.pb} to true remove 1 nether star from the inventory of {sf::*} send "{@logo}&bIn 5 minutes you will be allowed to fight!" to {sf::*} wait 3 minutes send "{@logo}&bIn 2 minutes you will be allowed to fight!" to {sf::*} wait 2 minutes send "{@logo}&bTHE PVP GODS ARE TAKING A NAP! THERE ARE NO RULES!" to {sf::*} set {sf.pvp} to true #------------------------------------------------------KITS# command /sfkit [<text>] [<number>]: trigger: if arg 1 is "create": if arg 2 is set: wait 2 ticks message "{@logo}&bKit %arg 2% Created!" loop all items in player's inventory: add loop-item to {sf::kit-%arg-2%::%player%::*} if arg 1 is "delete": if arg 2 is set: message "{@logo}&bKit %arg 2% Deleted!" clear {sf::kit-%arg-2%::%player%::*} if arg 1 is "use": if arg 2 is set: if {sf.join::%player%} is true: message "{@logo}&bKit %arg 2% Loaded!" clear the player's inventory give player nether star named "&4Kits" loop {sf::kit-%arg-2%::%player%::*}: add loop-value to the player's inventory on rightclick holding nether star: if {sf.join::%player%} is true: open chest with 1 rows named "&4Kits" to player wait 1 tick if {sf::kit-1::%player%::*} is set: format slot 0 of player with iron ingot named "&8Iron" to close then run [make player execute command "/sfkit use 1"] if {sf::kit-2::%player%::*} is set: format slot 1 of player with gold ingot named "&eGold" to close then run [make player execute command "/sfkit use 2"] if {sf::kit-3::%player%::*} is set: format slot 2 of player with diamond named "&bDiamond" to close then run [make player execute command "/sfkit use 3"] #-----------------------------------------------------------------KIT-OPTIONS# command /sfkitdelete: trigger: wait 2 ticks if {sf.join::%player%} is false: open chest with 1 rows named "&4Delete Kits" to player wait 1 tick if {sf::kit-1::%player%::*} is set: format slot 0 of player with iron ingot named "&8Delete Kit Iron" to close then run [make player execute command "/sfkit delete 1"] if {sf::kit-2::%player%::*} is set: format slot 1 of player with gold ingot named "&eDelete Kit Gold" to close then run [make player execute command "/sfkit delete 2"] if {sf::kit-3::%player%::*} is set: format slot 2 of player with diamond named "&bDelete Kit Diamond" to close then run [make player execute command "/sfkit delete 3"] format slot 8 of player with nether star named "&9Create" to close then run [make player execute command "/sfkitcreate"] command /sfkitcreate: trigger: wait 2 ticks if {sf.join::%player%} is false: open chest with 1 rows named "&9Create Kits" to player wait 1 tick if {sf::kit-1::%player%::*} is not set: format slot 0 of player with iron ingot named "&8Create Kit Iron" to close then run [make player execute command "/sfkit create 1"] if {sf::kit-2::%player%::*} is not set: format slot 1 of player with gold ingot named "&eCreate Kit Gold" to close then run [make player execute command "/sfkit create 2"] if {sf::kit-3::%player%::*} is not set: format slot 2 of player with diamond named "&bCreate Kit Diamond" to close then run [make player execute command "/sfkit create 3"] format slot 8 of player with barrier named "&4Delete" to close then run [make player execute command "/sfkitdelete"] on rightclick holding arrow: make player execute command "/sfkitcreate" #--------------------------------------------------------------------GAME-END# on death of player: if {sf.join::%player%} is true: remove 1 from {sf.players} if {sf.players} is 1: teleport {sf::*} to {sf.hub} send "{@logo}&4%player% Has died!" to {sf::*} send "{@logo}&aThe other player wins!" to {sf::*} set {sf.join::*} to false set {sf.game} to false set {sf.players} to 0 delete {sf::*} clear inventory of {sf::*} execute console command "/heal WimpyLlama" execute console command "/mapreset" delete {minigame.arenaname.breakblocks::*} delete {minigame.arenaname.breaklocations::*} delete {minigame.arenaname.placeblocks::*} delete {minigame.arenaname.placelocations::*} set {_count} to 0 loop 41 times: set slot {_count} of player to {inv.%player%::%{_count}%} add 1 to {_count} #-------------------------------------------------------------------------# on quit: if {sf.join::%player%} is true: remove 1 from {sf.players} if {sf.players} is 1: teleport {sf::*} to {sf.hub} send "{@logo}&4%player% Has died!" to {sf::*} send "{@logo}&aThe other player wins!" to {sf::*} set {sf.join::*} to false set {sf.game} to false set {sf.players} to 0 delete {sf::*} clear inventory of {sf::*} execute console command "/heal WimpyLlama" execute console command "/mapreset" delete {minigame.arenaname.breakblocks::*} delete {minigame.arenaname.breaklocations::*} delete {minigame.arenaname.placeblocks::*} delete {minigame.arenaname.placelocations::*} set {_count} to 0 loop 41 times: set slot {_count} of player to {inv.%player%::%{_count}%} add 1 to {_count} on place: if {sf.join::%player%} is true: if {sf.pb} is false: cancel event on break: if {sf.join::%player%} is true: if {sf.pb} is false: cancel event on damage: if attacker is {sf::*}: if {sf.pvp} is false: cancel event message "&4You can't do that right now!" on first join: give player 1 arrow named "&9Create&8/&4Delete &bKits" on break: if {sf.join::%player%} is true: add type of event-block to {minigame.arenaname.breakblocks::*} add location of event-block to {minigame.arenaname.breaklocations::*} on place: if {sf.join::%player%} is true: add type of event-block to {minigame.arenaname.placeblocks::*} add location of event-block to {minigame.arenaname.placelocations::*} command /mapreset: trigger: loop {minigame.arenaname.breakblocks::*}: wait 3 ticks loop {minigame.arenaname.breaklocations::*}: wait 3 ticks set {_loc} to loop-value-2 set block at {_loc} to {minigame.arenaname.breakblocks::%loop-index-2%} loop {minigame.arenaname.placeblocks::*}: wait 3 ticks loop {minigame.arenaname.placelocations::*}: wait 3 ticks set {_loc} to loop-value-2 set block at {_loc} to air message "{@logo}&bYou reset the map!"
options:
logo: &8[&9Sky&3Fight&8]
#--------------------------------------#
variables:
{sf.game} = false
{sf.world} = false
{sf.players} = 0
{sf.pb} = false
{sfjoin.%player%} = false
{sf.delay} = false
{sf.enter} = false
{sf.amount} = true
{sf.pvp} = false
#-----------------------------------LEAVE-COMMAND#
command /leave:
trigger:
send "%{sf.game}%"
if {sfjoin.%player%} is true:
if {sf.game} is true:
clear {sf::*}'s inventory
teleport {sf::*} to {sf.hub}
set {sf.game} to false
set {sf.world} to false
set {sf.players} to 0
set {sf.pb} to false
set {sf.delay} to false
set {sfjoin.%player%} to false
message "{@logo}&4You left the game!"
delete {sf::*}
execute console command "/mapreset"
delete {minigame.arenaname.breakblocks::*}
delete {minigame.arenaname.breaklocations::*}
delete {minigame.arenaname.placeblocks::*}
delete {minigame.arenaname.placelocations::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
else:
set {sf.game} to false
set {sf.world} to false
set {sf.players} to 0
set {sf.pb} to false
set {sfjoin.%player%} to false
message "{@logo}&4You left the game!"
clear the player's inventory
teleport the player to {sf.hub}
delete {sf::*}
execute console command "/mapresetx"
delete {minigame.arenaname.breakblocks::*}
delete {minigame.arenaname.breaklocations::*}
delete {minigame.arenaname.placeblocks::*}
delete {minigame.arenaname.placelocations::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
else:
message "{@logo}&4You are not in a game!"
#----------------------------MAIN-COMMAND#
command /sf <text> <text> [<text>] [<text>]:
usage: &9/&3sf "&2join&9" "&bmap&9" "&amode&9"
trigger:
#------------------------------ADMIN-COMMAND#
if arg 1 is "admin":
if player has permission "sf.admin":
if arg 2 is "sethub":
set {sf.hub} to location of player
message "{@logo}&bYou set the hub!"
if arg 2 is "setspawn1":
set {sf.spawn1.%arg 3%} to location of player
message "{@logo}&bYou set spawn1 for %arg 3%!"
if arg 2 is "setspawn2":
set {sf.spawn2.%arg 3%} to location of player
message "{@logo}&bYou set spawn2 for %arg 3%!"
if arg 2 is "remake":
loop {sf.%world%.breakblocks::*}:
loop {sf.%world%.breaklocations::*}:
set {_loc} to loop-value-2
set block at {_loc} to {sf.%world%.breakblocks::%loop-index-2%}
if arg 2 is "setcages":
if arg 3 is set:
set {sf.cagespawn%arg-4%.%arg-3%} to location of player
message "{@logo}&bYou set cage spawn %arg-4% for %arg 3%!"
else:
message "&4You are not a admin!"
#---------------------------------------------NORMAL-COMMAND#
if arg 1 is "join":
if arg 2 is "simple":
if {sfjoin.%player%} is true:
message "&4You are already in a game!"
else:
if {sf.game} is true:
message "&4That game has already started!"
else:
if {sf.delay} is true:
message "&4That game needs to cool down!"
else:
if {sf.world} is true:
message "&4That game needs to restart!"
else:
if {sfjoin.%player%} is false:
if {sf.players} is 0:
teleport the player to {sf.spawn1.%arg 2%}
if {sf.players} is 1:
teleport the player to {sf.spawn2.%arg 2%}
execute console command "/day day simple"
set {_count} to 0
loop 41 times:
set {inv.%player%::%{_count}%} to slot {_count} of player
add 1 to {_count}
clear the player's inventory
add player to {sf::*}
add 1 to {sf.players}
send "{@logo}&b%player% Joined the game!" to {sf::*}
set player's gamemode to survival
give player nether star named "&bKits"
set {sfjoin.%player%} to true
set {sf.pb} to false
#----------------------------------------------------------------GAME-START#
if {sf.players} is 2:
wait 10 ticks
set {sf.game} to true
set {sf.pvp} to false
loop {sf::*}:
teleport loop-value to {sf.cagespawn%loop-index%.map}
send "{@logo}&bThe game is starting in 20 seconds!" to {sf::*}
wait 10 seconds
send "{@logo}&b10 seconds till the game starts" to {sf::*}
wait 5 seconds
send "{@logo}&b5!" to {sf::*}
wait 1 second
send "{@logo}&b4!" to {sf::*}
wait 1 second
send "{@logo}&b3!" to {sf::*}
wait 1 second
send "{@logo}&b2!" to {sf::*}
wait 1 second
send "{@logo}&b1!" to {sf::*}
loop {sf::*}:
set block under loop-value to air
set {nodmg.%player%} to true
wait 3 seconds
delete {nodmg.%player%}
wait 1 second
send "{@logo}&bGO!" to {sf::*}
set {sf.pb} to true
remove 1 nether star from the inventory of {sf::*}
send "{@logo}&bIn 5 minutes you will be allowed to fight!" to {sf::*}
wait 3 minutes
send "{@logo}&bIn 2 minutes you will be allowed to fight!" to {sf::*}
wait 2 minutes
send "{@logo}&bTHE PVP GODS ARE TAKING A NAP! THERE ARE NO RULES!" to {sf::*}
set {sf.pvp} to true
#------------------------------------------------------KITS#
command /sfkit [<text>] [<number>]:
trigger:
if arg 1 is "create":
if arg 2 is set:
wait 2 ticks
message "{@logo}&bKit %arg 2% Created!"
loop all items in player's inventory:
add loop-item to {sf::kit-%arg-2%::%player%::*}
if arg 1 is "delete":
if arg 2 is set:
message "{@logo}&bKit %arg 2% Deleted!"
clear {sf::kit-%arg-2%::%player%::*}
if arg 1 is "use":
if arg 2 is set:
if {sfjoin.%player%} is true:
message "{@logo}&bKit %arg 2% Loaded!"
clear the player's inventory
give player nether star named "&4Kits"
loop {sf::kit-%arg-2%::%player%::*}:
add loop-value to the player's inventory
on rightclick holding nether star:
if {sfjoin.%player%} is true:
open chest with 1 rows named "&4Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is set:
format slot 0 of player with iron ingot named "&8Iron" to close then run [make player execute command "/sfkit use 1"]
if {sf::kit-2::%player%::*} is set:
format slot 1 of player with gold ingot named "&eGold" to close then run [make player execute command "/sfkit use 2"]
if {sf::kit-3::%player%::*} is set:
format slot 2 of player with diamond named "&bDiamond" to close then run [make player execute command "/sfkit use 3"]
#-----------------------------------------------------------------KIT-OPTIONS#
command /sfkitdelete:
trigger:
wait 2 ticks
if {sfjoin.%player%} is false:
open chest with 1 rows named "&4Delete Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is set:
format slot 0 of player with iron ingot named "&8Delete Kit Iron" to close then run [make player execute command "/sfkit delete 1"]
if {sf::kit-2::%player%::*} is set:
format slot 1 of player with gold ingot named "&eDelete Kit Gold" to close then run [make player execute command "/sfkit delete 2"]
if {sf::kit-3::%player%::*} is set:
format slot 2 of player with diamond named "&bDelete Kit Diamond" to close then run [make player execute command "/sfkit delete 3"]
format slot 8 of player with nether star named "&9Create" to close then run [make player execute command "/sfkitcreate"]
command /sfkitcreate:
trigger:
wait 2 ticks
if {sfjoin.%player%} is false:
open chest with 1 rows named "&9Create Kits" to player
wait 1 tick
if {sf::kit-1::%player%::*} is not set:
format slot 0 of player with iron ingot named "&8Create Kit Iron" to close then run [make player execute command "/sfkit create 1"]
if {sf::kit-2::%player%::*} is not set:
format slot 1 of player with gold ingot named "&eCreate Kit Gold" to close then run [make player execute command "/sfkit create 2"]
if {sf::kit-3::%player%::*} is not set:
format slot 2 of player with diamond named "&bCreate Kit Diamond" to close then run [make player execute command "/sfkit create 3"]
format slot 8 of player with barrier named "&4Delete" to close then run [make player execute command "/sfkitdelete"]
on rightclick holding arrow:
make player execute command "/sfkitcreate"
#--------------------------------------------------------------------GAME-END#
on death of player:
if {sfjoin.%player%} is true:
remove 1 from {sf.players}
if {sf.players} is 1:
teleport {sf::*} to {sf.hub}
send "{@logo}&4%player% Has died!" to {sf::*}
send "{@logo}&aThe other player wins!" to {sf::*}
set {sf.join::*} to false
set {sf.game} to false
set {sf.players} to 0
delete {sf::*}
clear inventory of {sf::*}
heal the player
execute console command "/mapreset"
delete {minigame.arenaname.breakblocks::*}
delete {minigame.arenaname.breaklocations::*}
delete {minigame.arenaname.placeblocks::*}
delete {minigame.arenaname.placelocations::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
#-------------------------------------------------------------------------#
on quit:
if {sfjoin.%player%} is true:
remove 1 from {sf.players}
if {sf.players} is 1:
teleport {sf::*} to {sf.hub}
send "{@logo}&4%player% Has died!" to {sf::*}
send "{@logo}&aThe other player wins!" to {sf::*}
set {sf.join::*} to false
set {sf.game} to false
set {sf.players} to 0
delete {sf::*}
clear inventory of {sf::*}
heal the player
execute console command "/mapresetx"
delete {minigame.arenaname.breakblocks::*}
delete {minigame.arenaname.breaklocations::*}
delete {minigame.arenaname.placeblocks::*}
delete {minigame.arenaname.placelocations::*}
set {_count} to 0
loop 41 times:
set slot {_count} of player to {inv.%player%::%{_count}%}
add 1 to {_count}
on place:
if {sfjoin.%player%} is true:
if {sf.pb} is false:
cancel event
on break:
if {sfjoin.%player%} is true:
if {sf.pb} is false:
cancel event
on damage:
if attacker is a player:
if {sf.pvp} is false:
cancel event
message "&4You can't do that right now!" to attacker
on damage:
if damage cause is fall:
if {nodmg.%victim%} is set:
cancel event
on first join:
give player 1 arrow named "&9Create&8/&4Delete &bKits"
on break:
if {sfjoin.%player%} is true:
add type of event-block to {minigame.arenaname.breakblocks::*}
add location of event-block to {minigame.arenaname.breaklocations::*}
on place:
if {sfjoin.%player%} is true:
add type of event-block to {minigame.arenaname.placeblocks::*}
add location of event-block to {minigame.arenaname.placelocations::*}
command /mapreset:
trigger:
loop {minigame.arenaname.breakblocks::*}:
wait 3 ticks
loop {minigame.arenaname.breaklocations::*}:
wait 3 ticks
set {_loc} to loop-value-2
set {_block} to "%loop-value-1%" parsed as item
set block at {_loc} to {_block}
loop {minigame.arenaname.placeblocks::*}:
wait 3 ticks
loop {minigame.arenaname.placelocations::*}:
wait 3 ticks
set {_loc} to "%loop-value-2%"
set block at {_loc} to air
message "{@logo}&bYou reset the map!"
function SaveArea(t: text):
set {_x} to 0
loop blocks within {arena.pos1.%{_t}%} to {arena.pos2.%{_t}%}:
if loop-block is not air:
add 1 to {_x}
set {arena::%{_t}%::blocklar::%location of loop-block%} to type of block at loop-block
if {_x} is 100:
wait 1 ticks
set {_x} to 0
function Restore(t: text):
set {_x} to 0
set {_y} to 0
wait 0.3 seconds
loop blocks within {arena.pos1.%{_t}%} to {arena.pos2.%{_t}%}:
if {arena::%{_t}%::blocklar::%location of loop-block%} is set:
if type of loop-block is not {arena::%{_t}%::blocklar::%location of loop-block%}:
add 1 to {_x}
set block at loop-block to {arena::%{_t}%::blocklar::%location of loop-block%}
if {_x} is 100:
wait 7 ticks #THIS IS AN ANTI-LAG SISTEM IF, CHANGE AT YOU RISK
set {_x} to 0
else:
if loop-block is not air:
set block at loop-block to air
if {_y} is 4:
wait 10 ticks
set {_y} to 0
command /setpos1 [<text>]:
trigger:
if arg 1 is set:
set {arena.pos1.%arg-1%} to location of player
command /setpos2 [<text>]:
trigger:
if arg 1 is set:
set {arena.pos1.%arg-1%} to location of player
command /save [<text>]:
trigger:
SaveArea("%arg-1%")
command /restore [<text>]:
trigger:
Restore("%arg-1%")