
    StartupEvents.registry('palladium:abilities', (event) => {
        event.create('heroes:death_stamina')
            .icon(palladium.createItemIcon('palladium:vibranium_circuit'))

            .tick((entity, entry, holder, enabled) => {
                if (enabled) {
                    let username = entity.getGameProfile().getName();
					let username_true = username.toLowerCase();
                    let scoreboard = Utils.server.scoreboard;

						
						
							let scoreboard_obj_stam = scoreboard.getObjective('Heroes.Stamina.Max');
							let score_stam = scoreboard.getOrCreatePlayerScore(username, scoreboard_obj_stam);
							let value_stam = score_stam.getScore();
							entity.server.runCommandSilent("execute as " + entity.uuid + " at @s run scoreboard players remove @s Heroes.Stamina.Max " + JavaMath.ceil(value_stam * 0.025) + "");
							entity.server.runCommandSilent("execute as " + entity.uuid + " at @s run scoreboard players set @s Heroes.Death 0");
					}
            });
    });