Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Natural Disaster Survival unanchored parts orbit player--
- --not mine--
- local Players = gameGetService(Players)
- local RunService = gameGetService(RunService)
- local UserInputService = gameGetService(UserInputService)
- local LocalPlayer = Players.LocalPlayer
- local Workspace = gameGetService(Workspace)
- local character = LocalPlayer.Character or LocalPlayer.CharacterAddedWait()
- local humanoidRootPart = characterWaitForChild(HumanoidRootPart)
- local Folder = Instance.new(Folder, Workspace)
- local Part = Instance.new(Part, Folder)
- local Attachment1 = Instance.new(Attachment, Part)
- Part.Anchored = true
- Part.CanCollide = false
- Part.Transparency = 1
- if not getgenv().Network then
- getgenv().Network = {
- BaseParts = {},
- Velocity = Vector3.new(14.46262424, 14.46262424, 14.46262424)
- }
- Network.RetainPart = function(Part)
- if typeof(Part) == Instance and PartIsA(BasePart) and PartIsDescendantOf(Workspace) then
- table.insert(Network.BaseParts, Part)
- Part.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- Part.CanCollide = false
- end
- end
- local function EnablePartControl()
- LocalPlayer.ReplicationFocus = Workspace
- RunService.HeartbeatConnect(function()
- sethiddenproperty(LocalPlayer, SimulationRadius, math.huge)
- for _, Part in pairs(Network.BaseParts) do
- if PartIsDescendantOf(Workspace) then
- Part.Velocity = Network.Velocity
- end
- end
- end)
- end
- EnablePartControl()
- end
- local function ForcePart(v)
- if vIsA(Part) and not v.Anchored and not v.ParentFindFirstChild(Humanoid) and not v.ParentFindFirstChild(Head) and v.Name ~= Handle then
- for _, x in next, vGetChildren() do
- if xIsA(BodyAngularVelocity) or xIsA(BodyForce) or xIsA(BodyGyro) or xIsA(BodyPosition) or xIsA(BodyThrust) or xIsA(BodyVelocity) or xIsA(RocketPropulsion) then
- xDestroy()
- end
- end
- if vFindFirstChild(Attachment) then
- vFindFirstChild(Attachment)Destroy()
- end
- if vFindFirstChild(AlignPosition) then
- vFindFirstChild(AlignPosition)Destroy()
- end
- if vFindFirstChild(Torque) then
- vFindFirstChild(Torque)Destroy()
- end
- v.CanCollide = false
- local Torque = Instance.new(Torque, v)
- Torque.Torque = Vector3.new(100000, 100000, 100000)
- local AlignPosition = Instance.new(AlignPosition, v)
- local Attachment2 = Instance.new(Attachment, v)
- Torque.Attachment0 = Attachment2
- AlignPosition.MaxForce = 9999999999999999
- AlignPosition.MaxVelocity = math.huge
- AlignPosition.Responsiveness = 200
- AlignPosition.Attachment0 = Attachment2
- AlignPosition.Attachment1 = Attachment1
- end
- end
- local Players = gameGetService(Players)
- local RunService = gameGetService(RunService)
- local UserInputService = gameGetService(UserInputService)
- local SoundService = gameGetService(SoundService)
- local StarterGui = gameGetService(StarterGui)
- local TextChatService = gameGetService(TextChatService)
- local LocalPlayer = Players.LocalPlayer
- -- Sound Effects
- local function playSound(soundId)
- local sound = Instance.new(Sound)
- sound.SoundId = rbxassetid .. soundId
- sound.Parent = SoundService
- soundPlay()
- sound.EndedConnect(function()
- soundDestroy()
- end)
- end
- -- Play initial sound
- playSound(2865227271)
- -- GUI Creation
- local ScreenGui = Instance.new(ScreenGui)
- ScreenGui.Name = SuperRingPartsGUI
- ScreenGui.ResetOnSpawn = false
- ScreenGui.Parent = LocalPlayerWaitForChild(PlayerGui)
- local MainFrame = Instance.new(Frame)
- MainFrame.Size = UDim2.new(0, 220, 0, 190)
- MainFrame.Position = UDim2.new(0.5, -110, 0.5, -95)
- MainFrame.BackgroundColor3 = Color3.fromRGB(204, 0, 0) -- Light brown
- MainFrame.BorderSizePixel = 0
- MainFrame.Parent = ScreenGui
- -- Make the GUI round
- local UICorner = Instance.new(UICorner)
- UICorner.CornerRadius = UDim.new(0, 20)
- UICorner.Parent = MainFrame
- local Title = Instance.new(TextLabel)
- Title.Size = UDim2.new(1, 0, 0, 40)
- Title.Position = UDim2.new(0, 0, 0, 0)
- Title.Text = Super Ring Parts v4
- Title.TextColor3 = Color3.fromRGB(153, 0, 0) -- Dark brown
- Title.BackgroundColor3 = Color3.fromRGB(255, 51, 51) -- Lighter brown
- Title.Font = Enum.Font.Fondamento -- More elegant font
- Title.TextSize = 22
- Title.Parent = MainFrame
- -- Round the title
- local TitleCorner = Instance.new(UICorner)
- TitleCorner.CornerRadius = UDim.new(0, 20)
- TitleCorner.Parent = Title
- local ToggleButton = Instance.new(TextButton)
- ToggleButton.Size = UDim2.new(0.8, 0, 0, 35)
- ToggleButton.Position = UDim2.new(0.1, 0, 0.3, 0)
- ToggleButton.Text = Ring Parts Off
- ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 0, 255) -- Sienna
- ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Cornsilk
- ToggleButton.Font = Enum.Font.Fondamento
- ToggleButton.TextSize = 18
- ToggleButton.Parent = MainFrame
- -- Round the toggle button
- local ToggleCorner = Instance.new(UICorner)
- ToggleCorner.CornerRadius = UDim.new(0, 10)
- ToggleCorner.Parent = ToggleButton
- local DecreaseRadius = Instance.new(TextButton)
- DecreaseRadius.Size = UDim2.new(0.2, 0, 0, 35)
- DecreaseRadius.Position = UDim2.new(0.1, 0, 0.6, 0)
- DecreaseRadius.Text =
- DecreaseRadius.BackgroundColor3 = Color3.fromRGB(255, 153, 153) -- Saddle brown
- DecreaseRadius.TextColor3 = Color3.fromRGB(255, 255, 255) -- Cornsilk
- DecreaseRadius.Font = Enum.Font.Fondamento
- DecreaseRadius.TextSize = 18
- DecreaseRadius.Parent = MainFrame
- -- Round the decrease button
- local DecreaseCorner = Instance.new(UICorner)
- DecreaseCorner.CornerRadius = UDim.new(0, 10)
- DecreaseCorner.Parent = DecreaseRadius
- local IncreaseRadius = Instance.new(TextButton)
- IncreaseRadius.Size = UDim2.new(0.2, 0, 0, 35)
- IncreaseRadius.Position = UDim2.new(0.7, 0, 0.6, 0)
- IncreaseRadius.Text =
- IncreaseRadius.BackgroundColor3 = Color3.fromRGB(255, 153, 153) -- Saddle brown
- IncreaseRadius.TextColor3 = Color3.fromRGB(255, 255, 255) -- Cornsilk
- IncreaseRadius.Font = Enum.Font.Fondamento
- IncreaseRadius.TextSize = 18
- IncreaseRadius.Parent = MainFrame
- -- Round the increase button
- local IncreaseCorner = Instance.new(UICorner)
- IncreaseCorner.CornerRadius = UDim.new(0, 10)
- IncreaseCorner.Parent = IncreaseRadius
- local RadiusDisplay = Instance.new(TextLabel)
- RadiusDisplay.Size = UDim2.new(0.4, 0, 0, 35)
- RadiusDisplay.Position = UDim2.new(0.3, 0, 0.6, 0)
- RadiusDisplay.Text = Radius 50
- RadiusDisplay.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Tan
- RadiusDisplay.TextColor3 = Color3.fromRGB(255, 255, 255) -- Dark brown
- RadiusDisplay.Font = Enum.Font.Fondamento
- RadiusDisplay.TextSize = 18
- RadiusDisplay.Parent = MainFrame
- -- Round the radius display
- local RadiusCorner = Instance.new(UICorner)
- RadiusCorner.CornerRadius = UDim.new(0, 10)
- RadiusCorner.Parent = RadiusDisplay
- local Watermark = Instance.new(TextLabel)
- Watermark.Size = UDim2.new(1, 0, 0, 20)
- Watermark.Position = UDim2.new(0, 0, 1, -20)
- Watermark.Text = Super Ring [V4] by lukas
- Watermark.TextColor3 = Color3.fromRGB(255, 255, 255) -- Dark brown
- Watermark.BackgroundTransparency = 1
- Watermark.Font = Enum.Font.Fondamento
- Watermark.TextSize = 14
- Watermark.Parent = MainFrame
- -- Add minimize button
- local MinimizeButton = Instance.new(TextButton)
- MinimizeButton.Size = UDim2.new(0, 30, 0, 30)
- MinimizeButton.Position = UDim2.new(1, -35, 0, 5)
- MinimizeButton.Text = -
- MinimizeButton.BackgroundColor3 = Color3.fromRGB(0, 0, 255) -- Saddle brown
- MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Cornsilk
- MinimizeButton.Font = Enum.Font.Fondamento
- MinimizeButton.TextSize = 18
- MinimizeButton.Parent = MainFrame
- -- Round the minimize button
- local MinimizeCorner = Instance.new(UICorner)
- MinimizeCorner.CornerRadius = UDim.new(0, 15)
- MinimizeCorner.Parent = MinimizeButton
- -- Minimize functionality
- local minimized = false
- MinimizeButton.MouseButton1ClickConnect(function()
- minimized = not minimized
- if minimized then
- MainFrameTweenSize(UDim2.new(0, 220, 0, 40), Out, Quad, 0.3, true)
- MinimizeButton.Text = +
- ToggleButton.Visible = false
- DecreaseRadius.Visible = false
- IncreaseRadius.Visible = false
- RadiusDisplay.Visible = false
- Watermark.Visible = false
- else
- MainFrameTweenSize(UDim2.new(0, 220, 0, 190), Out, Quad, 0.3, true)
- MinimizeButton.Text = -
- ToggleButton.Visible = true
- DecreaseRadius.Visible = true
- IncreaseRadius.Visible = true
- RadiusDisplay.Visible = true
- Watermark.Visible = true
- end
- playSound(12221967)
- end)
- -- Make GUI draggable
- local dragging
- local dragInput
- local dragStart
- local startPos
- local function update(input)
- local delta = input.Position - dragStart
- MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- MainFrame.InputBeganConnect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = MainFrame.Position
- input.ChangedConnect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- MainFrame.InputChangedConnect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UserInputService.InputChangedConnect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- -- Ring Parts Logic
- if not getgenv().Network then
- getgenv().Network = {
- BaseParts = {},
- Velocity = Vector3.new(14.46262424, 14.46262424, 14.46262424)
- }
- Network.RetainPart = function(Part)
- if typeof(Part) == Instance and PartIsA(BasePart) and PartIsDescendantOf(workspace) then
- table.insert(Network.BaseParts, Part)
- Part.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- Part.CanCollide = false
- end
- end
- local function EnablePartControl()
- LocalPlayer.ReplicationFocus = workspace
- RunService.HeartbeatConnect(function()
- sethiddenproperty(LocalPlayer, SimulationRadius, math.huge)
- for _, Part in pairs(Network.BaseParts) do
- if PartIsDescendantOf(workspace) then
- Part.Velocity = Network.Velocity
- end
- end
- end)
- end
- EnablePartControl()
- end
- local radius = 50
- local height = 100
- local rotationSpeed = 1
- local attractionStrength = 1000
- local ringPartsEnabled = false
- local function RetainPart(Part)
- if PartIsA(BasePart) and not Part.Anchored and PartIsDescendantOf(workspace) then
- if Part.Parent == LocalPlayer.Character or PartIsDescendantOf(LocalPlayer.Character) then
- return false
- end
- Part.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- Part.CanCollide = false
- return true
- end
- return false
- end
- local parts = {}
- local function addPart(part)
- if RetainPart(part) then
- if not table.find(parts, part) then
- table.insert(parts, part)
- end
- end
- end
- local function removePart(part)
- local index = table.find(parts, part)
- if index then
- table.remove(parts, index)
- end
- end
- for _, part in pairs(workspaceGetDescendants()) do
- addPart(part)
- end
- workspace.DescendantAddedConnect(addPart)
- workspace.DescendantRemovingConnect(removePart)
- RunService.HeartbeatConnect(function()
- if not ringPartsEnabled then return end
- local humanoidRootPart = LocalPlayer.Character and LocalPlayer.CharacterFindFirstChild(HumanoidRootPart)
- if humanoidRootPart then
- local tornadoCenter = humanoidRootPart.Position
- for _, part in pairs(parts) do
- if part.Parent and not part.Anchored then
- local pos = part.Position
- local distance = (Vector3.new(pos.X, tornadoCenter.Y, pos.Z) - tornadoCenter).Magnitude
- local angle = math.atan2(pos.Z - tornadoCenter.Z, pos.X - tornadoCenter.X)
- local newAngle = angle + math.rad(rotationSpeed)
- local targetPos = Vector3.new(
- tornadoCenter.X + math.cos(newAngle) math.min(radius, distance),
- tornadoCenter.Y + (height (math.abs(math.sin((pos.Y - tornadoCenter.Y) height)))),
- tornadoCenter.Z + math.sin(newAngle) math.min(radius, distance)
- )
- local directionToTarget = (targetPos - part.Position).unit
- part.Velocity = directionToTarget attractionStrength
- end
- end
- end
- end)
- -- Button functionality
- ToggleButton.MouseButton1ClickConnect(function()
- ringPartsEnabled = not ringPartsEnabled
- ToggleButton.Text = ringPartsEnabled and Ring Parts On or Ring Parts Off
- ToggleButton.BackgroundColor3 = ringPartsEnabled and Color3.fromRGB(50, 205, 50) or Color3.fromRGB(160, 82, 45)
- playSound(12221967)
- end)
- DecreaseRadius.MouseButton1ClickConnect(function()
- radius = math.max(1, radius - 2)
- RadiusDisplay.Text = Radius .. radius
- playSound(12221967)
- end)
- IncreaseRadius.MouseButton1ClickConnect(function()
- radius = math.min(1000, radius + 2)
- RadiusDisplay.Text = Radius .. radius
- playSound(12221967)
- end)
- -- Get player thumbnail
- local userId = PlayersGetUserIdFromNameAsync(Robloxlukasgames)
- local thumbType = Enum.ThumbnailType.HeadShot
- local thumbSize = Enum.ThumbnailSize.Size420x420
- local content, isReady = PlayersGetUserThumbnailAsync(userId, thumbType, thumbSize)
- StarterGuiSetCore(SendNotification, {
- Title = Super ring parts V4,
- Text = enjoy,
- Icon = content,
- Duration = 5
- })
- -- Chat message (Updated for new chat system)
- local function SendChatMessage(message)
- if TextChatService.ChatVersion == Enum.ChatVersion.TextChatService then
- local textChannel = TextChatService.TextChannels.RBXGeneral
- textChannelSendAsync(message)
- else
- gameGetService(ReplicatedStorage).DefaultChatSystemChatEvents.SayMessageRequestFireServer(message, All)
- end
- end
- -- Send the chat message
- SendChatMessage(Super Ring Parts V4 By lukas)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement