Advertisement
Rawoas13

[Script] Explosive Balls

Jan 18th, 2020
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. --Creator: Hass
  2. --Made in: 10/01/2020
  3. --Last update: 18/01/2020
  4. --[[ Notes:
  5.     Does:
  6.         Explosive balls
  7.     Keys
  8.         Click --> Summons an explosive ball
  9. ]]--
  10.  
  11. toDespawn = {}
  12.  
  13. eventLoop = function()
  14.     for k,v in next,toDespawn do
  15.         if os.time() > v[1] then
  16.             local o = tfm.get.room.objectList[v[2]]
  17.             tfm.exec.explosion(o.x,o.y,40,50)
  18.             tfm.exec.removeObject(v[2])
  19.             table.remove(toDespawn,k)
  20.             break
  21.         end
  22.     end
  23. end
  24.  
  25. eventNewPlayer = function(n)
  26.     system.bindMouse(n,true)
  27. end
  28. table.foreach(tfm.get.room.playerList,eventNewPlayer)
  29.  
  30. eventMouse = function(n,x,y)
  31.     table.insert(toDespawn,{os.time() + 800,tfm.exec.addShamanObject(6,x,y)})
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement