I try it and it work fine try this just copy and paste
sync on
dim menuclick(1)
dim menu$(10)
menu$(1)="LOAD"
menu$(2)="SAVE"
menu$(3)="FIRE"
menu$(4)="JUMP"
menu$(5)="RUN"
menu$(10)="XMEN"
MAKE OBJECT CUBE 1,10
do
INK RGB(255,255,255),1
TEXT 10,2,"....RIGHT CLICK FOR MENU... "
TEXT 10,20,"....YOU CLICK MENU... "+STR$(menuclick(1))+".. "+menu$(menuclick(1))
IF MOUSECLICK()=2 THEN menu(320,10,10) :SLEEP 20
YROTATE OBJECT 1,WRAPVALUE(OBJECT ANGLE Y(1)+2)
sync
loop
`..X=LEFT/RIGHT POS Y=UP/DOWN POS.......L=NUMBER OF MENU LENGHT...............
`..menuclick(1) RETURN MENU VALUE...............
function menu(x,y,l)
set text font "times new roman"
set text size 15
dim menux(l)
dim menuy(l)
dim mwidth(l)
dim mheight(l)
dim ops$(l)
dim menuops(l)
ex=0
for a=1 to l
ops$(a)=menu$(a)
next a
tw2=0:tw3=0:tw=0
for a=1 to l
for b=1 to 2
tw2=text width(ops$(a))
if tw2>tw3 then tw3=tw2
next a
next b
tw=tw3
mposy=y+16
for pos=1 to l
menux(pos)=x
menuy(pos)=y+pos*16
mwidth(pos)=x+tw+5
mheight(pos)=16+y+pos*16
menuops(pos)=pos
Next pos
oxm=mousex()
oym=mousey()
repeat
xm=mousex()
ym=mousey()
for pos=1 to l
ink rgb(210,210,160),1
if image exist(1000+pos) then box x,y+pos*16,x+tw+5+50,18+y+pos*16
box x,y+pos*16,x+tw+5,18+y+pos*16
ink rgb(165,165,125),1
box x+1,y+1+pos*16,x+tw+4,17+y+pos*16
ink rgb(10,10,10),1
text x+3,y+pos*16,ops$(pos)
if mousex()>menux(pos) and mousex()<mwidth(pos) and mousey()>menuy(pos) and mousey()<mheight(pos)
ink rgb(190,190,140),1
box x+2,y+2+pos*16,x+tw+3,16+y+pos*16
ink rgb(255,255,255),0
text x+3,y+pos*16,ops$(pos)
endif
if mouseclick()=1 and mousex()<>oxm and mousey()<mposy
menuclick(1)=0
backdrop on
ex=1
endif
if mouseclick()=1 and mousex()>menux(pos) and mousex()<mwidth(pos) and mousey()>menuy(pos) and mousey()<mheight(pos)
ink rgb(190,190,140),1
box x+2,y+2+pos*16,x+tw+3,16+y+pos*16
ink rgb(250,250,250),1
text x+3,y+pos*16,ops$(pos)
menuclick(1)=menuops(pos)
ex=1
endif
if mouseclick()=1 and mousey()>mheight(pos)
menuclick(1)=0
ex=1
endif
next pos
sync
until ex=1
undim menux(l)
undim menuy(l)
undim mwidth(l)
undim mheight(l)
undim ops$(20)
undim menuops(l)
endfunction menuclick(1)