The command should be separate from kills and can be only run when the user is dead (Player::IsDead). You can use PlayerStats::Damage for this.