NPC Code:
if (actionwashit) hearts-=strtofloat(#P(0));
//#CLIENTSIDE
if (washit) triggeraction x+1.5,y+2,washit,#v(playerswordpower);
As for the other thing, just make an option at the start of your server in which it is asked if the player can see both seteffect and setcoloreffect.