Gold Mine Levels

I am trying to learn unity so i made tried to make a game like the gold mines in Travian. So you can upgrade the mines and you will earn more but my script dosen`t work, when i try to upgrade it i still make the same gold as before. Here is my script:

float Gold;
	int Level1Cash = 9;

	void Update () {
		
	Gold += 5 * Time.deltaTime;
	
	if (Gold > Level1Cash){
			if (Input.GetKeyDown(KeyCode.P)){
			Gold -= 10;	
			Gold += 500000 * Time.deltaTime;
			}
		}
		
	}
	
	void OnGUI(){
	
		GUI.Box(new Rect(10,10,100,30), "Gold: " + (int)Gold);
		
	}

what is the problem?

Gold += 5 * Time.deltaTime;

Make 5 a variable, say goldFactor, initialise it as 5 and then modify the variable in your keypress code.