options: # █████╗ █████╗ ███╗ ██╗███████╗██╗ ██████╗ # ██╔══██╗██╔══██╗████╗ ██║██╔════╝██║██╔════╝ # ██║ ╚═╝██║ ██║██╔██╗██║█████╗ ██║██║ ██╗ # ██║ ██╗██║ ██║██║╚████║██╔══╝ ██║██║ ╚██╗ # ╚█████╔╝╚█████╔╝██║ ╚███║██║ ██║╚██████╔╝ # ╚════╝ ╚════╝ ╚═╝ ╚══╝╚═╝ ╚═╝ ╚═════╝ commandperm: kitpvp.play # permission to access basic features adminperm: kitpvp.admin # permission for everything except config and reload opperm: kitpvp.op # permission for everything # The config (besides those perms) is in-game with the command /kitpvp config # █████╗ █████╗ ██████╗ ███████╗ # ██╔══██╗██╔══██╗██╔══██╗██╔════╝ # ██║ ╚═╝██║ ██║██║ ██║█████╗ # ██║ ██╗██║ ██║██║ ██║██╔══╝ # ╚█████╔╝╚█████╔╝██████╔╝███████╗ # ╚════╝ ╚════╝ ╚═════╝ ╚══════╝ on join: player has permission "{@commandperm}": if {KitPvP::Player::%player's uuid%::CurrentKit} is set: clear {KitPvP::Player::%player's uuid%::CurrentKit} clear player's inventory clear player's potion effects set slot 0 of player's inventory to chest named "&aKit Selector &7(Right Click)" heal player command /kitpvp [] [] [] [] []: aliases: kp trigger: if player doesn't have permission "{@commandperm}": player doesn't have permission "{@adminperm}" player doesn't have permission "{@opperm}" send "&cYou don't have permission for this command!" stop if arg-1 is "config": if player has permission "{@opperm}": kitpvpconfiggui("Main", player) else: execute player command "skript:kitpvp" else if arg-1 is "reload": if player has permission "{@opperm}": send "&aStarting reloading the skript files." set {_time} to now reload script script set {_dif} to difference between now and {_time} send "&aSuccesfully reloaded SKitpvp in %{_dif}%" else: execute player command "skript:kitpvp" else if arg-1 is "editstats": if arg-2 is "Set", "Reset", "Add" or "Remove": if arg-3 is set: set {_p} to arg-3 parsed as offline player if {_p} is set: if {KitPvP::Players::*} contains {_p}'s uuid: if arg-4 is "Kills", "Deaths" or "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": if arg-2 is "Reset": if arg-4 is "Kills": set {KitPvP::Stats::%{_p}'s uuid%::Kills} to 0 send "&aSuccesfully set %{_p}%'s kills to 0!" to player send "&cYour kills got reset to 0!" to {_p} else if arg-4 is "Deaths": set {KitPvP::Stats::%{_p}'s uuid%::Deaths} to 0 send "&aSuccesfully set %{_p}%'s deaths to 0!" to player send "&cYour deaths got reset to 0!" to {_p} else if arg-4 is "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": set {KitPvP::Stats::%{_p}'s uuid%::Currency} to 0 send "&aSuccesfully set %{_p}%'s %{KitPvP::Config::Economy::Currency.Name.Multiple}% to 0!" to player send "&cYour %{KitPvP::Config::Economy::Currency.Name.Multiple}% got reset to 0!" to {_p} else if arg-2 is "Set": if arg-5 is set: set {_n} to arg-5 parsed as integer if {_n} is set: if arg-4 is "Kills": if {_n} is less than 0: send "&cYou can't set kills to a negative amount!" to player else: set {KitPvP::Stats::%{_p}'s uuid%::Kills} to {_n} send "&aSuccesfully set %{_p}%'s kills to %{_n}%!" to player send "&cYour Kills got changed to %{_n}%!" to {_p} else if arg-4 is "Deaths": if {_n} is less than 0: send "&cYou can't set deaths to a negative amount!" to player else: set {KitPvP::Stats::%{_p}'s uuid%::Deaths} to {_n} send "&aSuccesfully set %{_p}%'s deaths to %{_n}%!" to player send "&cYour Deaths got changed to %{_n}%!" to {_p} else if arg-4 is "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": if {_n} is less than 0: {KitPvP::Config::Economy::Negativity} is false send "&cYou can't set %{KitPvP::Config::Economy::Currency.Name.Multiple}% to a negative amount while debt is disabled!" to player stop set {KitPvP::Stats::%{_p}'s uuid%::Currency} to {_n} send "&aSuccesfully set %{_p}%'s %{KitPvP::Config::Economy::Currency.Name.Multiple}% to %{_n}%!" to player send "&cYour %{KitPvP::Config::Economy::Currency.Name.Multiple}% got changed to %{_n}%!" to {_p} else: send "&cPlease specify the amount as a whole number!" else: send "&cPlease specify the amount you want to set %{_p}%'s stats to!" else if arg-2 is "Add": if arg-5 is set: set {_n} to arg-5 parsed as integer if {_n} is set: if arg-4 is "Kills": if {KitPvP::Stats::%{_p}'s uuid%::Kills}+{_n} is less than 0: send "&cYou can't set kills to a negative amount!" to player else: add {_n} to {KitPvP::Stats::%{_p}'s uuid%::Kills} send "&aSuccesfully added %{_n}% to %{_p}%'s kills!" to player send "&cYou got %{_n}% added to your Kills!" to {_p} else if arg-4 is "Deaths": if {KitPvP::Stats::%{_p}'s uuid%::Deaths}+{_n} is less than 0: send "&cYou can't set deaths to a negative amount!" to player else: add {_n} to {KitPvP::Stats::%{_p}'s uuid%::Deaths} send "&aSuccesfully added %{_n}% to %{_p}%'s deaths!" to player send "&cYou got %{_n}% added to your Deaths!" to {_p} else if arg-4 is "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": if {KitPvP::Stats::%{_p}'s uuid%::Currency}+{_n} is less than 0: {KitPvP::Config::Economy::Negativity} is false send "&cYou can't set %{KitPvP::Config::Economy::Currency.Name.Multiple}% to a negative amount while debt is disabled!" to player stop add {_n} to {KitPvP::Stats::%{_p}'s uuid%::Currency} send "&aSuccesfully added %{_n}% to %{_p}%'s %{KitPvP::Config::Economy::Currency.Name.Multiple}%!" to player send "&cYou got %{_n}% added to your %{KitPvP::Config::Economy::Currency.Name.Multiple}%!" to {_p} else: send "&cPlease specify the amount as a whole number!" else: send "&cPlease specify the amount you want to set %{_p}%'s stats to!" else if arg-2 is "Remove": if arg-5 is set: set {_n} to arg-5 parsed as integer if {_n} is set: if arg-4 is "Kills": if {KitPvP::Stats::%{_p}'s uuid%::Kills}-{_n} is less than 0: send "&cYou can't set kills to a negative amount!" to player else: remove {_n} from {KitPvP::Stats::%{_p}'s uuid%::Kills} send "&aSuccesfully removed %{_n}% from %{_p}%'s kills!" to player send "&cYou got %{_n}% removed from your Kills!" to {_p} else if arg-4 is "Deaths": if {KitPvP::Stats::%{_p}'s uuid%::Deaths}-{_n} is less than 0: send "&cYou can't set deaths to a negative amount!" to player else: remove {_n} from {KitPvP::Stats::%{_p}'s uuid%::Deaths} send "&aSuccesfully removed %{_n}% from %{_p}%'s deaths!" to player send "&cYou got %{_n}% removed from your Deaths!" to {_p} else if arg-4 is "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": if {KitPvP::Stats::%{_p}'s uuid%::Currency}-{_n} is less than 0: {KitPvP::Config::Economy::Negativity} is false send "&cYou can't set %{KitPvP::Config::Economy::Currency.Name.Multiple}% to a negative amount while debt is disabled!" to player stop remove {_n} from {KitPvP::Stats::%{_p}'s uuid%::Currency} send "&aSuccesfully removed %{_n}% from %{_p}%'s %{KitPvP::Config::Economy::Currency.Name.Multiple}%!" to player send "&cYou got %{_n}% removed from your %{KitPvP::Config::Economy::Currency.Name.Multiple}%!" to {_p} else: send "&cPlease specify the amount as a whole number!" else: send "&cPlease specify the amount you want to set %{_p}%'s stats to!" else: send "&cPlease specify which stat you want to edit! Kills, Deaths, %{KitPvP::Config::Economy::Currency.Name.Multiple}%" else: send "&cThat player never joined!" else: send "&cThat is not a valid player name!" else: send "&cPlease specify a player whose stats you want to edit!" else: send "&cPlease specify what you want to do! Set, Reset, Add or Remove" else if arg-1 is "buy": if arg-2 is set: if arg-5 is set: set {_kit} to "%arg-2% %arg-3% %arg-4% %arg-5%" else if arg-4 is set: set {_kit} to "%arg-2% %arg-3% %arg-4%" else if arg-3 is set: set {_kit} to "%arg-2% %arg-3%" else: set {_kit} to arg-2 if {KitPvP::Player::%player's uuid%::Kits::%{_kit}%} is true: send "&cYou already bought that kit! Sell it using /kp sell %{_kit}%" else if {KitPvP::Kits::*} doesn't contain {_kit}: send "&cThat kit doesn't exist! You can't buy nothing!" else: if {KitPvP::Kits::%{_kit}%::EconomyCost} is false: send "&cThat kit is free so you already have access to it!" else if {KitPvP::Config::Economy::Economy} is false: send "&cThe economy is disabled so you can't buy that kit!" else: if {KitPvP::Stats::%player's uuid%::Currency} is more than or equal to {KitPvP::Kits::%{_kit}%::EconomyPrice}: remove {KitPvP::Kits::%{_kit}%::EconomyPrice} from {KitPvP::Stats::%player's uuid%::Currency} set {KitPvP::Player::%player's uuid%::Kits::%{_kit}%} to true loop {KitPvP::Kits::*}: {_kit} is loop-value {KitPvP::Kits::%{_kit}%::EconomyPrice} is 1: send "&aYou succesfully bought the %loop-value% kit for 1 %{KitPvP::Config::Economy::Currency.Name}%!" else: send "&aYou succesfully bought the %loop-value% kit for %{KitPvP::Kits::%{_kit}%::EconomyPrice}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%!" set {KitPvP::Player::%player's uuid%::Kits::%{_kit}%} to true else: send "&cYou don't have enough %{KitPvP::Config::Economy::Currency.Name.Multiple}% for that! (%{KitPvP::Stats::%player's uuid%::Currency}% out of %{KitPvP::Kits::%{_kit}%::EconomyPrice}%)" else: send "&cPlease specify a kit!" else if arg-1 is "sell": if {KitPvP::Config::Economy::Selling} is not true: send "&cSelling is disabled on this server! Contact server administrators if something is wrong!" else if arg-2 is set: if arg-5 is set: set {_kit} to "%arg-2% %arg-3% %arg-4% %arg-5%" else if arg-4 is set: set {_kit} to "%arg-2% %arg-3% %arg-4%" else if arg-3 is set: set {_kit} to "%arg-2% %arg-3%" else: set {_kit} to arg-2 if {KitPvP::Player::%player's uuid%::Kits::%{_kit}%} is false: send "&cYou haven't bought that kit! Buy it using /kp buy %{_kit}%" else if {KitPvP::Config::Economy::Economy} is false: send "&cThe economy is disabled so you can't sell that kit!" else: if {KitPvP::Stats::%player's uuid%::Currency} is more than or equal to {KitPvP::Kits::%{_kit}%::EconomyPrice}: add {KitPvP::Kits::%{_kit}%::EconomyPrice} to {KitPvP::Stats::%player's uuid%::Currency} if {KitPvP::Kits::%{_kit}%::EconomyPrice} is 1: send "&aSuccesfully sold the %{_kit}% kit for 1 %{KitPvP::Config::Economy::Currency.Name}%" else: send "&aSuccesfully sold the %{_kit}% kit for %{KitPvP::Kits::%{_kit}%::EconomyPrice}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%" set {KitPvP::Player::%player's uuid%::Kits::%{_kit}%} to false else: send "&cYou don't have enough %{KitPvP::Config::Economy::Currency.Name.Multiple}% for that! (%{KitPvP::Stats::%player's uuid%::Currency}% out of %{KitPvP::Kits::%{_kit}%::EconomyPrice}%)" else: send "&cPlease specify a kit!" else if arg-1 is "edit": if player has permission "{@adminperm}" or "{@opperm}": if arg-2 is set: if arg-5 is set: set {_kit} to "%arg-2% %arg-3% %arg-4% %arg-5%" else if arg-4 is set: set {_kit} to "%arg-2% %arg-3% %arg-4%" else if arg-3 is set: set {_kit} to "%arg-2% %arg-3%" else: set {_kit} to arg-2 if {KitPvP::Kits::*} doesn't contain {_kit}: send "&cThat kit doesn't exist! You can't edit nothing!" else: loop {KitPvP::Kits::*}: loop-value is {_kit} editkitgui(player, loop-value) else: send "&cPlease specify a kit!" else: execute player command "kp" else if arg-1 is "create": if player has permission "{@adminperm}" or "{@opperm}": if arg-2 is set: if arg-5 is set: set {_kit} to "%arg-2% %arg-3% %arg-4% %arg-5%" else if arg-4 is set: set {_kit} to "%arg-2% %arg-3% %arg-4%" else if arg-3 is set: set {_kit} to "%arg-2% %arg-3%" else: set {_kit} to arg-2 if {KitPvP::Kits::*} contains {_kit}: send "&cThat kit already exists! Use /kp delete before making a new one!" else: createkit(player, {_kit}) else: send "&cPlease specify the name of the kit!" else: execute player command "skript:kitpvp" else if arg-1 is "delete": if player has permission "{@adminperm}" or "{@opperm}": if arg-2 is set: if arg-5 is set: set {_kit} to "%arg-2% %arg-3% %arg-4% %arg-5%" else if arg-4 is set: set {_kit} to "%arg-2% %arg-3% %arg-4%" else if arg-3 is set: set {_kit} to "%arg-2% %arg-3%" else: set {_kit} to arg-2 if {KitPvP::Kits::*} doesn't contain {_kit}: send "&cThat kit doesn't exist! You can't delete nothing!" else: clear {KitPvP::Kits::%{_kit}%} send "&aSuccesfully deleted kit %{_kit}%" else: send "&cPlease specify the name of the kit!" else if arg-1 is "menu": kitpvpmenugui(player) else if arg-1 is "leaderboard" or "leaderboards": if arg-2 is set: if arg-2 is "Kills": sendLeaderboard("kills", player) else if arg-2 is "Deaths": sendLeaderboard("deaths", player) else if arg-2 is "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": sendLeaderboard("%{KitPvP::Config::Economy::Currency.Name.Multiple}%", player) else: execute player command "kp leaderboard" else: send "&cPlease specify a leaderboard: Kills, Deaths, %{KitPvP::Config::Economy::Currency.Name.Multiple}%" else if arg-1 is "stats": if arg-2 is set: set {_p} to arg-2 parsed as offline player if {_p} is set: if {KitPvP::Stats::%{_p}'s uuid%::Kills} is set: send "&b&l&m----&b&l Stats %{_p}% &m----" send "&bKills: %{KitPvP::Stats::%{_p}'s uuid%::Kills}%" send "&bDeaths: %{KitPvP::Stats::%{_p}'s uuid%::Deaths}%" send "" if {KitPvP::Stats::%{_p}'s uuid%::Currency} is 1 or -1: send "&bEconomy: %{KitPvP::Stats::%{_p}'s uuid%::Currency}% %{KitPvP::Config::Economy::Currency.Name}%" else: send "&bEconomy: %{KitPvP::Stats::%{_p}'s uuid%::Currency}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%" send "" else: send "&cThat player never joined!" else: send "&cThat is not a player name!" else: send "&b&l&m----&b&l Stats %player% &m----" send "&bKills: %{KitPvP::Stats::%player's uuid%::Kills}%" send "&bDeaths: %{KitPvP::Stats::%player's uuid%::Deaths}%" send "" if {KitPvP::Stats::%player's uuid%::Currency} is 1 or -1: send "&bEconomy: %{KitPvP::Stats::%player's uuid%::Currency}% %{KitPvP::Config::Economy::Currency.Name}%" else: send "&bEconomy: %{KitPvP::Stats::%player's uuid%::Currency}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%" send "" else if arg-1 is "clear": if arg-2 is set: if player has permission "{@adminperm}" or "{@opperm}": set {_p} to arg-2 parsed as player if {_p} is set: if {KitPvP::Player::%{_p}'s uuid%::CurrentKit} is set: clear {KitPvP::Player::%{_p}'s uuid%::CurrentKit} clear {_p}'s inventory clear {_p}'s potion effects set slot 0 of {_p}'s inventory to chest named "&aKit Selector &7(Right Click)" send "&aYou cleared %{_p}%'s kit!" to player heal {_p} send "&cYour kit got cleared!" to {_p} else: send "&cYou can't clear nothing!" to player else: send "&cThat player is not online!" else: execute player command "skript:kitpvp" else if {KitPvP::Player::%player's uuid%::CurrentKit} is set: clear {KitPvP::Player::%player's uuid%::CurrentKit} clear player's inventory clear player's potion effects set slot 0 of player's inventory to chest named "&aKit Selector &7(Right Click)" heal player send "&aYou cleared your kit!" else: send "&cYou can't clear nothing!" else if arg-1 is "kits": if amount of {KitPvP::Kits::*} is 0: send "&cThere aren't any kits available!" else: send "&b&l&m-----&b&l< KitPvP Kits >&m-----" loop {KitPvP::Kits::*}: send "- %loop-value%" send "&b&l&m--------------------" else if arg-1 is "setspawn": if player has permission "{@opperm}" or "{@adminperm}": set {KitPvP::Locs::Spawn} to player's location send "&aSuccesfully set spawn to your location!" else if arg-1 is "kit": if arg-2 is set: if arg-5 is set: set {_kit} to "%arg-2% %arg-3% %arg-4% %arg-5%" else if arg-4 is set: set {_kit} to "%arg-2% %arg-3% %arg-4%" else if arg-3 is set: set {_kit} to "%arg-2% %arg-3%" else: set {_kit} to arg-2 if {KitPvP::Kits::*} contains {_kit}: selectkit({_kit}, player) else: send "&cThat kit name is invalid!" else: send "&cWrong usage! /kp kit &l" else if arg-1 is "preview": if arg-2 is set: if arg-5 is set: set {_kit} to "%arg-2% %arg-3% %arg-4% %arg-5%" else if arg-4 is set: set {_kit} to "%arg-2% %arg-3% %arg-4%" else if arg-3 is set: set {_kit} to "%arg-2% %arg-3%" else: set {_kit} to arg-2 if {KitPvP::Kits::*} contains {_kit}: previewkit({_kit}, player) else: send "&cThat kit name is invalid!" else: send "&cWrong usage! /kp preview &l" else if arg-1 is "hologram": if player has permission "{@opperm}" or "{@adminperm}": if arg-2 is "list", "delete" or "create": if arg-2 is "list": loop {KitPvP::Hologram::*}: loop {KitPvP::Hologram::%loop-index%::*}: add "&f%loop-index-1%: %loop-value-2%" to {_holograms::*} size of {_holograms::*} is more than 0: send "&b&l&m---------- &b&lKitPvP Holograms &m----------" loop {_holograms::*}: send loop-value send "&f" else: send "&cYou can't list nothing!" else if arg-2 is "delete": if arg-3 is "kills", "deaths" or "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": if arg-4 is set: set {_id} to arg-4 parsed as integer if arg-3 is "kills": set {_type} to "Kills" else if arg-3 is "deaths": set {_type} to "Deaths" else: set {_type} to "Economy" {_id} is set: if {KitPvP::Hologram::%{_type}%::%{_id}%} is set: loop {KitPvP::Hologram::%{_type}%::%{_id}%::*}: loop all entities in radius 0.05 around {KitPvP::Hologram::%{_type}%::%{_id}%::%loop-index%}: loop-entity is an armor stand kill loop-entity clear {KitPvP::Hologram::%{_type}%::%{_id}%::%loop-index%} clear {KitPvP::Hologram::%{_type}%::%{_id}%} send "&aCleared the %{_type}%: %{_id}% hologram!" else: send "&cThat is not an existing Hologram!" else: send "&cPlease specify the ID of the hologram you want to delete!" else: send "&cPlease specify the ID of the hologram you want to delete!" else: send "&cInvalid hologram type! Choose between Kills, Deaths or %{KitPvP::Config::Economy::Currency.Name.Multiple}%" else if arg-2 is "create": if arg-3 is "kills", "deaths" or "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": arg-3 is "deaths": createhologram(player's location, "Deaths", {KitPvP::Config::Leaderboard::Deaths.showamount}) else if arg-3 is "kills": createhologram(player's location, "Kills", {KitPvP::Config::Leaderboard::Kills.showamount}) else: createhologram(player's location, "%{KitPvP::Config::Economy::Currency.Name.Multiple}%", {KitPvP::Config::Leaderboard::Economy.showamount}) else: send "&cInvalid hologram type! Choose between Kills, Deaths or %{KitPvP::Config::Economy::Currency.Name.Multiple}%" else: send "&cPlease specify an action! Create, Delete or List" else: execute player command "kp help" else if arg-1 is "spawn": if {KitPvP::Locs::Spawn} is set: send "&cTeleporting you to spawn! Don't move!" set {_xpos} to player's x-pos set {_ypos} to player's y-pos set {_zpos} to player's z-pos send "&aTeleporting to spawn in 3 seconds" loop 12 times: wait 5 ticks if difference between {_xpos} and player's x-pos is more than 0.1: send "&cYou moved!" stop else if difference between {_xpos} and player's x-pos is more than 0.1: send "&cYou moved!" stop else if difference between {_xpos} and player's x-pos is more than 0.1: send "&cYou moved!" stop if loop-value is 4: send "&aTeleporting to spawn in 2 seconds" if loop-value is 8: send "&aTeleporting to spawn in 1 second" teleport player to {KitPvP::Locs::Spawn} else: send "&cSpawn is not set! Contact server administrators!" else if arg-1 is "help": if arg-2 is "admin": if player has permission "{@opperm}" or "{@adminperm}": send "&b&l&m--------&r &b&lKitPvP Admin Help &m--------" send "" send "&b/kp help &7- &fDisplays a help message with all other commands." send "&b/kp help admin &7- &fDisplays this help message." player has permission "{@opperm}": send "&b/kp config &7- &fManage the config." send "&b/kp reload &7- &fReload the files." send "&b/kp edit &7- &fEdit a kit." send "&b/kp setspawn &7- &fSets the spawn for /kp spawn." send "&b/kp create &7- &fCreates a kit based on your inventory." send "&b/kp delete &7- &fCompletely removes a kit." send "&8Commands to control others's gameplay" send "&b/kp spawn &7- &fTeleport someone to spawn." send "&b/kp kit &7- &fMake someone select a kit." send "&b/kp clear &7- &fClear someone's kit." send "&b/kp editstats &7- &fChange someone's stats." send "&b" send "&b&l&m--------&r &b&lKitPvP Admin Help &m--------" stop send "&b&l&m-----------&r &b&lKitPvP Help &m----------" send "" send "&b/kp help &7- &fDisplays this help message." send "&b/kp stats &7- &fView someone's stats." send "&b/kp menu &7- &fOpen the kits menu." send "&b/kp clear &7- &fClears your current kit." send "&b/kp kits &7- &fLists all available kits." send "&b/kp kit &7- &fSelect a kit to use." send "&b/kp buy &7- &fBuy a kit for later use." send "&b/kp preview &7- &fSelect a kit to preview." send "&b/kp spawn &7- &fTeleports to the KitPvP spawn." if player has permission "{@opperm}" or "{@adminperm}": send "&b/kp help admin &7- &fHelp page for admin commands." send "" send "&b&l&m-----------&r &b&lKitPvP Help &m----------" else: execute player command "kitpvp help" # Loading in vars for the first time on load: {KitPvP::Hologram::Kills} is not set: set {KitPvP::Hologram::Kills} to "Kills" set {KitPvP::Hologram::Deaths} to "Deaths" set {KitPvP::Hologram::Economy} to "Economy" if {KitPvP::Config::Leaderboard::UpdateMessages} is not set: set {KitPvP::Config::Leaderboard::UpdateMessages} to true set {KitPvP::Config::Leaderboard::Economy} to true set {KitPvP::Config::Leaderboard::Deaths} to true set {KitPvP::Config::Leaderboard::Kills} to true set {KitPvP::Config::Leaderboard::Economy.UpdateTime} to 2 minutes set {KitPvP::Config::Leaderboard::Kills.UpdateTime} to 2 minutes set {KitPvP::Config::Leaderboard::Deaths.UpdateTime} to 2 minutes set {KitPvP::Config::Leaderboard::Deaths.ShowAmount} to 10 set {KitPvP::Config::Leaderboard::Kills.ShowAmount} to 10 set {KitPvP::Config::Leaderboard::Deaths.MinAmount} to 0 set {KitPvP::Config::Leaderboard::Kills.MinAmount} to 0 set {KitPvP::Config::Leaderboard::Economy.ShowAmount} to 10 set {KitPvP::Config::Leaderboard::Economy.MinAmount} to 0 if {KitPvP::Config::Economy::Economy} is not set: set {KitPvP::Config::Economy::Economy} to true set {KitPvP::Config::Economy::Currency.Name} to "Coin" set {KitPvP::Config::Economy::Currency.Name.Multiple} to "Coins" set {KitPvP::Config::Economy::KillAmount} to 5 set {KitPvP::Config::Economy::DeathAmount} to 0 set {KitPvP::Config::Economy::Negativity} to false set {KitPvP::Config::Economy::StartCapital} to 0 set {KitPvP::Config::Economy::Selling} to true if {KitPvP::Config::SignCommands::SignCommands} is not set: set {KitPvP::Config::SignCommands::SignCommands} to true set {KitPvP::Config::SignCommands::EnablePrefix} to "[KitPvP]" set {KitPvP::Config::SignCommands::UsePrefix} to "&7[&b&lKIT-PVP&7]" if size of {KitPvP::PotionEffects::*} is 0: set {KitPvP::PotionEffects::Saturation} to 0 set {KitPvP::PotionEffects::Hunger} to 0 set {KitPvP::PotionEffects::Strength} to 0 set {KitPvP::PotionEffects::Weakness} to 0 set {KitPvP::PotionEffects::Regeneration} to 0 set {KitPvP::PotionEffects::Resistance} to 0 set {KitPvP::PotionEffects::Fire Resistance} to 0 set {KitPvP::PotionEffects::Absorption} to 0 set {KitPvP::PotionEffects::Speed} to 0 set {KitPvP::PotionEffects::Slowness} to 0 set {KitPvP::PotionEffects::Glowing} to 0 set {KitPvP::PotionEffects::Invisibility} to 0 set {KitPvP::PotionEffects::Jump Boost} to 0 set {KitPvP::PotionEffects::Slow Falling} to 0 set {KitPvP::PotionEffects::Haste} to 0 set {KitPvP::PotionEffects::Mining Fatigue} to 0 set {KitPvP::PotionEffects::Night Vision} to 0 set {KitPvP::PotionEffects::Water Breathing} to 0 on sign change: {KitPvP::Config::SignCommands::SignCommands} is true if line 1 of event-block is {KitPvP::Config::SignCommands::EnablePrefix}: line 2 of event-block is set line 2 of event-block is "menu", "clear", "kit", "preview", "refill", "kits", "stats" or "spawn" if line 2 of event-block is "menu": set line 1 of event-block to {KitPvP::Config::SignCommands::UsePrefix} set line 2 of event-block to "&fClick to open" set line 3 of event-block to "&fthe kit selector" send "&bYou have succesfully created a sign command." else if line 2 of event-block is "clear": set line 1 of event-block to {KitPvP::Config::SignCommands::UsePrefix} set line 2 of event-block to "&fClick to clear" set line 3 of event-block to "&fyour current kit" send "&bYou have succesfully created a sign command." else if line 2 of event-block is "stats": set line 1 of event-block to {KitPvP::Config::SignCommands::UsePrefix} set line 2 of event-block to "&fClick to view" set line 3 of event-block to "&fyour stats" send "&bYou have succesfully created a sign command." else if line 2 of event-block is "spawn": set line 1 of event-block to {KitPvP::Config::SignCommands::UsePrefix} set line 2 of event-block to "&fClick to" set line 3 of event-block to "&fteleport to spawn" send "&bYou have succesfully created a sign command." else if line 2 of event-block is "refill": set line 1 of event-block to {KitPvP::Config::SignCommands::UsePrefix} set line 2 of event-block to "&fClick to refill" set line 3 of event-block to "&fyour soups" send "&bYou have succesfully created a sign command." else if line 2 of event-block is "preview": if line 3 of event-block is set: set {_kit} to line 3 of event-block if {KitPvP::Kits::*} contains {_kit}: set line 1 of event-block to {KitPvP::Config::SignCommands::UsePrefix} set line 2 of event-block to "&fClick to preview" set line 3 of event-block to "&fthe %{_kit}%" set line 4 of event-block to "&fkit" send "&bYou have succesfully created a sign command." else: send "&cThat kit does not exist!" else: send "&cPlease specify the kit name!" else if line 2 of event-block is "kit": if line 3 of event-block is set: set {_kit} to line 3 of event-block if {KitPvP::Kits::*} contains {_kit}: set line 1 of event-block to {KitPvP::Config::SignCommands::UsePrefix} set line 2 of event-block to "&fClick to select" set line 3 of event-block to "&fthe %{_kit}%" set line 4 of event-block to "&fkit" send "&bYou have succesfully created a sign command." else: send "&cThat kit does not exist!" else: send "&cPlease specify the kit name!" on right click on sign: {KitPvP::Config::SignCommands::SignCommands} is true if line 1 of event-block is {KitPvP::Config::SignCommands::UsePrefix}: if line 3 of event-block is "&fthe kit selector": kitpvpmenugui(player) else if line 3 of event-block is "&fyour soups": set {_gui} to chest inventory with 6 rows named "Refill" loop 54 times: set slot loop-value -1 of {_gui} to mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health." open {_gui} to player else if line 2 of event-block is "&fClick to select": set {_kit::*} to line 3 of event-block split at "&fthe " selectkit("%{_kit::2}%", player) else if line 2 of event-block is "&fClick to preview": set {_kit::*} to line 3 of event-block split at "&fthe " previewkit("%{_kit::2}%", player) else if line 3 of event-block is "&fteleport to spawn": if {KitPvP::Locs::Spawn} is set: send "&cTeleporting you to spawn! Don't move!" set {_xpos} to player's x-pos set {_ypos} to player's y-pos set {_zpos} to player's z-pos send "&aTeleporting to spawn in 3 seconds" loop 12 times: wait 5 ticks if difference between {_xpos} and player's x-pos is more than 0.1: send "&cYou moved!" stop else if difference between {_xpos} and player's x-pos is more than 0.1: send "&cYou moved!" stop else if difference between {_xpos} and player's x-pos is more than 0.1: send "&cYou moved!" stop if loop-value is 4: send "&aTeleporting to spawn in 2 seconds" if loop-value is 8: send "&aTeleporting to spawn in 1 second" teleport player to {KitPvP::Locs::Spawn} else: send "&cSpawn is not set! Contact server administrators!" else if line 3 of event-block is "&fyour stats": send "&b&l&m----&b&l Stats %player% &m----" send "&bKills: %{KitPvP::Stats::%player's uuid%::Kills}%" send "&bDeaths: %{KitPvP::Stats::%player's uuid%::Deaths}%" send "" if {KitPvP::Stats::%player's uuid%::Currency} is 1 or -1: send "&bEconomy: %{KitPvP::Stats::%player's uuid%::Currency}% %{KitPvP::Config::Economy::Currency.Name}%" else: send "&bEconomy: %{KitPvP::Stats::%player's uuid%::Currency}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%" send "" else if line 2 of event-block is "&fClick to clear": if {KitPvP::Player::%player's uuid%::CurrentKit} is set: clear {KitPvP::Player::%player's uuid%::CurrentKit} clear player's inventory set slot 0 of player's inventory to chest named "&aKit Selector &7(Right Click)" clear player's potion effects heal player send "&aYou cleared your kit!" to player else: send "&cYou can't clear nothing!" on inventory click: event-slot is chest named "&aKit Selector &7(Right Click)": cancel event kitpvpmenugui(player) on click: event-item is chest named "&aKit Selector &7(Right Click)": cancel event kitpvpmenugui(player) on swap hand items: event-player's tool is chest named "&aKit Selector &7(Right Click)": cancel event kitpvpmenugui(player) on drop: event-item is chest named "&aKit Selector &7(Right Click)": cancel event kitpvpmenugui(player) on damage: victim is a player {KitPvP::Player::%victim's uuid%::CurrentKit} is not set: victim has permission "{@commandperm}" or "{@opperm}" or "{@adminperm}" cancel event attacker is a player if {KitPvP::Player::%attacker's uuid%::CurrentKit} is not set: victim has permission "{@commandperm}" or "{@opperm}" or "{@adminperm}" cancel event function editkitgui(p: player, kit: text): set {_gui} to chest inventory with 6 rows named "&dEdit Kit GUI" loop 54 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&d" set slot 10 of {_gui} to {KitPvP::Kits::%{_kit}%::GUIItem} named "&7%{_kit}% GUI Item" with lore "&8&oClick this and then click an item in your inventory." set slot 12 of {_gui} to stone button named "&7GUI Slot" with lore "&8&oChoose where you want the %{_kit}% kit to be in the menu!" if {KitPvP::Kits::%{_kit}%::EconomyCost} is false: set slot 14 of {_gui} to gold ingot named "&7%{_kit}% Kit Cost Toggle" with lore "&7&oClick to Enable", "&7", "&fMakes the kit cost in-game currency", "&8&oYou can't obtain these kits if economy is disabled." and "&cCurrently Disabled" else: set slot 14 of {_gui} to gold ingot named "&7%{_kit}% Kit Cost Toggle" with lore "&7&oClick to Disable", "&7", "&fMakes the kit cost %{KitPvP::Config::Economy::Currency.Name.Multiple}%.", "&8&oYou can't obtain these kits if economy is disabled." and "&aCurrently Enabled" if {KitPvP::Kits::%{_kit}%::EconomyPrice} is 1: set slot 15 of {_gui} to gold ingot named "&7%{_kit}% Kit Cost" with lore "&7&oClick to change", "&7", "&fSets the kit cost in %{KitPvP::Config::Economy::Currency.Name.Multiple}%.", "&8&oDoesn't do anything if kit cost toggle is disabled." and "&aCurrently 1 %{KitPvP::Config::Economy::Currency.Name}%" else: set slot 15 of {_gui} to gold ingot named "&7%{_kit}% Kit Cost" with lore "&7&oClick to change", "&7", "&fSets the kit cost in %{KitPvP::Config::Economy::Currency.Name.Multiple}%.", "&8&oDoesn't do anything if kit cost toggle is disabled." and "&aCurrently %{KitPvP::Kits::%{_kit}%::EconomyPrice}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%" set slot 31 of {_gui} to chest named "&7%{_kit}% Kit Contents" with lore "&7&oClick to change", "&7" and "&fChanges the items the kit contains." set slot 29 of {_gui} to brewing stand named "&7%{_kit}% Permanent Potion Effects" with lore "&7&oClick to change", "&7" and "&fAdds permanent kit potion effects." set slot 49 of {_gui} to barrier named "&cClose" open {_gui} to {_p} on inventory click: event-inventory is not player's inventory player's current inventory's name is "&dEdit Kit GUI" cancel event event-slot is barrier named "&cClose": close player's inventory else if event-slot is gold ingot: if event-slot's name contains "Kit Cost Toggle": set {_kit} to event-slot's name replace all " Kit Cost Toggle" in {_kit} with "" replace all "&7" in {_kit} with "" if line 1 of event-slot's lore contains "Disable": set {KitPvP::Kits::%{_kit}%::EconomyCost} to false send "&aSuccesfully disabled the %{_kit}% kit currency cost!" editkitgui(player, {_kit}) else: set {KitPvP::Kits::%{_kit}%::EconomyCost} to true send "&aSuccesfully enabled the %{_kit}% kit currency cost!" editkitgui(player, {_kit}) else if event-slot's name contains "Kit Cost": set {_kit} to event-slot's name replace all " Kit Cost" in {_kit} with "" replace all "&7" in {_kit} with "" close player's inventory set {KitPvP::Chat::%player's uuid%} to "%{_kit}%CostSet" send "&aType in chat the amount of %{KitPvP::Config::Economy::Currency.Name.Multiple}% you want the %{_kit}% kit to cost!" loop {KitPvP::Kits::*}: if event-slot is arrow named "&eGo Back To The %loop-value% Edit GUI": editkitgui(player, loop-value) stop else if event-slot is stone button named "&eClick this to change the GUI slot of the %loop-value% kit!": editkitgui(player, loop-value) send "&aSuccesfully changed the GUI slot for the %loop-value% kit!" add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {_spots::*}: event-slot is loop-value-2 set {KitPvP::Kits::%loop-index-1%::GUISlot} to loop-value-2 if event-slot's lore contains "&8&oClick this and then click an item in your inventory.": loop {KitPvP::Kits::*}: if event-slot's name is "&7%loop-value% GUI Item": set {KitPvP::Inventory::%player's uuid%} to "SetGUIItem%loop-value%" send "&aNow click an item in your inventory to set the %loop-value% GUI item to!" else if event-slot's lore contains "&fAdds permanent kit potion effects.": set {_kit} to name of event-slot replace all " Permanent Potion Effects" in {_kit} with "" set {_kit} to last (length of {_kit}-2) characters of {_kit} openpotioneditgui(player, {_kit}) else if event-slot's lore contains "&fChanges the items the kit contains.": set {_kit} to name of event-slot replace all " Kit Contents" in {_kit} with "" set {_kit} to last (length of {_kit}-2) characters of {_kit} set {_gui} to chest inventory with 6 rows named "&dEdit Kit Contents GUI" loop 4 times: set slot loop-value +13 of {_gui} to magenta stained glass pane named "&d" set slot 9 of {_gui} to magenta stained glass pane named "&dHelmet Slot" set slot 10 of {_gui} to magenta stained glass pane named "&dChestplate Slot" set slot 11 of {_gui} to magenta stained glass pane named "&dLeggings Slot" set slot 12 of {_gui} to magenta stained glass pane named "&dBoots Slot" set slot 13 of {_gui} to magenta stained glass pane named "&dOffhand Slot" set slot 8 of {_gui} to arrow named "&eGo Back To The %{_kit}% Edit GUI" set slot 0 of {_gui} to {KitPvP::Kits::%{_kit}%::Helmet} set slot 1 of {_gui} to {KitPvP::Kits::%{_kit}%::Chestplate} set slot 2 of {_gui} to {KitPvP::Kits::%{_kit}%::Leggings} set slot 3 of {_gui} to {KitPvP::Kits::%{_kit}%::Boots} set slot 4 of {_gui} to {KitPvP::Kits::%{_kit}%::Offhand} loop 9 times: set slot 44+loop-value of {_gui} to {KitPvP::Kits::%{_kit}%::%loop-value -1%} loop 27 times: set slot 17+loop-value of {_gui} to {KitPvP::Kits::%{_kit}%::%loop-value +8%} open {_gui} to player else if event-slot is stone button named "&7GUI Slot": set {_kit} to line 1 of event-slot's lore replace all "&8&oChoose where you want the " in {_kit} with "" replace all " kit to be in the menu!" in {_kit} with "" set {_gui} to chest inventory with 6 rows named "&dEdit Kit GUI" loop 54 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&d" add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} loop {_spots::*}: set slot loop-value of {_gui} to stone button named "&eClick this to change the GUI slot of the %{_kit}% kit!" set slot 49 of {_gui} to barrier named "&cClose" set slot 48 of {_gui} to arrow named "&eGo Back To The %{_kit}% Edit GUI" open {_gui} to player function openpotioneditgui(p: player, kit: text): set {_gui} to chest inventory with 5 rows named "&dEdit Kit Potions GUI" loop 45 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&d" set slot 10 of {_gui} to diamond sword named "&dStrength Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Strength}%" set slot 11 of {_gui} to wooden sword named "&dWeakness Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Weakness}%" set slot 12 of {_gui} to diamond boots named "&dSpeed Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Speed}%" set slot 13 of {_gui} to leather boots named "&dSlowness Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Slowness}%" set slot 14 of {_gui} to apple named "&dRegeneration Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Regeneration}%" set slot 15 of {_gui} to golden apple named "&dAbsorption Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Absorption}%" set slot 16 of {_gui} to shield named "&dResistance Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Resistance}%" set slot 19 of {_gui} to flint and steel named "&dFire Resistance Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Fire Resistance}%" set slot 20 of {_gui} to glowstone named "&dGlowing Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Glowing}%" set slot 21 of {_gui} to golden pickaxe named "&dHaste Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Haste}%" set slot 22 of {_gui} to wooden pickaxe named "&dMining Fatigue Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Mining Fatigue}%" set slot 23 of {_gui} to chainmail helmet named "&dInvisibility Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Invisibility}%" set slot 24 of {_gui} to leather boots named "&dJump Boost Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Jump Boost}%" set slot 25 of {_gui} to elytra named "&dSlow Falling Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Slow Falling}%" set slot 28 of {_gui} to steak named "&dSaturation Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Saturation}%" set slot 29 of {_gui} to rotten flesh named "&dHunger Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Hunger}%" set slot 30 of {_gui} to water bottle named "&dWater Breathing Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Water Breathing}%" set slot 31 of {_gui} to diamond helmet named "&dNight Vision Effect" with lore "&7&oLeft-Click to add 1 level.", "&7&oRight-Click to remove 1 level." and "&7Current Level: %{KitPvP::Kits::%{_kit}%::PotionEffects::Night Vision}%" set slot 40 of {_gui} to barrier named "&cClose" set slot 39 of {_gui} to arrow named "&eGo Back To The %{_kit}% Edit GUI" open {_gui} to {_p} on inventory click: event-inventory is not player's inventory event-inventory's name is "&dEdit Kit Potions GUI": cancel event set {_kit} to slot 39 of player's current inventory's name replace all "&eGo Back To The " in {_kit} with "" replace all " Edit GUI" in {_kit} with "" event-slot is 40: close player's inventory else if event-slot is 39: editkitgui(player, {_kit}) else if event-slot's type is not magenta stained glass pane: if event-slot's name contains " Effect": set {_effect} to event-slot's name replace all " Effect" in {_effect} with "" set {_effect} to last (length of {_effect}-2) characters of {_effect} "%click type%" contains "left": add 1 to {KitPvP::Kits::%{_kit}%::PotionEffects::%{_effect}%} send "&aAdded 1 to the %{_effect}% Effect for the %{_kit}% Kit" openpotioneditgui(player, {_kit}) else: if {KitPvP::Kits::%{_kit}%::PotionEffects::%{_effect}%} is more than 0: remove 1 from {KitPvP::Kits::%{_kit}%::PotionEffects::%{_effect}%} send "&aRemoved 1 from the %{_effect}% Effect for the %{_kit}% Kit" openpotioneditgui(player, {_kit}) else: send "&cYou can't give a negative potion effect!" on inventory click: event-inventory is not player's inventory event-inventory's name is "&dEdit Kit Contents GUI": loop {KitPvP::Kits::*}: if event-slot is arrow named "&eGo Back To The %loop-value% Edit GUI": editkitgui(player, loop-value) stop if event-slot is magenta stained glass pane named "&d": cancel event on inventory close: event-inventory's name is "&dEdit Kit Contents GUI": loop {KitPvP::Kits::*}: if slot 8 of event-inventory is arrow named "&eGo Back To The %loop-value% Edit GUI": set {_kit} to loop-value set {KitPvP::Kits::%{_kit}%::Helmet} to slot 0 of event-inventory set {KitPvP::Kits::%{_kit}%::Chestplate} to slot 1 of event-inventory set {KitPvP::Kits::%{_kit}%::Leggings} to slot 2 of event-inventory set {KitPvP::Kits::%{_kit}%::Boots} to slot 3 of event-inventory set {KitPvP::Kits::%{_kit}%::Offhand} to slot 4 of event-inventory loop 9 times: set {KitPvP::Kits::%{_kit}%::%loop-value -1%} to slot 44+loop-value of event-inventory loop 27 times: set {KitPvP::Kits::%{_kit}%::%loop-value +8%} to slot 17+loop-value of event-inventory send "&aSuccesfully loaded the %{_kit}% kit contents." on inventory click: event-inventory is player's inventory {KitPvP::Inventory::%player's uuid%} is set: cancel event if {KitPvP::Inventory::%player's uuid%} contains "SetGUIItem": set {_kit} to last (length of {KitPvP::Inventory::%player's uuid%} - 10) characters of {KitPvP::Inventory::%player's uuid%} set {KitPvP::Kits::%{_kit}%::GUIItem} to event-slot send "&aSuccesfully set the %{_kit}% GUI Item to %event-slot%" editkitgui(player, {_kit}) clear {KitPvP::Inventory::%player's uuid%} on inventory close: clear {KitPvP::Inventory::%player's uuid%} function createkit(p: player, kit: text): set {_slot} to 0 set {_fl} to first character of {_kit} set {_fl} to uppercase({_fl}) set {_kit2} to lowercase({_kit}) set {_kit2} to "%{_fl}%%last (length of {_kit2} - 1) characters of {_kit2}%" replace all "" in {_kit2} with "" set {KitPvP::Kits::%{_kit2}%} to {_kit2} loop 36 times: set {KitPvP::Kits::%{_kit}%::%{_slot}%} to slot {_slot} of {_p}'s inventory add 1 to {_slot} set {KitPvP::Kits::%{_kit2}%::EconomyCost} to false set {KitPvP::Kits::%{_kit2}%::EconomyPrice} to 10 set {KitPvP::Kits::%{_kit2}%::Helmet} to {_p}'s helmet set {KitPvP::Kits::%{_kit2}%::Chestplate} to {_p}'s chestplate set {KitPvP::Kits::%{_kit2}%::Leggings} to {_p}'s leggings set {KitPvP::Kits::%{_kit2}%::Boots} to {_p}'s boots set {KitPvP::Kits::%{_kit2}%::Offhand} to {_p}'s offhand tool loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::%{_kit2}%::PotionEffects::%loop-index%} to 0 add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} set {KitPvP::Kits::%{_kit2}%::GUISlot} to first element of {_spots::*} if {_p}'s tool's type is not air: set {KitPvP::Kits::%{_kit2}%::GUIItem} to {_p}'s tool's type else: set {KitPvP::Kits::%{_kit2}%::GUIItem} to bedrock send "&aSuccesfully created the %{_kit2}% Kit! Edit it using /kp edit %{_kit2}%!" to {_p} function sendLeaderboard(t: text, p: player): if {_t} is "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": if {KitPvP::Config::Leaderboard::Economy} is false: send "&cThe %{KitPvP::Config::Economy::Currency.Name.Multiple}% leaderboard is disabled!" to {_p} stop send "&b&l&m-----------&b&l< &6&lTop %{KitPvP::Config::Leaderboard::Economy.ShowAmount}% &b&l>&m-----------" to {_p} loop {KitPvP::Leaderboard::Economy::*}: add 1 to {_num} {_num} is more than {KitPvP::Config::Leaderboard::Economy.ShowAmount}: stop loop {KitPvP::Leaderboard::Economy::%loop-index%::amount} is more than or equal to {KitPvP::Config::Leaderboard::Economy.MinAmount} if {KitPvP::Leaderboard::Economy::%loop-index%::amount} is 1 or -1: send "&6%loop-index% &7- &c%loop-value% &8» &7%{KitPvP::Leaderboard::Economy::%loop-index%::amount}% %{KitPvP::Config::Economy::Currency.Name}%" to {_p} else: send "&6%loop-index% &7- &c%loop-value% &8» &7%{KitPvP::Leaderboard::Economy::%loop-index%::amount}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%" to {_p} send "&b&l&m------------------------------" to {_p} else if {_t} is "Kills": if {KitPvP::Config::Leaderboard::Kills} is false: send "&cThe kills leaderboard is disabled!" to {_p} stop send "&b&l&m-----------&b&l< &6&lTop %{KitPvP::Config::Leaderboard::Kills.ShowAmount}% &b&l>&m-----------" to {_p} loop {KitPvP::Leaderboard::Kills::*}: add 1 to {_num} if {_num} is more than {KitPvP::Config::Leaderboard::Kills.ShowAmount}: stop loop {KitPvP::Leaderboard::Kills::%loop-index%::amount} is more than or equal to {KitPvP::Config::Leaderboard::Kills.MinAmount} if {KitPvP::Leaderboard::Kills::%loop-index%::amount} is 1: send "&6%loop-index% &7- &c%loop-value% &8» &71 Kill" to {_p} else: send "&6%loop-index% &7- &c%loop-value% &8» &7%{KitPvP::Leaderboard::Kills::%loop-index%::amount}% Kills" to {_p} send "&b&l&m------------------------------" to {_p} else if {_t} is "Deaths": if {KitPvP::Config::Leaderboard::Deaths} is false: send "&cThe deaths leaderboard is disabled!" to {_p} stop send "&b&l&m-----------&b&l< &6&lTop %{KitPvP::Config::Leaderboard::Deaths.ShowAmount}% &b&l>&m-----------" to {_p} loop {KitPvP::Leaderboard::Deaths::*}: add 1 to {_num} {_num} is more than {KitPvP::Config::Leaderboard::Deaths.ShowAmount}: stop loop {KitPvP::Leaderboard::Deaths::%loop-index%::amount} is more than or equal to {KitPvP::Config::Leaderboard::Deaths.MinAmount} if {KitPvP::Leaderboard::Deaths::%loop-index%::amount} is 1: send "&6%loop-index% &7- &c%loop-value% &8» &71 Death" to {_p} else: send "&6%loop-index% &7- &c%loop-value% &8» &7%{KitPvP::Leaderboard::Deaths::%loop-index%::amount}% Deaths" to {_p} send "&b&l&m------------------------------" to {_p} function updateLeaderboard(t: text): if {_t} is "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": {KitPvP::Config::Leaderboard::Economy} is true loop {KitPvP::Players::*}: set {_Economy::%loop-value parsed as offline player%} to {KitPvP::Stats::%loop-value%::Currency} loop {_Economy::*}: add 1 to {_size} if {_low.to.high.list::%loop-value%} is not set: set {_low.to.high.list::%loop-value%} to loop-index else: set {_n} to 0 loop {_size} times: add 1 to {_n} {_low.to.high.list::%loop-value-1%.%{_n}%} is not set set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index stop loop set {_n} to size of {_low.to.high.list::*} loop {_low.to.high.list::*}: set {_high.to.low.list::%{_n}%} to loop-value set {_n} to {_n}-1 set {_i} to 0 loop {_high.to.low.list::*}: add 1 to {_topnumber} set {KitPvP::Leaderboard::Economy::%{_topnumber}%} to "%loop-value%" parsed as offline player set {KitPvP::Leaderboard::Economy::%{_topnumber}%::amount} to {KitPvP::Stats::%{KitPvP::Leaderboard::Economy::%{_topnumber}%}'s uuid%::Currency} {KitPvP::Config::Leaderboard::UpdateMessages} is true loop all players: send "&aUpdated the %{KitPvP::Config::Economy::Currency.Name.Multiple}% leaderboards. (loaded %{_topnumber}% players)" to loop-player else if {_t} is "Kills": {KitPvP::Config::Leaderboard::Kills} is true loop {KitPvP::Players::*}: set {_Kills::%loop-value parsed as offline player%} to {KitPvP::Stats::%loop-value%::Kills} loop {_Kills::*}: add 1 to {_size} if {_low.to.high.list::%loop-value%} is not set: set {_low.to.high.list::%loop-value%} to loop-index else: set {_n} to 0 loop {_size} times: add 1 to {_n} {_low.to.high.list::%loop-value-1%.%{_n}%} is not set set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index stop loop set {_n} to size of {_low.to.high.list::*} loop {_low.to.high.list::*}: set {_high.to.low.list::%{_n}%} to loop-value set {_n} to {_n}-1 set {_i} to 0 loop {_high.to.low.list::*}: add 1 to {_topnumber} set {KitPvP::Leaderboard::Kills::%{_topnumber}%} to "%loop-value%" parsed as offline player set {KitPvP::Leaderboard::Kills::%{_topnumber}%::amount} to {KitPvP::Stats::%{KitPvP::Leaderboard::Economy::%{_topnumber}%}'s uuid%::Kills} {KitPvP::Config::Leaderboard::UpdateMessages} is true loop all players: send "&aUpdated the Kills leaderboards. (loaded %{_topnumber}% players)" to loop-player else if {_t} is "Deaths": {KitPvP::Config::Leaderboard::Deaths} is true loop {KitPvP::Players::*}: set {_Deaths::%loop-value parsed as offline player%} to {KitPvP::Stats::%loop-value%::Deaths} loop {_Deaths::*}: add 1 to {_size} if {_low.to.high.list::%loop-value%} is not set: set {_low.to.high.list::%loop-value%} to loop-index else: set {_n} to 0 loop {_size} times: add 1 to {_n} {_low.to.high.list::%loop-value-1%.%{_n}%} is not set set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index stop loop set {_n} to size of {_low.to.high.list::*} loop {_low.to.high.list::*}: set {_high.to.low.list::%{_n}%} to loop-value set {_n} to {_n}-1 set {_i} to 0 loop {_high.to.low.list::*}: add 1 to {_topnumber} set {KitPvP::Leaderboard::Deaths::%{_topnumber}%} to "%loop-value%" parsed as offline player set {KitPvP::Leaderboard::Deaths::%{_topnumber}%::amount} to {KitPvP::Stats::%{KitPvP::Leaderboard::Economy::%{_topnumber}%}'s uuid%::Deaths} {KitPvP::Config::Leaderboard::UpdateMessages} is true loop all players: send "&aUpdated the Deaths leaderboards. (loaded %{_topnumber}% players)" to loop-player on join: if {KitPvP::Players::*} doesn't contain player's uuid: add player's uuid to {KitPvP::Players::*} function kitpvpmenugui(p: player): set {_gui} to chest inventory with 6 rows named "&dKitPvP Kits Menu" loop 45 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&d" loop 9 times: set slot loop-value + 44 of {_gui} to gray stained glass pane named "&d" set slot 49 of {_gui} to barrier named "&cClose" loop {KitPvP::Kits::*}: set slot {KitPvP::Kits::%loop-index%::GUISlot} of {_gui} to {KitPvP::Kits::%loop-index%::GUIItem} named "&a%loop-value% Kit" with lore "&7&oLeft-Click to select" and "&7&oRight-Click to preview" open {_gui} to {_p} on inventory click: event-inventory is not player's inventory player's current inventory's name is "&dKitPvP Kits Menu" cancel event event-slot is barrier named "&cClose": close player's inventory else if event-slot is not magenta stained glass pane named "&d": if event-slot's name contains " Kit": set {_kit} to first (length of event-slot's name - 4) characters of event-slot's name set {_kit} to last (length of {_kit} - 2) characters of {_kit} if "%click type%" contains "right": previewkit({_kit}, player) else: selectkit({_kit}, player) function previewkit(kit: text, p: player): set {_gui} to chest inventory with 6 rows named "&8Kit Preview GUI" loop 9 times: set slot 8+loop-value of {_gui} to gray stained glass pane named "&e" set slot 0 of {_gui} to {KitPvP::Kits::%{_kit}%::Helmet} set slot 1 of {_gui} to {KitPvP::Kits::%{_kit}%::Chestplate} set slot 2 of {_gui} to {KitPvP::Kits::%{_kit}%::Leggings} set slot 3 of {_gui} to {KitPvP::Kits::%{_kit}%::Boots} set slot 4 of {_gui} to {KitPvP::Kits::%{_kit}%::Offhand} set {_item} to brewing stand named "&dPotion Effects" loop {KitPvP::Kits::%{_kit}%::PotionEffects::*}: loop-value is more than 0: add "&f%loop-index% %loop-value%" to {_item}'s lore if size of {_item}'s lore is 0: add "&cThe %{_kit}% kit doesn't have any potion effects." to {_item}'s lore set slot 6 of {_gui} to {_item} loop 9 times: set slot 44+loop-value of {_gui} to {KitPvP::Kits::%{_kit}%::%loop-value -1%} loop 27 times: set slot 17+loop-value of {_gui} to {KitPvP::Kits::%{_kit}%::%loop-value +8%} set slot 8 of {_gui} to arrow named "&eBack" with lore "&7Go back to the kits menu" open {_gui} to {_p} on inventory click: event-inventory is not player's inventory player's current inventory's name is "&8Kit Preview GUI" cancel event event-slot is arrow named "&eBack" with lore "&7Go back to the kits menu": close player's inventory kitpvpmenugui(player) function createhologram(loc: location, t: text, a: integer): if {_t} is "Kills": set {_largest} to 0 loop {KitPvP::Hologram::Kills::*}: loop-value is bigger than {_largest}: set {_largest} to loop-value add 1 to {_largest} set {KitPvP::Hologram::Kills::%{_largest}%} to {_largest} set {_num} to 0 loop {KitPvP::Leaderboard::Kills::*}: add 1 to {_num} {_num} is more than {_a}: stop loop {KitPvP::Leaderboard::Kills::%loop-index%::amount} is more than or equal to {KitPvP::Config::Leaderboard::Kills.MinAmount} add 1 to {_asamount} set {_aloc} to location 0.25*{_asamount} above {_loc} set {_num} to 0 loop {KitPvP::Leaderboard::Kills::*}: set {_aloc} to location 0.25 below {_aloc} add 1 to {_num} {_num} is more than {_a}: stop loop {KitPvP::Leaderboard::Kills::%loop-index%::amount} is more than or equal to {KitPvP::Config::Leaderboard::Kills.MinAmount} spawn armor stand at {_aloc} set tag "NoGravity" of nbt compound of last spawned armor stand to true set tag "Invisible" of nbt compound of last spawned armor stand to true set tag "CustomNameVisible" of nbt compound of last spawned armor stand to true set tag "Invulnerable" of nbt compound of last spawned armor stand to true if {KitPvP::Leaderboard::Kills::%loop-index%::amount} is 1: set last spawned armor stand's name to "&6%loop-index% &7- &c%loop-value% &8» &71 Kill" else: set last spawned armor stand's name to "&6%loop-index% &7- &c%loop-value% &8» &7%{KitPvP::Leaderboard::Kills::%loop-index%::amount}% Kills" set {KitPvP::Hologram::Kills::%{_largest}%::%{_num}%} to location of last spawned armor stand spawn armor stand at location 0.25*{_asamount}+0.2 above {_loc} set tag "NoGravity" of nbt compound of last spawned armor stand to true set tag "Invisible" of nbt compound of last spawned armor stand to true set tag "CustomNameVisible" of nbt compound of last spawned armor stand to true set tag "Invulnerable" of nbt compound of last spawned armor stand to true set last spawned armor stand's name to "&b&l&m------&b&l< &6&lKILLS Top %{_a}% &b&l>&m------" set {KitPvP::Hologram::Kills::%{_largest}%::%{_num}+1%} to location of last spawned armor stand else if {_t} is "Deaths": set {_largest} to 0 loop {KitPvP::Hologram::Deaths::*}: loop-value is bigger than {_largest}: set {_largest} to loop-value add 1 to {_largest} set {KitPvP::Hologram::Deaths::%{_largest}%} to {_largest} set {_num} to 0 loop {KitPvP::Leaderboard::Deaths::*}: add 1 to {_num} {_num} is more than {_a}: stop loop {KitPvP::Leaderboard::Deaths::%loop-index%::amount} is more than or equal to {KitPvP::Config::Leaderboard::Deaths.MinAmount} add 1 to {_asamount} set {_aloc} to location 0.25*{_asamount} above {_loc} set {_num} to 0 loop {KitPvP::Leaderboard::Deaths::*}: set {_aloc} to location 0.25 below {_aloc} add 1 to {_num} {_num} is more than {_a}: stop loop {KitPvP::Leaderboard::Deaths::%loop-index%::amount} is more than or equal to {KitPvP::Config::Leaderboard::Deaths.MinAmount} spawn armor stand at {_aloc} set tag "NoGravity" of nbt compound of last spawned armor stand to true set tag "Invisible" of nbt compound of last spawned armor stand to true set tag "CustomNameVisible" of nbt compound of last spawned armor stand to true set tag "Invulnerable" of nbt compound of last spawned armor stand to true if {KitPvP::Leaderboard::Deaths::%loop-index%::amount} is 1: set last spawned armor stand's name to "&6%loop-index% &7- &c%loop-value% &8» &71 Deaths" else: set last spawned armor stand's name to "&6%loop-index% &7- &c%loop-value% &8» &7%{KitPvP::Leaderboard::Deaths::%loop-index%::amount}% Deaths" set {KitPvP::Hologram::Deaths::%{_largest}%::%{_num}%} to location of last spawned armor stand spawn armor stand at location 0.25*{_asamount}+0.2 above {_loc} set tag "NoGravity" of nbt compound of last spawned armor stand to true set tag "Invisible" of nbt compound of last spawned armor stand to true set tag "CustomNameVisible" of nbt compound of last spawned armor stand to true set tag "Invulnerable" of nbt compound of last spawned armor stand to true set last spawned armor stand's name to "&b&l&m------&b&l< &6&lDEATHS Top %{_a}% &b&l>&m------" set {KitPvP::Hologram::Deaths::%{_largest}%::%{_num}+1%} to location of last spawned armor stand else if {_t} is "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": set {_largest} to 0 loop {KitPvP::Hologram::Economy::*}: loop-value is bigger than {_largest}: set {_largest} to loop-value add 1 to {_largest} set {KitPvP::Hologram::Economy::%{_largest}%} to {_largest} set {_num} to 0 loop {KitPvP::Leaderboard::Economy::*}: add 1 to {_num} {_num} is more than {_a}: stop loop {KitPvP::Leaderboard::Economy::%loop-index%::amount} is more than or equal to {KitPvP::Config::Leaderboard::Economy.MinAmount} add 1 to {_asamount} set {_aloc} to location 0.25*{_asamount} above {_loc} set {_num} to 0 loop {KitPvP::Leaderboard::Economy::*}: set {_aloc} to location 0.25 below {_aloc} add 1 to {_num} {_num} is more than {_a}: stop loop {KitPvP::Leaderboard::Economy::%loop-index%::amount} is more than or equal to {KitPvP::Config::Leaderboard::Economy.MinAmount} spawn armor stand at {_aloc} set tag "NoGravity" of nbt compound of last spawned armor stand to true set tag "Invisible" of nbt compound of last spawned armor stand to true set tag "CustomNameVisible" of nbt compound of last spawned armor stand to true set tag "Invulnerable" of nbt compound of last spawned armor stand to true if {KitPvP::Leaderboard::Economy::%loop-index%::amount} is 1: set last spawned armor stand's name to "&6%loop-index% &7- &c%loop-value% &8» &71 %{KitPvP::Config::Economy::Currency.Name}%" else: set last spawned armor stand's name to "&6%loop-index% &7- &c%loop-value% &8» &7%{KitPvP::Leaderboard::Economy::%loop-index%::amount}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%" set {KitPvP::Hologram::Economy::%{_largest}%::%{_num}%} to location of last spawned armor stand spawn armor stand at location 0.25*{_asamount}+0.2 above {_loc} set tag "NoGravity" of nbt compound of last spawned armor stand to true set tag "Invisible" of nbt compound of last spawned armor stand to true set tag "CustomNameVisible" of nbt compound of last spawned armor stand to true set tag "Invulnerable" of nbt compound of last spawned armor stand to true set last spawned armor stand's name to "&b&l&m------&b&l< &6&l%{KitPvP::Config::Economy::Currency.Name.Multiple}% Top %{_a}% &b&l>&m------" set {KitPvP::Hologram::Economy::%{_largest}%::%{_num}+1%} to location of last spawned armor stand function selectkit(kit: text, p: player): if {KitPvP::Kits::%{_kit}%::EconomyCost} is true: if {KitPvP::Player::%{_p}'s uuid%::Kits::%{_kit}%} is not true: if {KitPvP::Kits::%{_kit}%::EconomyPrice} is 1: send "&cYou need to buy that kit first! Cost is 1 %{KitPvP::Config::Economy::Currency.Name}% at /kp buy %{_kit}%" to {_p} else: send "&cYou need to buy that kit first! Cost is %{KitPvP::Kits::%{_kit}%::EconomyPrice}% %{KitPvP::Config::Economy::Currency.Name.Multiple}% at /kp buy %{_kit}%" to {_p} stop if {KitPvP::Player::%{_p}'s uuid%::CurrentKit} is set: send "&cYou already have a kit selected! First do /kp clear!" to {_p} else: loop {KitPvP::Kits::*}: if {_kit} is loop-value: close {_p}'s inventory set {KitPvP::Player::%{_p}'s uuid%::CurrentKit} to loop-value loop 36 times: set slot loop-value-2 -1 of {_p}'s inventory to {KitPvP::Kits::%loop-index%::%loop-value-2 -1%} set {_p}'s helmet to {KitPvP::Kits::%loop-index%::Helmet} set {_p}'s chestplate to {KitPvP::Kits::%loop-index%::Chestplate} set {_p}'s leggings to {KitPvP::Kits::%loop-index%::Leggings} set {_p}'s boots to {KitPvP::Kits::%loop-index%::Boots} set {_p}'s offhand tool to {KitPvP::Kits::%loop-index%::Offhand} loop {KitPvP::Kits::%loop-index%::PotionEffects::*}: loop-value-2 is more than 0: if loop-index-2 is "Strength": apply strength loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Weakness": apply weakness loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Speed": apply speed loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Slowness": apply slowness loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Regeneration": apply regeneration loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Absorption": apply absorption loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Resistance": apply resistance loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Fire Resistance": apply fire resistance loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Glowing": apply glowing loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Haste": apply haste loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Mining Fatigue": apply mining fatigue loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Invisibility": apply invisibility loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Jump Boost": apply jump boost loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Slow Falling": apply slow falling loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Saturation": apply saturation loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Hunger": apply hunger loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Water Breathing": apply water breathing loop-value-2 without any particles to {_p} for 9999 days else if loop-index-2 is "Night Vision": apply night vision loop-value-2 without any particles to {_p} for 9999 days function kitpvpconfiggui(t: text, p: player): if {_t} is "Main": set {_gui} to chest inventory with 6 rows named "&dKitPvP Configuration" loop 45 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&7" loop 9 times: set slot loop-value + 44 of {_gui} to gray stained glass pane named "&7" set slot 49 of {_gui} to barrier named "&cClose" set slot 10 of {_gui} to paper named "&dLeaderboards Category" with lore "&fClick to go to the Leaderboards Config" set slot 11 of {_gui} to gold ingot named "&dEconomy Category" with lore "&fClick to go to the Economy Config" set slot 12 of {_gui} to oak sign named "&dSign Commands Category" with lore "&fClick to go to the Sign Commands Config" set slot 13 of {_gui} to command block named "&dCommands Category" with lore "&fClick to go to the Commands Config" else if {_t} is "SignCommands": set {_gui} to chest inventory with 4 rows named "&dKitPvP Configuration" loop 27 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&7" loop 9 times: set slot loop-value + 26 of {_gui} to gray stained glass pane named "&7" set slot 31 of {_gui} to barrier named "&cClose" set slot 30 of {_gui} to arrow named "&eBack" with lore "&7Click to go back to the main config" if {KitPvP::Config::SignCommands::SignCommands} is true: set slot 10 of {_gui} to oak sign named "&dSign Commands" with lore "&7&oClick to Disable", "&7", "&fControls if you can create and use sign commands.", "&7" and "&aCurrently Enabled" else: set slot 10 of {_gui} to oak sign named "&dSign Commands" with lore "&7&oClick to Enable", "&7", "&fControls if you can create and use sign commands.", "&7" and "&cCurrently Disabled" set slot 11 of {_gui} to paper named "&dEnable Sign Commands Prefix" with lore "&7&oClick to change", "&7", "&fWhat line 1 of a sign needs to be to enable sign commands.", "&8&o(No color codes supported)." and "&aCurrently &f%{KitPvP::Config::SignCommands::EnablePrefix}%" set slot 12 of {_gui} to paper named "&dUse Sign Commands Prefix" with lore "&7&oClick to change", "&7", "&fWhat line 1 of the sign will be set to after enabling sign commands.", "&8&o(Color codes supported)." and "&aCurrently &f%{KitPvP::Config::SignCommands::UsePrefix}%" else if {_t} is "Messages": set {_gui} to chest inventory with 6 rows named "&dKitPvP Configuration" loop 45 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&7" loop 9 times: set slot loop-value + 44 of {_gui} to gray stained glass pane named "&7" set slot 40 of {_gui} to barrier named "&cClose" set slot 39 of {_gui} to arrow named "&eBack" with lore "&7Click to go back to the main config" else if {_t} is "Commands": set {_gui} to chest inventory with 5 rows named "&dKitPvP Configuration" loop 36 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&7" loop 9 times: set slot loop-value + 35 of {_gui} to gray stained glass pane named "&7" set slot 40 of {_gui} to barrier named "&cClose" set slot 39 of {_gui} to arrow named "&eBack" with lore "&7Click to go back to the main config" if {KitPvP::Config::Commands::Spawn} is true: set slot 10 of {_gui} to command block named "&dSpawn" with lore "&7&oClick to Disable", "&7", "&fMakes /spawn do the same as /kp spawn.", "&7" and "&aCurrently Enabled" else: set slot 10 of {_gui} to command block named "&dSpawn" with lore "&7&oClick to Enable", "&7", "&fMakes /spawn do the same as /kp spawn.", "&7" and "&cCurrently Disabled" if {KitPvP::Config::Commands::Leaderboard} is true: set slot 11 of {_gui} to paper named "&dLeaderboards" with lore "&7&oClick to Disable", "&7", "&fMakes /leaderboard(s) do the same as /kp leaderboard.", "&7" and "&aCurrently Enabled" else: set slot 11 of {_gui} to paper named "&dLeaderboards" with lore "&7&oClick to Enable", "&7", "&fMakes /leaderboard(s) do the same as /kp leaderboard.", "&7" and "&cCurrently Disabled" if {KitPvP::Config::Commands::Help} is true: set slot 12 of {_gui} to writable book named "&dHelp" with lore "&7&oClick to Disable", "&7", "&fMakes /help (admin) do the same as /kp help (admin).", "&7" and "&aCurrently Enabled" else: set slot 12 of {_gui} to writable book named "&dHelp" with lore "&7&oClick to Enable", "&7", "&fMakes /help (admin) do the same as /kp help (admin).", "&7" and "&cCurrently Disabled" if {KitPvP::Config::Commands::Buy} is true: set slot 13 of {_gui} to gold ingot named "&dBuy" with lore "&7&oClick to Disable", "&7", "&fMakes /buy (kit) do the same as /kp buy (kit).", "&7" and "&aCurrently Enabled" else: set slot 13 of {_gui} to gold ingot named "&dBuy" with lore "&7&oClick to Enable", "&7", "&fMakes /buy (kit) do the same as /kp buy (kit).", "&7" and "&cCurrently Disabled" else if {_t} is "Economy": set {_gui} to chest inventory with 5 rows named "&dKitPvP Configuration" loop 36 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&7" loop 9 times: set slot loop-value + 35 of {_gui} to gray stained glass pane named "&7" set slot 40 of {_gui} to barrier named "&cClose" set slot 39 of {_gui} to arrow named "&eBack" with lore "&7Click to go back to the main config" if {KitPvP::Config::Economy::Economy} is true: set slot 10 of {_gui} to gold ingot named "&dEconomy" with lore "&7&oClick to Disable", "&7", "&fManages the entire economy.", "&7" and "&aCurrently Enabled" else: set slot 10 of {_gui} to gold ingot named "&dEconomy" with lore "&7&oClick to Enable", "&7", "&fManages the entire economy.", "&7" and "&cCurrently Disabled" set slot 11 of {_gui} to paper named "&dCurrency Name" with lore "&7&oClick to change", "&7", "&fThe currency name is used for commands and messages.", "&7" and "&aCurrently ""%{KitPvP::Config::Economy::Currency.Name}%""" set slot 12 of {_gui} to paper named "&dCurrency Name Multiple" with lore "&7&oClick to change", "&7", "&fThe multiple of the currency named, coin -> coins.", "&7" and "&aCurrently ""%{KitPvP::Config::Economy::Currency.Name.Multiple}%""" set slot 13 of {_gui} to iron sword named "&dKill Amount" with lore "&7&oClick to change", "&7", "&fHow many %{KitPvP::Config::Economy::Currency.Name.Multiple}% you get on kill.", "&8&oDoesn't do anything if Economy is disabled." and "&aCurrently %{KitPvP::Config::Economy::KillAmount}%" set slot 14 of {_gui} to shield named "&dDeath Amount" with lore "&7&oClick to change", "&7", "&fHow many %{KitPvP::Config::Economy::Currency.Name.Multiple}% you lose on death.", "&8&oDoesn't do anything if Economy is disabled." and "&aCurrently %{KitPvP::Config::Economy::DeathAmount}%" if {KitPvP::Config::Economy::Negativity} is false: set slot 15 of {_gui} to barrier named "&dNegativity Allowed" with lore "&7&oClick to Enable" and "&7", "&fAllows players to go in debt with the currency.", "&8&oDisabling it doesn't make players lose debt.", "&cCurrently Disabled" else: set slot 15 of {_gui} to barrier named "&dNegativity Allowed" with lore "&7&oClick to Disable" and "&7", "&fAllows players to go in debt with the currency.", "&8&oDisabling it doesn't make players lose debt.", "&aCurrently Enabled" set slot 16 of {_gui} to gold ingot named "&dStart Capital" with lore "&7Click to change", "&7" and "&fHow much of the currency new players get.", "&8&oEven if the economy is disabled, new players will still get this.", "&aCurrently %{KitPvP::Config::Economy::StartCapital}%" if {KitPvP::Config::Economy::Selling} is false: set slot 19 of {_gui} to hopper named "&dSelling Kits" with lore "&7&oClick to Enable" and "&7", "&fAllows players to sell kits for the currency.", "&8&oDisabling it doesn't make players lose kits.", "&cCurrently Disabled" else: set slot 19 of {_gui} to hopper named "&dSelling Kits" with lore "&7&oClick to Disable" and "&7", "&fAllows players to sell kits for the currency.", "&8&oDisabling it doesn't make players lose kits.", "&aCurrently Enabled" else if {_t} is "Leaderboard": set {_gui} to chest inventory with 5 rows named "&dKitPvP Configuration" loop 36 times: set slot loop-value -1 of {_gui} to magenta stained glass pane named "&7" loop 9 times: set slot loop-value + 35 of {_gui} to gray stained glass pane named "&7" set slot 40 of {_gui} to barrier named "&cClose" set slot 39 of {_gui} to arrow named "&eBack" with lore "&7Click to go back to the main config" if {KitPvP::Config::Leaderboard::Kills} is true: set slot 10 of {_gui} to iron sword named "&dKills Leaderboard" with lore "&7&oClick to Disable", "&7", "&fManages Kill Leaderboard command and calculations.", "&7" and "&aCurrently Enabled" else: set slot 10 of {_gui} to iron sword named "&dKills Leaderboard" with lore "&7&oClick to Enable", "&7", "&fManages Kill Leaderboard command and calculations.", "&7" and "&cCurrently Disabled" if {KitPvP::Config::Leaderboard::Deaths} is true: set slot 14 of {_gui} to shield named "&dDeaths Leaderboard" with lore "&7&oClick to Disable", "&7", "&fManages Death Leaderboard command and calculations.", "&7" and "&aCurrently Enabled" else: set slot 14 of {_gui} to shield named "&dDeaths Leaderboard" with lore "&7&oClick to Enable", "&7", "&fManages Death Leaderboard command and calculations.", "&7" and "&cCurrently Disabled" if {KitPvP::Config::Leaderboard::Economy} is true: set slot 20 of {_gui} to gold ingot named "&d%{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard" with lore "&7&oClick to Disable", "&fManages %{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard command and calculations", "&7" and "&aCurrently Enabled" else: set slot 20 of {_gui} to gold ingot named "&d%{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard" with lore "&7&oClick to Enable", "&fManages %{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard command and calculations", "&7" and "&cCurrently Disabled" set slot 11 of {_gui} to iron sword named "&dKills Leaderboard Amount" with lore "&7&oClick to set precise amount", "&7", "&fThe amount of people shown in the kills leaderboard.", "&8&oDoesn't do anything if kills leaderboard is disabled." and "&aCurrently %{KitPvP::Config::Leaderboard::Kills.ShowAmount}%" set slot 12 of {_gui} to iron sword named "&dKills Leaderboard Minimum" with lore "&7&oClick to set precise amount", "&7", "&fThe minimum kills somebody needs to be on the leaderboard.", "&8&oDoesn't do anything if kills leaderboard is disabled." and "&aCurrently %{KitPvP::Config::Leaderboard::Kills.MinAmount}%" set slot 16 of {_gui} to shield named "&dDeaths Leaderboard Minimum" with lore "&7&oClick to set precise amount", "&7", "&fThe minimum deaths somebody needs to be on the leaderboard.", "&8&oDoesn't do anything if deaths leaderboard is disabled." and "&aCurrently %{KitPvP::Config::Leaderboard::Deaths.MinAmount}%" set slot 15 of {_gui} to shield named "&dDeaths Leaderboard Amount" with lore "&7&oClick to set precise amount", "&7", "&fThe amount of people shown in the deaths leaderboard.", "&8&oDoesn't do anything if deaths leaderboard is disabled." and "&aCurrently %{KitPvP::Config::Leaderboard::Deaths.ShowAmount}%" set slot 21 of {_gui} to gold ingot named "&d%{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard Amount" with lore "&7&oClick to set precise amount", "&7", "&fThe amount of people shown in the %{KitPvP::Config::Economy::Currency.Name.Multiple}% leaderboard", "&8&oDoesn't do anything if %{KitPvP::Config::Economy::Currency.Name.Multiple}% leaderboard is disabled." and "&aCurrently %{KitPvP::Config::Leaderboard::Economy.ShowAmount}%" set slot 22 of {_gui} to gold ingot named "&d%{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard Minimum" with lore "&7&oClick to set precise amount", "&7", "&fThe minimum %{KitPvP::Config::Economy::Currency.Name.Multiple}% somebody needs to be on the leaderboard.", "&8&oDoesn't do anything if %{KitPvP::Config::Economy::Currency.Name.Multiple}% leaderboard is disabled." and "&aCurrently %{KitPvP::Config::Leaderboard::Economy.MinAmount}%" set slot 13 of {_gui} to iron sword named "&dKills Leaderboard Update Time" with lore "&7&oClick to Change", "&7", "&fManages how often kill leaderboard calculations are ran", "&8&oCalculations don't run if kills leaderboard is disabled.", "&8&oHigher time = Less lag, lower time = more frequent updates." and "&aCurrently %{KitPvP::Config::Leaderboard::Kills.UpdateTime}%" set slot 19 of {_gui} to shield named "&dDeaths Leaderboard Update Time" with lore "&7&oClick to Change", "&7", "&fManages how often death leaderboard calculations are ran", "&8&oCalculations don't run if deaths leaderboard is disabled.", "&8&oHigher time = Less lag, lower time = more frequent updates." and "&aCurrently %{KitPvP::Config::Leaderboard::Deaths.UpdateTime}%" set slot 23 of {_gui} to gold ingot named "&d%{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard Update Time" with lore "&7&oClick to Change", "&7", "&fManages how often %{KitPvP::Config::Economy::Currency.Name}% leaderboard calculations are ran", "&8&oCalculations don't run if %{KitPvP::Config::Economy::Currency.Name.Multiple}% leaderboard is disabled.", "&8&oHigher time = Less lag, lower time = more frequent updates." and "&aCurrently %{KitPvP::Config::Leaderboard::Economy.UpdateTime}%" if {KitPvP::Config::Leaderboard::UpdateMessages} is true: set slot 24 of {_gui} to paper named "&dLeaderboard Update Messages" with lore "&7&oClick to Disable", "&7", "&fWhen enabled, messages when leaderboards are updating.", "&8&oOnly runs if calculations run." and "&aCurrently Enabled" else: set slot 24 of {_gui} to paper named "&dLeaderboard Update Messages" with lore "&7&oClick to Enable", "&7", "&fWhen enabled, messages when leaderboards are updating.", "&8&oOnly runs if calculations run." and "&cCurrently Disabled" open {_gui} to {_p} on inventory click: player has permission "{@opperm}" event-inventory is not player's inventory if event-inventory's name is "&dKitPvP Configuration": cancel event if event-slot is barrier named "&cClose": close player's inventory else if event-slot is command block named "&dCommands Category" with lore "&fClick to go to the Commands Config": kitpvpconfiggui("Commands", player) else if event-slot is arrow named "&eBack" with lore "&7Click to go back to the main config": kitpvpconfiggui("Main", player) else if event-slot is paper named "&dLeaderboards Category" with lore "&fClick to go to the Leaderboards Config": kitpvpconfiggui("leaderboard", player) else if event-slot is gold ingot named "&dEconomy Category" with lore "&fClick to go to the Economy Config": kitpvpconfiggui("Economy", player) else if event-slot is oak sign named "&dSign Commands Category" with lore "&fClick to go to the Sign Commands Config": kitpvpconfiggui("SignCommands", player) else if event-slot is iron sword named "&dKills Leaderboard Update Time": close player's inventory set {KitPvP::Chat::%player's uuid%} to "KillsUpdateTime" send "&aType in chat how often you want the Kills Leaderboard to update. (""3 minutes"" and ""1 minute and 50 seconds"" are examples)" else if event-slot is paper named "&dEnable Sign Commands Prefix": close player's inventory set {KitPvP::Chat::%player's uuid%} to "EnableSignPrefix" send "&aType in chat what you want the Enable Sign Commands Prefix to be!" else if event-slot is paper named "&dUse Sign Commands Prefix": close player's inventory set {KitPvP::Chat::%player's uuid%} to "UseSignPrefix" send "&aType in chat what you want the Use Sign Commands Prefix to be!" else if event-slot is shield named "&dDeaths Leaderboard Update Time": close player's inventory set {KitPvP::Chat::%player's uuid%} to "DeathsUpdateTime" send "&aType in chat how often you want the Deaths Leaderboard to update. (""3 minutes"" and ""1 minute and 50 seconds"" are examples)" else if event-slot is gold ingot named "&d%{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard Update Time": close player's inventory set {KitPvP::Chat::%player's uuid%} to "EconomyUpdateTime" send "&aType in chat how often you want the %{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard to update. (""3 minutes"" and ""1 minute and 50 seconds"" are examples)" else if event-slot is paper named "&dCurrency Name": close player's inventory set {KitPvP::Chat::%player's uuid%} to "CurrencyName" send "&aType in chat the name you want your currency to be." else if event-slot is oak sign named "&dSign Commands": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::SignCommands::SignCommands} to false send "&aSuccesfully disabled Sign Commands!" kitpvpconfiggui("SignCommands", player) else: set {KitPvP::Config::SignCommands::SignCommands} to true send "&aSuccesfully enabled Sign Commands!" kitpvpconfiggui("SignCommands", player) else if event-slot is command block named "&dSpawn": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Commands::Spawn} to false send "&aSuccesfully disabled /spawn!" kitpvpconfiggui("Commands", player) else: set {KitPvP::Config::Commands::Spawn} to true send "&aSuccesfully enabled /spawn!" kitpvpconfiggui("Commands", player) else if event-slot is gold ingot named "&dBuy": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Commands::Buy} to false send "&aSuccesfully disabled /buy!" kitpvpconfiggui("Commands", player) else: set {KitPvP::Config::Commands::Buy} to true send "&aSuccesfully enabled /buy!" kitpvpconfiggui("Commands", player) else if event-slot is writable book named "&dHelp": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Commands::Help} to false send "&aSuccesfully disabled /help!" kitpvpconfiggui("Commands", player) else: set {KitPvP::Config::Commands::Help} to true send "&aSuccesfully enabled /help!" kitpvpconfiggui("Commands", player) else if event-slot is paper named "&dLeaderboards": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Commands::Leaderboard} to false send "&aSuccesfully disabled /leaderboard(s)!" kitpvpconfiggui("Commands", player) else: set {KitPvP::Config::Commands::Leaderboard} to true send "&aSuccesfully enabled /leaderboard(s)!" kitpvpconfiggui("Commands", player) else if event-slot is gold ingot named "&d%{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Leaderboard::Economy} to false send "&aSuccesfully disabled the %{KitPvP::Config::Economy::Currency.Name.Multiple}% leaderboards!" kitpvpconfiggui("leaderboard", player) else: set {KitPvP::Config::Leaderboard::Economy} to true send "&aSuccesfully enabled the %{KitPvP::Config::Economy::Currency.Name.Multiple}% leaderboards!" kitpvpconfiggui("leaderboard", player) else if event-slot is barrier named "&dNegativity Allowed": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Economy::Negativity} to false send "&aSuccesfully disabled negativity (did not make players go out of debt)!" kitpvpconfiggui("economy", player) else: set {KitPvP::Config::Economy::Negativity} to true send "&aSuccesfully enabled negativity!" kitpvpconfiggui("economy", player) else if event-slot is iron sword named "&dKill Amount": close player's inventory set {KitPvP::Chat::%player's uuid%} to "EconomyKillAmount" send "&aType in chat how many %{KitPvP::Config::Economy::Currency.Name.Multiple}% you want the player to win on kill." else if event-slot is gold ingot named "&dStart Capital": close player's inventory set {KitPvP::Chat::%player's uuid%} to "EconomyStartCapital" send "&aType in chat how many %{KitPvP::Config::Economy::Currency.Name.Multiple}% you want new players to start with." else if event-slot is shield named "&dDeath Amount": close player's inventory set {KitPvP::Chat::%player's uuid%} to "EconomyDeathAmount" send "&aType in chat how many %{KitPvP::Config::Economy::Currency.Name.Multiple}% you want the player to lose on death." else if event-slot is paper named "&dCurrency Name Multiple": close player's inventory set {KitPvP::Chat::%player's uuid%} to "CurrencyNameMultiple" send "&aType in chat the name you want your currency multiple to be." else if event-slot is gold ingot named "&dEconomy": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Economy::Economy} to false send "&aSuccesfully disabled the entire economy!" kitpvpconfiggui("economy", player) else: set {KitPvP::Config::Economy::Economy} to true send "&aSuccesfully enabled the entire economy!" kitpvpconfiggui("economy", player) else if event-slot is iron sword named "&dKills Leaderboard": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Leaderboard::Kills} to false send "&aSuccesfully disabled the kills leaderboards!" kitpvpconfiggui("leaderboard", player) else: set {KitPvP::Config::Leaderboard::Kills} to true send "&aSuccesfully enabled the kills leaderboards!" kitpvpconfiggui("leaderboard", player) else if event-slot is hopper named "&dSelling Kits": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Economy::Selling} to false send "&aSuccesfully disabled the kit selling!" kitpvpconfiggui("economy", player) else: set {KitPvP::Config::Economy::Selling} to true send "&aSuccesfully enabled the kit selling!" kitpvpconfiggui("economy", player) else if event-slot is shield named "&dDeaths Leaderboard": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Leaderboard::Deaths} to false send "&aSuccesfully disabled the deaths leaderboards!" kitpvpconfiggui("leaderboard", player) else: set {KitPvP::Config::Leaderboard::Deaths} to true send "&aSuccesfully enabled the deaths leaderboards!" kitpvpconfiggui("leaderboard", player) else if event-slot is iron sword named "&dKills Leaderboard Amount": close player's inventory set {KitPvP::Chat::%player's uuid%} to "KillsLeaderboardAmount" send "&aType in chat the number of people you want the kills leaderboard to show." else if event-slot is shield named "&dDeaths Leaderboard Amount": close player's inventory set {KitPvP::Chat::%player's uuid%} to "DeathsLeaderboardAmount" send "&aType in chat the number of people you want the deaths leaderboard to show." else if event-slot is iron sword named "&dKills Leaderboard Minimum": close player's inventory set {KitPvP::Chat::%player's uuid%} to "KillsLeaderboardMin" send "&aType in chat the minimum kills somebody needs to be on the leaderboard." else if event-slot is shield named "&dDeaths Leaderboard Minimum": close player's inventory set {KitPvP::Chat::%player's uuid%} to "DeathsLeaderboardMin" send "&aType in chat the minimum deaths somebody needs to be on the leaderboard." else if event-slot is gold ingot named "&d%{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard Amount": close player's inventory set {KitPvP::Chat::%player's uuid%} to "EconomyLeaderboardAmount" send "&aType in chat the number of people you want the %{KitPvP::Config::Economy::Currency.Name.Multiple}% leaderboard to show." else if event-slot is gold ingot named "&d%{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard Minimum": close player's inventory set {KitPvP::Chat::%player's uuid%} to "EconomyLeaderboardMin" send "&aType in chat the minimum %{KitPvP::Config::Economy::Currency.Name.Multiple}% somebody needs to be on the leaderboard." else if event-slot is paper named "&dLeaderboard Update Messages": if line 1 of event-slot's lore contains "Disable": set {KitPvP::Config::Leaderboard::UpdateMessages} to false send "&aSuccesfully disabled the leaderboard update messages!" kitpvpconfiggui("leaderboard", player) else: set {KitPvP::Config::Leaderboard::UpdateMessages} to true send "&aSuccesfully enabled the leaderboard update messages!" kitpvpconfiggui("leaderboard", player) on chat: {KitPvP::Chat::%player's uuid%} is set loop {KitPvP::Kits::*}: if {KitPvP::Chat::%player's uuid%} is "%loop-value%CostSet": cancel event set {_n} to message parsed as integer if {_n} is set: if {_n} is more than 0: set {KitPvP::Kits::%loop-index%::EconomyPrice} to {_n} if {_n} is 1: send "&aSuccessfully set the %loop-value% kit cost to 1 %{KitPvP::Config::Economy::Currency.Name}%" else: send "&aSuccessfully set the %loop-value% kit cost to %{_n}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%" editkitgui(player, loop-value) else: send "&cThe number needs to be larger than 0!" else: send "&cYou can only type a full number for this!" if {KitPvP::Chat::%player's uuid%} is "KillsLeaderboardAmount" or "DeathsLeaderboardAmount": cancel event set {_n} to message parsed as integer if {_n} is set: if {_n} is more than 0: {KitPvP::Chat::%player's uuid%} is "KillsLeaderboardAmount": set {KitPvP::Config::Leaderboard::Kills.ShowAmount} to {_n} send "&aSuccesfully set the Kills Show Amount to %{_n}%" else: set {KitPvP::Config::Leaderboard::Deaths.ShowAmount} to {_n} send "&aSuccesfully set the Deaths Show Amount to %{_n}%" kitpvpconfiggui("leaderboard", player) else: send "&cThe number needs to be larger than 0!" else: send "&cYou can only type a full number for this!" else if {KitPvP::Chat::%player's uuid%} is "EnableSignPrefix" or "UseSignPrefix": cancel event {KitPvP::Chat::%player's uuid%} is "EnableSignPrefix": set {_msg} to uncolored message set {KitPvP::Config::SignCommands::EnablePrefix} to {_msg} send "&aSuccesfully set the Enable Sign Commands Prefix to %{_msg}% (make sure it fits on a sign .-.)" {KitPvP::Chat::%player's uuid%} is "UseSignPrefix": set {_msg} to formatted message set {KitPvP::Config::SignCommands::UsePrefix} to {_msg} send "&aSuccesfully set the Use Sign Commands Prefix to %{_msg}%&a (make sure it fits on a sign .-.)" kitpvpconfiggui("SignCommands", player) else if {KitPvP::Chat::%player's uuid%} is "EconomyUpdateTime" or "KillsUpdateTime" or "DeathsUpdateTime": cancel event set {_n} to message parsed as timespan if {_n} is set: if {_n} is less than 1 second: send "&cPlease type a value higher than 1 second!" else: {KitPvP::Chat::%player's uuid%} is "KillsUpdateTime": set {KitPvP::Config::Leaderboard::Kills.UpdateTime} to {_n} send "&aSuccesfully set the Kills Leaderboard Update Time to %{_n}%" else if {KitPvP::Chat::%player's uuid%} is "DeathsUpdateTime": set {KitPvP::Config::Leaderboard::Deaths.UpdateTime} to {_n} send "&aSuccesfully set the Deaths Leaderboard Update Time to %{_n}%" else if {KitPvP::Chat::%player's uuid%} is "EconomyUpdateTime": set {KitPvP::Config::Leaderboard::Economy.UpdateTime} to {_n} send "&aSuccesfully set the %{KitPvP::Config::Economy::Currency.Name.Multiple}% Leaderboard Update Time to %{_n}%" kitpvpconfiggui("leaderboard", player) else: send "&cYou need to type a timespan! For example: ""3 minutes"" or ""1 minute and 50 seconds""" else if {KitPvP::Chat::%player's uuid%} is "KillsLeaderboardMin" or "DeathsLeaderboardMin" or "EconomyLeaderboardMin" or "EconomyKillAmount" or "EconomyDeathAmount" or "EconomyStartCapital": cancel event set {_n} to message parsed as integer if {_n} is set: if {_n} is more than or equal to 0: {KitPvP::Chat::%player's uuid%} is "KillsLeaderboardMin": set {KitPvP::Config::Leaderboard::Kills.MinAmount} to {_n} send "&aSuccesfully set the Kills Minimum Amount to %{_n}%" kitpvpconfiggui("leaderboard", player) else if {KitPvP::Chat::%player's uuid%} is "DeathsLeaderboardMin": set {KitPvP::Config::Leaderboard::Deaths.MinAmount} to {_n} send "&aSuccesfully set the Deaths Minimum Amount to %{_n}%" kitpvpconfiggui("leaderboard", player) else if {KitPvP::Chat::%player's uuid%} is "EconomyLeaderboardMin": set {KitPvP::Config::Leaderboard::Economy.MinAmount} to {_n} send "&aSuccesfully set the Minimum Amount to %{_n}%" kitpvpconfiggui("leaderboard", player) else if {KitPvP::Chat::%player's uuid%} is "EconomyKillAmount": set {KitPvP::Config::Economy::KillAmount} to {_n} send "&aSuccesfully set the Economy Kill Amount to %{_n}%" kitpvpconfiggui("economy", player) else if {KitPvP::Chat::%player's uuid%} is "EconomyDeathAmount": set {KitPvP::Config::Economy::DeathAmount} to {_n} send "&aSuccesfully set the Economy Death Amount to %{_n}%" kitpvpconfiggui("economy", player) else if {KitPvP::Chat::%player's uuid%} is "EconomyStartCapital": set {KitPvP::Config::Economy::StartCapital} to {_n} if {_n} is 1: send "&aSuccesfully made new players start with 1 %{KitPvP::Config::Economy::Currency.Name}%!" else: send "&aSuccesfully made new players start with %{_n}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%!" kitpvpconfiggui("economy", player) else: send "&cThe number needs to be positive!" else: send "&cYou can only type a full number for this" else if {KitPvP::Chat::%player's uuid%} is "CurrencyName": cancel event set {KitPvP::Config::Economy::Currency.Name} to formatted message send "&aSuccesfully set the currency name to %formatted message%" kitpvpconfiggui("economy", player) else if {KitPvP::Chat::%player's uuid%} is "CurrencyNameMultiple": cancel event set {KitPvP::Config::Economy::Currency.Name.Multiple} to formatted message send "&aSuccesfully set the currency name multiple to %formatted message%" kitpvpconfiggui("economy", player) clear {KitPvP::Chat::%player's uuid%} on load: set {KitPvP::Leaderboard::KillsTime} to now set {_time} to now while {KitPvP::Leaderboard::KillsTime} is {_time}: if {KitPvP::Config::Leaderboard::Kills} is true: updateLeaderboard("Kills") wait {KitPvP::Config::Leaderboard::Kills.UpdateTime} on load: set {KitPvP::Leaderboard::DeathsTime} to now set {_time} to now while {KitPvP::Leaderboard::DeathsTime} is {_time}: if {KitPvP::Config::Leaderboard::Deaths} is true: updateLeaderboard("Deaths") wait {KitPvP::Config::Leaderboard::Deaths.UpdateTime} on load: set {KitPvP::Leaderboard::EconomyTime} to now set {_time} to now while {KitPvP::Leaderboard::EconomyTime} is {_time}: if {KitPvP::Config::Leaderboard::Economy} is true: updateLeaderboard("%{KitPvP::Config::Economy::Currency.Name.Multiple}%") wait {KitPvP::Config::Leaderboard::Economy.UpdateTime} # ██████╗████████╗ █████╗ ████████╗ ██████╗ # ██╔════╝╚══██╔══╝██╔══██╗╚══██╔══╝██╔════╝ # ╚█████╗ ██║ ███████║ ██║ ╚█████╗ # ╚═══██╗ ██║ ██╔══██║ ██║ ╚═══██╗ # ██████╔╝ ██║ ██║ ██║ ██║ ██████╔╝ # ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ on death: victim is a player if attacker is a player: add 1 to {KitPvP::Stats::%attacker's uuid%::Kills} {KitPvP::Config::Economy::Economy} is true add {KitPvP::Config::Economy::KillAmount} to {KitPvP::Stats::%attacker's uuid%::Currency} if {KitPvP::Config::Economy::KillAmount} is 1: send "&aYou gained 1 %{KitPvP::Config::Economy::Currency.Name}% from a kill!" to attacker else if {KitPvP::Config::Economy::KillAmount} is more than 1: send "&aYou gained %{KitPvP::Config::Economy::KillAmount}% %{KitPvP::Config::Economy::Currency.Name.Multiple}% from a kill!" to attacker add 1 to {KitPvP::Stats::%victim's uuid%::Deaths} if {KitPvP::Config::Economy::Negativity} is false: if {KitPvP::Stats::%victim's uuid%::Currency} is less than or equal to 0: stop remove {KitPvP::Config::Economy::DeathAmount} from {KitPvP::Stats::%victim's uuid%::Currency} if {KitPvP::Config::Economy::DeathAmount} is 1: send "&aYou lost 1 %{KitPvP::Config::Economy::Currency.Name}% from a death!" to victim else if {KitPvP::Config::Economy::DeathAmount} is more than 1: send "&aYou lost %{KitPvP::Config::Economy::KillAmount}% %{KitPvP::Config::Economy::Currency.Name.Multiple}% from a death!" to victim on join: {KitPvP::Stats::%player's uuid%::Deaths} is not set set {KitPvP::Stats::%player's uuid%::Deaths} to 0 set {KitPvP::Stats::%player's uuid%::Kills} to 0 set {KitPvP::Stats::%player's uuid%::Currency} to {KitPvP::Config::Economy::StartCapital} # TAB COMPLETION on tab complete of "/kp" or "/kitpvp" or "/skript:kp" or "/skript:kitpvp": player has permission "{@opperm}" or "{@adminperm}" or "{@commandperm}" if player has permission "{@opperm}": set tab completions for position 1 to "help", "stats", "hologram", "edit", "buy", "menu", "clear", "kits", "kit", "preview", "spawn", "config", "setspawn", "leaderboard", "create", "delete" and "editstats" else if player has permission "{@adminperm}": set tab completions for position 1 to "help", "hologram", "edit", "buy", "stats", "menu", "clear", "kits", "kit", "preview", "spawn", "setspawn", "leaderboard", "create", "delete" and "editstats" else: set tab completions for position 1 to "help", "buy", "stats", "menu", "clear", "kits", "kit", "preview" and "spawn", "leaderboard", "leaderboards" if tab arg-1 = "help": if player has permission "{@opperm}" or "{@adminperm}": set tab completions for position 2 to "admin" if tab arg-1 = "hologram": if player has permission "{@opperm}" or "{@adminperm}": set tab completions for position 2 to "create", "delete" and "list" if tab arg-2 = "create" or "delete": set tab completions for position 3 to "Kills", "Deaths" and "%{KitPvP::Config::Economy::Currency.Name.Multiple}%" else if tab arg-1 = "editstats": if player has permission "{@opperm}" or "{@adminperm}": set tab completions for position 2 to "set", "reset", "add" and "remove" loop {KitPvP::Players::*}: add loop-value parsed as offline player to {_p::*} set tab completions for position 3 to {_p::*} set tab completions for position 4 to "Kills", "Deaths" and "%{KitPvP::Config::Economy::Currency.Name.Multiple}%" else if tab arg-1 = "leaderboard" or "leaderboards": set tab completions for position 2 to "Kills", "Deaths" and "%{KitPvP::Config::Economy::Currency.Name.Multiple}%" else if tab arg-1 = "buy": loop {KitPvP::Kits::*}: if {KitPvP::Kits::%loop-index%::EconomyCost} is true: add loop-value to {_k::*} set tab completions for position 2 to {_k::*} else if tab arg-1 = "sell": loop {KitPvP::Kits::*}: if {KitPvP::Player::%player's uuid%::Kits::%loop-value%} is true: add loop-value to {_k::*} set tab completions for position 2 to {_k::*} else if tab arg-1 = "stats": loop {KitPvP::Players::*}: add loop-value parsed as offline player to tab completions for position 2 else if tab arg-1 = "clear" or "spawn": if player has permission "{@opperm}" or "{@adminperm}": set tab completions for position 2 to {KitPvP::OnlinePlayers::*} else if tab arg-1 = "kit" or "preview": set tab completions for position 2 to {KitPvP::Kits::*} else if tab arg-1 = "delete" or "edit": if player has permission "{@opperm}" or "{@adminperm}": set tab completions for position 2 to {KitPvP::Kits::*} else if tab arg-1 = "setstats": if player has permission "{@opperm}" or "{@adminperm}": loop {KitPvP::Players::*}: add loop-value parsed as offline player to tab completions for position 2 on command: set {_cmd} to full command set {_args::*} to {_cmd} split at " " if {_args::1} is "spawn": if {KitPvP::Config::Commands::Spawn} is true: cancel event execute player command "/kp spawn" else if {_args::1} is "leaderboard" or "leaderboards": {KitPvP::Config::Commands::Leaderboard} is true if {_args::2} is "Deaths": cancel event execute player command "/kp leaderboard deaths" else if {_args::2} is "Kills": cancel event execute player command "/kp leaderboard kills" else if {_args::2} is "%{KitPvP::Config::Economy::Currency.Name.Multiple}%": cancel event execute player command "/kp leaderboard %{KitPvP::Config::Economy::Currency.Name.Multiple}%" else: cancel event execute player command "/kp leaderboard" else if {_args::1} is "help": {KitPvP::Config::Commands::Help} is true cancel event if {_args::2} is "Admin": if player has permission "{@opperm}" or "{@adminperm}": execute player command "/kp help admin" else: execute player command "/kp help" else: execute player command "/kp help" else if {_args::1} is "buy": {KitPvP::Config::Commands::Buy} is true cancel event set {_kit} to {_args::2} if {KitPvP::Player::%player's uuid%::Kits::%{_kit}%} is true: send "&cYou already bought that kit! Sell it using /kp sell %{_kit}%" else if {_args::2} is not set: send "&cPlease specify a kit!" else if {KitPvP::Kits::*} doesn't contain {_args::2}: send "&cThat kit doesn't exist! You can't buy nothing!" else: if {KitPvP::Kits::%{_kit}%::EconomyCost} is false: send "&cThat kit is free so you already have access to it!" else if {KitPvP::Config::Economy::Economy} is false: send "&cThe economy is disabled so you can't buy that kit!" else: if {KitPvP::Stats::%player's uuid%::Currency} is more than or equal to {KitPvP::Kits::%{_kit}%::EconomyPrice}: remove {KitPvP::Kits::%{_kit}%::EconomyPrice} from {KitPvP::Stats::%player's uuid%::Currency} set {KitPvP::Player::%player's uuid%::Kits::%{_kit}%} to true loop {KitPvP::Kits::*}: {_kit} is loop-value {KitPvP::Kits::%{_kit}%::EconomyPrice} is 1: send "&aYou succesfully bought the %loop-value% kit for 1 %{KitPvP::Config::Economy::Currency.Name}%!" else: send "&aYou succesfully bought the %loop-value% kit for %{KitPvP::Kits::%{_kit}%::EconomyPrice}% %{KitPvP::Config::Economy::Currency.Name.Multiple}%!" else: send "&cYou don't have enough %{KitPvP::Config::Economy::Currency.Name.Multiple}% for that! (%{KitPvP::Stats::%player's uuid%::Currency}% out of %{KitPvP::Kits::%{_kit}%::EconomyPrice}%)" every 2 seconds: clear {KitPvP::OnlinePlayers::*} loop all players: add loop-value to {KitPvP::OnlinePlayers::*} # lowercase and uppercase stuff on script load: set {_letters} to "Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz" set {_letter-pairs::*} to {_letters} split at " " loop {_letter-pairs::*}: set {_pair::*} to loop-value split at "" set {_uppercase} to {_pair::1} set {_lowercase} to {_pair::2} set {letters::uppercase::%{_lowercase}%} to {_uppercase} set {letters::lowercase::%{_uppercase}%} to {_lowercase} on script unload: delete {letters::*} function switchCaseFor(text: text, to-uppercase: boolean) :: text: set {_characters::*} to {_text} split at "" set {_new} to "" loop {_characters::*}: set {_char} to loop-value if {_to-uppercase} is true: set {_char} to {letters::uppercase::%loop-value%} else: set {_char} to {letters::lowercase::%loop-value%} set {_new} to "%{_new}%%{_char}%" return {_new} function uppercase(text: text) :: text: return switchCaseFor({_text}, true) function lowercase(text: text) :: text: return switchCaseFor({_text}, false) function capitalize(text: text) :: text: set {_char} to the first character of {_text} set {_char} to {letters::uppercase::%{_char}%} set {_remaining} to "" set {_remaining} to the last (length of {_text} - 1) characters of {_text} return "%{_char}%%{_remaining}%" # CUSTOM ITEMS on right click: player's tool is mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health.": if player's health is less than player's max health: cancel event set player's tool to air heal player by 2.5 hearts else if player's offhand tool is mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health.": if player's health is less than player's max health: cancel event set player's offhand tool to air heal player by 2.5 hearts on consume: if event-item is mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health.": cancel event # LOADING IN THE PRE-MADE KITS on load: {KitPvP::Loaded::KitsPreMade} is not true: set {KitPvP::Loaded::KitsPreMade} to true # WARRIOR KIT set {_slot} to 2 set {KitPvP::Kits::Warrior} to "Warrior" set {KitPvP::Kits::Warrior::0} to iron sword named "&fWarrior's Sword" set {KitPvP::Kits::Warrior::1} to 3 of golden apple loop 34 times: set {KitPvP::Kits::Warrior::%{_slot}%} to mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health." add 1 to {_slot} set {KitPvP::Kits::Warrior::EconomyCost} to false set {KitPvP::Kits::Warrior::EconomyPrice} to 10 set {KitPvP::Kits::Warrior::Helmet} to iron helmet named "&fWarrior's Helmet" set {KitPvP::Kits::Warrior::Chestplate} to iron chestplate named "&fWarrior's Chestplate" set {KitPvP::Kits::Warrior::Leggings} to iron leggings named "&fWarrior's Leggings" set {KitPvP::Kits::Warrior::Boots} to iron boots named "&fWarrior's Boots" set {KitPvP::Kits::Warrior::Offhand} to air add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Warrior::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Warrior::GUISlot} to first element of {_spots::*} set {KitPvP::Kits::Warrior::GUIItem} to iron sword named "&fWarrior's Sword" loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Warrior::PotionEffects::%loop-index%} to 0 send "&aLoaded the Warrior kit" to console # ARCHER KIT set {_slot} to 2 set {KitPvP::Kits::Archer} to "Archer" set {KitPvP::Kits::Archer::0} to stone sword named "&fArcher's Sword" enchant {KitPvP::Kits::Archer::0} with knockback 1 set {KitPvP::Kits::Archer::1} to bow named "&fArcher's Bow" loop 34 times: set {KitPvP::Kits::Archer::%{_slot}%} to mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health." add 1 to {_slot} set {KitPvP::Kits::Archer::8} to 64 arrows set {KitPvP::Kits::Archer::EconomyCost} to false set {KitPvP::Kits::Archer::EconomyPrice} to 10 set {KitPvP::Kits::Archer::Helmet} to leather helmet named "&fArcher's Helmet" set {KitPvP::Kits::Archer::Chestplate} to leather chestplate named "&fArcher's Chestplate" set {KitPvP::Kits::Archer::Leggings} to leather leggings named "&fArcher's Leggings" set {KitPvP::Kits::Archer::Boots} to leather boots named "&fArcher's Boots" enchant {KitPvP::Kits::Archer::Helmet} with protection 1 enchant {KitPvP::Kits::Archer::Chestplate} with protection 1 enchant {KitPvP::Kits::Archer::Leggings} with protection 1 enchant {KitPvP::Kits::Archer::Boots} with protection 1 dye {KitPvP::Kits::Archer::Helmet} black dye {KitPvP::Kits::Archer::Chestplate} black dye {KitPvP::Kits::Archer::Leggings} black dye {KitPvP::Kits::Archer::Boots} black set {KitPvP::Kits::Archer::Offhand} to 64 arrows loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Archer::PotionEffects::%loop-index%} to 0 add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} set {KitPvP::Kits::Archer::GUISlot} to first element of {_spots::*} set {KitPvP::Kits::Archer::GUIItem} to bow named "&fArcher's Bow" loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Archer::PotionEffects::%loop-index%} to 0 send "&aLoaded the Archer kit" to console # TANK KIT set {_slot} to 3 set {KitPvP::Kits::Tank} to "Tank" set {KitPvP::Kits::Tank::0} to iron sword named "&fTank's Sword" set {KitPvP::Kits::Tank::1} to potion of strong swiftness set {KitPvP::Kits::Tank::2} to potion of strong swiftness loop 33 times: set {KitPvP::Kits::Tank::%{_slot}%} to mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health." add 1 to {_slot} loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Tank::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Tank::EconomyCost} to false set {KitPvP::Kits::Tank::EconomyPrice} to 10 set {KitPvP::Kits::Tank::Helmet} to iron helmet named "&fTank's Helmet" set {KitPvP::Kits::Tank::Chestplate} to diamond chestplate named "&fTank's Chestplate" set {KitPvP::Kits::Tank::Leggings} to iron leggings named "&fTank's Leggings" set {KitPvP::Kits::Tank::Boots} to iron boots named "&fTank's Boots" enchant {KitPvP::Kits::Tank::Helmet} with protection 1 enchant {KitPvP::Kits::Tank::Leggings} with protection 1 enchant {KitPvP::Kits::Tank::Boots} with protection 1 set {KitPvP::Kits::Tank::Offhand} to air add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} set {KitPvP::Kits::Tank::GUISlot} to first element of {_spots::*} set {KitPvP::Kits::Tank::GUIItem} to diamond chestplate named "&fTank's Chestplate" loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Tank::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Tank::PotionEffects::Slowness} to 1 send "&aLoaded the Tank kit" to console # NINJA KIT set {_slot} to 3 set {KitPvP::Kits::Ninja} to "Ninja" set {KitPvP::Kits::Ninja::0} to iron sword named "&fNinja's Sword" set {KitPvP::Kits::Ninja::1} to potion of invisibility set {KitPvP::Kits::Ninja::2} to potion of invisibility loop 33 times: set {KitPvP::Kits::Ninja::%{_slot}%} to mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health." add 1 to {_slot} set {KitPvP::Kits::Ninja::EconomyCost} to true set {KitPvP::Kits::Ninja::EconomyPrice} to 15 set {KitPvP::Kits::Ninja::Helmet} to chainmail helmet named "&fNinja's Helmet" set {KitPvP::Kits::Ninja::Chestplate} to chainmail chestplate named "&fNinja's Chestplate" set {KitPvP::Kits::Ninja::Leggings} to chainmail leggings named "&fNinja's Leggings" set {KitPvP::Kits::Ninja::Boots} to chainmail boots named "&fNinja's Boots" set {KitPvP::Kits::Ninja::Offhand} to air loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Ninja::PotionEffects::%loop-index%} to 0 add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} set {KitPvP::Kits::Ninja::GUISlot} to first element of {_spots::*} set {KitPvP::Kits::Ninja::GUIItem} to potion of invisibility loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Ninja::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Ninja::PotionEffects::Speed} to 1 send "&aLoaded the Ninja kit" to console # ASSASSIN KIT set {_slot} to 3 set {KitPvP::Kits::Assassin} to "Assassin" set {KitPvP::Kits::Assassin::0} to iron sword named "&fAssassin's Sword" set {KitPvP::Kits::Assassin::1} to potion of strong swiftness set {KitPvP::Kits::Assassin::2} to potion of strength loop 33 times: set {KitPvP::Kits::Assassin::%{_slot}%} to mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health." add 1 to {_slot} loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Assassin::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Assassin::EconomyCost} to true set {KitPvP::Kits::Assassin::EconomyPrice} to 20 set {KitPvP::Kits::Assassin::Helmet} to iron helmet named "&fAssassin's Helmet" set {KitPvP::Kits::Assassin::Chestplate} to iron chestplate named "&fAssassin's Chestplate" set {KitPvP::Kits::Assassin::Leggings} to leather leggings named "&fAssassin's Leggings" set {KitPvP::Kits::Assassin::Boots} to leather boots named "&fAssassin's Boots" set {KitPvP::Kits::Assassin::Offhand} to air add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} set {KitPvP::Kits::Assassin::GUISlot} to first element of {_spots::*} set {KitPvP::Kits::Assassin::GUIItem} to potion of strength loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Assassin::PotionEffects::%loop-index%} to 0 send "&aLoaded the Assassin kit" to console # BARBARIAN KIT set {_slot} to 3 set {KitPvP::Kits::Barbarian} to "Barbarian" set {KitPvP::Kits::Barbarian::0} to iron axe named "&fBarbarian's Axe" enchant {KitPvP::Kits::Barbarian::0} with sharpness 2 set {KitPvP::Kits::Barbarian::1} to potion of strong swiftness set {KitPvP::Kits::Barbarian::2} to potion of speed loop 33 times: set {KitPvP::Kits::Barbarian::%{_slot}%} to mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health." add 1 to {_slot} loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Barbarian::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Barbarian::EconomyCost} to true set {KitPvP::Kits::Barbarian::EconomyPrice} to 20 set {KitPvP::Kits::Barbarian::Helmet} to leather helmet named "&fBarbarian's Helmet" set {KitPvP::Kits::Barbarian::Chestplate} to air set {KitPvP::Kits::Barbarian::Leggings} to leather leggings named "&fBarbarian's Leggings" set {KitPvP::Kits::Barbarian::Boots} to leather boots named "&fBarbarian's Boots" set {KitPvP::Kits::Barbarian::Offhand} to air add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} set {KitPvP::Kits::Barbarian::GUISlot} to first element of {_spots::*} set {KitPvP::Kits::Barbarian::GUIItem} to {KitPvP::Kits::Barbarian::0} loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Barbarian::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Barbarian::PotionEffects::Strength} to 1 send "&aLoaded the Barbarian kit" to console # PALADIN KIT set {_slot} to 2 set {KitPvP::Kits::Paladin} to "Paladin" set {KitPvP::Kits::Paladin::0} to iron sword named "&fPaladin's Sword" set {KitPvP::Kits::Paladin::1} to 6 of golden apple loop 34 times: set {KitPvP::Kits::Paladin::%{_slot}%} to mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health." add 1 to {_slot} loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Paladin::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Paladin::EconomyCost} to true set {KitPvP::Kits::Paladin::EconomyPrice} to 30 set {KitPvP::Kits::Paladin::Helmet} to iron helmet named "&fPaladin's Helmet" set {KitPvP::Kits::Paladin::Chestplate} to gold chestplate named "&fPaladin's Chestplate" set {KitPvP::Kits::Paladin::Leggings} to iron leggings named "&fPaladin's Leggings" set {KitPvP::Kits::Paladin::Boots} to iron boots named "&fPaladin's Boots" set {KitPvP::Kits::Paladin::Offhand} to shield named "&fPaladin's Shield" add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} set {KitPvP::Kits::Paladin::GUISlot} to first element of {_spots::*} set {KitPvP::Kits::Paladin::GUIItem} to shield named "&fPaladin's Shield" loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Paladin::PotionEffects::%loop-index%} to 0 send "&aLoaded the Paladin kit" to console # REAPER KIT set {_slot} to 2 set {KitPvP::Kits::Reaper} to "Reaper" set {KitPvP::Kits::Reaper::0} to netherite hoe named "&fReaper's Scythe" enchant {KitPvP::Kits::Reaper::0} with sharpness 10 set {KitPvP::Kits::Reaper::1} to invisibility potion loop 34 times: set {KitPvP::Kits::Reaper::%{_slot}%} to mushroom stew named "&aRegenerative Soup &7(Right Click)" with lore "&7Use this item to regain health." add 1 to {_slot} loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Reaper::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Reaper::EconomyCost} to true set {KitPvP::Kits::Reaper::EconomyPrice} to 30 set {KitPvP::Kits::Reaper::Helmet} to leather helmet named "&fReaper's Helmet" set {KitPvP::Kits::Reaper::Chestplate} to leather chestplate named "&fReaper's Chestplate" set {KitPvP::Kits::Reaper::Leggings} to leather leggings named "&fReaper's Leggings" set {KitPvP::Kits::Reaper::Boots} to leather boots named "&fReaper's Boots" dye {KitPvP::Kits::Reaper::Helmet} black dye {KitPvP::Kits::Reaper::Chestplate} black dye {KitPvP::Kits::Reaper::Leggings} black dye {KitPvP::Kits::Reaper::Boots} black set {KitPvP::Kits::Reaper::Offhand} to air add 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 and 34 to {_spots::*} loop {KitPvP::Kits::*}: remove {KitPvP::Kits::%loop-index%::GUISlot} from {_spots::*} set {KitPvP::Kits::Reaper::GUISlot} to first element of {_spots::*} set {KitPvP::Kits::Reaper::GUIItem} to {KitPvP::Kits::Reaper::0} loop {KitPvP::PotionEffects::*}: set {KitPvP::Kits::Reaper::PotionEffects::%loop-index%} to 0 set {KitPvP::Kits::Reaper::PotionEffects::Invisibility} to 1 send "&aLoaded the Reaper kit" to console