import { system, world } from "@minecraft/server"
system.afterEvents.scriptEventReceive.subscribe(event => {
    const id = event.id
    const message = event.message
    const entity = event.sourceEntity
    if (id.includes("pufferfish") && message.includes("sound")) {
        for (let oh of entity.dimension.getEntities({ maxDistance: 50, location: entity.location })) {
            oh.dimension.playSound("omni_science.puff_sound", entity.location, { volume: 9999999999999, pitch: Math.random() / Math.random() / Math.random() })
        }
    }

})