jump script unity 2d

C#
GetComponent<Rigidbody2D>().AddForce(new Vector2(0,10), ForceMode2D.Impulse);
Source

Also in C#: