execute if score @s ranged_enchant_lvl matches 1.. run return run tellraw @s {"text":"Your ranged weapon enchantment level is already maxed!","color":"aqua"}

clear @s minecraft:bow

scoreboard players add @s ranged_enchant_lvl 1

tellraw @s {"text":"Your ranged weapon was enchanted!","color":"aqua"}

function pctf:logic/player/weapons/ranged