Advertisement
tomonaoboys

Untitled

Feb 8th, 2018
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.27 KB | None | 0 0
  1. local rs=game:GetService("RunService").RenderStepped
  2. function sw(n)if n==nil then rs:wait()else for i=1,n do rs:wait()end end return true end
  3. local function GetBeamLight(Parent,Length,Width0,Width1,FirstTransparent,Color,LightEm)
  4.     local BPart=Instance.new("Part",Parent)BPart.CanCollide=false BPart.Size=Vector3.new()BPart.Transparency=1
  5.     local a0=Instance.new("Attachment",BPart)local a1=Instance.new("Attachment",BPart)a1.Position=Vector3.new(0,0,Length)
  6.     local beam=Instance.new("Beam",BPart)beam.FaceCamera=1
  7.     beam.Attachment0=a0 beam.Attachment1=a1 beam.Segments=0
  8.     beam.Width0=Width0 beam.Width1=Width1 beam.Texture="rbxassetid://1251856844"beam.LightEmission=LightEm or 1
  9.     beam.Transparency=NumberSequence.new(FirstTransparent,1)beam.Color=ColorSequence.new(Color)
  10.     return BPart,beam
  11. end
  12. local function FadeBeamL(Beam,Type,Add)
  13.     if Beam~=nil then
  14.         if Beam:IsA("Beam")and Beam.Parent then
  15.             if Type=="Normal"then
  16.                 spawn(function()
  17.                     for i=0,1,Add do
  18.                         if Beam.Parent then
  19.                         Beam.Transparency=NumberSequence.new(i,1)
  20.                         sw()end
  21.                     end Beam.Parent:Destroy()
  22.                 end)
  23.             end
  24.             if Type=="idk"then
  25.                 spawn(function()
  26.                     for i=1,0,-Add do
  27.                         if Beam.Parent then
  28.                         Beam.Transparency=NumberSequence.new(i,1)
  29.                         sw()end
  30.                     end
  31.                     for i=0,1,Add do
  32.                         if Beam.Parent then
  33.                         Beam.Transparency=NumberSequence.new(i,1)
  34.                         sw()end
  35.                     end Beam.Parent:Destroy()
  36.                 end)
  37.             end
  38.         end
  39.     end
  40. end
  41. spawn(function()
  42. while sw()do
  43. 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)
  44. idk.CFrame=owner.Character.HumanoidRootPart.CFrame
  45. 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)
  46. FadeBeamL(beam,"idk",.025)
  47. end
  48. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement