How would I make a purchasable two clicks per second

I don’t know how I would code a two cps. I need help.
Code for project:

function refreshclicks() {
setText(“clickdisplay”, "Clicks: " + howmany);
setText(“shopclickdisplay”, "Clicks: " + howmany);
}
var howmany = 0;
function minuscountdown(takeaway) {
for(takeaway; takeaway>0; takeaway–){
refreshclicks();
}
howmany = howmany - 10;
}
minuscountdown(10);
refreshclicks();
onEvent(“clickcoin”, “click”, function(event) {
howmany = howmany + 1;
console.log(“added 1 click”);
refreshclicks();
});
onEvent(“debug”, “click”, function(event) {
setScreen(“debugmenu”);
});
onEvent(“setclicks”, “click”, function(event) {
howmany = prompt(“Enter a value”);
refreshclicks();
});
onEvent(“back”, “click”, function(event) {
setScreen(“default”);
});
onEvent(“2x”, “click”, function(event) {
//purchase system
if (howmany >= 10) {
console.log(“2x bought”);
setText(“2x”, “BOUGHT!”);
refreshclicks();
} else {
setText(“2x”, “Not enough clicks!”);
setTimeout(function() {
setText(“2x”, “buy 2x clicks: 10 clicks”);
}, 1000);
}
});
onEvent(“backtohome”, “click”, function(event) {
setScreen(“default”);
});
onEvent(“gotoshop”, “click”, function(event) {
setScreen(“shop”);
});

Is this for the AP Create Task?

This is quite easy

var clicks = 1; 
var money = randomNumber("10", "100");
var inventory = [];
setText("inventory", "Inventory:\n" + inventory);
setText("money", "Money: " + money);

onEvent("buyTaco", "click", function(){
  if(clicks>=2){
  hideElement("label7");
  hideElement("buyTaco");
  showElement("image1");
  showElement("label1");
  setProperty("buyTaco", "text-color", "white");
  setProperty("buyTaco", "background-color", "orange");
  money = money - 5;
  appendItem(inventory, "taco");
  var curInven = getText("inventory");
  setText("money", "Money: " + money);
  setText("inventory", curInven + " taco");
  timedLoop("2000", function(){
    hideElement("image1");
    hideElement("label1");
    showElement("buyTaco");
    clicks = 1;
  });
  } else{
  clicks = clicks + 1;
  showElement("label7");
  setProperty("buyTaco", "text-color", "black");
  setProperty("buyTaco", "background-color", "red");
  }
});

Here’s the link to the project and what it does.

How this works is simple. You set the clicks to 1. Reason why is so that whenever the user clicks once, the button knows that their clicks = 2 so it can tell the other elements to display/appear. Once you click the button for the second time you have the item added to your inventory and the cost removed from your total money.