Rohere

za warudo! STOP THE TIME!

May 10th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. a = 0
  2. clock = 0
  3. t = {}
  4.  
  5.  
  6. for c in pairs(t) do
  7. print(c)
  8. end
  9.  
  10.  
  11. function eventChatMessage(nick, txt)
  12. if txt == "ZA WARUDO!" then
  13. za_warudo(nick)
  14. dio = nick
  15. end
  16. end
  17.  
  18.  
  19. idd = 0
  20.  
  21. function za_warudo(nick)
  22. idd = 0
  23. for c in pairs(tfm.get.room.playerList) do
  24. if c == nick then
  25. print(c)
  26. else
  27. tfm.exec.movePlayer(c,tfm.get.room.playerList[c].x,tfm.get.room.playerList[c].y,false,0,0,true)
  28.  
  29.  
  30.  
  31. tfm.exec.addPhysicObject(idd, tfm.get.room.playerList[c].x+20, tfm.get.room.playerList[c].y,{type=14, friction=10000})
  32. idd=idd+1
  33. t[idd] = idd
  34. print(idd)
  35. tfm.exec.addPhysicObject(idd, tfm.get.room.playerList[c].x-20, tfm.get.room.playerList[c].y,{type=14, friction=10000})
  36. idd=idd+1
  37. t[idd] = idd
  38. print(idd)
  39. tfm.exec.addPhysicObject(idd, tfm.get.room.playerList[c].x, tfm.get.room.playerList[c].y-20,{type=14, friction=10000})
  40. idd=idd+1
  41. t[idd] = idd
  42. print(idd)
  43. tfm.exec.addPhysicObject(idd, tfm.get.room.playerList[c].x, tfm.get.room.playerList[c].y+20,{type=14, friction=10000})
  44. idd=idd+1
  45. t[idd] = idd
  46. print(idd)
  47.  
  48. tfm.exec.movePlayer(c,tfm.get.room.playerList[c].x,tfm.get.room.playerList[c].y,false,0,0,true)
  49. a = true
  50. end
  51. end
  52. end
  53.  
  54.  
  55.  
  56. function eventLoop()
  57. if a == true then
  58. clock=clock+0.5
  59. yp = tfm.get.room.playerList[dio].y
  60. xp = tfm.get.room.playerList[dio].x
  61. tfm.exec.displayParticle(2, xp+math.random(-30, 30), yp+math.random(-30, 30), 0, 0, 0, 0, nil)
  62. tfm.exec.displayParticle(2, xp+math.random(-30, 30), yp+math.random(-30, 30), 0, 0, 0, 0, nil)
  63. tfm.exec.displayParticle(2, xp+math.random(-30, 30), yp+math.random(-30, 30), 0, 0, 0, 0, nil)
  64. tfm.exec.displayParticle(2, xp+math.random(-30, 30), yp+math.random(-1, 1), 0, 0, 0, 0, nil)
  65. tfm.exec.displayParticle(2, xp+math.random(-30, 30), yp+math.random(-30, 30), 0, 0, 0, 0, nil)
  66. tfm.exec.displayParticle(2, xp+math.random(-30, 30), yp+math.random(-30, 30), 0, 0, 0, 0, nil)
  67. tfm.exec.displayParticle(2, xp+math.random(-30, 30), yp+math.random(-30, 30), 0, 0, 0, 0, nil)
  68.  
  69. tfm.exec.displayParticle(11, xp+math.random(-30, 30), yp+math.random(-60, 60), 0, 0, 0, 0, nil)
  70. tfm.exec.displayParticle(11, xp+math.random(-30, 30), yp+math.random(-1, 1), 0, 0, 0, 0, nil)
  71. tfm.exec.displayParticle(11, xp+math.random(-30, 30), yp+math.random(-30, 30), 0, 0, 0, 0, nil)
  72. tfm.exec.displayParticle(11, xp+math.random(-30, 30), yp+math.random(-30, 30), 0, 0, 0, 0, nil)
  73. tfm.exec.displayParticle(11, xp+math.random(-30, 30), yp+math.random(-30, 30), 0, 0, 0, 0, nil)
  74. tfm.exec.displayParticle(11, xp+math.random(-30, 30), yp+math.random(-60, 60), 0, 0, 0, 0, nil)
  75.  
  76. print(clock)
  77. if clock == 6 then
  78. a = false
  79. clear_g()
  80. end
  81. end
  82. end
  83.  
  84. function clear_g()
  85. for p in pairs(t) do
  86. tfm.exec.removePhysicObject(p-1)
  87. print(p)
  88. end
  89. t = {}
  90. clock = 0
  91. end
Advertisement
Add Comment
Please, Sign In to add comment