N0ePlox

Rocket

Nov 25th, 2018
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.87 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. Part1 = Instance.new("Part")
  21. Script2 = Instance.new("Script")
  22. ParticleEmitter3 = Instance.new("ParticleEmitter")
  23. ParticleEmitter4 = Instance.new("ParticleEmitter")
  24. Script5 = Instance.new("Script")
  25. Script6 = Instance.new("Script")
  26. Vector3Value7 = Instance.new("Vector3Value")
  27. Part8 = Instance.new("Part")
  28. Script9 = Instance.new("Script")
  29. ParticleEmitter10 = Instance.new("ParticleEmitter")
  30. ParticleEmitter11 = Instance.new("ParticleEmitter")
  31. ParticleEmitter12 = Instance.new("ParticleEmitter")
  32. ParticleEmitter13 = Instance.new("ParticleEmitter")
  33. Script14 = Instance.new("Script")
  34. Script15 = Instance.new("Script")
  35. Vector3Value16 = Instance.new("Vector3Value")
  36. Part17 = Instance.new("Part")
  37. Script18 = Instance.new("Script")
  38. ParticleEmitter19 = Instance.new("ParticleEmitter")
  39. ParticleEmitter20 = Instance.new("ParticleEmitter")
  40. ParticleEmitter21 = Instance.new("ParticleEmitter")
  41. ParticleEmitter22 = Instance.new("ParticleEmitter")
  42. Script23 = Instance.new("Script")
  43. Script24 = Instance.new("Script")
  44. Vector3Value25 = Instance.new("Vector3Value")
  45. Part26 = Instance.new("Part")
  46. ParticleEmitter27 = Instance.new("ParticleEmitter")
  47. Script28 = Instance.new("Script")
  48. Script29 = Instance.new("Script")
  49. Vector3Value30 = Instance.new("Vector3Value")
  50. Part31 = Instance.new("Part")
  51. ParticleEmitter32 = Instance.new("ParticleEmitter")
  52. Script33 = Instance.new("Script")
  53. Script34 = Instance.new("Script")
  54. Vector3Value35 = Instance.new("Vector3Value")
  55. Script36 = Instance.new("Script")
  56. Model0.Name = "Black Hole"
  57. Model0.Parent = mas
  58. Model0.PrimaryPart = Part17
  59. Part1.Name = "Quasars"
  60. Part1.Parent = Model0
  61. Part1.CFrame = CFrame.new(16.1907215, 0.847259998, 21.1910152, 0.535558999, -0.258820951, 0.80385828, 0.143505514, 0.965922713, 0.215395257, -0.832218707, 1.97826739e-06, 0.554456055)
  62. Part1.Orientation = Vector3.new(-12.4399996, 55.3999977, 8.44999981)
  63. Part1.Position = Vector3.new(16.1907215, 0.847259998, 21.1910152)
  64. Part1.Rotation = Vector3.new(-21.2299995, 53.5, 25.789999)
  65. Part1.Color = Color3.new(0, 1, 1)
  66. Part1.Transparency = 1
  67. Part1.Size = Vector3.new(2, 1, 2)
  68. Part1.Anchored = true
  69. Part1.BottomSurface = Enum.SurfaceType.Smooth
  70. Part1.BrickColor = BrickColor.new("Toothpaste")
  71. Part1.CanCollide = false
  72. Part1.Material = Enum.Material.Neon
  73. Part1.TopSurface = Enum.SurfaceType.Smooth
  74. Part1.brickColor = BrickColor.new("Toothpaste")
  75. Script2.Parent = Part1
  76. table.insert(cors,sandbox(Script2,function()
  77. while wait(0.0001) do
  78. script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
  79. end
  80. end))
  81. ParticleEmitter3.Parent = Part1
  82. ParticleEmitter3.Speed = NumberRange.new(50, 50)
  83. ParticleEmitter3.Color = ColorSequence.new(Color3.new(0.333333, 0, 1),Color3.new(0.333333, 0, 1))
  84. ParticleEmitter3.LightEmission = 1
  85. ParticleEmitter3.Texture = "rbxassetid://81137714"
  86. ParticleEmitter3.Transparency = NumberSequence.new(0.5,0.5)
  87. ParticleEmitter3.Size = NumberSequence.new(0.87499976158142,2.3125,0.43749988079071)
  88. ParticleEmitter3.Lifetime = NumberRange.new(1, 1)
  89. ParticleEmitter3.Rate = 1000
  90. ParticleEmitter3.SpreadAngle = Vector2.new(2, 2)
  91. ParticleEmitter3.VelocitySpread = 2
  92. ParticleEmitter4.Parent = Part1
  93. ParticleEmitter4.Speed = NumberRange.new(50, 50)
  94. ParticleEmitter4.Color = ColorSequence.new(Color3.new(0.333333, 0, 1),Color3.new(0.333333, 0, 1))
  95. ParticleEmitter4.LightEmission = 1
  96. ParticleEmitter4.Texture = "rbxassetid://81137714"
  97. ParticleEmitter4.Transparency = NumberSequence.new(0.5,0.5)
  98. ParticleEmitter4.Size = NumberSequence.new(0.87499976158142,2.3125,0.43749988079071)
  99. ParticleEmitter4.EmissionDirection = Enum.NormalId.Bottom
  100. ParticleEmitter4.Lifetime = NumberRange.new(1, 1)
  101. ParticleEmitter4.Rate = 1000
  102. ParticleEmitter4.SpreadAngle = Vector2.new(2, 2)
  103. ParticleEmitter4.VelocitySpread = 2
  104. Script5.Name = "attract"
  105. Script5.Parent = Part1
  106. table.insert(cors,sandbox(Script5,function()
  107. local hole = script.Parent
  108. local childList = {}
  109.  
  110. local massConstant = 888888 -- Generally a good value
  111.  
  112. local mass = 40000 * massConstant
  113.  
  114. -- This is basically a function that finds all unanchored parts and adds them to childList.
  115. -- Note: This should only be run once for each object
  116. function checkObject(obj)
  117. if (obj ~= hole) and (obj.className == "Part") then
  118. if (obj.Anchored == false) then
  119. table.insert(childList, 1, obj)
  120. end
  121. elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  122. local child = obj:GetChildren()
  123. for x = 1, #child do
  124. checkObject(child[x])
  125. end
  126. obj.ChildAdded:connect(checkObject)
  127. end
  128. end
  129.  
  130. checkObject(workspace)
  131.  
  132. print("Black Hole script loaded.")
  133.  
  134. local n = 0
  135. while true do
  136. if n < #childList then
  137. n = n + 1
  138. if n % 800 == 0 then
  139. wait(0.5)
  140. end
  141. else
  142. n = 1
  143. wait(0.5)
  144. end
  145.  
  146. local child = childList[n]
  147. if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then
  148. local relPos = hole.Position - child.Position
  149. local motivator = child:FindFirstChild("BlackHole Influence")
  150. if relPos.magnitude * 350 * massConstant < mass then
  151.  
  152. local a = math.random(1,4)
  153. if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then
  154. child:BreakJoints()
  155.  
  156.  
  157. end
  158.  
  159. if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then
  160. mass = mass + child:GetMass()
  161. -- child:Remove()
  162. table.remove(childList, n)
  163. n = n - 1 -- This is the reason I need a counter of my own design
  164. else
  165. -- child.CanCollide = false -- I Can assume that things won't escape the black hole.
  166. if motivator == nil then
  167. motivator = Instance.new("BodyPosition")
  168. motivator.Parent = child
  169. --game:GetService("Debris"):AddItem(motivator,0.4)
  170. motivator.Name = "BlackHole Influence"
  171. end
  172. if child.Parent:findFirstChild("Humanoid") ~= nil then
  173. motivator.position = hole.Position
  174. motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  175. motivator:remove()
  176. local posfind = child.Parent:findFirstChild("Torso")
  177. if posfind ~= nil then
  178. local posfind2 = posfind:findFirstChild("gotopos")
  179. if posfind2== nil then
  180. aa= script.gotopos:Clone()
  181. aa.Disabled=false
  182. game:GetService("Debris"):AddItem(aa,10)
  183. aa.Value.Value=script.Parent.Position
  184. aa.Parent=child.Parent.Torso
  185. end
  186. end
  187. else
  188. motivator.position = hole.Position
  189. motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  190.  
  191. end
  192.  
  193. end
  194. elseif motivator ~= nil then
  195. motivator:Remove()
  196. end
  197. end
  198. end
  199. end))
  200. Script6.Name = "gotopos"
  201. Script6.Parent = Script5
  202. table.insert(cors,sandbox(Script6,function()
  203. print 'Hello world!'
  204. local b = script.Value.Value
  205. while true do
  206. wait(0.1)
  207.  
  208. local a = script.Parent.Position
  209.  
  210. local dir = (a - b).unit
  211. dir=dir*-1
  212. script.Parent.Velocity = dir*50
  213. end
  214. end))
  215. Script6.Disabled = true
  216. Vector3Value7.Parent = Script6
  217. Part8.Name = "Rings"
  218. Part8.Parent = Model0
  219. Part8.CFrame = CFrame.new(16.1907215, 0.847259998, 21.1910152, 0.949450195, -0.258820474, 0.177639887, 0.254407436, 0.965922773, 0.047598023, -0.183905482, 1.72745342e-06, 0.98294884)
  220. Part8.Orientation = Vector3.new(-2.73000002, 10.2399998, 14.7599993)
  221. Part8.Position = Vector3.new(16.1907215, 0.847259998, 21.1910152)
  222. Part8.Rotation = Vector3.new(-2.76999998, 10.2299995, 15.25)
  223. Part8.Color = Color3.new(0, 1, 1)
  224. Part8.Transparency = 1
  225. Part8.Size = Vector3.new(2, 1, 2)
  226. Part8.Anchored = true
  227. Part8.BottomSurface = Enum.SurfaceType.Smooth
  228. Part8.BrickColor = BrickColor.new("Toothpaste")
  229. Part8.CanCollide = false
  230. Part8.Material = Enum.Material.Neon
  231. Part8.TopSurface = Enum.SurfaceType.Smooth
  232. Part8.brickColor = BrickColor.new("Toothpaste")
  233. Script9.Parent = Part8
  234. table.insert(cors,sandbox(Script9,function()
  235. while wait(0.0001) do
  236. script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
  237. end
  238. end))
  239. ParticleEmitter10.Parent = Part8
  240. ParticleEmitter10.Color = ColorSequence.new(Color3.new(0.894118, 0.470588, 1),Color3.new(0.301961, 0.14902, 0.458824))
  241. ParticleEmitter10.LightEmission = 0.80000001192093
  242. ParticleEmitter10.Texture = "rbxassetid://254959503"
  243. ParticleEmitter10.EmissionDirection = Enum.NormalId.Right
  244. ParticleEmitter10.Lifetime = NumberRange.new(3, 3)
  245. ParticleEmitter10.Rate = 250
  246. ParticleEmitter11.Parent = Part8
  247. ParticleEmitter11.Color = ColorSequence.new(Color3.new(0.894118, 0.470588, 1),Color3.new(0.301961, 0.14902, 0.458824))
  248. ParticleEmitter11.LightEmission = 0.80000001192093
  249. ParticleEmitter11.Texture = "rbxassetid://254959503"
  250. ParticleEmitter11.EmissionDirection = Enum.NormalId.Back
  251. ParticleEmitter11.Lifetime = NumberRange.new(3, 3)
  252. ParticleEmitter11.Rate = 250
  253. ParticleEmitter12.Parent = Part8
  254. ParticleEmitter12.Color = ColorSequence.new(Color3.new(0.894118, 0.470588, 1),Color3.new(0.301961, 0.14902, 0.458824))
  255. ParticleEmitter12.LightEmission = 0.80000001192093
  256. ParticleEmitter12.Texture = "rbxassetid://254959503"
  257. ParticleEmitter12.EmissionDirection = Enum.NormalId.Front
  258. ParticleEmitter12.Lifetime = NumberRange.new(3, 3)
  259. ParticleEmitter12.Rate = 250
  260. ParticleEmitter13.Parent = Part8
  261. ParticleEmitter13.Color = ColorSequence.new(Color3.new(0.894118, 0.470588, 1),Color3.new(0.301961, 0.14902, 0.458824))
  262. ParticleEmitter13.LightEmission = 0.80000001192093
  263. ParticleEmitter13.Texture = "rbxassetid://254959503"
  264. ParticleEmitter13.EmissionDirection = Enum.NormalId.Left
  265. ParticleEmitter13.Lifetime = NumberRange.new(3, 3)
  266. ParticleEmitter13.Rate = 250
  267. Script14.Name = "attract"
  268. Script14.Parent = Part8
  269. table.insert(cors,sandbox(Script14,function()
  270. local hole = script.Parent
  271. local childList = {}
  272.  
  273. local massConstant = 5.8 -- Generally a good value
  274.  
  275. local mass = 40000 * massConstant
  276.  
  277. -- This is basically a function that finds all unanchored parts and adds them to childList.
  278. -- Note: This should only be run once for each object
  279. function checkObject(obj)
  280. if (obj ~= hole) and (obj.className == "Part") then
  281. if (obj.Anchored == false) then
  282. table.insert(childList, 1, obj)
  283. end
  284. elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  285. local child = obj:GetChildren()
  286. for x = 1, #child do
  287. checkObject(child[x])
  288. end
  289. obj.ChildAdded:connect(checkObject)
  290. end
  291. end
  292.  
  293. checkObject(workspace)
  294.  
  295. print("Black Hole script loaded.")
  296.  
  297. local n = 0
  298. while true do
  299. if n < #childList then
  300. n = n + 1
  301. if n % 800 == 0 then
  302. wait(0.5)
  303. end
  304. else
  305. n = 1
  306. wait(0.5)
  307. end
  308.  
  309. local child = childList[n]
  310. if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then
  311. local relPos = hole.Position - child.Position
  312. local motivator = child:FindFirstChild("BlackHole Influence")
  313. if relPos.magnitude * 350 * massConstant < mass then
  314.  
  315. local a = math.random(1,4)
  316. if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then
  317. child:BreakJoints()
  318.  
  319.  
  320. end
  321.  
  322. if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then
  323. mass = mass + child:GetMass()
  324. -- child:Remove()
  325. table.remove(childList, n)
  326. n = n - 1 -- This is the reason I need a counter of my own design
  327. else
  328. -- child.CanCollide = false -- I Can assume that things won't escape the black hole.
  329. if motivator == nil then
  330. motivator = Instance.new("BodyPosition")
  331. motivator.Parent = child
  332. --game:GetService("Debris"):AddItem(motivator,0.4)
  333. motivator.Name = "BlackHole Influence"
  334. end
  335. if child.Parent:findFirstChild("Humanoid") ~= nil then
  336. motivator.position = hole.Position
  337. motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  338. motivator:remove()
  339. local posfind = child.Parent:findFirstChild("Torso")
  340. if posfind ~= nil then
  341. local posfind2 = posfind:findFirstChild("gotopos")
  342. if posfind2== nil then
  343. aa= script.gotopos:Clone()
  344. aa.Disabled=false
  345. game:GetService("Debris"):AddItem(aa,10)
  346. aa.Value.Value=script.Parent.Position
  347. aa.Parent=child.Parent.Torso
  348. end
  349. end
  350. else
  351. motivator.position = hole.Position
  352. motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  353.  
  354. end
  355.  
  356. end
  357. elseif motivator ~= nil then
  358. motivator:Remove()
  359. end
  360. end
  361. end
  362. end))
  363. Script15.Name = "gotopos"
  364. Script15.Parent = Script14
  365. table.insert(cors,sandbox(Script15,function()
  366. print 'Hello world!'
  367. local b = script.Value.Value
  368. while true do
  369. wait(0.1)
  370.  
  371. local a = script.Parent.Position
  372.  
  373. local dir = (a - b).unit
  374. dir=dir*-1
  375. script.Parent.Velocity = dir*30
  376. end
  377. end))
  378. Script15.Disabled = true
  379. Vector3Value16.Parent = Script15
  380. Part17.Name = "Rings"
  381. Part17.Parent = Model0
  382. Part17.CFrame = CFrame.new(16.1907215, 0.847259998, 21.1910152, 0.613135338, -0.258820951, 0.746375561, 0.164292201, 0.965922713, 0.199992523, -0.77270776, 1.96877659e-06, 0.63476938)
  383. Part17.Orientation = Vector3.new(-11.54, 49.6199989, 9.64999962)
  384. Part17.Position = Vector3.new(16.1907215, 0.847259998, 21.1910152)
  385. Part17.Rotation = Vector3.new(-17.4899998, 48.2799988, 22.8899994)
  386. Part17.Color = Color3.new(0, 1, 1)
  387. Part17.Transparency = 1
  388. Part17.Size = Vector3.new(2, 1, 2)
  389. Part17.Anchored = true
  390. Part17.BottomSurface = Enum.SurfaceType.Smooth
  391. Part17.BrickColor = BrickColor.new("Toothpaste")
  392. Part17.CanCollide = false
  393. Part17.Material = Enum.Material.Neon
  394. Part17.TopSurface = Enum.SurfaceType.Smooth
  395. Part17.brickColor = BrickColor.new("Toothpaste")
  396. Script18.Parent = Part17
  397. table.insert(cors,sandbox(Script18,function()
  398. while wait(0.0001) do
  399. script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
  400. end
  401. end))
  402. ParticleEmitter19.Parent = Part17
  403. ParticleEmitter19.Color = ColorSequence.new(Color3.new(0.894118, 0.470588, 1),Color3.new(0.301961, 0.14902, 0.458824))
  404. ParticleEmitter19.LightEmission = 0.80000001192093
  405. ParticleEmitter19.Texture = "rbxassetid://254959503"
  406. ParticleEmitter19.EmissionDirection = Enum.NormalId.Right
  407. ParticleEmitter19.Lifetime = NumberRange.new(3, 3)
  408. ParticleEmitter19.Rate = 250
  409. ParticleEmitter20.Parent = Part17
  410. ParticleEmitter20.Color = ColorSequence.new(Color3.new(0.894118, 0.470588, 1),Color3.new(0.301961, 0.14902, 0.458824))
  411. ParticleEmitter20.LightEmission = 0.80000001192093
  412. ParticleEmitter20.Texture = "rbxassetid://254959503"
  413. ParticleEmitter20.EmissionDirection = Enum.NormalId.Back
  414. ParticleEmitter20.Lifetime = NumberRange.new(3, 3)
  415. ParticleEmitter20.Rate = 250
  416. ParticleEmitter21.Parent = Part17
  417. ParticleEmitter21.Color = ColorSequence.new(Color3.new(0.894118, 0.470588, 1),Color3.new(0.301961, 0.14902, 0.458824))
  418. ParticleEmitter21.LightEmission = 0.80000001192093
  419. ParticleEmitter21.Texture = "rbxassetid://254959503"
  420. ParticleEmitter21.EmissionDirection = Enum.NormalId.Front
  421. ParticleEmitter21.Lifetime = NumberRange.new(3, 3)
  422. ParticleEmitter21.Rate = 250
  423. ParticleEmitter22.Parent = Part17
  424. ParticleEmitter22.Color = ColorSequence.new(Color3.new(0.894118, 0.470588, 1),Color3.new(0.301961, 0.14902, 0.458824))
  425. ParticleEmitter22.LightEmission = 0.80000001192093
  426. ParticleEmitter22.Texture = "rbxassetid://254959503"
  427. ParticleEmitter22.EmissionDirection = Enum.NormalId.Left
  428. ParticleEmitter22.Lifetime = NumberRange.new(3, 3)
  429. ParticleEmitter22.Rate = 250
  430. Script23.Name = "attract"
  431. Script23.Parent = Part17
  432. table.insert(cors,sandbox(Script23,function()
  433. local hole = script.Parent
  434. local childList = {}
  435.  
  436. local massConstant = 5.8 -- Generally a good value
  437.  
  438. local mass = 40000 * massConstant
  439.  
  440. -- This is basically a function that finds all unanchored parts and adds them to childList.
  441. -- Note: This should only be run once for each object
  442. function checkObject(obj)
  443. if (obj ~= hole) and (obj.className == "Part") then
  444. if (obj.Anchored == false) then
  445. table.insert(childList, 1, obj)
  446. end
  447. elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  448. local child = obj:GetChildren()
  449. for x = 1, #child do
  450. checkObject(child[x])
  451. end
  452. obj.ChildAdded:connect(checkObject)
  453. end
  454. end
  455.  
  456. checkObject(workspace)
  457.  
  458. print("Black Hole script loaded.")
  459.  
  460. local n = 0
  461. while true do
  462. if n < #childList then
  463. n = n + 1
  464. if n % 800 == 0 then
  465. wait(0.5)
  466. end
  467. else
  468. n = 1
  469. wait(0.5)
  470. end
  471.  
  472. local child = childList[n]
  473. if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then
  474. local relPos = hole.Position - child.Position
  475. local motivator = child:FindFirstChild("BlackHole Influence")
  476. if relPos.magnitude * 350 * massConstant < mass then
  477.  
  478. local a = math.random(1,4)
  479. if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then
  480. child:BreakJoints()
  481.  
  482.  
  483. end
  484.  
  485. if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then
  486. mass = mass + child:GetMass()
  487. -- child:Remove()
  488. table.remove(childList, n)
  489. n = n - 1 -- This is the reason I need a counter of my own design
  490. else
  491. -- child.CanCollide = false -- I Can assume that things won't escape the black hole.
  492. if motivator == nil then
  493. motivator = Instance.new("BodyPosition")
  494. motivator.Parent = child
  495. --game:GetService("Debris"):AddItem(motivator,0.4)
  496. motivator.Name = "BlackHole Influence"
  497. end
  498. if child.Parent:findFirstChild("Humanoid") ~= nil then
  499. motivator.position = hole.Position
  500. motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  501. motivator:remove()
  502. local posfind = child.Parent:findFirstChild("Torso")
  503. if posfind ~= nil then
  504. local posfind2 = posfind:findFirstChild("gotopos")
  505. if posfind2== nil then
  506. aa= script.gotopos:Clone()
  507. aa.Disabled=false
  508. game:GetService("Debris"):AddItem(aa,10)
  509. aa.Value.Value=script.Parent.Position
  510. aa.Parent=child.Parent.Torso
  511. end
  512. end
  513. else
  514. motivator.position = hole.Position
  515. motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  516.  
  517. end
  518.  
  519. end
  520. elseif motivator ~= nil then
  521. motivator:Remove()
  522. end
  523. end
  524. end
  525. end))
  526. Script24.Name = "gotopos"
  527. Script24.Parent = Script23
  528. table.insert(cors,sandbox(Script24,function()
  529. print 'Hello world!'
  530. local b = script.Value.Value
  531. while true do
  532. wait(0.1)
  533.  
  534. local a = script.Parent.Position
  535.  
  536. local dir = (a - b).unit
  537. dir=dir*-1
  538. script.Parent.Velocity = dir*30
  539. end
  540. end))
  541. Script24.Disabled = true
  542. Vector3Value25.Parent = Script24
  543. Part26.Name = "Shine"
  544. Part26.Parent = Model0
  545. Part26.CFrame = CFrame.new(16.079874, 1.02206242, 21.1910267, 0.965925157, -0.258821905, -5.9178401e-06, 0.258821934, 0.965925097, -3.41922555e-06, 6.60116075e-06, 1.77104937e-06, 1)
  546. Part26.Orientation = Vector3.new(0, 0, 15)
  547. Part26.Position = Vector3.new(16.079874, 1.02206242, 21.1910267)
  548. Part26.Rotation = Vector3.new(0, 0, 15)
  549. Part26.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  550. Part26.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  551. Part26.Anchored = true
  552. Part26.BottomSurface = Enum.SurfaceType.Smooth
  553. Part26.BrickColor = BrickColor.new("Really black")
  554. Part26.CanCollide = false
  555. Part26.FrontParamA = 0
  556. Part26.FrontParamB = 0
  557. Part26.Material = Enum.Material.SmoothPlastic
  558. Part26.TopSurface = Enum.SurfaceType.Smooth
  559. Part26.brickColor = BrickColor.new("Really black")
  560. Part26.Shape = Enum.PartType.Ball
  561. ParticleEmitter27.Parent = Part26
  562. ParticleEmitter27.Speed = NumberRange.new(0, 0)
  563. ParticleEmitter27.Color = ColorSequence.new(Color3.new(0.615686, 0.32549, 0.690196),Color3.new(0.333333, 0, 0.498039))
  564. ParticleEmitter27.LightEmission = 0.69999998807907
  565. ParticleEmitter27.Texture = "rbxassetid://286708119"
  566. ParticleEmitter27.Size = NumberSequence.new(2.5,2.5)
  567. ParticleEmitter27.EmissionDirection = Enum.NormalId.Front
  568. ParticleEmitter27.Lifetime = NumberRange.new(0.10000000149012, 0.10000000149012)
  569. ParticleEmitter27.Rate = 1000
  570. Script28.Name = "attract"
  571. Script28.Parent = Part26
  572. table.insert(cors,sandbox(Script28,function()
  573. local hole = script.Parent
  574. local childList = {}
  575.  
  576. local massConstant = 5.8 -- Generally a good value
  577.  
  578. local mass = 40000 * massConstant
  579.  
  580. -- This is basically a function that finds all unanchored parts and adds them to childList.
  581. -- Note: This should only be run once for each object
  582. function checkObject(obj)
  583. if (obj ~= hole) and (obj.className == "Part") then
  584. if (obj.Anchored == false) then
  585. table.insert(childList, 1, obj)
  586. end
  587. elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  588. local child = obj:GetChildren()
  589. for x = 1, #child do
  590. checkObject(child[x])
  591. end
  592. obj.ChildAdded:connect(checkObject)
  593. end
  594. end
  595.  
  596. checkObject(workspace)
  597.  
  598. print("Black Hole script loaded.")
  599.  
  600. local n = 0
  601. while true do
  602. if n < #childList then
  603. n = n + 1
  604. if n % 800 == 0 then
  605. wait(0.5)
  606. end
  607. else
  608. n = 1
  609. wait(0.5)
  610. end
  611.  
  612. local child = childList[n]
  613. if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then
  614. local relPos = hole.Position - child.Position
  615. local motivator = child:FindFirstChild("BlackHole Influence")
  616. if relPos.magnitude * 350 * massConstant < mass then
  617.  
  618. local a = math.random(1,4)
  619. if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then
  620. child:BreakJoints()
  621.  
  622.  
  623. end
  624.  
  625. if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then
  626. mass = mass + child:GetMass()
  627. -- child:Remove()
  628. table.remove(childList, n)
  629. n = n - 1 -- This is the reason I need a counter of my own design
  630. else
  631. -- child.CanCollide = false -- I Can assume that things won't escape the black hole.
  632. if motivator == nil then
  633. motivator = Instance.new("BodyPosition")
  634. motivator.Parent = child
  635. --game:GetService("Debris"):AddItem(motivator,0.4)
  636. motivator.Name = "BlackHole Influence"
  637. end
  638. if child.Parent:findFirstChild("Humanoid") ~= nil then
  639. motivator.position = hole.Position
  640. motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  641. motivator:remove()
  642. local posfind = child.Parent:findFirstChild("Torso")
  643. if posfind ~= nil then
  644. local posfind2 = posfind:findFirstChild("gotopos")
  645. if posfind2== nil then
  646. aa= script.gotopos:Clone()
  647. aa.Disabled=false
  648. game:GetService("Debris"):AddItem(aa,10)
  649. aa.Value.Value=script.Parent.Position
  650. aa.Parent=child.Parent.Torso
  651. end
  652. end
  653. else
  654. motivator.position = hole.Position
  655. motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  656.  
  657. end
  658.  
  659. end
  660. elseif motivator ~= nil then
  661. motivator:Remove()
  662. end
  663. end
  664. end
  665. end))
  666. Script29.Name = "gotopos"
  667. Script29.Parent = Script28
  668. table.insert(cors,sandbox(Script29,function()
  669. print 'Hello world!'
  670. local b = script.Value.Value
  671. while true do
  672. wait(0.1)
  673.  
  674. local a = script.Parent.Position
  675.  
  676. local dir = (a - b).unit
  677. dir=dir*-1
  678. script.Parent.Velocity = dir*30
  679. end
  680. end))
  681. Script29.Disabled = true
  682. Vector3Value30.Parent = Script29
  683. Part31.Name = "Singularity"
  684. Part31.Parent = Model0
  685. Part31.CFrame = CFrame.new(16.0798931, 0.954685628, 21.1910172, 0.965925157, -0.258821905, -5.9178401e-06, 0.258821934, 0.965925097, -3.41922555e-06, 6.60116075e-06, 1.77104937e-06, 1)
  686. Part31.Orientation = Vector3.new(0, 0, 15)
  687. Part31.Position = Vector3.new(16.0798931, 0.954685628, 21.1910172)
  688. Part31.Rotation = Vector3.new(0, 0, 15)
  689. Part31.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  690. Part31.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  691. Part31.Anchored = true
  692. Part31.BottomSurface = Enum.SurfaceType.Smooth
  693. Part31.BrickColor = BrickColor.new("Really black")
  694. Part31.CanCollide = false
  695. Part31.FrontParamA = 0
  696. Part31.FrontParamB = 0
  697. Part31.Material = Enum.Material.SmoothPlastic
  698. Part31.TopSurface = Enum.SurfaceType.Smooth
  699. Part31.brickColor = BrickColor.new("Really black")
  700. Part31.Shape = Enum.PartType.Ball
  701. ParticleEmitter32.Parent = Part31
  702. ParticleEmitter32.Speed = NumberRange.new(0, 0)
  703. ParticleEmitter32.Color = ColorSequence.new(Color3.new(0, 0, 0),Color3.new(0, 0, 0))
  704. ParticleEmitter32.Texture = "rbxassetid://286708119"
  705. ParticleEmitter32.ZOffset = 1
  706. ParticleEmitter32.Size = NumberSequence.new(2.2000000476837,2.2000000476837)
  707. ParticleEmitter32.EmissionDirection = Enum.NormalId.Front
  708. ParticleEmitter32.Lifetime = NumberRange.new(0.10000000149012, 0.10000000149012)
  709. ParticleEmitter32.Rate = 1000
  710. Script33.Name = "attract"
  711. Script33.Parent = Part31
  712. table.insert(cors,sandbox(Script33,function()
  713. local hole = script.Parent
  714. local childList = {}
  715.  
  716. local massConstant = 5.8 -- Generally a good value
  717.  
  718. local mass = 40000 * massConstant
  719.  
  720. -- This is basically a function that finds all unanchored parts and adds them to childList.
  721. -- Note: This should only be run once for each object
  722. function checkObject(obj)
  723. if (obj ~= hole) and (obj.className == "Part") then
  724. if (obj.Anchored == false) then
  725. table.insert(childList, 1, obj)
  726. end
  727. elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
  728. local child = obj:GetChildren()
  729. for x = 1, #child do
  730. checkObject(child[x])
  731. end
  732. obj.ChildAdded:connect(checkObject)
  733. end
  734. end
  735.  
  736. checkObject(workspace)
  737.  
  738. print("Black Hole script loaded.")
  739.  
  740. local n = 0
  741. while true do
  742. if n < #childList then
  743. n = n + 1
  744. if n % 800 == 0 then
  745. wait(0.5)
  746. end
  747. else
  748. n = 1
  749. wait(0.5)
  750. end
  751.  
  752. local child = childList[n]
  753. if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then
  754. local relPos = hole.Position - child.Position
  755. local motivator = child:FindFirstChild("BlackHole Influence")
  756. if relPos.magnitude * 350 * massConstant < mass then
  757.  
  758. local a = math.random(1,4)
  759. if a == 1 and child.Parent:findFirstChild("Humanoid") == nil then
  760. child:BreakJoints()
  761.  
  762.  
  763. end
  764.  
  765. if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then
  766. mass = mass + child:GetMass()
  767. -- child:Remove()
  768. table.remove(childList, n)
  769. n = n - 1 -- This is the reason I need a counter of my own design
  770. else
  771. -- child.CanCollide = false -- I Can assume that things won't escape the black hole.
  772. if motivator == nil then
  773. motivator = Instance.new("BodyPosition")
  774. motivator.Parent = child
  775. --game:GetService("Debris"):AddItem(motivator,0.4)
  776. motivator.Name = "BlackHole Influence"
  777. end
  778. if child.Parent:findFirstChild("Humanoid") ~= nil then
  779. motivator.position = hole.Position
  780. motivator.maxForce = Vector3.new(1000, 1000, 1000) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  781. motivator:remove()
  782. local posfind = child.Parent:findFirstChild("Torso")
  783. if posfind ~= nil then
  784. local posfind2 = posfind:findFirstChild("gotopos")
  785. if posfind2== nil then
  786. aa= script.gotopos:Clone()
  787. aa.Disabled=false
  788. game:GetService("Debris"):AddItem(aa,10)
  789. aa.Value.Value=script.Parent.Position
  790. aa.Parent=child.Parent.Torso
  791. end
  792. end
  793. else
  794. motivator.position = hole.Position
  795. motivator.maxForce = Vector3.new(1500, 1500, 1500) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  796.  
  797. end
  798.  
  799. end
  800. elseif motivator ~= nil then
  801. motivator:Remove()
  802. end
  803. end
  804. end
  805. end))
  806. Script34.Name = "gotopos"
  807. Script34.Parent = Script33
  808. table.insert(cors,sandbox(Script34,function()
  809. print 'Hello world!'
  810. local b = script.Value.Value
  811. while true do
  812. wait(0.1)
  813.  
  814. local a = script.Parent.Position
  815.  
  816. local dir = (a - b).unit
  817. dir=dir*-1
  818. script.Parent.Velocity = dir*30
  819. end
  820. end))
  821. Script34.Disabled = true
  822. Vector3Value35.Parent = Script34
  823. Script36.Parent = Part31
  824. table.insert(cors,sandbox(Script36,function()
  825. local hole = script.Parent
  826. local childList = {}
  827.  
  828. local massConstant = 8 -- Generally a good value
  829.  
  830. local mass = 32000 * massConstant
  831.  
  832. -- This is basically a function that finds all unanchored parts and adds them to childList.
  833. -- Note: This should only be run once for each object
  834. function checkObject(obj)
  835. if obj ~= hole and obj:isA("BasePart") then
  836. if not obj.Anchored then
  837. childList[obj] = true
  838. end
  839. elseif obj:isA("Model") or obj:isA("Accoutrement") or obj:isA("Tool") then
  840. for _, child in ipairs(obj:GetChildren()) do
  841. checkObject(child)
  842. end
  843. obj.ChildAdded:connect(checkObject)
  844. end
  845. end
  846.  
  847. checkObject(workspace)
  848.  
  849. print("Black Hole script loaded.")
  850.  
  851. while true do
  852. for child in pairs(childList) do
  853. local distance = (hole.Position - child.Position).magnitude
  854. local motivator = child:FindFirstChild("BlackHole Influence")
  855.  
  856. if distance * 240 * massConstant < mass then
  857. child:BreakJoints()
  858. if distance * 320 * massConstant < mass and child.Size.z + hole.Size.x > distance * 2 - 4 then
  859. mass = mass + child:GetMass()
  860. childList[child] = nil
  861. child:Remove()
  862. else
  863. child.CanCollide = false -- I Can assume that things won't escape the black hole.
  864. if not motivator then
  865. motivator = Instance.new("BodyPosition")
  866. motivator.Parent = child
  867. motivator.Name = "BlackHole Influence"
  868. end
  869. motivator.position = hole.Position
  870. motivator.maxForce = Vector3.new(1, 1, 1) * mass * child:GetMass() / (distance * massConstant)
  871. end
  872. elseif motivator ~= nil then
  873. motivator:Remove()
  874. end
  875. end
  876. wait()
  877. end
  878.  
  879. end))
  880. for i,v in pairs(mas:GetChildren()) do
  881. v.Parent = workspace
  882. pcall(function() v:MakeJoints() end)
  883. end
  884. mas:Destroy()
  885. for i,v in pairs(cors) do
  886. spawn(function()
  887. pcall(v)
  888. end)
  889. end
Advertisement
Add Comment
Please, Sign In to add comment