StartupEvents.registry('palladium:condition_serializer', (event) => {
event.create('heroes:in_pocket')
  .addProperty("id_scoreboard", "string", "Score.Board", "Scoreboard used to identify storage id")
            .addProperty("dimension_id", "string", "minecraft:the_overworld", "Scoreboard used for timer")
            .addProperty("dimension_size", "string", "Heroes.Pocket.Id", "Scoreboard used for dimension size")
  .test((entity, props) => {
					const score_id = props.get('id_scoreboard');
					const dim_size = props.get('dimension_size');
					const dim_id = props.get('dimension_id');
					const score_x = props.get('scoreboard_x');
					const score_y = props.get('scoreboard_y');
					const score_z = props.get('scoreboard_z');
					let dimension = entity.getLevel().getDimension();
					let username_name = entity.getName().getString();
                    let username = entity.username;
					let near_pocket = 0
					
					let scoreboard = Utils.server.scoreboard;

                    let scoreboard_obj = scoreboard.getObjective(props.get("id_scoreboard"));
					if (scoreboard_obj != null) {
                    let score = scoreboard.getOrCreatePlayerScore(username, scoreboard_obj);
                    let value = score.getScore();
					
					let scoreboard_obj_size = scoreboard.getObjective(props.get("dimension_size"));
					if (scoreboard_obj_size != null) {
                    let score_size = scoreboard.getOrCreatePlayerScore(username, scoreboard_obj_size);
                    let value_size = score_size.getScore();

					
					near_pocket = entity.server.runCommandSilent("execute as " + username + " at @s[nbt={Dimension:\"heroes:pocket_dimension\"}] in " + dim_id + " positioned " + (value * 250) + " 156 " + (value * 250) + " if entity @e[tag=Heroes.Pocket.Failsafe,distance=..5]");
										}
				}
			return near_pocket === 1
})
});