Bolodefchoco_LUAXML

[Script] Emote Particles

Feb 18th, 2016
568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.60 KB | None | 0 0
  1. --Creator: Bolodefchoco
  2. --Made in: 18/02/2016
  3. --Last update: 26/05/2016
  4. --[[ Notes:
  5.     Does:
  6.         Aprimora as emoções oficiais.
  7. ]]--
  8.  
  9. tfm.exec.position=function(n)
  10.     return tfm.get.room.playerList[n].x,tfm.get.room.playerList[n].y,tfm.get.room.playerList[n].isFacingRight
  11. end
  12.  
  13. math.randomseed(os.time())
  14.  
  15. eventEmotePlayed=function(n,id)
  16.     local x,y,f = tfm.exec.position(n)
  17.     if id==0 then
  18.         for i = 1,20 do
  19.             for k = -2,2,math.pi do
  20.                 tfm.exec.displayParticle(29,x + k*(math.cos(i) * 40),y + k*(math.sin(i) * 40))
  21.             end
  22.         end
  23.     end
  24.     if id==1 then
  25.         for i = 1,20 do
  26.             tfm.exec.displayParticle(2,x+(f and 5 or -5),y+(math.random(-1,1)*i),(f and 1 or -1),math.random(-1,1))
  27.         end
  28.     end
  29.     if id==2 then
  30.         for i = 1,10 do
  31.             tfm.exec.displayParticle(14,x+(i%2==0 and -10 or 5),y-7,0,math.random(2))
  32.         end
  33.     end
  34.     if id==3 then
  35.         for i = 1,15 do
  36.             tfm.exec.displayParticle(31,x+(math.random(-1,1)*i),y+(math.random(-.9,.9)*i),math.random(-1,1),math.random(-math.pi,math.pi))
  37.         end
  38.     end
  39.     if id==4 then
  40.         for i = 1,6 do
  41.             tfm.exec.displayParticle(3,x+math.cos(i),y+(math.random(-.9,.9)*i),math.random(-1.5,1.5),math.random(-1,1))
  42.         end
  43.     end
  44.     if id==5 then
  45.         for i = 1,10 do
  46.             tfm.exec.displayParticle(0,x+math.random(80),y-math.random(20),(f and 2 or -2))
  47.         end
  48.     end
  49.     if id==6 then
  50.         for i = 1,20 do
  51.             tfm.exec.displayParticle(1,x+(math.random(-1,1)*i),y+(math.random(.5,1)*i),math.random(-1.5,1.5),-math.random(.5,2),math.random(-.9,.9),math.random(.1,.9))
  52.         end
  53.     end
  54.     if id==7 then
  55.         local particles={0,1,2,4,9,11,13}
  56.         tfm.exec.displayParticle(37,x,y)
  57.         for i = 1,8 do
  58.             tfm.exec.displayParticle(particles[math.random(#particles)],x+math.random(-50,50),y+math.random(-10,10),math.random(-1,1))
  59.         end
  60.     end
  61.     if id==8 then
  62.         for i = 1,8 do
  63.             tfm.exec.displayParticle(33,x+(math.random(-2,2)*i),y+(math.random(-2,2)*i),math.random(-1.5,1.5),math.random(-1,1),-math.random(-.9,.9),-math.random(-.2,.2))
  64.         end
  65.     end
  66.     if id==9 then
  67.         local confetti={21,22,23,24}
  68.         for i = 1,20 do
  69.             tfm.exec.displayParticle(confetti[math.random(#confetti)],x+(math.random(-2,2)*i),y+(math.random(-2,2)*i),math.random(-1.5,1.5),math.random(-1,1),math.random(-.9,.9),math.random(-.2,.2))
  70.         end
  71.     end
  72.     if id==13 then
  73.         for i = 1,6 do
  74.             tfm.exec.displayParticle(2,x+(f and 5+(i*30) or -5-(i*40)),y-12,math.random())
  75.         end
  76.     end
  77.     if id==17 then
  78.         for i = 1,15 do
  79.             tfm.exec.displayParticle(30,x+(math.random(-1,1)*i),y+(math.random(-2,2)*i),math.random(-1,1))
  80.         end
  81.     end
  82.     if id==21 then
  83.         for i = 1,10 do
  84.             tfm.exec.displayParticle(5,x+(f and 20+(i*15) or -20-(i*15)),y-5,(f and .2 or -.2))
  85.         end
  86.     end
  87. end
Advertisement
Add Comment
Please, Sign In to add comment