I need help in my game

I’m working on a school project where we have to develop our own game. I’m making a kind of Minecraft Cookie Clicker, but instead of cookies, it’s diamonds, and instead of grandmothers, farms, mines, etc., it’s the wooden, stone, iron, and diamond pickaxes from Minecraft. The goal of the game is to reach 100,000 diamonds. There’s also a diamond ore to mine manually. The thing is, in the code section, I generated four variables that are initially set to 0, one for each pickaxe. Each time you buy another pickaxe, it’s added to your total diamonds after some calculations. The problem is that it works fine when you buy one, but when you buy more (the problem appears after four), it starts giving you a number of diamonds that doesn’t correspond at all to what it should. I’m also sharing the link to the project because it’s better to see it than read about it. Just so you know, the project is in Spanish because I’m from Spain. This is it: https://x.thunkable.com/copy/2e204b454ddcf09fa01dc9e7a378a22c
By the way, in that app, there are two games. The one I’m talking about is called “Paga tu deuda.” The other one is in development, but I’m also open to suggestions for it because it’s not working for me either.