menu:
set cursor 0,0
print "WELCOME TO THE GAME OF THE YEAR!!"
print
print "Select an option"
print
print "1) go to game"
wait key
if inkey$()="1"
gosub main_game
cls
endif
return
main_game:
Sync On
Sync Rate 60
autocam off
hide mouse
backdrop on
fog on
fog distance 4000
fog color RGB(128,128,128)
color backdrop RGB(128,128,128)
Rem make matrix
Make matrix 1,100000,100000,20,20
Rem texture matrix
Load image "abbie.jpg",1
Prepare matrix texture 1,1,1,1
Fill matrix 1,0,1
Rem Make player pawn
`Load image "barry.bmp",2
Make object sphere 10,25
`Texture object 10,2
position object 10,100,0,100
rem Randomize the matrix
randomize matrix 1,500
rem Variables
health=100
bullets=50
boxY=200
boxZ=20
Rem Main loop
Do
Rem Store Object angle
AngleY# = object angle Y(10)
Rem Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,AngleY#,20)
ZTest# = Newzvalue(Z#,AngleY#,20)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
Move object 10,10
Endif
Endif
If Leftkey()=1 then Yrotate object 10,Wrapvalue(AngleY#-5)
If Rightkey()=1 then Yrotate object 10,Wrapvalue(AngleY#+5)
X# = Object position x(10)
Z# = Object position z(10)
Y# = Get Ground Height(1,X#,Z#)
Position object 10,X#,Y#+12.5,Z#
CameraZ# = Newzvalue(Z#,AngleY#-180,100)
CameraX# = Newxvalue(X#,AngleY#-180,100)
CameraY# = Get Ground Height(1,CameraX#,CameraZ#)
Position camera CameraX#,CameraY#+50,CameraZ#
Point camera X#,Y#+25,Z#
Rem Refresh Screen
Sync
set cursor 0,0
box 10,10,boxY,BoxZ
ink rgb(0,255,100),0
set cursor 0,20
print BoxY
if boxY <= 0
boxY = 0
endif
if downkey()=1
dec BoxY
if boxY = 150
dec health,25
endif
if boxY = 100
dec health,25
endif
if boxY = 50
dec health,25
endif
if boxY = 0
dec health, 25
endif
endif
set cursor 600,460
set text size 25
text 550,460,"Ammo"
print Bullets
set cursor 50,460
set text size 25
text 0, 460,"health:"
print health
if mouseclick()=1
dec bullets
if bullets <= 0
bullets = 0
color object 10, rgb(188,255,0)
endif
endif
if health <= 0
health = 0
color object 10, rgb(255,50,100)
endif
Loop
return
I already did that

it worked out great!
"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack