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

world.afterEvents.entityDie.subscribe((data) => {
    const entity = data.deadEntity


    if (Math.round(Math.random() * 5) == 1 && entity.typeId === "minecraft:squid") {
        entity.runCommandAsync("structure load mystructure:squid_helmet_loot ~ ~ ~ ")
    }

})

