function sandbox(var,func) local env = getfenv(func) local newenv = setmetatable({},{ __index = function(self,k) if k=="script" then return var else return env[k] end end, }) setfenv(func,newenv) return func end cors = {} mas = Instance.new("Model",game:GetService("Lighting")) Model0 = Instance.new("Model") Part1 = Instance.new("Part") Script2 = Instance.new("Script") ParticleEmitter3 = Instance.new("ParticleEmitter") ParticleEmitter4 = Instance.new("ParticleEmitter") Script5 = Instance.new("Script") Script6 = Instance.new("Script") Vector3Value7 = Instance.new("Vector3Value") Part8 = Instance.new("Part") Script9 = Instance.new("Script") Script10 = Instance.new("Script") Script11 = Instance.new("Script") Vector3Value12 = Instance.new("Vector3Value") ParticleEmitter13 = Instance.new("ParticleEmitter") ParticleEmitter14 = Instance.new("ParticleEmitter") ParticleEmitter15 = Instance.new("ParticleEmitter") ParticleEmitter16 = Instance.new("ParticleEmitter") Part17 = Instance.new("Part") Script18 = Instance.new("Script") ParticleEmitter19 = Instance.new("ParticleEmitter") Script20 = Instance.new("Script") Script21 = Instance.new("Script") Vector3Value22 = Instance.new("Vector3Value") ParticleEmitter23 = Instance.new("ParticleEmitter") ParticleEmitter24 = Instance.new("ParticleEmitter") ParticleEmitter25 = Instance.new("ParticleEmitter") Part26 = Instance.new("Part") ParticleEmitter27 = Instance.new("ParticleEmitter") Script28 = Instance.new("Script") Script29 = Instance.new("Script") Vector3Value30 = Instance.new("Vector3Value") Part31 = Instance.new("Part") ParticleEmitter32 = Instance.new("ParticleEmitter") Script33 = Instance.new("Script") Script34 = Instance.new("Script") Vector3Value35 = Instance.new("Vector3Value") Script36 = Instance.new("Script") Model0.Name = "Black Hole" Model0.Parent = mas Model0.PrimaryPart = Part17 Part1.Name = "Quasars" Part1.Parent = Model0 Part1.CFrame = CFrame.new(-40.9709282, 144.504608, -28.8558464, 0.535559833, -0.25882259, 0.803857327, 0.143504083, 0.965924919, 0.215396628, -0.832215309, -9.87319368e-07, 0.554452658) Part1.Orientation = Vector3.new(-12.4399996, 55.4000015, 8.44999981) Part1.Position = Vector3.new(-40.9709282, 144.504608, -28.8558464) Part1.Rotation = Vector3.new(-21.2299995, 53.5, 25.7900009) Part1.Color = Color3.new(0, 1, 1) Part1.Transparency = 1 Part1.Size = Vector3.new(2, 1, 2) Part1.Anchored = true Part1.BottomSurface = Enum.SurfaceType.Smooth Part1.BrickColor = BrickColor.new("Toothpaste") Part1.CanCollide = false Part1.Material = Enum.Material.Neon Part1.TopSurface = Enum.SurfaceType.Smooth Part1.brickColor = BrickColor.new("Toothpaste") Script2.Parent = Part1 table.insert(cors,sandbox(Script2,function() while wait(0.0001) do script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.1, 0) end end)) ParticleEmitter3.Parent = Part1 ParticleEmitter3.Speed = NumberRange.new(50, 50) ParticleEmitter3.Color = ColorSequence.new(Color3.new(0.333333, 0, 1),Color3.new(0.333333, 0, 1)) ParticleEmitter3.LightEmission = 1 ParticleEmitter3.Texture = "rbxassetid://81137714" ParticleEmitter3.Transparency = NumberSequence.new(0.5,0.5) ParticleEmitter3.Size = NumberSequence.new(0.87499976158142,2.3125,0.43749988079071) ParticleEmitter3.Lifetime = NumberRange.new(1, 1) ParticleEmitter3.Rate = 1000 ParticleEmitter3.SpreadAngle = Vector2.new(2, 2) ParticleEmitter3.VelocitySpread = 2 ParticleEmitter4.Parent = Part1 ParticleEmitter4.Speed = NumberRange.new(50, 50) ParticleEmitter4.Color = ColorSequence.new(Color3.new(0.333333, 0, 1),Color3.new(0.333333, 0, 1)) ParticleEmitter4.LightEmission = 1 ParticleEmitter4.Texture = "rbxassetid://81137714" ParticleEmitter4.Transparency = NumberSequence.new(0.5,0.5) ParticleEmitter4.Size = NumberSequence.new(0.87499976158142,2.3125,0.43749988079071) ParticleEmitter4.EmissionDirection = Enum.NormalId.Bottom ParticleEmitter4.Lifetime = NumberRange.new(1, 1) ParticleEmitter4.Rate = 1000 ParticleEmitter4.SpreadAngle = Vector2.new(2, 2) ParticleEmitter4.VelocitySpread = 2 Script5.Name = "attract" Script5.Parent = Part1 table.insert(cors,sandbox(Script5,function() local hole = script.Parent local childList = {} local massConstant = 888888 -- Generally a good value local mass = 40000 * massConstant -- This is basically a function that finds all unanchored parts and adds them to childList. -- Note: This should only be run once for each object function checkObject(obj) if (obj ~= hole) and (obj.className == "Part") then if (obj.Anchored == false) then table.insert(childList, 1, obj) end elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then local child = obj:GetChildren() for x = 1, #child do checkObject(child[x]) end obj.ChildAdded:connect(checkObject) end end checkObject(workspace) print("Black Hole script loaded.") local n = 0 while true do if n < #childList then n = n + 1 if n % 800 == 0 then wait(0.5) end else n = 1 wait(0.5) end local child = childList[n] if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then local relPos = hole.Position - child.Position local motivator = child:FindFirstChild("BlackHole Influence") if relPos.magnitude * 350 * massConstant < mass then local a = math.random(1,4) if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then child:BreakJoints() end if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then mass = mass + child:GetMass() -- child:Remove() table.remove(childList, n) n = n - 1 -- This is the reason I need a counter of my own design else -- child.CanCollide = false -- I Can assume that things won't escape the black hole. if motivator == nil then motivator = Instance.new("BodyPosition") motivator.Parent = child --game:GetService("Debris"):AddItem(motivator,0.4) motivator.Name = "BlackHole Influence" end if child.Parent:findFirstChild("Humanoid") ~= nil then motivator.position = hole.Position motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant) motivator:remove() local posfind = child.Parent:findFirstChild("Torso") if posfind ~= nil then local posfind2 = posfind:findFirstChild("gotopos") if posfind2== nil then aa= script.gotopos:Clone() aa.Disabled=false game:GetService("Debris"):AddItem(aa,10) aa.Value.Value=script.Parent.Position aa.Parent=child.Parent.Torso end end else motivator.position = hole.Position motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant) end end elseif motivator ~= nil then motivator:Remove() end end end end)) Script6.Name = "gotopos" Script6.Parent = Script5 table.insert(cors,sandbox(Script6,function() print 'Hello world!' local b = script.Value.Value while true do wait(0.1) local a = script.Parent.Position local dir = (a - b).unit dir=dir*-1 script.Parent.Velocity = dir*50 end end)) Script6.Disabled = true Vector3Value7.Parent = Script6 Part8.Name = "Rings" Part8.Parent = Model0 Part8.CFrame = CFrame.new(-40.9709282, 144.504608, -28.8558464, 0.949450195, -0.258822143, 0.17763859, 0.254407436, 0.965924978, 0.0475999936, -0.183905482, -1.2401407e-06, 0.982943952) Part8.Orientation = Vector3.new(-2.73000002, 10.2399998, 14.7600002) Part8.Position = Vector3.new(-40.9709282, 144.504608, -28.8558464) Part8.Rotation = Vector3.new(-2.76999998, 10.2299995, 15.25) Part8.Color = Color3.new(0, 1, 1) Part8.Transparency = 1 Part8.Size = Vector3.new(2, 1, 2) Part8.Anchored = true Part8.BottomSurface = Enum.SurfaceType.Smooth Part8.BrickColor = BrickColor.new("Toothpaste") Part8.CanCollide = false Part8.Material = Enum.Material.Neon Part8.TopSurface = Enum.SurfaceType.Smooth Part8.brickColor = BrickColor.new("Toothpaste") Script9.Parent = Part8 table.insert(cors,sandbox(Script9,function() while wait(0.0001) do script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.1, 0) end end)) Script10.Name = "attract" Script10.Parent = Part8 table.insert(cors,sandbox(Script10,function() local hole = script.Parent local childList = {} local massConstant = 5.8 -- Generally a good value local mass = 40000 * massConstant -- This is basically a function that finds all unanchored parts and adds them to childList. -- Note: This should only be run once for each object function checkObject(obj) if (obj ~= hole) and (obj.className == "Part") then if (obj.Anchored == false) then table.insert(childList, 1, obj) end elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then local child = obj:GetChildren() for x = 1, #child do checkObject(child[x]) end obj.ChildAdded:connect(checkObject) end end checkObject(workspace) print("Black Hole script loaded.") local n = 0 while true do if n < #childList then n = n + 1 if n % 800 == 0 then wait(0.5) end else n = 1 wait(0.5) end local child = childList[n] if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then local relPos = hole.Position - child.Position local motivator = child:FindFirstChild("BlackHole Influence") if relPos.magnitude * 350 * massConstant < mass then local a = math.random(1,4) if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then child:BreakJoints() end if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then mass = mass + child:GetMass() -- child:Remove() table.remove(childList, n) n = n - 1 -- This is the reason I need a counter of my own design else -- child.CanCollide = false -- I Can assume that things won't escape the black hole. if motivator == nil then motivator = Instance.new("BodyPosition") motivator.Parent = child --game:GetService("Debris"):AddItem(motivator,0.4) motivator.Name = "BlackHole Influence" end if child.Parent:findFirstChild("Humanoid") ~= nil then motivator.position = hole.Position motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant) motivator:remove() local posfind = child.Parent:findFirstChild("Torso") if posfind ~= nil then local posfind2 = posfind:findFirstChild("gotopos") if posfind2== nil then aa= script.gotopos:Clone() aa.Disabled=false game:GetService("Debris"):AddItem(aa,10) aa.Value.Value=script.Parent.Position aa.Parent=child.Parent.Torso end end else motivator.position = hole.Position motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant) end end elseif motivator ~= nil then motivator:Remove() end end end end)) Script11.Name = "gotopos" Script11.Parent = Script10 table.insert(cors,sandbox(Script11,function() print 'Hello world!' local b = script.Value.Value while true do wait(0.1) local a = script.Parent.Position local dir = (a - b).unit dir=dir*-1 script.Parent.Velocity = dir*30 end end)) Script11.Disabled = true Vector3Value12.Parent = Script11 ParticleEmitter13.Parent = Part8 ParticleEmitter13.Speed = NumberRange.new(1, 1) ParticleEmitter13.Color = ColorSequence.new(Color3.new(0.987366, 0.242267, 0.0729076),Color3.new(0.987366, 0.242267, 0.0729076)) ParticleEmitter13.LightEmission = 0.80000001192093 ParticleEmitter13.Texture = "rbxassetid://254959503" ParticleEmitter13.EmissionDirection = Enum.NormalId.Right ParticleEmitter13.Lifetime = NumberRange.new(3, 3) ParticleEmitter13.Rate = 250 ParticleEmitter14.Parent = Part8 ParticleEmitter14.Speed = NumberRange.new(1, 1) ParticleEmitter14.Color = ColorSequence.new(Color3.new(0.987366, 0.242267, 0.0729076),Color3.new(0.987366, 0.242267, 0.0729076)) ParticleEmitter14.LightEmission = 0.80000001192093 ParticleEmitter14.Texture = "rbxassetid://254959503" ParticleEmitter14.EmissionDirection = Enum.NormalId.Left ParticleEmitter14.Lifetime = NumberRange.new(3, 3) ParticleEmitter14.Rate = 250 ParticleEmitter15.Parent = Part8 ParticleEmitter15.Speed = NumberRange.new(1, 1) ParticleEmitter15.Color = ColorSequence.new(Color3.new(0.987366, 0.242267, 0.0729076),Color3.new(0.987366, 0.242267, 0.0729076)) ParticleEmitter15.LightEmission = 0.80000001192093 ParticleEmitter15.Texture = "rbxassetid://254959503" ParticleEmitter15.EmissionDirection = Enum.NormalId.Front ParticleEmitter15.Lifetime = NumberRange.new(3, 3) ParticleEmitter15.Rate = 250 ParticleEmitter16.Parent = Part8 ParticleEmitter16.Speed = NumberRange.new(1, 1) ParticleEmitter16.Color = ColorSequence.new(Color3.new(0.987366, 0.242267, 0.0729076),Color3.new(0.987366, 0.242267, 0.0729076)) ParticleEmitter16.LightEmission = 0.80000001192093 ParticleEmitter16.Texture = "rbxassetid://254959503" ParticleEmitter16.EmissionDirection = Enum.NormalId.Back ParticleEmitter16.Lifetime = NumberRange.new(3, 3) ParticleEmitter16.Rate = 250 Part17.Name = "Rings" Part17.Parent = Model0 Part17.CFrame = CFrame.new(-40.9709282, 144.504608, -28.8558464, 0.613136113, -0.25882259, 0.746374547, 0.164290935, 0.965924919, 0.199994043, -0.772704661, -9.96810172e-07, 0.634765685) Part17.Orientation = Vector3.new(-11.54, 49.6199989, 9.64999962) Part17.Position = Vector3.new(-40.9709282, 144.504608, -28.8558464) Part17.Rotation = Vector3.new(-17.4899998, 48.2799988, 22.8899994) Part17.Color = Color3.new(0, 1, 1) Part17.Transparency = 1 Part17.Size = Vector3.new(2, 1, 2) Part17.Anchored = true Part17.BottomSurface = Enum.SurfaceType.Smooth Part17.BrickColor = BrickColor.new("Toothpaste") Part17.CanCollide = false Part17.Material = Enum.Material.Neon Part17.TopSurface = Enum.SurfaceType.Smooth Part17.brickColor = BrickColor.new("Toothpaste") Script18.Parent = Part17 table.insert(cors,sandbox(Script18,function() while wait(0.0001) do script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.1, 0) end end)) ParticleEmitter19.Parent = Part17 ParticleEmitter19.Speed = NumberRange.new(1, 1) ParticleEmitter19.Color = ColorSequence.new(Color3.new(0.987366, 0.242267, 0.0729076),Color3.new(0.987366, 0.242267, 0.0729076)) ParticleEmitter19.LightEmission = 0.80000001192093 ParticleEmitter19.Texture = "rbxassetid://254959503" ParticleEmitter19.EmissionDirection = Enum.NormalId.Right ParticleEmitter19.Lifetime = NumberRange.new(3, 3) ParticleEmitter19.Rate = 250 Script20.Name = "attract" Script20.Parent = Part17 table.insert(cors,sandbox(Script20,function() local hole = script.Parent local childList = {} local massConstant = 5.8 -- Generally a good value local mass = 40000 * massConstant -- This is basically a function that finds all unanchored parts and adds them to childList. -- Note: This should only be run once for each object function checkObject(obj) if (obj ~= hole) and (obj.className == "Part") then if (obj.Anchored == false) then table.insert(childList, 1, obj) end elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then local child = obj:GetChildren() for x = 1, #child do checkObject(child[x]) end obj.ChildAdded:connect(checkObject) end end checkObject(workspace) print("Black Hole script loaded.") local n = 0 while true do if n < #childList then n = n + 1 if n % 800 == 0 then wait(0.5) end else n = 1 wait(0.5) end local child = childList[n] if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then local relPos = hole.Position - child.Position local motivator = child:FindFirstChild("BlackHole Influence") if relPos.magnitude * 350 * massConstant < mass then local a = math.random(1,4) if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then child:BreakJoints() end if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then mass = mass + child:GetMass() -- child:Remove() table.remove(childList, n) n = n - 1 -- This is the reason I need a counter of my own design else -- child.CanCollide = false -- I Can assume that things won't escape the black hole. if motivator == nil then motivator = Instance.new("BodyPosition") motivator.Parent = child --game:GetService("Debris"):AddItem(motivator,0.4) motivator.Name = "BlackHole Influence" end if child.Parent:findFirstChild("Humanoid") ~= nil then motivator.position = hole.Position motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant) motivator:remove() local posfind = child.Parent:findFirstChild("Torso") if posfind ~= nil then local posfind2 = posfind:findFirstChild("gotopos") if posfind2== nil then aa= script.gotopos:Clone() aa.Disabled=false game:GetService("Debris"):AddItem(aa,10) aa.Value.Value=script.Parent.Position aa.Parent=child.Parent.Torso end end else motivator.position = hole.Position motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant) end end elseif motivator ~= nil then motivator:Remove() end end end end)) Script21.Name = "gotopos" Script21.Parent = Script20 table.insert(cors,sandbox(Script21,function() print 'Hello world!' local b = script.Value.Value while true do wait(0.1) local a = script.Parent.Position local dir = (a - b).unit dir=dir*-1 script.Parent.Velocity = dir*30 end end)) Script21.Disabled = true Vector3Value22.Parent = Script21 ParticleEmitter23.Parent = Part17 ParticleEmitter23.Speed = NumberRange.new(1, 1) ParticleEmitter23.Color = ColorSequence.new(Color3.new(0.987366, 0.242267, 0.0729076),Color3.new(0.987366, 0.242267, 0.0729076)) ParticleEmitter23.LightEmission = 0.80000001192093 ParticleEmitter23.Texture = "rbxassetid://254959503" ParticleEmitter23.EmissionDirection = Enum.NormalId.Left ParticleEmitter23.Lifetime = NumberRange.new(3, 3) ParticleEmitter23.Rate = 250 ParticleEmitter24.Parent = Part17 ParticleEmitter24.Speed = NumberRange.new(1, 1) ParticleEmitter24.Color = ColorSequence.new(Color3.new(0.987366, 0.242267, 0.0729076),Color3.new(0.987366, 0.242267, 0.0729076)) ParticleEmitter24.LightEmission = 0.80000001192093 ParticleEmitter24.Texture = "rbxassetid://254959503" ParticleEmitter24.EmissionDirection = Enum.NormalId.Front ParticleEmitter24.Lifetime = NumberRange.new(3, 3) ParticleEmitter24.Rate = 250 ParticleEmitter25.Parent = Part17 ParticleEmitter25.Speed = NumberRange.new(1, 1) ParticleEmitter25.Color = ColorSequence.new(Color3.new(0.987366, 0.242267, 0.0729076),Color3.new(0.987366, 0.242267, 0.0729076)) ParticleEmitter25.LightEmission = 0.80000001192093 ParticleEmitter25.Texture = "rbxassetid://254959503" ParticleEmitter25.EmissionDirection = Enum.NormalId.Back ParticleEmitter25.Lifetime = NumberRange.new(3, 3) ParticleEmitter25.Rate = 250 Part26.Name = "Shine" Part26.Parent = Model0 Part26.CFrame = CFrame.new(-41.081768, 144.679413, -28.8558311, 0.965932727, -0.258822411, -5.09619713e-06, 0.258824348, 0.965925038, -2.98023224e-07, 5.7220459e-06, -1.19278945e-06, 1.00000739) Part26.Orientation = Vector3.new(0, 0, 15) Part26.Position = Vector3.new(-41.081768, 144.679413, -28.8558311) Part26.Rotation = Vector3.new(0, 0, 15) Part26.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) Part26.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) Part26.Anchored = true Part26.BottomSurface = Enum.SurfaceType.Smooth Part26.BrickColor = BrickColor.new("Really black") Part26.CanCollide = false Part26.FrontParamA = 0 Part26.FrontParamB = 0 Part26.Material = Enum.Material.SmoothPlastic Part26.TopSurface = Enum.SurfaceType.Smooth Part26.brickColor = BrickColor.new("Really black") Part26.Shape = Enum.PartType.Ball ParticleEmitter27.Parent = Part26 ParticleEmitter27.Speed = NumberRange.new(0, 0) ParticleEmitter27.Color = ColorSequence.new(Color3.new(0.974243, 0.544472, 0.0839246),Color3.new(0.974243, 0.544472, 0.0839246)) ParticleEmitter27.LightEmission = 0.69999998807907 ParticleEmitter27.Texture = "rbxassetid://286708119" ParticleEmitter27.Size = NumberSequence.new(2.5,2.5) ParticleEmitter27.EmissionDirection = Enum.NormalId.Front ParticleEmitter27.Lifetime = NumberRange.new(0.10000000149012, 0.10000000149012) ParticleEmitter27.Rate = 1000 Script28.Name = "attract" Script28.Parent = Part26 table.insert(cors,sandbox(Script28,function() local hole = script.Parent local childList = {} local massConstant = 5.8 -- Generally a good value local mass = 40000 * massConstant -- This is basically a function that finds all unanchored parts and adds them to childList. -- Note: This should only be run once for each object function checkObject(obj) if (obj ~= hole) and (obj.className == "Part") then if (obj.Anchored == false) then table.insert(childList, 1, obj) end elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then local child = obj:GetChildren() for x = 1, #child do checkObject(child[x]) end obj.ChildAdded:connect(checkObject) end end checkObject(workspace) print("Black Hole script loaded.") local n = 0 while true do if n < #childList then n = n + 1 if n % 800 == 0 then wait(0.5) end else n = 1 wait(0.5) end local child = childList[n] if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then local relPos = hole.Position - child.Position local motivator = child:FindFirstChild("BlackHole Influence") if relPos.magnitude * 350 * massConstant < mass then local a = math.random(1,4) if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then child:BreakJoints() end if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then mass = mass + child:GetMass() -- child:Remove() table.remove(childList, n) n = n - 1 -- This is the reason I need a counter of my own design else -- child.CanCollide = false -- I Can assume that things won't escape the black hole. if motivator == nil then motivator = Instance.new("BodyPosition") motivator.Parent = child --game:GetService("Debris"):AddItem(motivator,0.4) motivator.Name = "BlackHole Influence" end if child.Parent:findFirstChild("Humanoid") ~= nil then motivator.position = hole.Position motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant) motivator:remove() local posfind = child.Parent:findFirstChild("Torso") if posfind ~= nil then local posfind2 = posfind:findFirstChild("gotopos") if posfind2== nil then aa= script.gotopos:Clone() aa.Disabled=false game:GetService("Debris"):AddItem(aa,10) aa.Value.Value=script.Parent.Position aa.Parent=child.Parent.Torso end end else motivator.position = hole.Position motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant) end end elseif motivator ~= nil then motivator:Remove() end end end end)) Script29.Name = "gotopos" Script29.Parent = Script28 table.insert(cors,sandbox(Script29,function() print 'Hello world!' local b = script.Value.Value while true do wait(0.1) local a = script.Parent.Position local dir = (a - b).unit dir=dir*-1 script.Parent.Velocity = dir*30 end end)) Script29.Disabled = true Vector3Value30.Parent = Script29 Part31.Name = "Singularity" Part31.Parent = Model0 Part31.CFrame = CFrame.new(-41.081768, 144.61203, -28.8558464, 0.965932727, -0.258822411, -5.09619713e-06, 0.258824348, 0.965925038, -2.98023224e-07, 5.7220459e-06, -1.19278945e-06, 1.00000739) Part31.Orientation = Vector3.new(0, 0, 15) Part31.Position = Vector3.new(-41.081768, 144.61203, -28.8558464) Part31.Rotation = Vector3.new(0, 0, 15) Part31.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) Part31.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) Part31.Anchored = true Part31.BottomSurface = Enum.SurfaceType.Smooth Part31.BrickColor = BrickColor.new("Really black") Part31.CanCollide = false Part31.FrontParamA = 0 Part31.FrontParamB = 0 Part31.Material = Enum.Material.SmoothPlastic Part31.TopSurface = Enum.SurfaceType.Smooth Part31.brickColor = BrickColor.new("Really black") Part31.Shape = Enum.PartType.Ball ParticleEmitter32.Parent = Part31 ParticleEmitter32.Speed = NumberRange.new(0, 0) ParticleEmitter32.Color = ColorSequence.new(Color3.new(0, 0, 0),Color3.new(0, 0, 0)) ParticleEmitter32.Texture = "rbxassetid://286708119" ParticleEmitter32.ZOffset = 1 ParticleEmitter32.Size = NumberSequence.new(2.2000000476837,2.2000000476837) ParticleEmitter32.EmissionDirection = Enum.NormalId.Front ParticleEmitter32.Lifetime = NumberRange.new(0.10000000149012, 0.10000000149012) ParticleEmitter32.Rate = 1000 Script33.Name = "attract" Script33.Parent = Part31 table.insert(cors,sandbox(Script33,function() local hole = script.Parent local childList = {} local massConstant = 5.8 -- Generally a good value local mass = 40000 * massConstant -- This is basically a function that finds all unanchored parts and adds them to childList. -- Note: This should only be run once for each object function checkObject(obj) if (obj ~= hole) and (obj.className == "Part") then if (obj.Anchored == false) then table.insert(childList, 1, obj) end elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then local child = obj:GetChildren() for x = 1, #child do checkObject(child[x]) end obj.ChildAdded:connect(checkObject) end end checkObject(workspace) print("Black Hole script loaded.") local n = 0 while true do if n < #childList then n = n + 1 if n % 800 == 0 then wait(0.5) end else n = 1 wait(0.5) end local child = childList[n] if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then local relPos = hole.Position - child.Position local motivator = child:FindFirstChild("BlackHole Influence") if relPos.magnitude * 350 * massConstant < mass then local a = math.random(1,4) if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then child:BreakJoints() end if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then mass = mass + child:GetMass() -- child:Remove() table.remove(childList, n) n = n - 1 -- This is the reason I need a counter of my own design else -- child.CanCollide = false -- I Can assume that things won't escape the black hole. if motivator == nil then motivator = Instance.new("BodyPosition") motivator.Parent = child --game:GetService("Debris"):AddItem(motivator,0.4) motivator.Name = "BlackHole Influence" end if child.Parent:findFirstChild("Humanoid") ~= nil then motivator.position = hole.Position motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant) motivator:remove() local posfind = child.Parent:findFirstChild("Torso") if posfind ~= nil then local posfind2 = posfind:findFirstChild("gotopos") if posfind2== nil then aa= script.gotopos:Clone() aa.Disabled=false game:GetService("Debris"):AddItem(aa,10) aa.Value.Value=script.Parent.Position aa.Parent=child.Parent.Torso end end else motivator.position = hole.Position motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant) end end elseif motivator ~= nil then motivator:Remove() end end end end)) Script34.Name = "gotopos" Script34.Parent = Script33 table.insert(cors,sandbox(Script34,function() print 'Hello world!' local b = script.Value.Value while true do wait(0.1) local a = script.Parent.Position local dir = (a - b).unit dir=dir*-1 script.Parent.Velocity = dir*30 end end)) Script34.Disabled = true Vector3Value35.Parent = Script34 Script36.Parent = Part31 table.insert(cors,sandbox(Script36,function() local hole = script.Parent local childList = {} local massConstant = 8 -- Generally a good value local mass = 32000 * massConstant -- This is basically a function that finds all unanchored parts and adds them to childList. -- Note: This should only be run once for each object function checkObject(obj) if obj ~= hole and obj:isA("BasePart") then if not obj.Anchored then childList[obj] = true end elseif obj:isA("Model") or obj:isA("Accoutrement") or obj:isA("Tool") then for _, child in ipairs(obj:GetChildren()) do checkObject(child) end obj.ChildAdded:connect(checkObject) end end checkObject(workspace) print("Black Hole script loaded.") while true do for child in pairs(childList) do local distance = (hole.Position - child.Position).magnitude local motivator = child:FindFirstChild("BlackHole Influence") if distance * 240 * massConstant < mass then child:BreakJoints() if distance * 320 * massConstant < mass and child.Size.z + hole.Size.x > distance * 2 - 4 then mass = mass + child:GetMass() childList[child] = nil child:Remove() else child.CanCollide = false -- I Can assume that things won't escape the black hole. if not motivator then motivator = Instance.new("BodyPosition") motivator.Parent = child motivator.Name = "BlackHole Influence" end motivator.position = hole.Position motivator.maxForce = Vector3.new(1, 1, 1) * mass * child:GetMass() / (distance * massConstant) end elseif motivator ~= nil then motivator:Remove() end end wait() end end)) for i,v in pairs(mas:GetChildren()) do v.Parent = workspace pcall(function() v:MakeJoints() end) end mas:Destroy() for i,v in pairs(cors) do spawn(function() pcall(v) end) end