Advertisement
suxonov

Untitled

May 21st, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. for name,player in pairs(tfm.get.room.playerList) do
  2.     system.bindMouse(name)
  3. end
  4.  
  5. function pythag(x1,y1,x2,y2)
  6. return math.sqrt((y2-y1)^2+(x2-x1)^2)
  7. end
  8.  
  9. function eventMouse(name,x,y)
  10.     for k,p in pairs(tfm.get.room.playerList) do
  11.         if pythag(x,y,p.x,p.y) <= 15 and p.score < tfm.get.room.playerList[name].score then
  12.             tfm.exec.killPlayer(k)
  13.             tfm.exec.setPlayerScore(k, 0, false)
  14.             tfm.exec.setPlayerScore(name, p.score, true)
  15.         end
  16.     end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement