if Input.is_action_just_pressed("jump"):
if is_on_floor():
velocity.y = jump_velocity
elif not has_smashed:
moving=false
velocity.x=0
velocity.y = -jump_velocity*2
has_smashed=true
if moving==true:
var direction = Input.get_axis("left", "right")
if direction:
velocity.x = direction * speed
else:
velocity.x = move_toward(velocity.x, 0, speed)
else:
await is_on_floor()
moving=true