Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.00 KB | None | 0 0
  1. admin = 'tothrli'
  2. staff = 'Killer1515'
  3.  
  4. tfm.exec.setNameColor(admin, 0xCB546B)
  5. tfm.exec.setNameColor(staff, 0x73121F)
  6. ui.addTextArea(1,"Admin's: <b>" .. admin .. "<n>",v,0,20,100,20)
  7. ui.addTextArea(2,"Staff's: <b>" .. staff.. "<n>",nill,0,45,100,20)
  8. function eventChatCommand(name,command)
  9. if command=="vanilla" then
  10. tfm.exec.disableAutoNewGame(true)
  11. ninja=false
  12. worsh2={0,10,20,30,40}
  13. m={0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210}
  14. dead=0
  15. wj=false
  16. bodyDef={
  17. type=4,
  18. width=10,
  19. height=60,
  20. foreground=false,
  21. friction=20,
  22. restitution=0,
  23. angle=0,
  24. miceCollision=true,
  25. groundCollision=false,
  26. dynamic=false,
  27. }
  28. powers={sexy={},wj={},speed={fast={},agile={},pirate={},ninja={}},over={},sham={},cheese={},hawk={},snow={},vamp={},myst={},cheese2={}}
  29. players=0
  30. function eventNewPlayer(name)
  31. players=players+1
  32. if tfm.get.room.playerList[name].title==9 then table.insert(powers.speed.fast,name) powers.speed.fast[name]=true
  33. elseif tfm.get.room.playerList[name].title==81 then table.insert(powers.over,name) powers.over[name]=true
  34. 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
  35. elseif tfm.get.room.playerList[name].title==3 then table.insert(powers.sham,name) powers.sham[name]=true
  36. 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)
  37. elseif tfm.get.room.playerList[name].title==10 then table.insert(powers.speed.agile,name) powers.speed.agile[name]=true
  38. elseif tfm.get.room.playerList[name].title==11 then table.insert(powers.speed.pirate,name) powers.speed.pirate[name]=true
  39. 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
  40. elseif tfm.get.room.playerList[name].title==125 then table.insert(powers.sexy,name) powers.sexy[name]=true
  41. elseif tfm.get.room.playerList[name].title==56 then tfm.exec.bindKeyboard(name,75,true,true)
  42. 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
  43. elseif tfm.get.room.playerList[name].title==245 then table.insert(powers.snow,name) powers.snow[name]=true
  44. elseif tfm.get.room.playerList[name].title==287 then table.insert(powers.vamp,name) powers.vamp[name]=true
  45. elseif tfm.get.room.playerList[name].title==329 then table.insert(powers.myst,name) powers.myst[name]=true
  46. elseif tfm.get.room.playerList[name].title==294 then table.insert(powers.cheese2,name) powers.cheese2[name]=true
  47. end
  48. end
  49. for i,v in pairs(tfm.get.room.playerList) do eventNewPlayer(i) end
  50. function eventNewGame()
  51. for i,v in pairs(tfm.get.room.playerList) do
  52. if powers.sham[i] then tfm.exec.setShaman(i)
  53. elseif powers.vamp[i] then tfm.exec.setVampirePlayer(i)
  54. end
  55. end
  56. dead=0
  57. end
  58. function eventPlayerWon(name)
  59. dead=dead+1
  60. if dead==players then tfm.exec.setGameTime(5) end
  61. end
  62. function eventPlayerDied(name)
  63. dead=dead+1
  64. if dead==players then tfm.exec.setGameTime(5) end
  65. end
  66. function eventPlayerLeft(name)
  67. dead=dead+1 players=players-1
  68. if dead==players then tfm.exec.setGameTime(5) end
  69. end
  70. function eventKeyboard(name,key,down,x,y)
  71. for i,v in pairs(tfm.get.room.playerList) do
  72. 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
  73. elseif key==67 and powers.cheese[name] and v.score>=40 then tfm.exec.setPlayerScore(name,-40,true) tfm.exec.giveCheese(name)
  74. 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)
  75. end
  76. end
  77. end
  78. function eventLoop(t,tr)
  79. for i,v in pairs(tfm.get.room.playerList) do
  80. 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
  81. 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
  82. 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
  83. 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
  84. 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
  85. elseif powers.over[i] then tfm.exec.setPlayerScore(i,9001)
  86. 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)
  87. end
  88. 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
  89. end
  90. if tr<=0 then tfm.exec.newGame(m[math.random(#m)])
  91. end
  92. end
  93. function eventChatCommand(name,cmd)
  94. local args={}
  95. for i in cmd:gmatch('%S+') do table.insert(args,i) end
  96. if cmd=='snow' and powers.snow[name] then tfm.exec.snow()
  97. 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)
  98. elseif args[1]=='cheese' and powers.cheese2[name] and args[2] then lover=name loved=args[2] love=true
  99. end
  100. end
  101. system.disableChatCommandDisplay('snow',true)
  102. system.disableChatCommandDisplay('mystery',true)
  103. system.disableChatCommandDisplay('cheese',true)
  104. tfm.exec.newGame(m[math.random(#m)])
  105.  
  106. end
  107. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement