execute if score .wizard_battle settings matches 1 run return run function pctf:logic/player/weapons/scrolls

execute if score @s melee_lvl matches 0 if score @s melee_enchant_lvl matches 0 run give @s minecraft:wooden_sword[item_name={"color":"white","italic":false,"text":"Wooden Sword"},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 1 if score @s melee_enchant_lvl matches 0 run give @s minecraft:stone_sword[item_name={"color":"white","italic":false,"text":"Stone Sword"},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 2 if score @s melee_enchant_lvl matches 0 run give @s minecraft:iron_sword[item_name={"color":"white","italic":false,"text":"Iron Sword"},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 3 if score @s melee_enchant_lvl matches 0 run give @s minecraft:diamond_sword[item_name={"color":"white","italic":false,"text":"Diamond Sword"},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 4 if score @s melee_enchant_lvl matches 0 run give @s minecraft:netherite_sword[item_name={"color":"white","italic":false,"text":"Netherite Sword"},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]

execute if score @s melee_lvl matches 0 if score @s melee_enchant_lvl matches 1 run give @s minecraft:wooden_sword[item_name={"color":"white","italic":false,"text":"Wooden Sword"},enchantments={"minecraft:sharpness":1},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 1 if score @s melee_enchant_lvl matches 1 run give @s minecraft:stone_sword[item_name={"color":"white","italic":false,"text":"Stone Sword"},enchantments={"minecraft:sharpness":1},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 2 if score @s melee_enchant_lvl matches 1 run give @s minecraft:iron_sword[item_name={"color":"white","italic":false,"text":"Iron Sword"},enchantments={"minecraft:sharpness":1},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 3 if score @s melee_enchant_lvl matches 1 run give @s minecraft:diamond_sword[item_name={"color":"white","italic":false,"text":"Diamond Sword"},enchantments={"minecraft:sharpness":1},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 4 if score @s melee_enchant_lvl matches 1 run give @s minecraft:netherite_sword[item_name={"color":"white","italic":false,"text":"Netherite Sword"},enchantments={"minecraft:sharpness":1},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]

execute if score @s melee_lvl matches 0 if score @s melee_enchant_lvl matches 2 run give @s minecraft:wooden_sword[item_name={"color":"white","italic":false,"text":"Wooden Sword"},enchantments={"minecraft:sharpness":2},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 1 if score @s melee_enchant_lvl matches 2 run give @s minecraft:stone_sword[item_name={"color":"white","italic":false,"text":"Stone Sword"},enchantments={"minecraft:sharpness":2},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 2 if score @s melee_enchant_lvl matches 2 run give @s minecraft:iron_sword[item_name={"color":"white","italic":false,"text":"Iron Sword"},enchantments={"minecraft:sharpness":2},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 3 if score @s melee_enchant_lvl matches 2 run give @s minecraft:diamond_sword[item_name={"color":"white","italic":false,"text":"Diamond Sword"},enchantments={"minecraft:sharpness":2},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]
execute if score @s melee_lvl matches 4 if score @s melee_enchant_lvl matches 2 run give @s minecraft:netherite_sword[item_name={"color":"white","italic":false,"text":"Netherite Sword"},enchantments={"minecraft:sharpness":2},unbreakable={},tooltip_display={hidden_components:["unbreakable","attribute_modifiers","can_break"]},can_break=[{blocks:"#pctf:can_break"}]]