Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admin = 'tothrli'
- staff = 'Killer1515'
- tfm.exec.setNameColor(admin, 0xCB546B)
- tfm.exec.setNameColor(staff, 0x73121F)
- ui.addTextArea(1,"Admin's: <b>" .. admin .. "<n>",v,0,20,100,20)
- ui.addTextArea(2,"Staff's: <b>" .. staff.. "<n>",nill,0,45,100,20)
- function eventChatCommand(name,command)
- if command=="vanilla" then
- tfm.exec.disableAutoNewGame(true)
- ninja=false
- worsh2={0,10,20,30,40}
- m={0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210}
- dead=0
- wj=false
- bodyDef={
- type=4,
- width=10,
- height=60,
- foreground=false,
- friction=20,
- restitution=0,
- angle=0,
- miceCollision=true,
- groundCollision=false,
- dynamic=false,
- }
- powers={sexy={},wj={},speed={fast={},agile={},pirate={},ninja={}},over={},sham={},cheese={},hawk={},snow={},vamp={},myst={},cheese2={}}
- players=0
- function eventNewPlayer(name)
- players=players+1
- if tfm.get.room.playerList[name].title==9 then table.insert(powers.speed.fast,name) powers.speed.fast[name]=true
- elseif tfm.get.room.playerList[name].title==81 then table.insert(powers.over,name) powers.over[name]=true
- elseif tfm.get.room.playerList[name].title==70 then tfm.exec.bindKeyboard(name,32,true,true) table.insert(powers.wj,name) powers.wj[name]={gtype,bool=false,bool2=true,num=0} powers.wj[name].gtype=players wj=true
- elseif tfm.get.room.playerList[name].title==3 then table.insert(powers.sham,name) powers.sham[name]=true
- elseif tfm.get.room.playerList[name].title==8 then table.insert(powers.cheese,name) powers.cheese[name]=true tfm.exec.bindKeyboard(name,67,true,true)
- elseif tfm.get.room.playerList[name].title==10 then table.insert(powers.speed.agile,name) powers.speed.agile[name]=true
- elseif tfm.get.room.playerList[name].title==11 then table.insert(powers.speed.pirate,name) powers.speed.pirate[name]=true
- elseif tfm.get.room.playerList[name].title==12 then table.insert(powers.speed.ninja,name) powers.speed.ninja[name]={jump=0,bool=true} ninja=true
- elseif tfm.get.room.playerList[name].title==125 then table.insert(powers.sexy,name) powers.sexy[name]=true
- elseif tfm.get.room.playerList[name].title==56 then tfm.exec.bindKeyboard(name,75,true,true)
- elseif tfm.get.room.playerList[name].title==47 then tfm.exec.bindKeyboard(name,32,true,true) table.insert(powers.hawk,name) powers.hawk[name]=true
- elseif tfm.get.room.playerList[name].title==245 then table.insert(powers.snow,name) powers.snow[name]=true
- elseif tfm.get.room.playerList[name].title==287 then table.insert(powers.vamp,name) powers.vamp[name]=true
- elseif tfm.get.room.playerList[name].title==329 then table.insert(powers.myst,name) powers.myst[name]=true
- elseif tfm.get.room.playerList[name].title==294 then table.insert(powers.cheese2,name) powers.cheese2[name]=true
- end
- end
- for i,v in pairs(tfm.get.room.playerList) do eventNewPlayer(i) end
- function eventNewGame()
- for i,v in pairs(tfm.get.room.playerList) do
- if powers.sham[i] then tfm.exec.setShaman(i)
- elseif powers.vamp[i] then tfm.exec.setVampirePlayer(i)
- end
- end
- dead=0
- end
- function eventPlayerWon(name)
- dead=dead+1
- if dead==players then tfm.exec.setGameTime(5) end
- end
- function eventPlayerDied(name)
- dead=dead+1
- if dead==players then tfm.exec.setGameTime(5) end
- end
- function eventPlayerLeft(name)
- dead=dead+1 players=players-1
- if dead==players then tfm.exec.setGameTime(5) end
- end
- function eventKeyboard(name,key,down,x,y)
- for i,v in pairs(tfm.get.room.playerList) do
- if key==32 then if powers.wj[name].bool2 then if powers.wj[name].num==0 then powers.wj[name].bool=true powers.wj[name].num=1 elseif powers.wj[name]==true then powers.wj[name].bool=false tfm.exec.removePhysicObject(powers.wj[name].gtype) powers.wj[name].num=0 elseif powers.hawk[name] then tfm.exec.movePlayer(name,0,0,true,0,-50) end end
- elseif key==67 and powers.cheese[name] and v.score>=40 then tfm.exec.setPlayerScore(name,-40,true) tfm.exec.giveCheese(name)
- elseif key==75 then tfm.exec.giveCheese(i) tfm.exec.setPlayerScore(i,-(100/players),true) tfm.exec.explosion(v.x,v.y,10,100) tfm.exec.killPlayer(name)
- end
- end
- end
- function eventLoop(t,tr)
- for i,v in pairs(tfm.get.room.playerList) do
- if powers.speed.fast[i] then if v.movingRight then tfm.exec.movePlayer(i,0,0,true,100) elseif v.movingLeft then tfm.exec.movePlayer(i,0,0,true,-100) end
- elseif powers.speed.agile[i] then if v.movingRight then tfm.exec.movePlayer(i,0,0,true,150) elseif v.movingLeft then tfm.exec.movePlayer(i,0,0,true,-150) end
- elseif powers.speed.pirate[i] then if v.movingRight then tfm.exec.movePlayer(i,0,0,true,200) elseif v.movingLeft then tfm.exec.movePlayer(i,0,0,true,-200) end
- elseif ninja then if powers.speed.ninja[i].bool then if powers.speed.ninja[i].jump<3 then powers.speed.ninja[i].jump=powers.speed.ninja[i].jump+1 end if v.isJumping and powers.speed.ninja[i].jump==3 then powers.speed.ninja[i].jump=0 tfm.exec.movePlayer(i,0,0,true,0,-75) end if v.movingRight then tfm.exec.movePlayer(i,0,0,true,250) elseif v.movingLeft then tfm.exec.movePlayer(i,0,0,true,-250) end end
- elseif wj then if powers.wj[i].bool then if v.isFacingRight then tfm.exec.addPhysicObject(powers.wj[i].gtype,v.x+20,v.y-10,bodyDef) else tfm.exec.addPhysicObject(powers.wj[i].gtype,v.x-20,v.y-10,bodyDef) end end
- elseif powers.over[i] then tfm.exec.setPlayerScore(i,9001)
- elseif powers.sexy[i] then tfm.exec.displayParticle(2,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(2,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(0,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(0,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(1,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(1,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(11,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(11,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(13,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(13,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(4,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(4,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0)
- end
- if love then tfm.exec.displayParticle(6,tfm.get.room.playerList[lover].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[lover].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[lover].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[lover].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,v.x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[lover].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[lover].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[lover].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[lover].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[lover].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[lover].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x+worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(6,tfm.get.room.playerList[loved].x-worsh2[math.random(#worsh2)],tfm.get.room.playerList[loved].y-worsh2[math.random(#worsh2)],0,0,0,0) end
- end
- if tr<=0 then tfm.exec.newGame(m[math.random(#m)])
- end
- end
- function eventChatCommand(name,cmd)
- local args={}
- for i in cmd:gmatch('%S+') do table.insert(args,i) end
- if cmd=='snow' and powers.snow[name] then tfm.exec.snow()
- elseif cmd=='mystery' and powers.myst[name] then local x={tfm.exec.setVampirePlayer(name),tfm.exec.setShaman(name),tfm.exec.explosion(tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y,100,200),tfm.exec.giveCheese(name),tfm.exec.playerVictory(name),tfm.exec.setNameColor(name,math.random(0x000000,0xFFFFFF)),tfm.exec.snow()} math.random(#x)
- elseif args[1]=='cheese' and powers.cheese2[name] and args[2] then lover=name loved=args[2] love=true
- end
- end
- system.disableChatCommandDisplay('snow',true)
- system.disableChatCommandDisplay('mystery',true)
- system.disableChatCommandDisplay('cheese',true)
- tfm.exec.newGame(m[math.random(#m)])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement