Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent=nil
- script.Name="eungorb"
- local start
- local plrs=game.Players:GetPlayers()
- local link=nil
- local ro=true
- local sur=false
- local pro=false
- local protected
- local ease=0.3
- local leader
- local att=nil
- local orbParts={}
- local surrounded
- local me=game.Players.LocalPlayer
- leader=Instance.new("Part",workspace)
- leader.Name="EungLeader"
- leader.Anchored=true
- leader.Size=Vector3.new(2,2,2)
- leader.Shape="Ball"
- leader.CanCollide=false
- leader.Transparency=1
- local pi=math.pi
- local arrows={}
- local tabs={}
- color="Really black" -- Feel free to change the color to whatever you'd like.
- local pointsz={
- CFrame.new(0,0,0),
- CFrame.new(2,33,2),
- CFrame.new(-11,35,-22)
- }
- local function newPoint(cframe)
- table.insert(pointsz,cframe)
- end
- local function newArrow()
- local arrow=Instance.new("Part",workspace)
- arrow.Name="EungArrow"
- arrow.Anchored=true
- arrow.Material="Plastic"
- arrow.Anchored=true
- arrow.CanCollide=false
- arrow.Size=Vector3.new(1, 0.4, 2)
- arrow.Transparency=1
- local mesh=Instance.new("SpecialMesh",arrow)
- mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
- mesh.MeshType="FileMesh"
- mesh.Scale=Vector3.new(-1, 1, -1.5)
- mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
- table.insert(tabs,arrow)
- end
- local t=0
- local function wipe(tab)
- for i=1,#tab do
- table.remove(tab,i)
- end
- end
- local link=nil
- local cmds={
- ["fol"]=function(p)
- for _,v in next,game.Players:GetPlayers() do
- if string.find(v.Name:lower(),p:lower()) ~= nil then
- pcall(function()
- sur=false
- pro=false
- ro=true
- link=v.Character.Torso
- att=nil
- end)
- end
- end
- end,
- ["sur"]=function(p)
- for _,v in next,game.Players:GetPlayers() do
- if string.find(v.Name:lower(),p:lower()) ~= nil then
- pcall(function()
- ro=false
- pro=false
- sur=true
- surrounded=v
- end)
- end
- end
- end,
- ["kill"]=function(p)
- for _,v in next,game.Players:GetPlayers() do
- if string.find(v.Name:lower(),p:lower()) ~= nil then
- pcall(function()
- att=nil
- sur=false
- pro=false
- v.Character.Torso.Anchored=true
- kill(v)
- end)
- end
- end
- end,
- ["attack"]=function(p)
- for _,v in next,game.Players:GetPlayers() do
- if string.find(v.Name:lower(),p:lower()) ~= nil then
- pcall(function()
- ro=true
- sur=false
- pro=false
- att=v.Character.Torso
- link=v.Character.Torso
- end)
- end
- end
- end,
- ["protect"]=function(p)
- for _,v in next,game.Players:GetPlayers() do
- if string.find(v.Name:lower(),p:lower())~=nil then
- pcall(function()
- for i=1,10 do wait()
- newArrow()
- end
- ro=false
- sur=false
- protected=v
- pro=true
- end)
- end
- end
- end
- }
- function remove(tab,val)
- for i=1,#tab do
- if tab[i]==val then
- table.remove(tab,i)
- break
- end
- end
- end
- function dist(part1,part2)
- return (part1-part2).magnitude
- end
- local function easey(part,cframe)
- while wait() do
- local arrow=Instance.new("Part",workspace)
- arrow.Name="EungArrow"
- arrow.Anchored=true
- arrow.Material="Plastic"
- arrow.Anchored=true
- arrow.CanCollide=false
- arrow.Size=Vector3.new(1, 0.4, 2)
- arrow.Transparency=1
- local mesh=Instance.new("SpecialMesh",arrow)
- mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
- mesh.MeshType="FileMesh"
- mesh.Scale=Vector3.new(-1, 1, -1.5)
- mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
- table.insert(arrows,arrow)
- local dx=cframe.X-part.CFrame.X
- local dy=cframe.Y-part.CFrame.Y
- local dz=cframe.Z-part.CFrame.Z
- local vx=dx*ease;
- local vy=dy*ease;
- local vz=dz*ease
- if dist(part.Position,Vector3.new(cframe.X,cframe.Y,cframe.Z))>1 then
- part.CFrame=CFrame.new(part.CFrame.X+vx,part.CFrame.Y+vy,part.CFrame.Z+vz)
- arrow.CFrame=CFrame.new(part.CFrame.X+vx,part.CFrame.Y+vy,part.CFrame.Z+vz)
- wait(0.05)
- arrow.CFrame=CFrame.new(arrow.Position,Vector3.new(cframe.X,cframe.Y,cframe.Z))
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.09 do wait()
- arrow.Transparency=i
- end
- arrow:Destroy()
- remove(arrows,arrow)
- end))
- else
- break
- end
- end
- end
- function protect()
- if pro and protected then
- for i,v in next,tabs do
- local x=math.cos(i*(pi*2)/#tabs)*(2+#tabs);
- local y=0
- local z=math.sin(i*(pi*2)/#tabs)*(2+#tabs);
- easey(v,protected.Torso.CFrame*CFrame.new(x,y,z))
- wait(0.05)
- v.CFrame=CFrame.new(v.CFrame.p,protected.Torso.CFrame.p)
- end
- end
- end
- local function checkGood(p0,p1,p2)
- local part=Instance.new("Part",workspace)
- part.Transparency=1
- part.Anchored=true
- part.CanCollide=false
- for i=0,1,0.01 do
- part.CFrame=p0:lerp(p1,i):lerp(p2,i)
- if part.CFrame==me.Torso.CFrame then
- return false
- else
- return true
- end
- end
- end
- local function quadCurve(p0,p1,p2,t)
- local arrow=Instance.new("Part",workspace)
- arrow.Name="EungArrow"
- arrow.Anchored=true
- arrow.Material="Plastic"
- arrow.Anchored=true
- arrow.Size=Vector3.new(1, 0.4, 2)
- arrow.Transparency=1
- arrow.CanCollide=false
- local mesh=Instance.new("SpecialMesh",arrow)
- mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
- mesh.MeshType="FileMesh"
- mesh.Scale=Vector3.new(-1, 1, -1.5)
- mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
- arrow.CFrame=CFrame.new(5,5,5)
- table.insert(arrows,arrow)
- local pFinalX=math.pow(1-t,2)*p0.x+(1-t)*2*t*p1.x+t*t*p2.x;
- local pFinalY=math.pow(1-t,2)*p0.y+(1-t)*2*t*p1.y+t*t*p2.y;
- local pFinalZ=math.pow(1-t,2)*p0.z+(1-t)*2*t*p1.z+t*t*p2.z;
- leader.CFrame=CFrame.new(pFinalX,pFinalY,pFinalZ)
- arrow.CFrame=CFrame.new(pFinalX,pFinalY,pFinalZ)
- wait(0.05)
- arrow.CFrame=CFrame.new(arrow.Position,Vector3.new(leader.CFrame.X,leader.CFrame.Y,leader.CFrame.Z))
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.09 do wait()
- arrow.Transparency=i
- end
- arrow:Destroy()
- remove(arrows,arrow)
- end))
- end
- local start
- local sec
- local function multiCurve(beginning,points)
- local p0z,p1z,p2z,midx,midy,midz
- p0z=beginning
- p1z = points[2];
- p2z = points[3];
- midx=(p1z.x+p2z.x)/2;
- midy=(p1z.y+p2z.y)/2;
- midz=(p1z.z+p2z.z)/2;
- sec=p2z
- start=CFrame.new(midx,midy,midz)
- quadCurve(p0z,p1z,start,t)
- end
- local xangle=0
- local yangle=0
- local xspeed=0.05
- local yspeed=0.06
- local radius=5
- local g=0
- function surround()
- if sur and surrounded then
- ro=false
- local x=math.cos(xangle)*radius;
- local y=math.sin(tick())*2;
- local z=math.sin(yangle)*radius;
- local arrow=Instance.new("Part",workspace)
- arrow.Name="EungArrow"
- arrow.Anchored=true
- arrow.Material="Plastic"
- arrow.Anchored=true
- arrow.Size=Vector3.new(1, 0.4, 2)
- arrow.Transparency=1
- arrow.CanCollide=false
- local mesh=Instance.new("SpecialMesh",arrow)
- mesh.MeshId="http://www.roblox.com/asset/?id=15887356"
- mesh.MeshType="FileMesh"
- mesh.Scale=Vector3.new(-1, 1, -1.5)
- mesh.TextureId="http://www.roblox.com/asset/?id=15886781"
- arrow.CFrame=CFrame.new(5,5,5)
- table.insert(arrows,arrow)
- leader.CFrame=surrounded.Character.Torso.CFrame*CFrame.new(x,y,z)
- arrow.CFrame=surrounded.Character.Torso.CFrame*CFrame.new(x,y,z)
- wait(0.05)
- arrow.CFrame=CFrame.new(arrow.Position,Vector3.new(leader.CFrame.X,leader.CFrame.Y,leader.CFrame.Z))
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.09 do wait()
- arrow.Transparency=i
- end
- arrow:Destroy()
- remove(arrows,arrow)
- end))
- xangle=xangle+xspeed
- yangle=yangle+yspeed
- end
- end
- function kill(plr)
- ro=false
- if plr then
- easey(leader,plr.Character.Torso.CFrame)
- plr.Character:BreakJoints()
- if link~=nil then
- easey(leader,link.CFrame*CFrame.new(5,0,0))
- else
- easey(leader,CFrame.new(5,0,0))
- end
- ro=true
- end
- end
- local function rot()
- if game.Workspace:findFirstChild("EungLeader") then
- if ro==true then
- if t<=1 then
- multiCurve(pointsz[1],pointsz)
- if link==nil then
- t=t+0.005
- else
- t=t+0.025
- end
- else
- pointsz[1]=(CFrame.new(start.X,start.Y,start.Z))
- pointsz[2]=(CFrame.new(sec.X,sec.Y,sec.Z))
- local x=math.random(-50,50)
- local y=math.random(0,50)
- local z=math.random(-50,50)
- local xw=math.random(-17,17)
- local yw=math.random(0,17)
- local zw=math.random(-17,17)
- local xa=math.random(-1,1)
- local ya=math.random(0,1)
- local za=math.random(-1,1)
- if link==nil and att==nil then
- pointsz[3]=(CFrame.new(x,y,z))
- elseif link~=nil and att==nil then
- pointsz[3]=(link.CFrame*CFrame.new(xw,yw,zw))
- elseif link~=nil and att~=nil then
- pointsz[3]=(link.CFrame*CFrame.new(xa,ya,za))
- leader.Touched:connect(function(hit)
- if hit.Name~="EungArrow" then
- if att~=nil then
- hit:Destroy()
- end
- end
- end)
- end
- t=0
- end
- end
- else
- leader=Instance.new("Part",workspace)
- leader.Name="EungLeader"
- leader.Anchored=true
- leader.Material=Enum.Material.Neon
- leader.BrickColor=BrickColor.new(color)
- leader.Size=Vector3.new(2,2,2)
- leader.Shape="Ball"
- leader.CanCollide=false
- leader.Transparency=1
- end
- end
- game:service'RunService'.RenderStepped:connect(function() rot() surround() end)
- me.Character.Humanoid.Died:connect(function()
- link=nil
- wait(6)
- link=me.Character.Torso
- end)
- local function chatted(msg)
- local cmd,parm=string.match(msg,"(.*)/(.*)")
- if cmd and parm and cmds[cmd] then
- cmds[cmd](parm)
- end
- end
- local function playerAdded(player)
- if player==me then
- player.Chatted:connect(function(m) chatted(m) end)
- end
- end
- game.Players.PlayerAdded:connect(playerAdded)
- for _,v in next,plrs do
- playerAdded(v)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement