Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mainClass = "BasePart" --The type of object you want to screw with
- mainObject = workspace --The base parent, all descendants will get rekt
- function lighting()
- local li = game:GetService("Lighting")
- --Do something with lighting
- li.TimeOfDay = 0
- li.Ambient = Color3.new(0,0,0)
- li.OutdoorAmbient = Color3.new(0,0,0)
- li.FogEnd = 100
- li.FogColor = Color3.new(0,0,0)
- end
- function handle(p)
- wait()
- --What you want to do to the things found
- p.BrickColor = BrickColor.new("Really black")
- local f = Instance.new("Fire",p)
- local sb = Instance.new("SelectionBox",p)
- local sm = Instance.new("Smoke",p)
- local sp = Instance.new("Sparkles",p)
- sb.SurfaceColor3 = Color3.new(1,0,0)
- sb.LineThickness = 1
- sb.Color3 = Color3.new(1,0,0)
- sb.Adornee = p
- local bg = Instance.new("BillboardGui",p)
- bg.Adornee = p
- bg.ExtentsOffset = Vector3.new(0,4,0)
- bg.Size = UDim2.new(0,200,0,25)
- local tl = Instance.new("TextLabel",bg)
- tl.Text = "no"
- tl.Size = UDim2.new(1,0,1,0)
- tl.BackgroundTransparency = 1
- tl.TextColor3 = Color3.new(0,1,0)
- tl.FontSize = "Size24"
- coroutine.resume(coroutine.create(function()
- handle(p)
- end))
- end
- --Don't edit anything below this line
- function doWork(par,func,class)
- local a = par:GetChildren()
- for i=1,#a do
- if a[i]:IsA(class) then
- func(a[i])
- end
- doWork(a[i],func,class)
- end
- end
- mainObject.DescendantAdded:connect(function(obj)
- if obj:IsA(mainClass) then
- handle(obj)
- end
- end)
- doWork(mainObject,handle,mainClass)
- lighting()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement