Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Author(s): Nettoork#0000
- ]]--
- local objects = {}
- eventNewPlayer = function(name)
- tfm.exec.bindKeyboard(name, 32, true, true)
- end
- eventLoop = function()
- local toRemove = {}
- for i, v in next, objects do
- if v[2] < os.time() then
- toRemove[#toRemove + 1] = i
- end
- end
- for i, v in next, toRemove do
- if objects[v] then
- tfm.exec.removeObject(objects[v][1])
- table.remove(objects, v)
- end
- end
- end
- eventKeyboard = function(username, key, down, x, y)
- local data = tfm.get.room.playerList[username]
- if key == 32 and not data.isDead then
- objects[#objects + 1] = {tfm.exec.addShamanObject(35, data.isFacingRight and x + 20 or x - 20, y-10, data.isFacingRight and 0 or 180, data.isFacingRight and 35 or -35), os.time() + 5000}
- end
- end
- table.foreach(tfm.get.room.playerList, eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement