Duplicate an Object Once

Okay, so what i need my code to do is duplicate an object ONCE every time a certain condition is met. I know how to duplicate the object, but everytime the condition gets met, it just makes an unlimited amount of clones (or until unity crashes).
this is the code that i thought would work, but apparently doesn’t :

 var Ball : Transform;
var Dupe : Scoring;
var a : int = 0;
var i : int = 0;

function Start ()
{
	Dupe = GameObject.Find("ScoreBoard").GetComponent(Scoring);
}
function Update()
{	
	if(Dupe.Score != 0 && Dupe.Score % 5 == 0)
	{ 
		if(a != Dupe.Score)
		{
			Instantiate(Ball, Vector3(0,6,-1),Quaternion.identity);
			a = Dupe.Score;
		}
	}
	
}

and the other script being referenced :

 var start : Vector3;
var Check : Scoring;
var CanClick : int = 0;
var X : int;
var Y : int;
var Z : int;

function Start () 
{
	start = transform.position;
	Check = GameObject.Find("ScoreBoard").GetComponent(Scoring);
}
function Update()
{
	//testing purposes, will be removed in FInal Product
	if(Input.GetKeyDown(KeyCode.Space))
	{
		Test();
	}
}

//Checks that the player is going to be clicking the ball
function OnMouseOver()
{
	//has the ball passed the collider, meaning it is in
	//the clickable area
	if(CanClick == 1)
	{
		//did the player click, which from previous checks
		//would be them clicking the ball
		if(Input.GetMouseButtonDown(0))
		{
			//Reset conditionals & add points
			CanClick = 0;
			Reset();
			Check.Score += 1;
		}
	}
return;
}

//reset the ball to it's original position and speed
function Reset()
{

	Rand();
	this.rigidbody.velocity = Vector2();
	this.constantForce.force = Vector2(X,Y);
return;
}

function Rand()
{
	X = Random.Range(-5,5);
	Y = Random.Range(20,25);
	if(X == 0)
	{ X += 1;}	
return;
}

function Test()
{
	transform.position = start;
return;
}

The Scoring is done on it’s own script, attached to some GUI Text :

var Score : int = 0;

function Start()
{}

function OnGUI()
{
	guiText.text = "Score : " + Score;
}

So i just don’t understand what i should be doing so that it only duplicates my object ONCE, when i call on it.

Any help or comments are welcome and appreciated.
Thank You

You are instantiating the object every frame when Dupe.score reaches 5. You need to reset Dupe.score to 0 if you want it to stop, or add some flag to never Instantiate again after the first time.

Problem Solved!
originally the code for duplicating was attached to the object i wanted to duplicate. Apparently this causes some problems, so by simply moving this code :

var Ball : Transform;
var Dupe : Scoring;
var a : int = 0;
var i : int = 0;
 
function Start ()
{
    Dupe = GameObject.Find("ScoreBoard").GetComponent(Scoring);
}
function Update()
{   
    if(Dupe.Score != 0 && Dupe.Score % 5 == 0)
    { 
       if(a != Dupe.Score)
       {
         Instantiate(Ball, Vector3(0,6,-1),Quaternion.identity);
         a = Dupe.Score;
       }
    }
}

to another object (in my case it was the main camera) it solved the problem