MaxproGlitcher

blackHole its not me create that

Sep 22nd, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.05 KB | None | 0 0
  1. local UserInputService = game:GetService("UserInputService")
  2. local Players = game:GetService("Players")
  3. local RunService = game:GetService("RunService")
  4. local Workspace = game:GetService("Workspace")
  5. local StarterGui = game:GetService("StarterGui")
  6. local TweenService = game:GetService("TweenService")
  7.  
  8. local LocalPlayer = Players.LocalPlayer
  9. local Mouse = LocalPlayer:GetMouse()
  10.  
  11. local blackHole = nil
  12. local Attachment1 = Instance.new("Attachment")
  13.  
  14. local MAX_SIMULATION_RADIUS = 90000
  15. local BLACK_HOLE_SIZE = Vector3.new(5, 5, 5)
  16. local BLACK_HOLE_COLOR = Color3.fromRGB(0, 0, 0)
  17. local BLACK_HOLE_GLOW_RANGE = 20
  18. local BLACK_HOLE_GLOW_BRIGHTNESS = 10
  19. local BLACK_HOLE_GLOW_COLOR = Color3.fromRGB(0, 0, 255)
  20. local TORQUE_VECTOR = Vector3.new(100000, 100000, 100000)
  21. local ALIGN_POSITION_RESPONSIVENESS = 200
  22.  
  23. local connections = {}
  24.  
  25. local function setupNetworkAccess()
  26. settings().Physics.AllowSleep = false
  27.  
  28. table.insert(connections, RunService.Heartbeat:Connect(function()
  29. for _, player in ipairs(Players:GetPlayers()) do
  30. if player ~= LocalPlayer then
  31. player.MaximumSimulationRadius = 0
  32. pcall(function() sethiddenproperty(player, "SimulationRadius", 0) end)
  33. end
  34. end
  35.  
  36. LocalPlayer.MaximumSimulationRadius = MAX_SIMULATION_RADIUS
  37. pcall(function() setsimulationradius(MAX_SIMULATION_RADIUS) end)
  38. end))
  39. end
  40.  
  41. local function applyForceToPart(part)
  42. if part:IsA("BasePart") and not part.Anchored and not part.Parent:FindFirstChildOfClass("Humanoid") and part.Name ~= "Handle" and part.Parent ~= LocalPlayer.Character then
  43. for _, child in ipairs(part:GetChildren()) do
  44. if child:IsA("BodyMover") or child:IsA("RocketPropulsion") then
  45. child:Destroy()
  46. end
  47. end
  48.  
  49. local attachment = part:FindFirstChild("Attachment")
  50. if attachment then attachment:Destroy() end
  51.  
  52. local alignPosition = part:FindFirstChild("AlignPosition")
  53. if alignPosition then alignPosition:Destroy() end
  54.  
  55. local torque = part:FindFirstChild("Torque")
  56. if torque then torque:Destroy() end
  57.  
  58. part.CanCollide = false
  59.  
  60. local Attachment2 = Instance.new("Attachment", part)
  61. local Torque = Instance.new("Torque", part)
  62. Torque.Torque = TORQUE_VECTOR
  63. Torque.Attachment0 = Attachment2
  64.  
  65. local AlignPosition = Instance.new("AlignPosition", part)
  66. AlignPosition.MaxForce = math.huge
  67. AlignPosition.MaxVelocity = math.huge
  68. AlignPosition.Responsiveness = ALIGN_POSITION_RESPONSIVENESS
  69. AlignPosition.Attachment0 = Attachment2
  70. AlignPosition.Attachment1 = Attachment1
  71. end
  72. end
  73.  
  74. local function createOrMoveBlackHole(position)
  75. if blackHole then
  76. local tween = TweenService:Create(blackHole, TweenInfo.new(0.1), {Position = position})
  77. tween:Play()
  78. return
  79. end
  80.  
  81. local Folder = Instance.new("Folder", Workspace)
  82.  
  83. blackHole = Instance.new("Part", Folder)
  84. blackHole.Size = BLACK_HOLE_SIZE
  85. blackHole.Shape = Enum.PartType.Ball
  86. blackHole.Color = BLACK_HOLE_COLOR
  87. blackHole.Anchored = true
  88. blackHole.CanCollide = false
  89. blackHole.Material = Enum.Material.ForceField
  90. blackHole.Position = position
  91.  
  92. local Glow = Instance.new("PointLight", blackHole)
  93. Glow.Color = BLACK_HOLE_GLOW_COLOR
  94. Glow.Range = BLACK_HOLE_GLOW_RANGE
  95. Glow.Brightness = BLACK_HOLE_GLOW_BRIGHTNESS
  96.  
  97. local particleEmitter = Instance.new("ParticleEmitter", blackHole)
  98. particleEmitter.Texture = "rbxassetid://243098098"
  99. particleEmitter.Color = ColorSequence.new(Color3.fromRGB(0, 0, 0), Color3.fromRGB(0, 0, 255))
  100. particleEmitter.LightEmission = 1
  101. particleEmitter.Size = NumberSequence.new(1, 3)
  102. particleEmitter.Rate = 200
  103. particleEmitter.Lifetime = NumberRange.new(2)
  104. particleEmitter.Speed = NumberRange.new(5, 10)
  105. particleEmitter.Rotation = NumberRange.new(0, 360)
  106. particleEmitter.RotSpeed = NumberRange.new(-100, 100)
  107. particleEmitter.VelocitySpread = 180
  108. particleEmitter.Acceleration = Vector3.new(0, -1, 0)
  109. particleEmitter.EmissionDirection = Enum.NormalId.Front
  110. particleEmitter.ZOffset = 2
  111.  
  112. local swirlingParticles = Instance.new("ParticleEmitter", blackHole)
  113. swirlingParticles.Texture = "rbxassetid://242617766"
  114. swirlingParticles.Color = ColorSequence.new(Color3.fromRGB(0, 0, 255), Color3.fromRGB(0, 0, 0))
  115. swirlingParticles.LightEmission = 0.75
  116. swirlingParticles.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.5), NumberSequenceKeypoint.new(1, 2)})
  117. swirlingParticles.Rate = 100
  118. swirlingParticles.Lifetime = NumberRange.new(2)
  119. swirlingParticles.Speed = NumberRange.new(0, 0)
  120. swirlingParticles.Rotation = NumberRange.new(0, 360)
  121. swirlingParticles.RotSpeed = NumberRange.new(-20, 20)
  122. swirlingParticles.VelocitySpread = 0
  123. swirlingParticles.EmissionDirection = Enum.NormalId.Front
  124. swirlingParticles.ZOffset = 2
  125.  
  126. local sizeTweenInfo = TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true)
  127. local sizeTween = TweenService:Create(blackHole, sizeTweenInfo, {Size = BLACK_HOLE_SIZE * 1.5})
  128. sizeTween:Play()
  129.  
  130. local sound = Instance.new("Sound", blackHole)
  131. sound.SoundId = "rbxassetid://5057664921"
  132. sound.Volume = 4
  133. sound.Looped = true
  134. sound:Play()
  135.  
  136. local BillboardGui = Instance.new("BillboardGui", blackHole)
  137. BillboardGui.Size = UDim2.new(0, 75, 0, 75)
  138. BillboardGui.AlwaysOnTop = true
  139. BillboardGui.StudsOffset = Vector3.new(0, 4, 0)
  140.  
  141. local TextLabel = Instance.new("TextLabel", BillboardGui)
  142. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  143. TextLabel.Text = "!"
  144. TextLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
  145. TextLabel.BackgroundTransparency = 1
  146. TextLabel.TextScaled = true
  147.  
  148. Attachment1.Parent = blackHole
  149. Attachment1.Position = Vector3.new(0, 0, 0)
  150.  
  151. for _, v in ipairs(Workspace:GetDescendants()) do
  152. applyForceToPart(v)
  153. end
  154.  
  155. table.insert(connections, Workspace.DescendantAdded:Connect(function(v)
  156. applyForceToPart(v)
  157. end))
  158. end
  159.  
  160. local function cleanup()
  161. if blackHole then
  162. blackHole:Destroy()
  163. blackHole = nil
  164. end
  165. for _, connection in ipairs(connections) do
  166. connection:Disconnect()
  167. end
  168. connections = {}
  169. StarterGui:SetCore("SendNotification", {
  170. Title = "Attractor",
  171. Text = "The Attractor was removed. Execute again to create.",
  172. Duration = 2
  173. })
  174. end
  175.  
  176. local function onInputBegan(input, gameProcessedEvent)
  177. if input.KeyCode == Enum.KeyCode.E and not gameProcessedEvent then
  178. local position = Mouse.Hit.p
  179. createOrMoveBlackHole(position)
  180.  
  181. StarterGui:SetCore("SendNotification", {
  182. Title = "Attractor",
  183. Text = "Attractor was created or moved.",
  184. Duration = 2
  185. })
  186. elseif input.KeyCode == Enum.KeyCode.Q and not gameProcessedEvent then
  187. cleanup()
  188. end
  189. end
  190.  
  191. local function initializeScript()
  192. table.insert(connections, UserInputService.InputBegan:Connect(onInputBegan))
  193. setupNetworkAccess()
  194.  
  195. StarterGui:SetCore("SendNotification", {
  196. Title = "Script Executed",
  197. Text = "Press 'E' to create/move the Attractor. Press 'Q' to remove it.",
  198. Duration = 5
  199. })
  200. end
  201.  
  202. local function createShittyUI()
  203. local ScreenGui = Instance.new("ScreenGui", LocalPlayer.PlayerGui)
  204. ScreenGui.Name = "BlackHoleUI"
  205. ScreenGui.ResetOnSpawn = false
  206.  
  207. local Frame = Instance.new("Frame", ScreenGui)
  208. Frame.Size = UDim2.new(0, 400, 0, 300)
  209. Frame.Position = UDim2.new(0.5, -200, 0.5, -150)
  210. Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  211. Frame.BorderSizePixel = 0
  212.  
  213. local UICorner = Instance.new("UICorner", Frame)
  214. UICorner.CornerRadius = UDim.new(0, 10)
  215.  
  216. local TitleBar = Instance.new("Frame", Frame)
  217. TitleBar.Size = UDim2.new(1, 0, 0, 30)
  218. TitleBar.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  219. TitleBar.BorderSizePixel = 0
  220.  
  221. local TitleLabel = Instance.new("TextLabel", TitleBar)
  222. TitleLabel.Size = UDim2.new(1, -30, 1, 0)
  223. TitleLabel.Position = UDim2.new(0, 10, 0, 0)
  224. TitleLabel.Text = "NOTE"
  225. TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  226. TitleLabel.BackgroundTransparency = 1
  227. TitleLabel.TextScaled = true
  228. TitleLabel.Font = Enum.Font.GothamBold
  229.  
  230. local CloseButton = Instance.new("TextButton", TitleBar)
  231. CloseButton.Size = UDim2.new(0, 30, 0, 30)
  232. CloseButton.Position = UDim2.new(1, -30, 0, 0)
  233. CloseButton.Text = "X"
  234. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  235. CloseButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  236. CloseButton.BorderSizePixel = 0
  237. CloseButton.TextScaled = true
  238. CloseButton.Font = Enum.Font.GothamBold
  239.  
  240. local UpdateBox = Instance.new("TextLabel", Frame)
  241. UpdateBox.Size = UDim2.new(1, -20, 1, -50)
  242. UpdateBox.Position = UDim2.new(0, 10, 0, 40)
  243. UpdateBox.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  244. UpdateBox.BorderSizePixel = 0
  245. UpdateBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  246. UpdateBox.Text = "want this shit updated? give me funds! :)"
  247. UpdateBox.TextScaled = true
  248. UpdateBox.Font = Enum.Font.Gotham
  249. UpdateBox.TextWrapped = true
  250. UpdateBox.ClipsDescendants = true
  251.  
  252. local UICorner2 = Instance.new("UICorner", UpdateBox)
  253. UICorner2.CornerRadius = UDim.new(0, 10)
  254.  
  255. local function makeFrameDraggable(frame, handle)
  256. local dragging
  257. local dragInput
  258. local dragStart
  259. local startPos
  260.  
  261. local function update(input)
  262. local delta = input.Position - dragStart
  263. frame:TweenPosition(UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true)
  264. end
  265.  
  266. handle.InputBegan:Connect(function(input)
  267. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  268. dragging = true
  269. dragStart = input.Position
  270. startPos = frame.Position
  271.  
  272. input.Changed:Connect(function()
  273. if input.UserInputState == Enum.UserInputState.End then
  274. dragging = false
  275. end
  276. end)
  277. end
  278. end)
  279.  
  280. handle.InputChanged:Connect(function(input)
  281. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  282. dragInput = input
  283. end
  284. end)
  285.  
  286. UserInputService.InputChanged:Connect(function(input)
  287. if input == dragInput and dragging then
  288. update(input)
  289. end
  290. end)
  291. end
  292.  
  293. makeFrameDraggable(Frame, TitleBar)
  294.  
  295. CloseButton.MouseButton1Click:Connect(function()
  296. ScreenGui:Destroy()
  297. end)
  298. end
  299.  
  300. createShittyUI()
  301. initializeScript()
Add Comment
Please, Sign In to add comment