Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- meeped="Tectoon"
- power=350
- --for k,v in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard("Tectoon", 32, true, true)
- --end
- function eventKeyboard(meeper, key, down, x, y)
- if key==32 then
- meeper_x=x
- meeped_x=tfm.get.room.playerList[meeped].x
- meeper_y=y+10
- meeped_y=tfm.get.room.playerList[meeped].y
- xdiff=meeped_x-meeper_x
- ydiff=meeped_y-meeper_y
- length=math.sqrt(xdiff^2+ydiff^2)
- if length <= 90 then
- tfm.exec.movePlayer(meeped, 0, 0, false, (xdiff/(math.abs(xdiff)+math.abs(ydiff)))*power, (ydiff/(math.abs(xdiff)+math.abs(ydiff)))*power, false)
- end
- end
- end
- tfm.exec.newGame(2643833)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement