Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admin=""
- mapas = {6930458}
- p = {}
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAfkDeath(true)
- function eventNewPlayer(name)
- p[name]={
- click = true,
- time_click = 0,
- }
- tfm.exec.setPlayerScore(name,0,false)
- system.bindMouse(name,true)
- end
- for all in pairs(tfm.get.room.playerList) do
- eventNewPlayer(all)
- end
- function eventMouse(name,x,y)
- if p[name].click and admin == name then
- tfm.exec.explosion (x, y, 20, 100, true)
- tfm.exec.displayParticle(12,x,t)
- p[name].click = false
- p[name].time_click = 6
- end
- end
- function eventLoop()
- if not p[admin].click then
- if p[admin].time_click > 0 then
- ui.addTextArea(0,"<b><p align='center'><VP><font size='15'>"..math.floor(p[admin].time_click/2).."</font></p>",nil,5,370,790,25,nil,nil,80,true)
- p[admin].time_click = p[admin].time_click-1;
- else
- p[admin].click = true
- ui.removeTextArea(0,nil)
- end
- end
- end
- function eventPlayerDied(name)
- tfm.exec.setPlayerScore(name,2,true)
- if vivos > 1 then
- vivos = vivos-1;
- else
- for i in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[i].isDead then
- tfm.exec.giveCheese(I)
- tfm.exec.playerVictory(i)
- end
- end
- tfm.exec.newGame(mapas[math.random(#mapas)])
- end
- end
- function eventNewGame()
- vivos = 0
- local sc = {}
- for name,player in pairs(tfm.get.room.playerList) do
- vivos=vivos+1;
- sc[#sc+1] = {n=name,s=player.score}
- end
- table.sort(sc,function(a,b) return a.s>b.s end)
- for k,v in pairs(sc) do
- if k < 2 then
- admin = v.n
- end
- end
- tfm.exec.killPlayer(admin)
- end
- tfm.exec.setUIMapName("Power of the sprit")
- tfm.exec.newGame(mapas[math.random(#mapas)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement