Unity Jump Problem

When Ever I jump, It only jumps once, after that it does not allow me to jump again.

using UnityEngine;
using System.Collections;

public class Runner : MonoBehaviour {
public bool grounded = true;
public float jumpPower = 190;
private bool hasJumped = false;
public float Speed;
// Use this for initialization
void Start () {
transform.Translate (Vector3.left * Time.deltaTime * Speed);
}

// Update is called once per frame
void Update () {
	// Do something

	if(!grounded && GetComponent<Rigidbody>().velocity.y == 0) {
		grounded = true;
	}
	if (Input.GetKeyDown(KeyCode.Space) && grounded == true) {
		hasJumped = true;
	}
}

void FixedUpdate (){
	if(hasJumped){
		GetComponent<Rigidbody>().AddForce(transform.up*jumpPower);
		grounded = false;
		hasJumped = false;
	}
}

}

You shouldn’t check if velocity == 0 because it’s a float. In unity you should avoid checking floats with ‘==’. If you put your gameobject to a flat surface it will work, but if you jump on a surface with angle, your gameobject will slide off a little bit, you can’t see it. So the velocity will change constantly and the grounded will never be true again. I recommend you to look for an another method of jumping, without checking the velocity.