I am making a wither dagger, but unamed ironswords reacts to ironswords named wither dagger, but iron swords that is named something other than iron sword doesn't react as a wither dagger
Code:
on damage:
if attacker is holding an iron_sword named "<green>Wither dagger":
if unix date of ((metadata tag "cooldown4" of attacker) ? 0) wasn't less than 2 seconds ago:
set metadata tag "cooldown4" of attacker to unix timestamp of now
apply wither 1 to victim for 4 seconds