First of all, you load image continuously. Please move load image at beginning of program, between imgPlayer = 1 and repeat. Same for imgX/imgY.
Here, that should work:
sync on
sync rate 45
global imgPlayer as word
global imgX as integer
global imgY as integer
imgPlayer = 1
imgX = 350
imgY = 85
load image "daring1.bmp", imgPlayer
repeat
cls
picture()
sync
until escapekey()
function picture()
if keystate(32)
inc imgX, 20
endif
if keystate(30)
dec imgX, 20
endif
paste image imgPlayer, imgX, imgY
endfunction
WHAT WAS WRONG
First of all, you loaded image every loop iterations which has severe impact on speed of your code. This wasn't critical and didn't relate to your problem at all, but you should know to load image at the beginning of your program, outside of main loop (you can however have "loading loop" if you have images named like img1.bmp, img2.bmp, etc. as FOR..NEXT loop).
Second thing, related to your code was you reset x and y position every iteration of loop, in picture() function that made moving picture futile. All initialization of position/speed/etc. variables should also be done outside of main loop or any function used within it.