Instead of having multiple if statements, you can do this:
var direction : Vector2 = Input.get_vector("left", "right", "up", "down")
Also assuming this script extends CharacterBody2D, you need to manipulate the built in velocity variable which move_and_slide() uses.
In my game i also have acceleration, which i just set to an absurdly high number to get snappier feeling movement.
var accel : int = 999999
const speed : int = 300
velocity.x = move_toward(velocity.x, speed * direction.x, accel)
velocity.y = move_toward(velocity.y, speed * direction.y, accel)
move_and_slide()