import { system, world } from "@minecraft/server";
system.runInterval(() => {
    for (let player of world.getAllPlayers()) {
        if (!player.getEffect("resistance") || player.getEffect("resistance").duration <= 1) {
            player.addEffect("resistance", 6000, { amplifier: 1, showParticles: false })
        }
    }
}, 1)