Advertisement
jordan83221

Aero

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