Make a tool called shield set the type of tool to special and set everything else in visual to 0, go in triggers and make a new procedure in the when tool in hand tick trigger and after that make this script: while item in hand of target / entity = shield do add potion with level (Number) duration (0.5) type resistance
Make a tool called shield set the type of tool to special and set everything else in visual to 0, go in triggers and make a new procedure in the when tool in hand tick trigger and after that make this script: while item in hand of target / entity = shield do add potion with level (Number) duration (0.5) type resistance
Oh and when I said "while item in hand of target / entity" I meant you could use off hand or main hand.
You can also use item instead of tool.
How do you make it like a normal minecraft shield? (As in the blocking)