execute unless entity @s[name=phaic] run tag @s remove admin
execute unless entity @s[name=phaic] run tag @s remove dev

clear @s
function pctf:logic/player/weapons/melee
function pctf:logic/player/weapons/ranged
item replace entity @s[tag=has_shears] hotbar.2 with shears[can_break=[{blocks:"#pctf:can_break"}],item_name={"color":"gray","italic":false,"text":"Shears"},unbreakable={},tooltip_display={hidden_components:["unbreakable","can_break","attribute_modifiers"]},enchantments={"minecraft:efficiency":4}]
item replace entity @s[tag=has_axe] hotbar.3 with stone_axe[can_break=[{blocks:"#pctf:can_break"}],item_name={"color":"gray","italic":false,"text":"Stone Axe"},unbreakable={},tooltip_display={hidden_components:["unbreakable","can_break","attribute_modifiers"]},attribute_modifiers=[{id:"attack_damage",type:"attack_damage",amount:0,operation:"add_value",slot:"mainhand"},{id:"attack_speed",type:"attack_speed",amount:-3.5,operation:"add_value",slot:"mainhand"}]] 1
item replace entity @s inventory.8 with arrow[item_name={"color":"gray","text":"Arrow"}] 12

give @s[team=blue] minecraft:blue_wool[item_name={"color":"gray","text":"Blue Wool"},tooltip_display={hidden_components:["can_place_on","can_break"]},can_place_on=[{blocks:"#pctf:wool_placeable"}],can_break=[{blocks:"#pctf:can_break"}]] 32
give @s[team=red] minecraft:red_wool[item_name={"color":"gray","text":"Red Wool"},tooltip_display={hidden_components:["can_place_on","can_break"]},can_place_on=[{blocks:"#pctf:wool_placeable"}],can_break=[{blocks:"#pctf:can_break"}]] 32

item replace entity @s hotbar.8 with minecraft:bread[item_name={"color":"gray","text":"Bread"}] 8

execute if entity @s[team=blue] run function pctf:logic/player/armor/blue
execute if entity @s[team=red] run function pctf:logic/player/armor/red

execute if score .pvp_version settings matches 0 run attribute @s minecraft:attack_speed base set 4
execute if score .pvp_version settings matches 1 run attribute @s minecraft:attack_speed base set 100000

execute if score .apocalypse settings matches 1 run function pctf:logic/items/flamethrower/give {amount: "5"}

execute if entity @e[type=marker,tag=milk,distance=..250,scores={generic_timer=50..}] run give @s bucket
execute if entity @e[type=marker,tag=railgun,distance=..250,scores={generic_timer=1..}] run function pctf:logic/items/railgun/give