Advertisement
jordan83221

Aero 1.1

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