In Minecraft on my pvp server How do I give players effects when they right click an item in their inventory?

For example, if I had a ninja kit, I want the player to right click the sword and he gets invisibility and speed. How do I do that?

There are plugins that can do that, such as Item Effects - https://www.spigotmc.org/...-11.23055/

It's also possible to do this purely with command blocks, however it would take a while to learn how they work. I've never done anything like this but it would be something along the lines of check for item in player inventory, when item is used via a right click then give the player X effects.