on damage of player:
    if attacker is a player:
        victim is not attacker
        set attacker's flight mode to false
        set victim's flight mode to false
        if {ct::%attacker%} is not set:
            set {bar::%attacker%} to new bossbar
            set title of bossbar {bar::%attacker%} to "&cCombat Tag!"
            set the color of bossbar {bar::%attacker%} to RED
            add attacker to bossbar {bar::%attacker%}
            send "&e&kxxx&c Combat tagged &e%display name of victim%! &cDon't log out! &e&kxxx" to attacker
        if {ct::%victim%} is not set:
            set {bar::%victim%} to new bossbar
            add victim to bossbar {bar::%victim%}
            set title of bossbar {bar::%victim%} to "&cCombat Tag!"
            set the color of bossbar {bar::%victim%} to RED
            send "&e&kxxx&c Combat Tagged by &e%display name of attacker%! &cDon't logout! &e&kxxx" to victim
        set {ct::%attacker%} to 60
        set {ct::%victim%} to 60

Add a code snippet to your website: www.paste.org