Code:
code_language.skript:
on rightclick with diamond sword:
name of player's tool is "&eIce Mage Sword":
set {_Waited} to difference between {Freeze::%player%} and now
if {_Waited} is less than 20 seconds:
stop
else:
set {AbilityInUse} to "True"
send "&cAbility &8&l» &7You have activated your &aFreeze &7ability" to player
set {Freeze::%player%} to now
loop players in radius 4 around player:
set the freeze state of loop-player to true
wait 2 seconds
set the freeze state of loop-player to false