To do frictionless motion, you need to think about two things, the applied thrust and the direction the object is actually moving. You'll need to make a thrust variable which holds the magnitude of the thrust, and you'll also need to know which way you are facing, since the example I'm doing is 2d you'll only need a y angle, making things much easier. Due to the simple laws of acceleration (F=ma, v=u+at) you can add the thrust directly to your velocity, with some time or mass constant if necessary. I do this by splitting up the thrust into x and y values (with sin and cos), and adding these to the x and y velocities respectively. After all that, here's some sample code:
sync on
sync rate 45
hide mouse
autocam off
make matrix 1,10000,10000,50,50
make object box 1,50,50,50
x#=0
z#=0
ya#=0
xvel#=0
zvel#=0
thrust#=0
do
if upkey()=1 then thrust#=1
if downkey()=1 then thrust#=-1
if upkey()=0 and downkey()=0 then thrust#=0
if leftkey()=1 then ya#=ya#-5
if rightkey()=1 then ya#=ya#+5
xvel#=xvel#+(sin(ya#)*thrust#)
zvel#=zvel#+(cos(ya#)*thrust#)
x#=x#+xvel#
z#=z#+zvel#
position object 1,x#,0#,z#
yrotate object 1,ya#
position camera x#,200,z#-300
point camera x#,0,z#
sync
loop
Use the arrowkeys to move the cube around. Actual frictionless motion is not particularly nice, so you might want to put some coefficients in there to lower the speed.