
    StartupEvents.registry('palladium:abilities', (event) => {
        event.create('heroes:ocular_emulate')
            .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.Power.Icon.Ocular');
                    let score = scoreboard.getOrCreatePlayerScore(username, scoreboard_obj);
                    let value = score.getScore();

					
						let power_max = global.power_amount;
						let power = global['ability_' + value];


					
					if (power == 'Levitation') {
					entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players operation @s Heroes.Levitation.Speed.Base.Psychogenesis = @s Heroes.Levitation.Speed.Base.Hold");
					}
					if (power == 'Bone_Protrusion') {
					entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players operation @s Heroes.Bone.Var.Psychogenesis = @s Heroes.Bone.Var.Hold");
					}
					
					if (value >= 1) {
					entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players set @s Heroes.Ocular_Psychogenesis.Power.Hold " + value + "");
					}
					for (let power_list = 0; power_list <= power_max; power_list++) {
						let power = global['ability_' + power_list];
							
					entity.server.runCommandSilent("execute as " + username + " at @s run tag @s remove Powers.Ocular." + power + "");

						}
					entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players set @s Heroes.Levitation.Speed.Base.Hold 0");
					entity.server.runCommandSilent("execute as " + username + " at @s run scoreboard players set @s Heroes.Bone.Var.Hold 0");
					entity.server.runCommandSilent("execute as " + username + " at @s run tag @s add Heroes.Ocular.Next");
					entity.server.runCommandSilent("execute as " + username + " at @s run tag @s remove Powers.Ocular.Ability");
					entity.server.runCommandSilent("execute as " + username + " at @s run tag @s add Heroes.Prock");
					}
            });
    });