
    StartupEvents.registry('palladium:abilities', (event) => {
        event.create('heroes:intuitive_origin_cycle')
            .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 = scoreboard.getObjective("Heroes.Intuitive.True.Power");
                    let score = scoreboard.getOrCreatePlayerScore(username, scoreboard_obj);
                    let value = score.getScore();
					let power_max = global.power_amount;
					
						value += 1;
						if (value > power_max) {
							value = - 2;
						}
					for (let power_list = value; power_list < power_max + 1; power_list++) {
						let power_cap = global['ability_' + power_list];
						if (power_list > power_max) {
						power_list = -2; 
						continue;
							}
						if (power_list == -1) {
						entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players set @s Heroes.Intuitive.True.Power " + power_list + "");
						break;
						}
						if (power_cap != 'Ability_Absorption' && power_cap != 'Ability_Transferal' && power_cap != 'Interplay' && power_cap != 'Empathic_Mimicry' && power_cap != 'Intuitive_Aptitude') {
					let scoreboard_obj_1 = scoreboard.getObjective("Powers.Intuitive." + power_cap);
                    let score_1 = scoreboard.getOrCreatePlayerScore(username, scoreboard_obj_1);
                    let value_1 = score_1.getScore();
					if (value_1 >= 1) {
					entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players set @s Heroes.Intuitive.True.Power " + power_list + "");
					break;
								}
							}
						}
						entity.server.runCommandSilent("execute as " + username + " at @s run ability lock @s heroes:intuitive_aptitude Origin_Power_Gui_Toggle");
					
				}
			});
    });