$execute unless score @s coins matches $(wood).. run return run tellraw @s {"text":"You don't have enough coins! ($(wood)c)","color":"red"}
execute if entity @s[team=blue] run give @s minecraft:warped_planks[tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_place_on","can_break"]},item_name={"color":"gray","text":"Blue Planks"},can_place_on=[{blocks:"#pctf:wool_placeable"}],can_break=[{blocks:"#pctf:can_break"}]] 12
execute if entity @s[team=red] run give @s minecraft:crimson_planks[tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_place_on","can_break"]},item_name={"color":"gray","text":"Red Planks"},can_place_on=[{blocks:"#pctf:wool_placeable"}],can_break=[{blocks:"#pctf:can_break"}]] 12
$function pctf:logic/player/coins/remove {amount: "$(wood)"}