Is there a way to prevent the game from allowing unlimited money to be generated by simply pressing a button?
var workbard = document.getElementById("workbar");
function work() {
var zaman = setInterval(function () {
workbard.value +=1;
if (workbard.value == 10) {
workbard.value -=11;
workbard.style.visibility = 'hidden'
clearInterval(zaman);
money = money +=5;
experience = experience +=10;
document.getElementById("para").innerHTML= ":" +money;
document.getElementById("exp").innerHTML=":" +experience;
}
<progress id="workbar" alue="0" max="10"></progress>
<button type ="button"id="workb2"onclick="work(),document.getElementById('workbar').style.visibility='visible'">Work</button>