Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAfkDeath(true)
- admin = {Shulton=true}
- players={}
- objects={}
- obj = {}
- function eventPlayerDied(name)
- tfm.exec.respawnPlayer(name)
- end
- function eventNewPlayer(name)
- players[name]={
- charg = 0,
- time = 0,
- }
- tfm.exec.respawnPlayer(name)
- tfm.exec.bindKeyboard(name,32,true,true)
- tfm.exec.bindKeyboard(name,83,true,true)
- tfm.exec.bindKeyboard(name,40,true,true)
- end
- function eventKeyboard(name,key,down,x,y)
- local player = tfm.get.room.playerList[name]
- if key == 32 or key == 83 or key == 40 and players[name].time == 0 and not tfm.get.room.playerList[name].isDead then
- if player.isFacingRight then
- obj = tfm.exec.addShamanObject(19,x-6,y+10)
- table.insert(objects,obj)
- else
- obj = tfm.exec.addShamanObject(20,x-6,y+10)
- table.insert(objects,obj)
- end
- players[name].time = 3
- end
- end
- function eventLoop(t,r)
- for name in pairs(tfm.get.room.playerList) do
- if players[name].time == 3 then
- players[name].charg = 1
- end
- if players[name].charg == 1 then
- players[name].time = players[name].time - 1
- if players[name].time == 0 then
- players[name].charg = 0
- tfm.exec.removeObject(obj)
- table.remove(objects)
- end
- end
- end
- end
- for nick in pairs(tfm.get.room.playerList) do
- eventNewPlayer(nick)
- end
- tfm.exec.newGame("@5163406")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement