
    StartupEvents.registry('palladium:abilities', (event) => {
        event.create('heroes:cycle_genetic_blocker')
            .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 item = entity.mainHandItem.nbt
					if (item == null) {
					entity.mainHandItem = entity.mainHandItem.withName(Text.yellow("Genetic Blocker").italic(false))
					entity.mainHandItem.nbt.Selected_Power = -1;
					}
					if (item != null) {
						
					let value = item[`Selected_Power`]
					let power_max = global.power_amount;
					
						value += 1;
						if (value > power_max) {
							value = - 2;
						}
					for (let power_list = value; power_list < power_max +2; power_list++) {
						let power_cap = global['ability_' + power_list];
						if (power_list > power_max) {
						power_list = -2; 
						continue;
							}
						if (power_list == -1) {
						entity.mainHandItem = entity.mainHandItem.withName(Text.yellow("Genetic Blocker").italic(false))
						entity.mainHandItem.nbt.Selected_Power = -1;
						break;
						}
						if (power_cap != 'Catalyst') {
					let scoreboard_obj_1 = scoreboard.getObjective("Powers." + power_cap);
					if (scoreboard_obj_1 != null) {
                    let score_1 = scoreboard.getOrCreatePlayerScore(username, scoreboard_obj_1);
                    let value_1 = score_1.getScore();
					if (value_1 >= 1) {
					entity.mainHandItem.nbt.Selected_Power = power_list;
					if (power_list == 33 || power_list == 34) {
					entity.mainHandItem = entity.mainHandItem.withName(Text.yellow("Genetic Blocker : Ocular_Psychogenesis").italic(false))
					}
					if (power_list != 33 && power_list != 34) {
					entity.mainHandItem = entity.mainHandItem.withName(Text.yellow("Genetic Blocker : " + power_cap).italic(false))
					}
					break;
									}
								}
							}
						}
					}
				}
			});
    });