destroy when mouse click

I want a cube to be destroyed when i click it,but my script has these following problems.
1-The cubes it is attached to(2) destroy all at a time.
2-It gets destroyed when i click anywhere not only when it is on top of the cube.
I have 2 different codes,let me post them both.

using UnityEngine;
using System.Collections;

public class checkifclick : MonoBehaviour {

    public int points = 0;

    void OnMouseDown () {
        Destroy(gameObject);
        points = points + 1;
    }

    void Update() {
        Debug.Log (points);
    }

}
using UnityEngine;
using System.Collections;
public class checkifclick2 : MonoBehaviour {
    public static int points = 0;
    void Update() {
        if (Input.GetMouseButtonDown(0)) {
            points = points + 1;
            Destroy (gameObject);
        }
        Debug.Log (points);
    }
}

first one should work, although trying to the “points” thing in the same script isn’t going to work beyond since you are destroying the gameobject and all the scripts attached to it, and if you have multiple of this script on multiple objects they all have their own points total…

Second one doesn’t check what the mouse is over, that will destroy every things with the code attached to it when the mouse button is clicked, and again, the points thing is redundant.

edit: and posting multiple threads for the same thing really isn’t useful.