I was able to figure this one out on my own just a couple changes and additions i was able to think up, below is the full code.
cls
sync on
sync rate 30
hide mouse
`just set up a scene
make object cube 1,100
make matrix 1,10000,10000,30,30
`this is just an important variable
o# = 0
do
`move the object
if keystate(17)=1 then move object 1,10
if keystate(31)=1 then move object 1,-5
if keystate(30)=1 then turn object left 1,3
if keystate(32)=1 then turn object right 1,3
`record object position
x# = object position x(1)
y# = object position y(1)
z# = object position z(1)
`record camera x and z positions
cx# = camera position x()
cz# = camera position z()
cy# = camera position y()
`camera rotate positions
crx#=camera angle x()
cry#=camera angle y()
crz#=camera angle z()
`mouse position
mx# = mousemovex()
my# = mousemovey()
`Lets make sure the camera has a retricted y position (200 above the object)
position camera x#, y#+100, z#
`follow the object
if keystate(17)=0 and keystate(31)= 0 then inc o#,1
if o# > 10 then o# = 10
if o# < 10 then SET CAMERA TO OBJECT ORIENTATION 1
if keystate(17)=1 or keystate(31)=1 then o# = 0
if keystate(30)=0 then inc o#,1
if o# > 10 then o# = 10
if o# < 10 then SET CAMERA TO OBJECT ORIENTATION 1
if keystate(30)=1 then o# = 0
if keystate(32)=0 then inc o#,1
if o# > 10 then o# = 10
if o# < 10 then SET CAMERA TO OBJECT ORIENTATION 1
if keystate(32)=1 then o# = 0
`360 camera movement
rotate camera crx#+((my#+0.0)/2.0),cry#+((mx#+0.0)/2.0),0
sync
loop