Guest User

Untitled

a guest
Nov 11th, 2022
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. --paddle
  2. padx=52
  3. pady=122
  4. padw=24
  5. padh=4
  6.  
  7. function movepaddle()
  8.     if btn (0) then
  9.         padx-=3
  10.     elseif btn (1) then
  11.         padx+=3
  12.   end
  13. end
  14.  
  15. function_update()
  16.     movepaddle()
  17. end
  18.  
  19. function_draw
  20. --clear the screen
  21.     rectfill(0,0,128,128,3)
  22.    
  23. --draw the paddle
  24.     rectfill(padx, pady, padx+padw,pady+padh,3)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment