import { world } from "@minecraft/server";

world.afterEvents.itemUse.subscribe((event) => {

    if (event.itemStack.typeId === "minecraft:stick") {
        event.source.applyKnockback(0, -1, 8, 1);
        event.source.dimension.spawnParticle("minecraft:knockback_roar_particle", event.source.location);
        event.source.dimension.runCommand('playsound firework.launch @a');
    }
});