Advertisement
Cra-Z-Gaming

Natural Disaster Parts Orbit

Mar 8th, 2025
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.54 KB | None | 0 0
  1. --Natural Disaster Survival unanchored parts orbit player--
  2.  
  3. --not mine--
  4.  
  5. local Players = gameGetService(Players)
  6. local RunService = gameGetService(RunService)
  7. local UserInputService = gameGetService(UserInputService)
  8. local LocalPlayer = Players.LocalPlayer
  9. local Workspace = gameGetService(Workspace)
  10.  
  11. local character = LocalPlayer.Character or LocalPlayer.CharacterAddedWait()
  12. local humanoidRootPart = characterWaitForChild(HumanoidRootPart)
  13.  
  14. local Folder = Instance.new(Folder, Workspace)
  15. local Part = Instance.new(Part, Folder)
  16. local Attachment1 = Instance.new(Attachment, Part)
  17. Part.Anchored = true
  18. Part.CanCollide = false
  19. Part.Transparency = 1
  20.  
  21. if not getgenv().Network then
  22. getgenv().Network = {
  23. BaseParts = {},
  24. Velocity = Vector3.new(14.46262424, 14.46262424, 14.46262424)
  25. }
  26.  
  27. Network.RetainPart = function(Part)
  28. if typeof(Part) == Instance and PartIsA(BasePart) and PartIsDescendantOf(Workspace) then
  29. table.insert(Network.BaseParts, Part)
  30. Part.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  31. Part.CanCollide = false
  32. end
  33. end
  34.  
  35. local function EnablePartControl()
  36. LocalPlayer.ReplicationFocus = Workspace
  37. RunService.HeartbeatConnect(function()
  38. sethiddenproperty(LocalPlayer, SimulationRadius, math.huge)
  39. for _, Part in pairs(Network.BaseParts) do
  40. if PartIsDescendantOf(Workspace) then
  41. Part.Velocity = Network.Velocity
  42. end
  43. end
  44. end)
  45. end
  46.  
  47. EnablePartControl()
  48. end
  49.  
  50. local function ForcePart(v)
  51. if vIsA(Part) and not v.Anchored and not v.ParentFindFirstChild(Humanoid) and not v.ParentFindFirstChild(Head) and v.Name ~= Handle then
  52. for _, x in next, vGetChildren() do
  53. if xIsA(BodyAngularVelocity) or xIsA(BodyForce) or xIsA(BodyGyro) or xIsA(BodyPosition) or xIsA(BodyThrust) or xIsA(BodyVelocity) or xIsA(RocketPropulsion) then
  54. xDestroy()
  55. end
  56. end
  57. if vFindFirstChild(Attachment) then
  58. vFindFirstChild(Attachment)Destroy()
  59. end
  60. if vFindFirstChild(AlignPosition) then
  61. vFindFirstChild(AlignPosition)Destroy()
  62. end
  63. if vFindFirstChild(Torque) then
  64. vFindFirstChild(Torque)Destroy()
  65. end
  66. v.CanCollide = false
  67. local Torque = Instance.new(Torque, v)
  68. Torque.Torque = Vector3.new(100000, 100000, 100000)
  69. local AlignPosition = Instance.new(AlignPosition, v)
  70. local Attachment2 = Instance.new(Attachment, v)
  71. Torque.Attachment0 = Attachment2
  72. AlignPosition.MaxForce = 9999999999999999
  73. AlignPosition.MaxVelocity = math.huge
  74. AlignPosition.Responsiveness = 200
  75. AlignPosition.Attachment0 = Attachment2
  76. AlignPosition.Attachment1 = Attachment1
  77. end
  78. end
  79.  
  80.  
  81.  
  82. local Players = gameGetService(Players)
  83. local RunService = gameGetService(RunService)
  84. local UserInputService = gameGetService(UserInputService)
  85. local SoundService = gameGetService(SoundService)
  86. local StarterGui = gameGetService(StarterGui)
  87. local TextChatService = gameGetService(TextChatService)
  88.  
  89. local LocalPlayer = Players.LocalPlayer
  90.  
  91. -- Sound Effects
  92. local function playSound(soundId)
  93. local sound = Instance.new(Sound)
  94. sound.SoundId = rbxassetid .. soundId
  95. sound.Parent = SoundService
  96. soundPlay()
  97. sound.EndedConnect(function()
  98. soundDestroy()
  99. end)
  100. end
  101.  
  102. -- Play initial sound
  103. playSound(2865227271)
  104.  
  105. -- GUI Creation
  106. local ScreenGui = Instance.new(ScreenGui)
  107. ScreenGui.Name = SuperRingPartsGUI
  108. ScreenGui.ResetOnSpawn = false
  109. ScreenGui.Parent = LocalPlayerWaitForChild(PlayerGui)
  110.  
  111. local MainFrame = Instance.new(Frame)
  112. MainFrame.Size = UDim2.new(0, 220, 0, 190)
  113. MainFrame.Position = UDim2.new(0.5, -110, 0.5, -95)
  114. MainFrame.BackgroundColor3 = Color3.fromRGB(204, 0, 0) -- Light brown
  115. MainFrame.BorderSizePixel = 0
  116. MainFrame.Parent = ScreenGui
  117.  
  118. -- Make the GUI round
  119. local UICorner = Instance.new(UICorner)
  120. UICorner.CornerRadius = UDim.new(0, 20)
  121. UICorner.Parent = MainFrame
  122.  
  123. local Title = Instance.new(TextLabel)
  124. Title.Size = UDim2.new(1, 0, 0, 40)
  125. Title.Position = UDim2.new(0, 0, 0, 0)
  126. Title.Text = Super Ring Parts v4
  127. Title.TextColor3 = Color3.fromRGB(153, 0, 0) -- Dark brown
  128. Title.BackgroundColor3 = Color3.fromRGB(255, 51, 51) -- Lighter brown
  129. Title.Font = Enum.Font.Fondamento -- More elegant font
  130. Title.TextSize = 22
  131. Title.Parent = MainFrame
  132.  
  133. -- Round the title
  134. local TitleCorner = Instance.new(UICorner)
  135. TitleCorner.CornerRadius = UDim.new(0, 20)
  136. TitleCorner.Parent = Title
  137.  
  138. local ToggleButton = Instance.new(TextButton)
  139. ToggleButton.Size = UDim2.new(0.8, 0, 0, 35)
  140. ToggleButton.Position = UDim2.new(0.1, 0, 0.3, 0)
  141. ToggleButton.Text = Ring Parts Off
  142. ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 0, 255) -- Sienna
  143. ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Cornsilk
  144. ToggleButton.Font = Enum.Font.Fondamento
  145. ToggleButton.TextSize = 18
  146. ToggleButton.Parent = MainFrame
  147.  
  148. -- Round the toggle button
  149. local ToggleCorner = Instance.new(UICorner)
  150. ToggleCorner.CornerRadius = UDim.new(0, 10)
  151. ToggleCorner.Parent = ToggleButton
  152.  
  153. local DecreaseRadius = Instance.new(TextButton)
  154. DecreaseRadius.Size = UDim2.new(0.2, 0, 0, 35)
  155. DecreaseRadius.Position = UDim2.new(0.1, 0, 0.6, 0)
  156. DecreaseRadius.Text =
  157. DecreaseRadius.BackgroundColor3 = Color3.fromRGB(255, 153, 153) -- Saddle brown
  158. DecreaseRadius.TextColor3 = Color3.fromRGB(255, 255, 255) -- Cornsilk
  159. DecreaseRadius.Font = Enum.Font.Fondamento
  160. DecreaseRadius.TextSize = 18
  161. DecreaseRadius.Parent = MainFrame
  162.  
  163. -- Round the decrease button
  164. local DecreaseCorner = Instance.new(UICorner)
  165. DecreaseCorner.CornerRadius = UDim.new(0, 10)
  166. DecreaseCorner.Parent = DecreaseRadius
  167.  
  168. local IncreaseRadius = Instance.new(TextButton)
  169. IncreaseRadius.Size = UDim2.new(0.2, 0, 0, 35)
  170. IncreaseRadius.Position = UDim2.new(0.7, 0, 0.6, 0)
  171. IncreaseRadius.Text =
  172. IncreaseRadius.BackgroundColor3 = Color3.fromRGB(255, 153, 153) -- Saddle brown
  173. IncreaseRadius.TextColor3 = Color3.fromRGB(255, 255, 255) -- Cornsilk
  174. IncreaseRadius.Font = Enum.Font.Fondamento
  175. IncreaseRadius.TextSize = 18
  176. IncreaseRadius.Parent = MainFrame
  177.  
  178. -- Round the increase button
  179. local IncreaseCorner = Instance.new(UICorner)
  180. IncreaseCorner.CornerRadius = UDim.new(0, 10)
  181. IncreaseCorner.Parent = IncreaseRadius
  182.  
  183. local RadiusDisplay = Instance.new(TextLabel)
  184. RadiusDisplay.Size = UDim2.new(0.4, 0, 0, 35)
  185. RadiusDisplay.Position = UDim2.new(0.3, 0, 0.6, 0)
  186. RadiusDisplay.Text = Radius 50
  187. RadiusDisplay.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Tan
  188. RadiusDisplay.TextColor3 = Color3.fromRGB(255, 255, 255) -- Dark brown
  189. RadiusDisplay.Font = Enum.Font.Fondamento
  190. RadiusDisplay.TextSize = 18
  191. RadiusDisplay.Parent = MainFrame
  192.  
  193. -- Round the radius display
  194. local RadiusCorner = Instance.new(UICorner)
  195. RadiusCorner.CornerRadius = UDim.new(0, 10)
  196. RadiusCorner.Parent = RadiusDisplay
  197.  
  198. local Watermark = Instance.new(TextLabel)
  199. Watermark.Size = UDim2.new(1, 0, 0, 20)
  200. Watermark.Position = UDim2.new(0, 0, 1, -20)
  201. Watermark.Text = Super Ring [V4] by lukas
  202. Watermark.TextColor3 = Color3.fromRGB(255, 255, 255) -- Dark brown
  203. Watermark.BackgroundTransparency = 1
  204. Watermark.Font = Enum.Font.Fondamento
  205. Watermark.TextSize = 14
  206. Watermark.Parent = MainFrame
  207.  
  208. -- Add minimize button
  209. local MinimizeButton = Instance.new(TextButton)
  210. MinimizeButton.Size = UDim2.new(0, 30, 0, 30)
  211. MinimizeButton.Position = UDim2.new(1, -35, 0, 5)
  212. MinimizeButton.Text = -
  213. MinimizeButton.BackgroundColor3 = Color3.fromRGB(0, 0, 255) -- Saddle brown
  214. MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Cornsilk
  215. MinimizeButton.Font = Enum.Font.Fondamento
  216. MinimizeButton.TextSize = 18
  217. MinimizeButton.Parent = MainFrame
  218.  
  219. -- Round the minimize button
  220. local MinimizeCorner = Instance.new(UICorner)
  221. MinimizeCorner.CornerRadius = UDim.new(0, 15)
  222. MinimizeCorner.Parent = MinimizeButton
  223.  
  224. -- Minimize functionality
  225. local minimized = false
  226. MinimizeButton.MouseButton1ClickConnect(function()
  227. minimized = not minimized
  228. if minimized then
  229. MainFrameTweenSize(UDim2.new(0, 220, 0, 40), Out, Quad, 0.3, true)
  230. MinimizeButton.Text = +
  231. ToggleButton.Visible = false
  232. DecreaseRadius.Visible = false
  233. IncreaseRadius.Visible = false
  234. RadiusDisplay.Visible = false
  235. Watermark.Visible = false
  236. else
  237. MainFrameTweenSize(UDim2.new(0, 220, 0, 190), Out, Quad, 0.3, true)
  238. MinimizeButton.Text = -
  239. ToggleButton.Visible = true
  240. DecreaseRadius.Visible = true
  241. IncreaseRadius.Visible = true
  242. RadiusDisplay.Visible = true
  243. Watermark.Visible = true
  244. end
  245. playSound(12221967)
  246. end)
  247.  
  248. -- Make GUI draggable
  249. local dragging
  250. local dragInput
  251. local dragStart
  252. local startPos
  253.  
  254. local function update(input)
  255. local delta = input.Position - dragStart
  256. MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  257. end
  258.  
  259. MainFrame.InputBeganConnect(function(input)
  260. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  261. dragging = true
  262. dragStart = input.Position
  263. startPos = MainFrame.Position
  264.  
  265. input.ChangedConnect(function()
  266. if input.UserInputState == Enum.UserInputState.End then
  267. dragging = false
  268. end
  269. end)
  270. end
  271. end)
  272.  
  273. MainFrame.InputChangedConnect(function(input)
  274. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  275. dragInput = input
  276. end
  277. end)
  278.  
  279. UserInputService.InputChangedConnect(function(input)
  280. if input == dragInput and dragging then
  281. update(input)
  282. end
  283. end)
  284.  
  285. -- Ring Parts Logic
  286. if not getgenv().Network then
  287. getgenv().Network = {
  288. BaseParts = {},
  289. Velocity = Vector3.new(14.46262424, 14.46262424, 14.46262424)
  290. }
  291. Network.RetainPart = function(Part)
  292. if typeof(Part) == Instance and PartIsA(BasePart) and PartIsDescendantOf(workspace) then
  293. table.insert(Network.BaseParts, Part)
  294. Part.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  295. Part.CanCollide = false
  296. end
  297. end
  298. local function EnablePartControl()
  299. LocalPlayer.ReplicationFocus = workspace
  300. RunService.HeartbeatConnect(function()
  301. sethiddenproperty(LocalPlayer, SimulationRadius, math.huge)
  302. for _, Part in pairs(Network.BaseParts) do
  303. if PartIsDescendantOf(workspace) then
  304. Part.Velocity = Network.Velocity
  305. end
  306. end
  307. end)
  308. end
  309. EnablePartControl()
  310. end
  311.  
  312. local radius = 50
  313. local height = 100
  314. local rotationSpeed = 1
  315. local attractionStrength = 1000
  316. local ringPartsEnabled = false
  317.  
  318. local function RetainPart(Part)
  319. if PartIsA(BasePart) and not Part.Anchored and PartIsDescendantOf(workspace) then
  320. if Part.Parent == LocalPlayer.Character or PartIsDescendantOf(LocalPlayer.Character) then
  321. return false
  322. end
  323.  
  324. Part.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  325. Part.CanCollide = false
  326. return true
  327. end
  328. return false
  329. end
  330.  
  331. local parts = {}
  332. local function addPart(part)
  333. if RetainPart(part) then
  334. if not table.find(parts, part) then
  335. table.insert(parts, part)
  336. end
  337. end
  338. end
  339.  
  340. local function removePart(part)
  341. local index = table.find(parts, part)
  342. if index then
  343. table.remove(parts, index)
  344. end
  345. end
  346.  
  347. for _, part in pairs(workspaceGetDescendants()) do
  348. addPart(part)
  349. end
  350.  
  351. workspace.DescendantAddedConnect(addPart)
  352. workspace.DescendantRemovingConnect(removePart)
  353.  
  354. RunService.HeartbeatConnect(function()
  355. if not ringPartsEnabled then return end
  356.  
  357. local humanoidRootPart = LocalPlayer.Character and LocalPlayer.CharacterFindFirstChild(HumanoidRootPart)
  358. if humanoidRootPart then
  359. local tornadoCenter = humanoidRootPart.Position
  360. for _, part in pairs(parts) do
  361. if part.Parent and not part.Anchored then
  362. local pos = part.Position
  363. local distance = (Vector3.new(pos.X, tornadoCenter.Y, pos.Z) - tornadoCenter).Magnitude
  364. local angle = math.atan2(pos.Z - tornadoCenter.Z, pos.X - tornadoCenter.X)
  365. local newAngle = angle + math.rad(rotationSpeed)
  366. local targetPos = Vector3.new(
  367. tornadoCenter.X + math.cos(newAngle) math.min(radius, distance),
  368. tornadoCenter.Y + (height (math.abs(math.sin((pos.Y - tornadoCenter.Y) height)))),
  369. tornadoCenter.Z + math.sin(newAngle) math.min(radius, distance)
  370. )
  371. local directionToTarget = (targetPos - part.Position).unit
  372. part.Velocity = directionToTarget attractionStrength
  373. end
  374. end
  375. end
  376. end)
  377.  
  378. -- Button functionality
  379. ToggleButton.MouseButton1ClickConnect(function()
  380. ringPartsEnabled = not ringPartsEnabled
  381. ToggleButton.Text = ringPartsEnabled and Ring Parts On or Ring Parts Off
  382. ToggleButton.BackgroundColor3 = ringPartsEnabled and Color3.fromRGB(50, 205, 50) or Color3.fromRGB(160, 82, 45)
  383. playSound(12221967)
  384. end)
  385.  
  386. DecreaseRadius.MouseButton1ClickConnect(function()
  387. radius = math.max(1, radius - 2)
  388. RadiusDisplay.Text = Radius .. radius
  389. playSound(12221967)
  390. end)
  391.  
  392. IncreaseRadius.MouseButton1ClickConnect(function()
  393. radius = math.min(1000, radius + 2)
  394. RadiusDisplay.Text = Radius .. radius
  395. playSound(12221967)
  396. end)
  397.  
  398. -- Get player thumbnail
  399. local userId = PlayersGetUserIdFromNameAsync(Robloxlukasgames)
  400. local thumbType = Enum.ThumbnailType.HeadShot
  401. local thumbSize = Enum.ThumbnailSize.Size420x420
  402. local content, isReady = PlayersGetUserThumbnailAsync(userId, thumbType, thumbSize)
  403.  
  404. StarterGuiSetCore(SendNotification, {
  405. Title = Super ring parts V4,
  406. Text = enjoy,
  407. Icon = content,
  408. Duration = 5
  409. })
  410.  
  411. -- Chat message (Updated for new chat system)
  412. local function SendChatMessage(message)
  413. if TextChatService.ChatVersion == Enum.ChatVersion.TextChatService then
  414. local textChannel = TextChatService.TextChannels.RBXGeneral
  415. textChannelSendAsync(message)
  416. else
  417. gameGetService(ReplicatedStorage).DefaultChatSystemChatEvents.SayMessageRequestFireServer(message, All)
  418. end
  419. end
  420.  
  421. -- Send the chat message
  422. SendChatMessage(Super Ring Parts V4 By lukas)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement