Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rs=game:GetService("RunService").RenderStepped
- function sw(n)if n==nil then rs:wait()else for i=1,n do rs:wait()end end return true end
- local function GetBeamLight(Parent,Length,Width0,Width1,FirstTransparent,Color,LightEm)
- local BPart=Instance.new("Part",Parent)BPart.CanCollide=false BPart.Size=Vector3.new()BPart.Transparency=1
- local a0=Instance.new("Attachment",BPart)local a1=Instance.new("Attachment",BPart)a1.Position=Vector3.new(0,0,Length)
- local beam=Instance.new("Beam",BPart)beam.FaceCamera=1
- beam.Attachment0=a0 beam.Attachment1=a1 beam.Segments=0
- beam.Width0=Width0 beam.Width1=Width1 beam.Texture="rbxassetid://1251856844"beam.LightEmission=LightEm or 1
- beam.Transparency=NumberSequence.new(FirstTransparent,1)beam.Color=ColorSequence.new(Color)
- return BPart,beam
- end
- local function FadeBeamL(Beam,Type,Add)
- if Beam~=nil then
- if Beam:IsA("Beam")and Beam.Parent then
- if Type=="Normal"then
- spawn(function()
- for i=0,1,Add do
- if Beam.Parent then
- Beam.Transparency=NumberSequence.new(i,1)
- sw()end
- end Beam.Parent:Destroy()
- end)
- end
- if Type=="idk"then
- spawn(function()
- for i=1,0,-Add do
- if Beam.Parent then
- Beam.Transparency=NumberSequence.new(i,1)
- sw()end
- end
- for i=0,1,Add do
- if Beam.Parent then
- Beam.Transparency=NumberSequence.new(i,1)
- sw()end
- end Beam.Parent:Destroy()
- end)
- end
- end
- end
- end
- spawn(function()
- while sw()do
- local idk,beam=GetBeamLight(owner.Character.HumanoidRootPart,math.random(120,200)/10,.1,1+math.random(100)/200,1,Color3.new(1,1,1),1)
- idk.CFrame=owner.Character.HumanoidRootPart.CFrame
- local weld=Instance.new("Weld",owner.Character.HumanoidRootPart)weld.Part0=idk weld.Part1=owner.Character.HumanoidRootPart weld.C0=CFrame.new()*CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),0)
- FadeBeamL(beam,"idk",.025)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement