I'm creating a game for my school on Minecraft Education Edition, which is Bedrock based. At a point in the game, the players will collect items I rename on an anvil that will give special abilities, e.g. a book that summons lightning, a book that replenishes health of nearby players, a book that makes the holder invulnerable, a helmet that allows night vision, and a few others I am working out.
How do I code command blocks to tag a player either wearing item or holding in off-hand and allow the tagged player to have the effect happen?