Player Movement Freezes in Unity3D [Please help, no answers!]

Hello all,
I have created a player controller script like this:

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

    public float speed;
    public Rigidbody rb;
    public Animator anim;
    public float jumpPower;
    private bool grounded;
    private float distToGround;
    public float hits;


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

    }
    void OnCollisionStay(Collision collisionInfo)
    {
        grounded = true;
    }

    void OnCollisionExit(Collision collisionInfo)
    {
        grounded = false;
    }
    // Update is called once per frame
    void Update () {
       

        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveZ = Input.GetAxis("Vertical");
        rb.velocity = new Vector3(moveHorizontal *speed, rb.velocity.y, moveZ*speed);

        if(Input.GetKeyDown(KeyCode.Space) && grounded == true)
        {
            Jump();
        }
	}

    void Jump()
    {
        rb.AddForce(Vector3.up * jumpPower);
       // animation.Play("jump_pose");
    }
    void FixedUpdate()
    {
        //
    }

}

This script, however, does not seem to be working. It usually ends up freezing the player where you cannot move the player at all with any keys. This is demonstrated here: https://embed.gyazo.com/768346efa3444041f574b65912f852c2.gif
It is also demonstrated here showing the movement before it: Screen capture - 1b516af1ae6b493297139a7ad9ca61f1 - Gyazo

Could you please advise me on how to fix this? I would appreciate any help.

Thanks,

8Development

I made some minor changes to your script:

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

	public float speed;
	private Rigidbody rb;
	private Animator anim;
	public float jumpPower;
	private bool grounded;
	private float distToGround;
	public float hits;


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

	}
	void OnCollisionStay(Collision collisionInfo)
	{
		grounded = true;
	}

	void OnCollisionExit(Collision collisionInfo)
	{
		grounded = false;
	}
	// Update is called once per frame
	void Update () {


		float input_x = Input.GetAxisRaw("Horizontal");
		float input_y = Input.GetAxisRaw("Vertical");

		anim.SetFloat("x", input_x);
		anim.SetFloat("y", input_y);

		transform.position += new Vector3(input_x, input_y, 0).normalized * Time.deltaTime; 
	}


	void FixedUpdate(){
		if(Input.GetKey (KeyCode.Space)){
			rb.AddForce(Vector3.up * jumpPower);
		}
	}
}