Advertisement
jordan83221

Genesis

Sep 28th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.37 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 me=game.Players.Eungjr
  11. color="Really black" -- Feel free to change the color to whatever you'd like.
  12. local pointsz={
  13.     CFrame.new(0,0,0),
  14.     CFrame.new(2,33,2),
  15.     CFrame.new(-11,35,-22)
  16. }
  17. local function newPoint(cframe)
  18.     table.insert(pointsz,cframe)
  19. end
  20. local t=0
  21. local function wipe(tab)
  22.     for i=1,#tab do
  23.         table.remove(tab,i)
  24.     end
  25. end
  26. local link=nil
  27. local cmds={
  28.     ["fol"]=function(p)
  29.         for _,v in next,plrs do
  30.             if string.find(v.Name:lower(),p:lower()) ~= nil then
  31.                 pcall(function()
  32.                     sur=false
  33.                     link=v.Character.Torso
  34.                 end)
  35.             end
  36.         end
  37.     end,
  38.     ["sur"]=function(p)
  39.         for _,v in next,plrs do
  40.             if string.find(v.Name:lower(),p:lower()) ~= nil then
  41.                 pcall(function()
  42.                     sur=true
  43.                     surround(v)
  44.                 end)
  45.             end
  46.         end
  47.     end,
  48.     ["kill"]=function(p)
  49.         for _,v in next,plrs do
  50.             if string.find(v.Name:lower(),p:lower()) ~= nil then
  51.                 pcall(function()
  52.                     v.Character.Torso.Anchored=true
  53.                     kill(v)
  54.                 end)
  55.             end
  56.         end
  57.     end
  58. }
  59. Aero=Instance.new("Model",workspace)
  60. Aero.Name="Aero"
  61. leader=Instance.new("Part",Aero)
  62. leader.Name="EungLeader"
  63. leader.Anchored=true
  64. leader.Material=Enum.Material.Neon
  65. leader.BrickColor=BrickColor.new(color)
  66. leader.Size=Vector3.new(2,2,2)
  67. leader.Shape="Ball"
  68. leader.CanCollide=false
  69. leader.Transparency=1
  70. function dist(part1,part2)
  71.     return (part1-part2).magnitude
  72. end
  73. local function easey(part,cframe)
  74.     while wait() do
  75.         local arrow=Instance.new("Part",Aero)
  76.         arrow.Name="EungArrow"
  77.         arrow.Anchored=true
  78.         arrow.Material="Plastic"
  79.         arrow.Anchored=true
  80.         arrow.CanCollide=false
  81.         arrow.Size=Vector3.new(1, 0.4, 2)
  82.         arrow.Transparency=1
  83.         local mesh=Instance.new("SpecialMesh",arrow)
  84.         mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
  85.         mesh.MeshType="FileMesh"
  86.         mesh.Scale=Vector3.new(-1, 1, -1.5)
  87.         mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
  88.         local dx=cframe.X-part.CFrame.X
  89.         local dy=cframe.Y-part.CFrame.Y
  90.         local dz=cframe.Z-part.CFrame.Z
  91.         local vx=dx*ease;
  92.         local vy=dy*ease;
  93.         local vz=dz*ease
  94.         if dist(part.Position,Vector3.new(cframe.X,cframe.Y,cframe.Z))>1 then
  95.             part.CFrame=CFrame.new(part.CFrame.X+vx,part.CFrame.Y+vy,part.CFrame.Z+vz)
  96.             arrow.CFrame=CFrame.new(part.CFrame.X+vx,part.CFrame.Y+vy,part.CFrame.Z+vz)
  97.             wait(0.05)
  98.             arrow.CFrame=CFrame.new(arrow.Position,Vector3.new(cframe.X,cframe.Y,cframe.Z))
  99.             coroutine.resume(coroutine.create(function()
  100.                 for i=0,1,0.09 do wait()
  101.                     arrow.Transparency=i
  102.                 end
  103.                 arrow:Destroy()
  104.             end))
  105.         else
  106.             break
  107.         end
  108.     end
  109. end
  110. local function checkGood(p0,p1,p2)
  111.     local part=Instance.new("Part",workspace)
  112.     part.Transparency=1
  113.     part.Anchored=true
  114.     part.CanCollide=false
  115.     for i=0,1,0.01 do
  116.         part.CFrame=p0:lerp(p1,i):lerp(p2,i)
  117.         if part.CFrame==me.Torso.CFrame then
  118.             return false
  119.         else
  120.             return true
  121.         end
  122.     end
  123. end
  124. local function quadCurve(p0,p1,p2,t)
  125.     local arrow=Instance.new("Part",workspace)
  126.     arrow.Name="EungArrow"
  127.     arrow.Anchored=true
  128.     arrow.Material="Plastic"
  129.     arrow.Anchored=true
  130.     arrow.Size=Vector3.new(1, 0.4, 2)
  131.     arrow.Transparency=1
  132.     arrow.CanCollide=false
  133.     local mesh=Instance.new("SpecialMesh",arrow)
  134.     mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
  135.     mesh.MeshType="FileMesh"
  136.     mesh.Scale=Vector3.new(-1, 1, -1.5)
  137.     mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
  138.     arrow.CFrame=CFrame.new(5,5,5)
  139.     local pFinalX=math.pow(1-t,2)*p0.x+(1-t)*2*t*p1.x+t*t*p2.x;
  140.     local pFinalY=math.pow(1-t,2)*p0.y+(1-t)*2*t*p1.y+t*t*p2.y;
  141.     local pFinalZ=math.pow(1-t,2)*p0.z+(1-t)*2*t*p1.z+t*t*p2.z;
  142.     leader.CFrame=CFrame.new(pFinalX,pFinalY,pFinalZ)
  143.     arrow.CFrame=CFrame.new(pFinalX,pFinalY,pFinalZ)
  144.     wait(0.05)
  145.     arrow.CFrame=CFrame.new(arrow.Position,Vector3.new(leader.CFrame.X,leader.CFrame.Y,leader.CFrame.Z))
  146.     coroutine.resume(coroutine.create(function()
  147.         for i=0,1,0.09 do wait()
  148.             arrow.Transparency=i
  149.         end
  150.         arrow:Destroy()
  151.     end))
  152. end
  153. local start
  154. local sec
  155. local function multiCurve(beginning,points)
  156.     local p0z,p1z,p2z,midx,midy,midz
  157.     p0z=beginning
  158.     p1z = points[2];
  159.     p2z = points[3];
  160.     midx=(p1z.x+p2z.x)/2;
  161.     midy=(p1z.y+p2z.y)/2;
  162.     midz=(p1z.z+p2z.z)/2;
  163.     sec=p2z
  164.     start=CFrame.new(midx,midy,midz)
  165.     quadCurve(p0z,p1z,start,t)
  166. end
  167. function surround(plr)
  168.     ro=false
  169.     easey(leader,plr.Character.Torso.CFrame*CFrame.new(5,0,0))
  170.     while wait() do
  171.         if sur==true then
  172.             pointsz[1]=(CFrame.new(start.X,start.Y,start.Z))
  173.             pointsz[2]=(CFrame.new(sec.X,sec.Y,sec.Z))
  174.             pointsz[3]=(plr.Character.Torso.CFrame*CFrame.new(5,0,0))
  175.             ro=true
  176.             t=0
  177.         else
  178.             break
  179.         end
  180.     end
  181. end
  182. function kill(plr)
  183.     ro=false
  184.     if plr then
  185.         easey(leader,plr.Character.Torso.CFrame)
  186.         plr.Character:BreakJoints()
  187.         easey(leader,link.CFrame*CFrame.new(5,0,0))
  188.         ro=true
  189.     end
  190. end
  191. local function rot()
  192.     if game.Workspace:findFirstChild("EungLeader") then
  193.         if ro==true then
  194.             if t<=1 then
  195.                 multiCurve(pointsz[1],pointsz)
  196.                 if link==nil then
  197.                     t=t+0.005
  198.                 else
  199.                     t=t+0.025
  200.                 end
  201.             else
  202.                 pointsz[1]=(CFrame.new(start.X,start.Y,start.Z))
  203.                 pointsz[2]=(CFrame.new(sec.X,sec.Y,sec.Z))
  204.                 local x=math.random(-50,50)
  205.                 local y=math.random(0,50)
  206.                 local z=math.random(-50,50)
  207.                 local xw=math.random(-17,17)
  208.                 local yw=math.random(0,17)
  209.                 local zw=math.random(-17,17)
  210.                 if link==nil then
  211.                     pointsz[3]=(CFrame.new(x,y,z))
  212.                 else
  213.                     if link then
  214.                         pointsz[3]=(link.CFrame*CFrame.new(xw,yw,zw))
  215.                     end
  216.                 end
  217.                 t=0
  218.             end
  219.         end
  220.     else
  221.         leader=Instance.new("Part",Aero)
  222.         leader.Name="EungLeader"
  223.         leader.Anchored=true
  224.         leader.Material=Enum.Material.Neon
  225.         leader.BrickColor=BrickColor.new(color)
  226.         leader.Size=Vector3.new(2,2,2)
  227.         leader.Shape="Ball"
  228.         leader.CanCollide=false
  229.         leader.Transparency=1
  230.     end
  231. end
  232. game:service'RunService'.Stepped:connect(function() rot() end)
  233. me.Character.Humanoid.Died:connect(function()
  234.     link=nil
  235.     wait(6)
  236.     link=me.Character.Torso
  237. end)
  238. local function chatted(msg)
  239.     local cmd,parm=string.match(msg,"(.*)/(.*)")
  240.     if cmd and parm and cmds[cmd] then
  241.         cmds[cmd](parm)
  242.     end
  243. end
  244. local function playerAdded(player)
  245.     if player==me then
  246.         player.Chatted:connect(function(m) chatted(m) end)
  247.     end
  248. end
  249.  
  250. game.Players.PlayerAdded:connect(function(p) playerAdded(p) end)
  251. for _,v in next,plrs do
  252.     playerAdded(v)
  253. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement