Can't relate movement with camera

Im new to Unity and I can’t seem to find how to relate my movement relative to where my camera is looking. Can someone help me? (Im sorry for errors but english isn’t my first language)

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

    public float moveSpeed;
    public Rigidbody theRB;
    public float jumpForce;

	// Use this for initialization
	void Start () {
        theRB = GetComponent<Rigidbody>();

    // Update is called once per frame
    void Update() {
        theRB.velocity = new Vector3(Input.GetAxis("Horizontal") * moveSpeed, theRB.velocity.y, Input.GetAxis("Vertical") * moveSpeed);

        if (Input.GetKeyDown(KeyCode.Space))
        theRB.velocity = new Vector3(theRB.velocity.x, jumpForce, theRB.velocity.z);


Thanks it worked! But now my character can just fly into the air and slows down when looking down.
Do you have an if command for when he is on ground and does not loose speed when going to an object?
And I can’t jump