GIANT_SWORD_ABILITY: type: world debug: true events: after player right clicks block with:giants_sword: - if : - if : - narrate "<&[error]>Please wait before using the ability again!" - playsound sound:BLOCK_NOTE_BLOCK_BELL volume:1 pitch:2 - stop - define material giants_sword - define location - if <[location]> == null: - narrate "<&[error]>The block is too far away!" - playsound sound:BLOCK.NOTE_BLOCK.BELL volume:1 pitch:2 - stop - spawn item_display[item=<[material]>;view_range=300;scale=4.5,4.5,4.5;brightness=[sky=15;block=15];left_rotation=0.6,-2,0,0] <[location].above[8].with_pitch[180].with_yaw[]> save:GIANT_SWORD - define GIANT_SWORD - define targetLoc - define target <[targetLoc].find_entities[living].within[4.5]> - hurt "30" <[target]> source: if:<[target]>!=[] - playsound <[location]> sound:BLOCK_ANVIL_LAND volume:1 pitch:0.3 - if !: - flag player GIANT_SWORD.cooldown expire:30s - itemcooldown iron_sword d:30s - wait 10s - remove <[GIANT_SWORD]> if:<[GIANT_SWORD].is_spawned> - else: - stop