
    StartupEvents.registry('palladium:abilities', (event) => {
        event.create('heroes:ability_removal')
            .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 genetic_blocker = -1
					
					let scoreboard_obj = scoreboard.getObjective('Heroes.Genetic.Blocker.Type');
					if (scoreboard_obj != null) {
                    let score = scoreboard.getOrCreatePlayerScore(username, scoreboard_obj);
                    let value = score.getScore();
					genetic_blocker = value
					}
					
					
					let power_max = global.power_amount;
					entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players set @s Heroes.AbilityTot 0");
					for (let power_list = 0; power_list <= power_max; power_list++) {
						let power_cap = global['ability_' + power_list];
						let power = power_cap.toString().toLowerCase();
						if (power == 'nightvision' || power == 'waterwalk' || power == 'luminescent' || power == 'string_generation' || power == 'water_breathing' || power == 'suffocation_immunity' || power == 'attraction_of_small_objects' || power == 'wall_climbing' || power == 'bone_protrusion' || power == 'age_shifting' || power == 'chromatic_synthesis' || power == 'gold_mimicry') {
							power = 'single_ability_power';
						}
						if (power == 'ability_absorption' || power == 'ability_transferal' || power == 'interplay') {
							power = 'ability_movement';
						}
						if (power == 'ocular_psychogenesis_control' || power == 'ocular_psychogenesis_emission') {
							power = 'ocular_psychogenesis';
						}
						if (power == 'pocket_reality') {
							power = 'pocket_dimension';
						}
						if (power == 'regenerative_segmentation') {
							power = 'rapid_cellular_regeneration';
						}
						if (power_list == 33) {
								if (genetic_blocker == 33 || genetic_blocker == 34) {
								power_list == 35
								continue;
								}
							}
							if (power_list == 34) {
								if (genetic_blocker == 33 || genetic_blocker == 34) {
								power_list == 35
								continue;
								}
							}
						if (genetic_blocker == power_list && power_list != 33 && power_list != 34) {
							power_list += 1
							continue;
						}
						if (power != 'catalyst') {
					entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players set @s Powers." + power_cap + " 0");
						}
					}
					entity.server.runCommandSilent("execute as " + username + " at @s run tag @s remove Powers.Reset");
					entity.server.runCommandSilent("execute as " + username + " at @s run tag @s add Heroes.Prock");
					entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players set @s Heroes.Genetic.Blocker.Type -1");
                }
            });
    });