GUI and Rupees

Tricxta generously gave me this wonderful GUI but there is a small issue with it. I have been messing with it for an hour and haven’t gotten any working results. I need it to take the player’s money and give them bombs. It does it fine until the player is out of money, it simply doesn’t take money but still gives them bombs. Please help me out.

//Made by Tricxta
if (leftmousebutton || timeout){
  timereverywhere;
  showimg 500,kondies_sign.gif,screenwidth/2-(imgwidth(kondies_sign.gif)/2),screenheight/2-(imgheight(kondies_sign.gif)/2);
  changeimgvis 500,4;
  showimg 501,nd_bomb-icon.png,screenwidth/2-25,screenheight/2-50;
  changeimgvis 501,5;
  showimg 206,@[email protected]@30 Rupees for '10 Bombs',screenwidth/2-75,screenheight/2-70;
  changeimgvis 206,6;
  changeimgzoom 206,.6;
  changeimgcolors 206,.1,.1,.1,0;
  showimg 503,kondies_signcancel.gif,screenwidth/2-140,screenheight/2+25;
  changeimgvis 503,5;
  showimg 504,kondies_signconfirm.gif,screenwidth/2+80,screenheight/2+25;
  changeimgvis 504,5;
  if (leftmousebutton){
    if (mousescreenx in |screenwidth/2-140,screenwidth/2-74| && mousescreeny in |screenheight/2+25,screenheight/2+58|)close();
    else if (mousescreenx in |screenwidth/2+80,screenwidth/2+146| && mousescreeny in |screenheight/2+25,screenheight/2+58|)buy();
  }
  timeout=0.05;
}


function close(){
  hideimgs 206,504;
  break;
}
function buy(){
  playerrupees -=30;
  hideimgs 206,504;
  playerbombs +=10;
  break;
}
//Made by Tricxta
if (leftmousebutton || timeout){
  timereverywhere;
  showimg 500,kondies_sign.gif,screenwidth/2-(imgwidth(kondies_sign.gif)/2),screenheight/2-(imgheight(kondies_sign.gif)/2);
  changeimgvis 500,4;
  showimg 501,nd_bomb-icon.png,screenwidth/2-25,screenheight/2-50;
  changeimgvis 501,5;
  showimg 206,@[email protected]@30 Rupees for '10 Bombs',screenwidth/2-75,screenheight/2-70;
  changeimgvis 206,6;
  changeimgzoom 206,.6;
  changeimgcolors 206,.1,.1,.1,0;
  showimg 503,kondies_signcancel.gif,screenwidth/2-140,screenheight/2+25;
  changeimgvis 503,5;
  showimg 504,kondies_signconfirm.gif,screenwidth/2+80,screenheight/2+25;
  changeimgvis 504,5;
  if (leftmousebutton){
    if (mousescreenx in |screenwidth/2-140,screenwidth/2-74| && mousescreeny in |screenheight/2+25,screenheight/2+58|)close();
    else if (mousescreenx in |screenwidth/2+80,screenwidth/2+146| && mousescreeny in |screenheight/2+25,screenheight/2+58|)buy();
  }
  timeout=0.05;
}


function close(){
  hideimgs 206,504;
  break;
}
function buy(){
  if (playerrupees>=30){
  playerrupees -=30;
  hideimgs 206,504;
  playerbombs +=10;
  break;
  }else{
  close()
  }
}

You forgot a check for how much they have. It should work now…

Kondie forgot the (); after the last close for the record.

I :facehoof: just for the record

I see it in there… Urza, are your eyes bad?

regardless you’re still missing a ;