if (created) {
  showcharacter;
  updategani();
}
if (updategani) {
  updategani();
}
function updategani() {
  type = 1;
  if (rupees>=100) type = 4;
  else if (rupees>=30) type = 3;
  else if (rupees>=5) type = 2;

  setcharani gralats,#v(type);
}
if (playertouchsme) {
  playerrupees += rupees;
  rupees = 0;
  destroy;
}