Advertisement
jordan83221

kick

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