Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- 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")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Script3 = Instance.new("Script")
- Fire4 = Instance.new("Fire")
- Script5 = Instance.new("Script")
- Part6 = Instance.new("Part")
- SpecialMesh7 = Instance.new("SpecialMesh")
- Script8 = Instance.new("Script")
- Fire9 = Instance.new("Fire")
- Script10 = Instance.new("Script")
- Script11 = Instance.new("Script")
- Model0.Name = "BlackHole"
- Model0.Parent = mas
- Part1.Name = "H"
- Part1.Parent = Model0
- Part1.Transparency = 0.0099999997764826
- Part1.Rotation = Vector3.new(0, 0, -69.2600021)
- Part1.Anchored = true
- Part1.CanCollide = false
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.Size = Vector3.new(142.780136, 155.195801, 6.20783186)
- Part1.CFrame = CFrame.new(17.2116375, 50.9214897, 28.8960648, 0.354115248, 0.935203671, 0, -0.935203671, 0.354115248, 0, 0, 0, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Position = Vector3.new(17.2116375, 50.9214897, 28.8960648)
- Part1.Orientation = Vector3.new(0, 0, -69.2600021)
- SpecialMesh2.Name = "planar1"
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1185246"
- SpecialMesh2.Scale = Vector3.new(1241.56714, 1241.56714, 0)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=21315275"
- SpecialMesh2.VertexColor = Vector3.new(0, 0, 0)
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- SpecialMesh2.Scale = Vector3.new(1241.56714, 1241.56714, 0)
- Script3.Name = "spin"
- Script3.Parent = Part1
- table.insert(cors,sandbox(Script3,function()
- spinning = script.Parent
- while true do
- spinning.CFrame = spinning.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(0), 0.2)
- wait()
- end
- end))
- Fire4.Parent = Part1
- Fire4.Size = 30
- Fire4.Color = Color3.new(0, 0, 1)
- Fire4.Enabled = false
- Fire4.Heat = 25
- Fire4.SecondaryColor = Color3.new(1, 1, 1)
- Fire4.Color = Color3.new(0, 0, 1)
- Script5.Name = "Spread"
- Script5.Parent = Fire4
- table.insert(cors,sandbox(Script5,function()
- function Spread(part)
- check = part:findFirstChild("Fire")
- if check == nil then
- script.Parent:Clone().Parent = part
- elseif check ~= nil then
- check.Size = check.Size + 1
- check.Heat = check.Heat +1
- end
- end
- script.Parent.Parent.Touched:connect(Spread)
- end))
- Part6.Name = "H"
- Part6.Parent = Model0
- Part6.Transparency = 1
- Part6.Rotation = Vector3.new(-180, 0, 21.4099998)
- Part6.Anchored = true
- Part6.CanCollide = false
- Part6.FormFactor = Enum.FormFactor.Symmetric
- Part6.Size = Vector3.new(142.780136, 155.195801, 6.20783186)
- Part6.CFrame = CFrame.new(17.2224369, 50.9053879, 35.1039429, 0.931013227, -0.365007758, 0, -0.365007788, -0.931013346, 0, 0, 0, -1)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.TopSurface = Enum.SurfaceType.Smooth
- Part6.Position = Vector3.new(17.2224369, 50.9053879, 35.1039429)
- Part6.Orientation = Vector3.new(0, 180, -158.589996)
- SpecialMesh7.Name = "planar1"
- SpecialMesh7.Parent = Part6
- SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=1185246"
- SpecialMesh7.Scale = Vector3.new(1241.56714, 1241.56714, 0)
- SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=21315275"
- SpecialMesh7.VertexColor = Vector3.new(0, 0, 0)
- SpecialMesh7.MeshType = Enum.MeshType.FileMesh
- SpecialMesh7.Scale = Vector3.new(1241.56714, 1241.56714, 0)
- Script8.Name = "spin"
- Script8.Parent = Part6
- table.insert(cors,sandbox(Script8,function()
- spinning = script.Parent
- while true do
- spinning.CFrame = spinning.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(0), 0.2)
- wait()
- end
- end))
- Fire9.Parent = Part6
- Fire9.Size = 30
- Fire9.Color = Color3.new(0, 0, 1)
- Fire9.Enabled = false
- Fire9.Heat = 25
- Fire9.SecondaryColor = Color3.new(1, 1, 1)
- Fire9.Color = Color3.new(0, 0, 1)
- Script10.Name = "Spread"
- Script10.Parent = Fire9
- table.insert(cors,sandbox(Script10,function()
- function Spread(part)
- check = part:findFirstChild("Fire")
- if check == nil then
- script.Parent:Clone().Parent = part
- elseif check ~= nil then
- check.Size = check.Size + 1
- check.Heat = check.Heat +1
- end
- end
- script.Parent.Parent.Touched:connect(Spread)
- end))
- Script11.Parent = Part6
- table.insert(cors,sandbox(Script11,function()
- local hole = script.Parent
- local childList = {}
- local massConstant = 5.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.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()
- end
- else
- n = 1
- wait()
- 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 * 240 * massConstant < mass then
- child:BreakJoints()
- 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
- motivator.Name = "BlackHole Influence"
- end
- motivator.position = hole.Position
- motivator.maxForce = Vector3.new(1, 1, 1) * mass * child:GetMass() / (relPos.magnitude * massConstant)
- end
- elseif motivator ~= nil then
- motivator:Remove()
- end
- end
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement