You call Object Collision(j,0) twice per loop, just call it once and put the value in a variable.
Also, since object collision(7,0) will be a constant, get the value of it before you enter the loop, store it and use the variable.
Also, the Delete Object command is what is the major slow-down.
If you still need the objects, or even if you don't, instead of deleting them, just move them to some rediculously far-away place and hide them
Like this;
function detecthit(bar, action)
objhit7 = object collision(7,0)
hit = 0
for j = 1 to 3
objhitj = object collision(j,0)
for k = 1 to 3
for i = 1 to 16
if track1(bar+k,i)<>0
if objhitj = track1(bar+k,i) and action=j
Hide Object track1(bar+k,i)
Position Object track1(bar+k,i),-2000,-2000,-2000
track1(bar+k,i)=0
hit = 1
endif
if objhit7 = track1(bar+k,i)
hit = 3
endif
endif
if objhitj = 0 and action=j
hit = 2
endif
next i
next k
next j
endfunction hit
That should give you a speed boost
Jess.
[EDIT]
Just noticed that you're calling Object Collision(j,0) way too many times,
I moved it out of the For k and For i loops so that it is only called 3 times per function call instead of the 288 times it was before.
[/EDIT]

Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy