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

world.afterEvents.playerBreakBlock.subscribe((e) => {
    if (e.brokenBlockPermutation.type.id !== 'minecraft:sculk_sensor') return;

    const scoreboard = world.scoreboard.getObjective('plank_waao:sculk_pillbug_block_timer');
    if (!scoreboard) return;

    scoreboard.addScore(e.player, 600);
});