How can I make the player jump and put gravity using this script below?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Hakal87

extends KinematicBody2D

export var speed = 75

func _physics_process(delta):
var direction: Vector2
direction.x = Input.get_action_strength(“ui_right”) - Input.get_action_strength(“ui_left”)
direction.y = Input.get_action_strength(“ui_down”) - Input.get_action_strength(“ui_up”)

if abs(direction.x) == 1 and abs(direction.y) == 1:
	direction = direction.normalized()

var movement = speed * direction * delta
:bust_in_silhouette: Reply From: nathanwfranke