For the purpose of keeping this simple I have left some errors in your program for you to fix. The reason it was going faster forwards was because you had the movement code in a for loop so it could happen multiple times with one game loop.
Here I corrected that problem-
Hide Mouse
player = 1
autocam on
sync on : sync rate 30
Rem Object Creation
Make Object Sphere player,75
Make Object Cone 2,100
Make Object Cone 3,100
Make Object Cube 4,100
for x = 5 to 30
make object cube x, 100
position object x, rnd(5000), 0, rnd(5000)
set object collision on x
Color Object x, rgb(rnd(255),rnd(255),rnd(255))
set object collision on x
make object collision box x, -42,-42,-42, 42,42,42, 1
next x
Rem Object Color
Color object player, rgb(0,0,0)
Color object 2, rgb(255,255,255)
Color object 3, rgb(255,255,255)
Color Object 4, rgb(255,255,255)
Rem Object Position
Position Object 2, -200,0,200
Position Object 3, 200,0,200
position object 4, 0,0,500
Rem Collision with Objects
set object collision on player
make object collision box 1, -42,-42,-42, 42,42,42, 1
set object collision on 2
make object collision box 2, -30,-30,-30, 30,30,30, 1
set object collision on 3
make object collision box 3, -30,-30,-30, 30,30,30, 1
set object collision on 4
make object collision box 4, -42,-42,-42, 42,42,42, 1
Rem Object Movement
Do
x# = object position x(player)
y# = object position y(player)
NewY# = y#+10
OtherY# = y#-10
z# = object position z(player)
aY# = object angle Y(player)
moveplayer=1 : `I added this line
if object collision(player, 0) >0
`if upkey() = 1 then move object player, 5 wrong
moveplayer=0 : `I added this line
endif
if moveplayer=1 and upkey()=1 then move object player,5 : `I added this line
if downkey() = 1 then move object player, -5
if rightkey() = 1 then yrotate object player, wrapvalue(aY#+10)
if leftkey() = 1 then yrotate object player, wrapvalue(aY#-10)
if Inkey$()= "w" then position object player, x#, newy#, z#
if Inkey$()= "s" then position object player, x#, othery#, z#
Rem Camera Movement Follow
cpZ# = Newzvalue(object position Z(player), object angle Y(player)-180,300)
cpX# = Newxvalue(object position X(player), object angle Y(player)-180,300)
position camera cpX#,150,cpZ#
Point camera object position X(player), object position y(player)+50,object position z(player)
sync
Loop
The problems that remain are:
-you can move backwards through things
-once you collide with something you can't get away from it by turning around and using the upkey
To solve the first one just do the same thing for the downkey which has been done for the upkey.
For the second one you can just make it automatically move you back to a previous position not colliding with the object.