Why is only apperaring the first sprite when I atack or run?

Here it´s the code:

extends CharacterBody2D


var SPEED = 300.0
const JUMP_VELOCITY = -400.0
@onready var sprite_2d = $AnimatedSprite2D


var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")


func _physics_process(delta):
	if (velocity.x > 1 || velocity.x < -1):
		sprite_2d.animation = "walk"
		if Input.is_action_pressed("Shift"):
			SPEED = 500.0
			sprite_2d.animation = "run"
		else:
			SPEED = 300.0
	else:
		sprite_2d.animation = "stand"
	

	if not is_on_floor():
		velocity.y += gravity * delta
		sprite_2d.animation = "air"


	if Input.is_action_just_pressed("Jump") and is_on_floor():
		velocity.y = JUMP_VELOCITY


	var direction = Input.get_axis("Left", "Right")
	if direction > 0:
		sprite_2d.flip_h = false
	elif direction < 0:
		sprite_2d.flip_h = true
	
	if direction:
		velocity.x = direction * SPEED
	else:
		velocity.x = move_toward(velocity.x, 0, SPEED)


	if is_on_floor() and Input.is_action_pressed("Atack") and (velocity.x == 0):
		sprite_2d.animation = "atack"

	move_and_slide()