code_language.skript:
on damage:
if attacker is sneaking:
if {team.%attacker's uuid%} is 5:
if {flair_type.%attacker's uuid%} is 2:
if {cooldown.%attacker's uuid%.locked} is true:
cancel event
else:
if {timer.%attacker's uuid%.locked} is true:
cancel event
else:
set {timer.%attacker's uuid%.locked} to true
set {timer_display.%attacker's uuid%.locked} to 30
play sound "minecraft:entity.warden.sonic_boom" with volume 1 to all players within 6 blocks around the attacker
while {timer_display.%attacker's uuid%.locked} is not 0:
remove 1 from {timer_display.%attacker's uuid%.locked}
apply glowing 2 without particles to victim for 2 seconds replacing the existing effect
apply blindness 2 without particles to victim for 2 seconds replacing the existing effect
apply strength 2 without particles to attacker for 2 seconds replacing the existing effect
send action bar "&9Locked | %{timer_display.%attacker's uuid%.locked}s"
wait 1 second
if {timer_display.%attacker's uuid%.locked} is 0:
set {timer.%attacker's uuid%.locked} to false
set {cooldown.%attacker's uuid%.locked} to true
set {cooldown_display.%attacker's uuid%.locked} to 120
while {cooldown_display.%attacker's uuid%.locked} is not 0:
remove 1 from {cooldown_display.%attacker's uuid%.locked}
send action bar "&4Locked | %{cooldown_display.%attacker's uuid%.locked}%s"
wait 1 second
if {cooldown_display.%attacker's uuid%.locked} is 0:
set {cooldown.%attacker's uuid%.locked} to false