// Update is called once per frame void OnMouseOver() { if (Input.GetMouseButtonUp(0)) { SpawnScript.AddToCounter(); Destroy(gameObject); } }