Advertisement
bapereira

Nave espacial (tacar confete e abaixar)

Oct 15th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. --[[
  2. Project's author: Nettoork#0000
  3. ]]--
  4.  
  5. function eventNewPlayer(name)
  6. for i, key in next, {83, 40, 69} do
  7. tfm.exec.bindKeyboard(name, key, true)
  8. end
  9. end
  10.  
  11. local movement = {{0, 10}, {0, -20}, {-20, 3}, {20, 3}}
  12.  
  13. eventKeyboard = function(name,key,down,x,y)
  14. if key == 83 or key == 40 or key == 69 then
  15. for i = 1, 4 do
  16. tfm.exec.addPhysicObject(i, x + movement[i][1], y + movement[i][2], { type=0, width=10, height=10, friction=81 })
  17. end
  18. end
  19. end
  20.  
  21. table.foreach(tfm.get.room.playerList, eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement