How To Fire Balls At Crusor Location

I m making game like Smash Hit
I want fire balls at cursor location

public Rigidbody ball;
public Transform shotPos;
public float shotForce, moveSpeed;

    void Update () {
        float h = Input.GetAxis("Horizontal")*Time.deltaTime*moveSpeed;//player movement
        float v = Input.GetAxis("Vertical")*Time.deltaTime*moveSpeed;//player movement
        transform.Translate(new Vector3(h, v, 0));
        if (Input.GetMouseButtonDown(0))
        {
            Rigidbody shot = Instantiate(ball, shotPos.position, shotPos.rotation )as Rigidbody;
            shot.AddForce(shotPos.forward * shotForce);
        }
        

	}

public GameObject bullet;
public float force;
void Update(){
if (Input.GetMouseButtonDown (0)) {
GameObject bullet_ = Instantiate (bullet);
bullet_.transform.position = GetMousePosition ();
bullet_.GetComponent ().AddForce (Vector3.forward * force);
}
}

	Vector3 GetMousePosition(){

			Vector3 inputPos = Camera.main.ScreenToWorldPoint (Input.mousePosition);

			inputPos .z = Camera.main.transform.position.z;

			return inputPos;

	}