a simple button code without functions would look like this.
sync on : sync rate 60 : backdrop on
ink rgb(255,255,255),1 : set text size 24 : set text font "verdana" : set text to bold
btnxpos=270 : btnypos=240
btnwidth=128 : btnheight=24
btnxpos1=270 : btnypos1=200
load$="LOAD GAME"
disable escapekey : while escapekey()=0
mx=MOUSEX()
my=MOUSEY()
if mouseover=3 and mouseclick()=1
ink rgb(150,150,150),2
text 10,10,"clicked"
rem execute your code here
endif
if mx > btnxpos1 and mx < btnwidth + btnxpos1 and my > btnypos1 and my < btnheight + btnypos1
ink rgb(255,255,255),1
text btnxpos1,btnypos1,load$
mouseover=3
else
ink rgb(100,100,100),1
text btnxpos1,btnypos1,load$
mouseover=0
endif
sync : endwhile
end