oh, there's one bug in that which would slow down the framerate. It checks for collision twice in the loop instead of once, and db collision really slows down a program. It works better with:
position object 11,posx#,posy#,posz#
hit#=object collision(11,0)
if hit#<>0
if get object collision y() then playergrav#=0
if (get object collision x())+(get object collision z())
if ((object size(hit#)+object position y(hit#))-posy#)<40
posy#=object size y(hit#)+object position y(hit#)+1
endif
endif
dec posx#,get object collision x()
dec posy#,get object collision y()
dec posz#,get object collision z()
endif