Stack kill streak when i don't need it

Last Godot Version

I want to create mechanic that will upgrade my weapons with kill streak but after one kill i can stack kills cos my func doesn’t stop at all. What should i do to finish my func after moment when i take +1 to kill streak.

My code:

extends Area2D

class_name Sword

@export var damage : int = 10
@export var player : Player
@export var facing_shape : FacingCollisionShape2D
@export var enemy_counter : int = 0


func _ready():	
	monitoring = false
	player.connect("facing_direction_changed", _on_player_facing_direction_changed)

func _on_body_entered(body):
	var enemy_died  = false
	for child in body.get_children():
		if child is Damageable:
			
			#get direction from sword to the body
			var direction_to_damageable = (body.global_position - get_parent().global_position)
			var direction_sign = sign(direction_to_damageable.x)
			
			if(direction_sign > 0):
				child.hit(damage, Vector2.RIGHT)
			elif(direction_sign < 0):
				child.hit(damage, Vector2.LEFT)
			else:
				child.hit(damage, Vector2.ZERO)
				
			if (child.health <= 0 and !enemy_died):
				enemy_died = true
				player.enemy_dies()
				return  # DOESN'T FINISH CODE???

func _on_player_facing_direction_changed(facing_right : bool):
	if(facing_right):
		facing_shape.position = facing_shape.facing_right_position
	else:
		facing_shape.position = facing_shape.facing_left_position

I guess you can simply change the condition

if child is Damageable:

to

if not enemy_died and child is Damageable:

it doesn’t fix the problem(((

if it’s necessary i can show damageable script:

Damageable.gd:

extends Node

class_name Damageable

signal on_hit(node : Node, damage_taken : int, knockback_direction : Vector2)


@export var health : float = 20:
	get:
		return health
	set(value):
		SignalBus.emit_signal("on_health_changed", get_parent(), value - health)
		health = value
		
@export var dead_animation_name : String = "death"

func hit(damage : int, knockback_direction : Vector2):
	health -= damage
	emit_signal("on_hit", get_parent(), damage, knockback_direction)
	


func _on_animation_tree_animation_finished(anim_name):
	if(anim_name == dead_animation_name):
		get_parent().queue_free()
		

Sword.gd:

extends Area2D

class_name Sword

@export var damage : int = 10
@export var player : Player
@export var facing_shape : FacingCollisionShape2D
@export var enemy_counter : int = 0


func _ready():	
	monitoring = false
	player.connect("facing_direction_changed", _on_player_facing_direction_changed)

func _on_body_entered(body):
	var enemy_died  = false
	for child in body.get_children():
		if not enemy_died and child is Damageable:
			
			#get direction from sword to the body
			var direction_to_damageable = (body.global_position - get_parent().global_position)
			var direction_sign = sign(direction_to_damageable.x)
			
			if(direction_sign > 0):
				child.hit(damage, Vector2.RIGHT)
			elif(direction_sign < 0):
				child.hit(damage, Vector2.LEFT)
			else:
				child.hit(damage, Vector2.ZERO)
				
			if (child.health <= 0):
				enemy_died = true
				player.enemy_dies()
				return  # DOESN'T FINISH CODE???

func _on_player_facing_direction_changed(facing_right : bool):
	if(facing_right):
		facing_shape.position = facing_shape.facing_right_position
	else:
		facing_shape.position = facing_shape.facing_left_position