execute unless score @s pay matches 200.. run return run function ws:store/samurai/fail
scoreboard players remove @s pay 200
title @s title {"translate":"luxury.buysuccess","color":"green"}
give @s diamond_pickaxe[custom_name='{"italic":false,"translate":"samurai.katana"}',custom_model_data=1001,custom_data={samurai:1},attribute_modifiers={modifiers:[{id:"minecraft:base_attack_damage",type:"generic.attack_damage",amount:6,operation:"add_value",slot:"mainhand"},{id:"minecraft:base_attack_speed",type:"generic.attack_speed",amount:-2.4,operation:"add_value",slot:"mainhand"}],show_in_tooltip:true}] 1
execute at @s run playsound minecraft:block.beacon.activate player @p ~ ~ ~ 100
scoreboard players add @a[tag=samurai] pay 40
tellraw @a[tag=samurai] [{"translate":"business.bonus"},{"text":": "},{"text":"40$"},{"text":" ("},{"translate":"samurai.name"},{"text":")"}]
execute as @a[tag=samurai] at @s run playsound minecraft:entity.experience_orb.pickup player @s ~ ~ ~ 0.05 0