try this hope it help
sync on
rem make first and second rows, position them
for t = 1 to 10
make object cube t,1
color object t,rgb(255,0,0)
make object collision box t,-0.5,-0.5,-0.5,0.5,0.5,0.5,0
position object t,(t*1.1)-6,0,5
next t
for x = 11 to 20
make object cube x,1
color object x,rgb(0,152,255)
make object collision box x,-0.5,-0.5,-0.5,0.5,0.5,0.5,0
position object x,(x*1.1)-17,0,3.9
next x
rem make the paddle
make object box 21,2.5,1,0.3
color object 21,rgb(0,255,0)
rem make the ball
gosub make_ball
make object collision box 22,-0.5,-0.5,-0.5,0.5,0.5,0.5,1
rem make the side boxes, position them
make object box 23,1,1,9.75
color object 23,rgb(50,50,50)
position object 23,-6,0,0
make object box 24,1,1,9.75
color object 24,rgb(50,50,50)
position object 24,6.1,0,0
rem camera position
position camera 0,10,-5:point camera 0,0,0
rem some variables
balla#=170
x=0
do
rem pad movement and changing ball angle
if rightkey()=1 and pad#<4 then pad#=pad#+0.5
if leftkey()=1 and pad#>-4 then pad#=pad#-0.5
if rightkey()=1 and ballz#<-4 and ballz>-4.5 then balla#=balla#+8
if leftkey()=1 and ballz#<-4 and ballz>-4.5 then balla#=balla#-8
rem get the ball moving
ballx#=newxvalue(ballx#,balla#,0.3)
ballz#=newzvalue(ballz#,balla#,0.3)
if ballz#<-4 and ballz#>-4.2 and ABS(pad#-ballx#)<1.5 then balla#=180-balla#
if ballz#>8 then balla#=180-balla#
rem bounce off walls
if ballx#<-5 or ballx#>5 then balla#=360-balla#
balla#=wrapvalue(balla#)
rem position ball and rotate ball
position object 22,ballx#,0,ballz#
yrotate object 22,balla#
rem position paddle
position object 21,pad#,0,-4.7
rem return the ball to the middle
if ballz#<-5.5
gosub death
endif
objcol=object hit(22,0)
rem collision the second round
if objcol>0 and objcol<21 then delete object objcol:balla#=160+rnd(20)-balla#
`if object collision(1,22)>0 then delete object 1
`if object collision(2,22)>0 then delete object 2
`if object collision(3,22)>0 then delete object 3
`if object collision(4,22)>0 then delete object 4
`if object collision(5,22)>0 then delete object 5
`if object collision(6,22)>0 then delete object 6
`if object collision(7,22)>0 then delete object 7
`if object collision(8,22)>0 then delete object 8
`if object collision(9,22)>0 then delete object 9
`if object collision(10,22)>0 then delete object 10
`if object collision(11,22)>0 then delete object 11
`if object collision(12,22)>0 then delete object 12
`if object collision(13,22)>0 then delete object 13
`if object collision(14,22)>0 then delete object 14
`if object collision(15,22)>0 then delete object 15
`if object collision(16,22)>0 then delete object 16
`if object collision(17,22)>0 then delete object 17
`if object collision(18,22)>0 then delete object 18
`if object collision(19,22)>0 then delete object 19
`if object collision(20,22)>0 then delete object 20
sync
loop
make_ball:
make object sphere 22,1
color object 22,rgb(150,150,150)
return
death:
`x=x+1
`while x=1
text 100,100,"Press space to restart!"
suspend for key
ballx# = 0
ballz# = 0
balla# = 170
position object 22,0,0,0
`x=0
`endwhile
return
You can do it if you try