particle entity_effect{color:[0.000,0.800,0.700,1.00]} ~ ~ ~ 0.5 0.5 0.5 0 50 force @a

scoreboard players set @s knockback_resistance_timer 160

#
attribute @s minecraft:knockback_resistance base set 1
#
execute store result score random temp run random value 1..4
#
execute if score random temp matches 1 run playsound minecraft:item.mace.smash_ground player @a ~ ~ ~ 0.75 0.9
execute if score random temp matches 2 run playsound minecraft:item.mace.smash_ground player @a ~ ~ ~ 0.75 1
execute if score random temp matches 3 run playsound minecraft:item.mace.smash_ground player @a ~ ~ ~ 0.75 1.1
execute if score random temp matches 4 run playsound minecraft:item.mace.smash_ground player @a ~ ~ ~ 0.75 1.2