How do I make a datapack that checks if a player is holding a sword and shifting?

I'm trying to make a custom datapack for a server I play on and reimplementing sword blocking in a way

Continue to help post