+ 3
I think you're looking for something like this ...
var cash=0;
var more=1;
var wake=10;
function money(){
if(wake<=0) return; // đđ» I just added this line
cash=cash+more;
wake=wake-1; document.getElementById("cash").innerHTML=cash;
document.getElementById("wake").innerHTML=wake;
}
function energy(){
wake=wake+1; document.getElementById("wake").innerHTML=wake;
}