Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- started=true
- players={}
- jogadores={}
- x=690
- arg={}
- vivo=-2
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAutoNewGame(true)
- system.disableChatCommandDisplay("help")
- tfm.exec.newGame("@5363720")
- admin={"Haxhhhhhhhhh","Drawist"}
- banidos={}
- toDespawn={}
- function eventNewPlayer(name)
- for i,key in ipairs({32,40,83}) do
- tfm.exec.bindKeyboard(name,key,true,true)
- end
- end
- function eventNewGame()
- tfm.exec.setGameTime(60)
- tfm.exec.setUIMapName("<vp>KillRats versão 1.0")
- for name,player in pairs(tfm.get.room.playerList) do
- table.insert(jogadores,name)
- tfm.exec.setPlayerScore(name,0,false)
- end
- for _,player in pairs(admin) do
- if player == "Haxhhhhhhhhh" then
- tfm.exec.movePlayer(player,770,100,false,1,1,false)
- elseif player == "Drawist" then
- tfm.exec.movePlayer(player,770,200,false,1,1,false)
- else
- tfm.exec.movePlayer(player,770,300,false,1,1,false)
- end
- end
- for _,player in pairs(players) do
- tfm.exec.movePlayer(player,750,300,false,1,1,false)
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- players[name]={
- timestamp=os.time(),
- offsets={x=-20, y=10}
- }
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventKeyboard(name,key,down,x,y)
- if x >= 660 then
- if (key==32 or key==40 or key==83) and not tfm.get.room.playerList[name].isDead and started then
- if players[name].timestamp < os.time()-1000 then
- local id
- if tfm.get.room.playerList[name].isFacingRight then
- id=tfm.exec.addShamanObject(19,x+players[name].offsets.x,y+players[name].offsets.y)
- else
- id=tfm.exec.addShamanObject(20,x+players[name].offsets.x,y+players[name].offsets.y)
- end
- players[name].timestamp=os.time()
- table.insert(toDespawn,{os.time(),id})
- end end end
- end
- function eventChatCommand(name,command)
- if command == "help" then
- ui.addPopup(0,0," <font size='36'>KillRats <br><font size='12'>O objetivo do jogo é você não morrer pelos membros que estão no canto! Caso você seja o vencedor, você entra no grupo dos mestres.<br><br>Admins do jogo: Drawist e Haxhhhhhhhhh.",name,350,175,300,true)
- end
- end
- function eventPlayerDied(name)
- local i=0
- local n
- for pname,player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- i=i+1
- n=pname
- end
- end
- if i==0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- elseif i==1 then
- for _,player in pairs(jogadores) do
- tfm.exec.giveCheese(n)
- tfm.exec.playerVictory(n)
- table.insert(players,n)
- tfm.exec.movePlayer(n,700,340,false,1,1,false)
- ggg=n; end
- end
- end
- function coloradmin()
- for _,admins in pairs(admin) do
- tfm.exec.setNameColor(admins, 0x8500FF)
- tfm.exec.bindKeyboard(admins, 32, true, true)
- end
- end
- function eventLoop(a,b)
- for pn, p in pairs(tfm.get.room.playerList) do
- if p.x >= x + 100 then
- tfm.exec.setNameColor(pn, 0x8500FF)
- end
- end
- if b <= 1 then
- tfm.exec.newGame("@5363720")
- end
- end
- coloradmin()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement