Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Lightning(part)
- local billboard = Instance.new("BillboardGui", part)
- billboard.Name = "Lightning"
- billboard.Adornee = part
- billboard.Size = UDim2.new(0, 5000, 0, 5000)
- local mainfr = Instance.new("Frame", billboard)
- mainfr.Size = UDim2.new(0,0,0,0)
- mainfr.Position = UDim2.new(0.5, 0, 0.5, 0)
- mainfr.BackgroundTransparency = 1
- local last = nil
- for i=1, 20 do
- local newFrame = Instance.new("Frame", mainfr)
- newFrame.Size = UDim2.new(0, 40, 0, 100)
- newFrame.BackgroundTransparency = 0.2
- newFrame.BackgroundColor3 = Color3.new(1,1,1)
- newFrame.Name = i
- newFrame.Rotation = math.random(-45, 45)
- newFrame.BorderSizePixel = 0
- newFrame.Position = last and last.Position + UDim2.new(0, -newFrame.Rotation/2, 0, -newFrame.Rotation) or UDim2.new(0.5, -20, 0.5, 0)
- last = newFrame
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement