Your request is not very specific. I'm not sure if you having trouble with it actually running or if the code has errors in it. It compiled fine for me, and looking through, there were some things wrong.
I would figure out other ways to check for a collision other than using the POINT command - it is terribly slow.
In drawing the first paddle, you had this 'box px1, py1, py1+10, py1+10', which should have been 'box px1,py1,px1+10,py1+10' However, this produces a paddle that is much smaller than the other one, which seems odd.
Anyway, I re-did the code so it at least works, and I sized the paddles the same. Here you go:
rem Make some variables
ballx as integer = 320
bally as integer = 240
speedx as integer = -2
speedy as integer = 1
px1 as integer = 600
py1 as integer = 240
px2 as integer = 20
py2 as integer = 240
score1 as integer = 0
score2 as integer = 0
rem Slow down the game.
sync on
sync rate 40
rem The game runs in a loop.
do
cls
rem check shift/ctrl keys to move the left paddle
if shiftkey()
dec py2,2
if py2<0 then py2 = 0
endif
if controlkey()
inc py2,2
if py2 > 470 then py2 = 470
endif
rem Check up/down keys to move the right paddle
if upkey()
dec py1, 2
if py1<0 then py1 =0
endif
if downkey()
inc py1, 2
if py1 > 470 then py1 = 670
endif
rem Move the ball
inc ballx, speedx
inc bally, speedy
rem Bounce the ball off top/bottom of the screen
if bally < 0 or bally > 470 then speedy = speedy *-1
rem See if left player missed the ball
rem If so, player 2 scores, reset the ball
if ballx < 0
inc score2, 1
ballx = 320
bally = 240
speedx = 2
sleep 500
endif
rem See if right player missed the ball
rem If so, player 1 scores, reset the ball
if ballx > 630
inc score1, 1
ballx = 320
bally = 240
speedx = -2
sleep 500
endif
rem Draw the ball
circle ballx, bally, 10
rem Draw the paddles
box px1, py1, px1+16, py1+64
box px2, py2, px2+16, py2+64
rem Lets see if the ball has hit a paddle
if ballx <= (px2 + 20) and (bally + 10) >= py2 and bally <= (py2 + 64)
speedx = speedx *-1
inc ballx, speedx
endif
if ballx >= (px1 - 10) and (bally + 10) >= py1 and bally <= (py1 + 64)
speedx = speedx *-1
inc ballx, speedx
endif
rem Print the scores
text 0, 0, "SCORE" + str$(score1)
text 550, 0, "SCORE" + str$(score2)
rem Draw the screen
sync
loop
Please notice that I indented your code for you, to make it more readable. I would suggest you do this on all of your code. Also, as you get further along, you might want to consider using sprites for the ball and paddles.
So many games to code.......so little time.