How do I make it so that players can only use 1 kit per life?
I have tried this but it doesnt work....
Someone help me? would appresh
CODE:
I have tried this but it doesnt work....
Someone help me? would appresh
CODE:
code_language.skript:
on join:
clear player's inventory
set slot 0 of player to nether star named "&cKits &7(Right Click)"
set slot 4 of player to emerald named "&6Perks &7(Right Click)"
on right click with nether star:
if name of player's tool is "&cKits &7(Right Click)":
make player execute command "/kit"
on right click with emerald:
if name of player's tool is "&6Perks &7(Right Click)":
make player execute command "/perks"
command /kit [<text>]:
trigger:
#phyco
if arg-1 is not set:
wait 2 ticks
open chest with 5 rows named "&cKits Menu" to player
play "ITEM_PICKUP" to player at volume 1.5
format gui slot 10 of player with diamond sword named "&e&nKnight" with lore "||&e★ &fClass &7&l» &fKnight||&e★ &fStatus &7&l» &a&lUNLOCKED||||&7Click to Select" to run player command "/kit Pvp" with left click
else:
#pyro
if argument 1 is "pyro":
clear player's inventory
give player a wooden sword named "Flaming Sword"
give player 1 fire charge named "Flame Bomb"
equip player with all leather armor
dye player's helmet (100, 0, 0)
dye player's chestplate (100, 0, 0)
dye player's leggings (100, 0, 0)
dye player's boots (100, 0, 0)
set {Class.%player%} to "Pyro"
else:
if argument 1 is "Pvp":
if {HasKit.%player%} is "False":
set {HasKit.%player%} to "True"
close player's inventory
clear player's inventory
give player a diamond sword
give player 10 golden apples
give player 34 mushroom stews
equip player with all iron armor
play "SUCCESSFUL_HIT" to player at volume 1.2
send "&8[&cKit&8] &7You have selected the &cPvp Kit"
set {Class.%player%} to "Pvp"
Else:
send "&8[&cKit&8] &7You have already selected a kit"
# if argument 1 is not "tank", "knight", "pyro", "magician", "scout", "Pvp", or "phyco":
# message "<red>Invalid class. Valid classes are tank, knight, pyro, magician, and phyco."
# dye player's boots (100, 0, 0)
on death of player:
set {Class.%victim%} to "None"
set {HasKit.%victim%} to "False"