Advertisement
jordan83221

Aero 1.3.1

Dec 10th, 2015
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.71 KB | None | 0 0
  1. script.Parent=nil
  2. script.Name="eungorb"
  3. local start
  4. local plrs=game.Players:GetPlayers()
  5. local link=nil
  6. local ro=true
  7. local sur=false
  8. local pro=false
  9. local protected
  10. local ease=0.3
  11. local leader
  12. local att=nil
  13. local orbParts={}
  14. local surrounded
  15. local me=game.Players.LocalPlayer
  16. leader=Instance.new("Part",workspace)
  17. leader.Name="EungLeader"
  18. leader.Anchored=true
  19. leader.Size=Vector3.new(2,2,2)
  20. leader.Shape="Ball"
  21. leader.CanCollide=false
  22. leader.Transparency=1
  23. local pi=math.pi
  24. local arrows={}
  25. local tabs={}
  26. color="Really black" -- Feel free to change the color to whatever you'd like.
  27. local pointsz={
  28.     CFrame.new(0,0,0),
  29.     CFrame.new(2,33,2),
  30.     CFrame.new(-11,35,-22)
  31. }
  32. local function newPoint(cframe)
  33.     table.insert(pointsz,cframe)
  34. end
  35. local function newArrow()
  36.     local arrow=Instance.new("Part",workspace)
  37.     arrow.Name="EungArrow"
  38.     arrow.Anchored=true
  39.     arrow.Material="Plastic"
  40.     arrow.Anchored=true
  41.     arrow.CanCollide=false
  42.     arrow.Size=Vector3.new(1, 0.4, 2)
  43.     arrow.Transparency=1
  44.     local mesh=Instance.new("SpecialMesh",arrow)
  45.     mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
  46.     mesh.MeshType="FileMesh"
  47.     mesh.Scale=Vector3.new(-1, 1, -1.5)
  48.     mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
  49.     table.insert(tabs,arrow)
  50. end
  51. local t=0
  52. local function wipe(tab)
  53.     for i=1,#tab do
  54.         table.remove(tab,i)
  55.     end
  56. end
  57. local link=nil
  58. local cmds={
  59.     ["fol"]=function(p)
  60.         for _,v in next,game.Players:GetPlayers() do
  61.             if string.find(v.Name:lower(),p:lower()) ~= nil then
  62.                 pcall(function()
  63.                     sur=false
  64.                     pro=false
  65.                     ro=true
  66.                     link=v.Character.Torso
  67.                     att=nil
  68.                 end)
  69.             end
  70.         end
  71.     end,
  72.     ["sur"]=function(p)
  73.         for _,v in next,game.Players:GetPlayers() do
  74.             if string.find(v.Name:lower(),p:lower()) ~= nil then
  75.                 pcall(function()
  76.                     ro=false
  77.                     pro=false
  78.                     sur=true
  79.                     surrounded=v
  80.                 end)
  81.             end
  82.         end
  83.     end,
  84.     ["kill"]=function(p)
  85.         for _,v in next,game.Players:GetPlayers() do
  86.             if string.find(v.Name:lower(),p:lower()) ~= nil then
  87.                 pcall(function()
  88.                     att=nil
  89.                     sur=false
  90.                     pro=false
  91.                     v.Character.Torso.Anchored=true
  92.                     kill(v)
  93.                 end)
  94.             end
  95.         end
  96.     end,
  97.     ["attack"]=function(p)
  98.         for _,v in next,game.Players:GetPlayers() do
  99.             if string.find(v.Name:lower(),p:lower()) ~= nil then
  100.                 pcall(function()
  101.                     ro=true
  102.                     sur=false
  103.                     pro=false
  104.                     att=v.Character.Torso
  105.                     link=v.Character.Torso
  106.                 end)
  107.             end
  108.         end
  109.     end,
  110.     ["protect"]=function(p)
  111.         for _,v in next,game.Players:GetPlayers() do
  112.             if string.find(v.Name:lower(),p:lower())~=nil then
  113.                 pcall(function()
  114.                     for i=1,10 do wait()
  115.                         newArrow()
  116.                     end
  117.                     ro=false
  118.                     sur=false
  119.                     protected=v
  120.                     pro=true
  121.                 end)
  122.             end
  123.         end
  124.     end
  125. }
  126. function remove(tab,val)
  127.     for i=1,#tab do
  128.         if tab[i]==val then
  129.             table.remove(tab,i)
  130.             break
  131.         end
  132.     end
  133. end
  134. function dist(part1,part2)
  135.     return (part1-part2).magnitude
  136. end
  137. local function easey(part,cframe)
  138.     while wait() do
  139.         local arrow=Instance.new("Part",workspace)
  140.         arrow.Name="EungArrow"
  141.         arrow.Anchored=true
  142.         arrow.Material="Plastic"
  143.         arrow.Anchored=true
  144.         arrow.CanCollide=false
  145.         arrow.Size=Vector3.new(1, 0.4, 2)
  146.         arrow.Transparency=1
  147.         local mesh=Instance.new("SpecialMesh",arrow)
  148.         mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
  149.         mesh.MeshType="FileMesh"
  150.         mesh.Scale=Vector3.new(-1, 1, -1.5)
  151.         mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
  152.         table.insert(arrows,arrow)
  153.         local dx=cframe.X-part.CFrame.X
  154.         local dy=cframe.Y-part.CFrame.Y
  155.         local dz=cframe.Z-part.CFrame.Z
  156.         local vx=dx*ease;
  157.         local vy=dy*ease;
  158.         local vz=dz*ease
  159.         if dist(part.Position,Vector3.new(cframe.X,cframe.Y,cframe.Z))>1 then
  160.             part.CFrame=CFrame.new(part.CFrame.X+vx,part.CFrame.Y+vy,part.CFrame.Z+vz)
  161.             arrow.CFrame=CFrame.new(part.CFrame.X+vx,part.CFrame.Y+vy,part.CFrame.Z+vz)
  162.             wait(0.05)
  163.             arrow.CFrame=CFrame.new(arrow.Position,Vector3.new(cframe.X,cframe.Y,cframe.Z))
  164.             coroutine.resume(coroutine.create(function()
  165.                 for i=0,1,0.09 do wait()
  166.                     arrow.Transparency=i
  167.                 end
  168.                 arrow:Destroy()
  169.                 remove(arrows,arrow)
  170.             end))
  171.         else
  172.             break
  173.         end
  174.     end
  175. end
  176. function protect()
  177.     if pro and protected then
  178.         for i,v in next,tabs do
  179.             local x=math.cos(i*(pi*2)/#tabs)*(2+#tabs);
  180.             local y=0
  181.             local z=math.sin(i*(pi*2)/#tabs)*(2+#tabs);
  182.             easey(v,protected.Torso.CFrame*CFrame.new(x,y,z))
  183.             wait(0.05)
  184.             v.CFrame=CFrame.new(v.CFrame.p,protected.Torso.CFrame.p)
  185.         end
  186.     end
  187. end
  188. local function checkGood(p0,p1,p2)
  189.     local part=Instance.new("Part",workspace)
  190.     part.Transparency=1
  191.     part.Anchored=true
  192.     part.CanCollide=false
  193.     for i=0,1,0.01 do
  194.         part.CFrame=p0:lerp(p1,i):lerp(p2,i)
  195.         if part.CFrame==me.Torso.CFrame then
  196.             return false
  197.         else
  198.             return true
  199.         end
  200.     end
  201. end
  202. local function quadCurve(p0,p1,p2,t)
  203.     local arrow=Instance.new("Part",workspace)
  204.     arrow.Name="EungArrow"
  205.     arrow.Anchored=true
  206.     arrow.Material="Plastic"
  207.     arrow.Anchored=true
  208.     arrow.Size=Vector3.new(1, 0.4, 2)
  209.     arrow.Transparency=1
  210.     arrow.CanCollide=false
  211.     local mesh=Instance.new("SpecialMesh",arrow)
  212.     mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
  213.     mesh.MeshType="FileMesh"
  214.     mesh.Scale=Vector3.new(-1, 1, -1.5)
  215.     mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
  216.     arrow.CFrame=CFrame.new(5,5,5)
  217.     table.insert(arrows,arrow)
  218.     local pFinalX=math.pow(1-t,2)*p0.x+(1-t)*2*t*p1.x+t*t*p2.x;
  219.     local pFinalY=math.pow(1-t,2)*p0.y+(1-t)*2*t*p1.y+t*t*p2.y;
  220.     local pFinalZ=math.pow(1-t,2)*p0.z+(1-t)*2*t*p1.z+t*t*p2.z;
  221.     leader.CFrame=CFrame.new(pFinalX,pFinalY,pFinalZ)
  222.     arrow.CFrame=CFrame.new(pFinalX,pFinalY,pFinalZ)
  223.     wait(0.05)
  224.     arrow.CFrame=CFrame.new(arrow.Position,Vector3.new(leader.CFrame.X,leader.CFrame.Y,leader.CFrame.Z))
  225.     coroutine.resume(coroutine.create(function()
  226.         for i=0,1,0.09 do wait()
  227.             arrow.Transparency=i
  228.         end
  229.         arrow:Destroy()
  230.         remove(arrows,arrow)
  231.     end))
  232. end
  233. local start
  234. local sec
  235. local function multiCurve(beginning,points)
  236.     local p0z,p1z,p2z,midx,midy,midz
  237.     p0z=beginning
  238.     p1z = points[2];
  239.     p2z = points[3];
  240.     midx=(p1z.x+p2z.x)/2;
  241.     midy=(p1z.y+p2z.y)/2;
  242.     midz=(p1z.z+p2z.z)/2;
  243.     sec=p2z
  244.     start=CFrame.new(midx,midy,midz)
  245.     quadCurve(p0z,p1z,start,t)
  246. end
  247. local xangle=0
  248. local yangle=0
  249. local xspeed=0.05
  250. local yspeed=0.06
  251. local radius=5
  252. local g=0
  253. function surround()
  254.     if sur and surrounded then
  255.         ro=false
  256.         local x=math.cos(xangle)*radius;
  257.         local y=math.sin(tick())*2;
  258.         local z=math.sin(yangle)*radius;
  259.         local arrow=Instance.new("Part",workspace)
  260.         arrow.Name="EungArrow"
  261.         arrow.Anchored=true
  262.         arrow.Material="Plastic"
  263.         arrow.Anchored=true
  264.         arrow.Size=Vector3.new(1, 0.4, 2)
  265.         arrow.Transparency=1
  266.         arrow.CanCollide=false
  267.         local mesh=Instance.new("SpecialMesh",arrow)
  268.         mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
  269.         mesh.MeshType="FileMesh"
  270.         mesh.Scale=Vector3.new(-1, 1, -1.5)
  271.         mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
  272.         arrow.CFrame=CFrame.new(5,5,5)
  273.         table.insert(arrows,arrow)
  274.         leader.CFrame=surrounded.Character.Torso.CFrame*CFrame.new(x,y,z)
  275.         arrow.CFrame=surrounded.Character.Torso.CFrame*CFrame.new(x,y,z)
  276.         wait(0.05)
  277.         arrow.CFrame=CFrame.new(arrow.Position,Vector3.new(leader.CFrame.X,leader.CFrame.Y,leader.CFrame.Z))
  278.         coroutine.resume(coroutine.create(function()
  279.             for i=0,1,0.09 do wait()
  280.                 arrow.Transparency=i
  281.             end
  282.             arrow:Destroy()
  283.             remove(arrows,arrow)
  284.         end))
  285.         xangle=xangle+xspeed
  286.         yangle=yangle+yspeed
  287.     end
  288. end
  289. function kill(plr)
  290.     ro=false
  291.     if plr then
  292.         easey(leader,plr.Character.Torso.CFrame)
  293.         plr.Character:BreakJoints()
  294.         if link~=nil then
  295.             easey(leader,link.CFrame*CFrame.new(5,0,0))
  296.         else
  297.             easey(leader,CFrame.new(5,0,0))
  298.         end
  299.         ro=true
  300.     end
  301. end
  302. local function rot()
  303.     if game.Workspace:findFirstChild("EungLeader") then
  304.         if ro==true then
  305.             if t<=1 then
  306.                 multiCurve(pointsz[1],pointsz)
  307.                 if link==nil then
  308.                     t=t+0.005
  309.                 else
  310.                     t=t+0.025
  311.                 end
  312.             else
  313.                 pointsz[1]=(CFrame.new(start.X,start.Y,start.Z))
  314.                 pointsz[2]=(CFrame.new(sec.X,sec.Y,sec.Z))
  315.                 local x=math.random(-50,50)
  316.                 local y=math.random(0,50)
  317.                 local z=math.random(-50,50)
  318.                 local xw=math.random(-17,17)
  319.                 local yw=math.random(0,17)
  320.                 local zw=math.random(-17,17)
  321.                 local xa=math.random(-1,1)
  322.                 local ya=math.random(0,1)
  323.                 local za=math.random(-1,1)
  324.                 if link==nil and att==nil then
  325.                     pointsz[3]=(CFrame.new(x,y,z))
  326.                 elseif link~=nil and att==nil then
  327.                     pointsz[3]=(link.CFrame*CFrame.new(xw,yw,zw))
  328.                 elseif link~=nil and att~=nil then
  329.                     pointsz[3]=(link.CFrame*CFrame.new(xa,ya,za))
  330.                     leader.Touched:connect(function(hit)
  331.                         if hit.Name~="EungArrow" then
  332.                             if att~=nil then
  333.                                 hit:Destroy()
  334.                             end
  335.                         end
  336.                     end)
  337.                 end
  338.                 t=0
  339.             end
  340.         end
  341.     else
  342.         leader=Instance.new("Part",workspace)
  343.         leader.Name="EungLeader"
  344.         leader.Anchored=true
  345.         leader.Material=Enum.Material.Neon
  346.         leader.BrickColor=BrickColor.new(color)
  347.         leader.Size=Vector3.new(2,2,2)
  348.         leader.Shape="Ball"
  349.         leader.CanCollide=false
  350.         leader.Transparency=1
  351.     end
  352. end
  353. game:service'RunService'.RenderStepped:connect(function() rot() surround() end)
  354. me.Character.Humanoid.Died:connect(function()
  355.     link=nil
  356.     wait(6)
  357.     link=me.Character.Torso
  358. end)
  359. local function chatted(msg)
  360.     local cmd,parm=string.match(msg,"(.*)/(.*)")
  361.     if cmd and parm and cmds[cmd] then
  362.         cmds[cmd](parm)
  363.     end
  364. end
  365. local function playerAdded(player)
  366.     if player==me then
  367.         player.Chatted:connect(function(m) chatted(m) end)
  368.     end
  369. end
  370.  
  371. game.Players.PlayerAdded:connect(playerAdded)
  372. for _,v in next,plrs do
  373.     playerAdded(v)
  374. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement