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

world.afterEvents.playerSpawn.subscribe((event) => {
    const player = event.player;

    // Reset Rads score to 0 on respawn
    player.runCommandAsync("scoreboard players set @s Rads 0").catch(() => {});

    // Clear all status effects
    player.runCommandAsync("effect @s clear").catch(() => {});
});

