execute unless score @s weight.level matches 4.. run return run function ws:item/return_dragon_bone
execute at @s run playsound minecraft:entity.player.levelup player @s ~ ~ ~ 0.5 0.9
tellraw @s {"translate":"unishop.item.dragon_bone.levelup","color":"dark_green"}
scoreboard players remove @s stat.strength 3
scoreboard players remove @s weight.level 3
execute store result storage ws:temp stats.amount float 0.05 run scoreboard players get @s stat.strength
data modify storage ws:temp stats.attribute_type set value 'generic.attack_damage'
data modify storage ws:temp stats.operation set value 'add_multiplied_total'
function ws:misc/stats/update with storage ws:temp stats
scoreboard players add @s stat.dragon_bone 1
execute store result storage ws:temp stats.amount float 3.0 run scoreboard players get @s stat.dragon_bone
data modify storage ws:temp stats.attribute_type set value 'generic.armor'
data modify storage ws:temp stats.operation set value 'add_value'
function ws:misc/stats/update with storage ws:temp stats
execute store result storage ws:temp stats.amount float 0.5 run scoreboard players get @s stat.dragon_bone
data modify storage ws:temp stats.attribute_type set value 'generic.armor_toughness'
data modify storage ws:temp stats.operation set value 'add_value'
function ws:misc/stats/update with storage ws:temp stats