income script is not working as planned

I want it to add a gold coin to the GUI every 2 seconds but it says that I earned the coin five times every second in the log and doesnt display it on my GUI. here is the part of the script related:

private int gold;
	private float income;
	private float currency;
	
	void Start ()
	{
		income = 0.01F;
	}
	
	void FixedUpdate ()
	{
		currency = (income * Time.deltaTime);
		
		if(currency > 2000)
			gold += 1;
			currency = 0;
			Debug.Log("earned one coin");
	}
	
	void OnGUI ()
	{
		//Upper GUI
		GUI.Box(new Rect(0,0, Screen.width, Screen.height - (Screen.height * 13) / 14), "");
		GUI.Label(new Rect(Screen.width / 20,Screen.height / 40, Screen.width / 8, Screen.height / 8), "Gold:" +gold);

and I have all the closing tags with no errors.

First things first: you want public variables in the global scope so you can set values from the editor. It makes balancing your game easier.

var incomeRate : int;
var gold : int;
var maxGold : int;

Next, while adding a value can work for “delayed” money incrementing, you are really better served using the Time functions. But you’ll need a lastTick value to figure out when you last incremented your resource!

private var lastTick : float;

function FixedUpdate()
{
  if( Time.time > lastTick + incomeRate )
  {
    // Gain 1 resource.
  }
}

Fortune to you.

thanks a lot! I still am learning c# and am working with a limited knowledge base.