I know how to make the script run an animation but i dont know how to change my actual speed. I want the script to increase my characters speed when I hit the shift button.
Assuming you use a character controller, you can set the speed in the script’s variables.
transform.Translate(Vector3.forward * Time.deltaTime * speed);
Otherwise you can change the overall speed in the Project Settings/Time via Time Scale.