I'm making a Minecraft adventure map in 1.13.2 where the player gets a item that can collect information by right clicking on signs or items with it in their offhand. I only know of one way the sign can give a message in chat: /tellraw. However, I don't want it to show the same message if the player doesn't have this item in their offhand.
I have searched for terms like "minecraft different outputs offhand item" and "minecraft rightclick sign offhand item different" but it seems no one else has this same problem. No one else, as I've seen, has explained how this could even be accomplished.