Advertisement
LoneV2

Super Ring

Dec 13th, 2024 (edited)
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.47 KB | Gaming | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local UserInputService = game:GetService("UserInputService")
  4. local SoundService = game:GetService("SoundService")
  5. local StarterGui = game:GetService("StarterGui")
  6. local TextChatService = game:GetService("TextChatService")
  7.  
  8. local LocalPlayer = Players.LocalPlayer
  9.  
  10. -- Sound Effects
  11. local function playSound(soundId)
  12.     local sound = Instance.new("Sound")
  13.     sound.SoundId = "rbxassetid://" .. soundId
  14.     sound.Parent = SoundService
  15.     sound:Play()
  16.     sound.Ended:Connect(function()
  17.         sound:Destroy()
  18.     end)
  19. end
  20.  
  21. -- Play initial sound
  22. playSound("2865227271")
  23.  
  24. -- GUI Creation
  25. local ScreenGui = Instance.new("ScreenGui")
  26. ScreenGui.Name = "SuperRingPartsGUI"
  27. ScreenGui.ResetOnSpawn = false
  28. ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  29.  
  30. local MainFrame = Instance.new("Frame")
  31. MainFrame.Size = UDim2.new(0, 220, 0, 190)
  32. MainFrame.Position = UDim2.new(0.5, -110, 0.5, -95)
  33. MainFrame.BackgroundColor3 = Color3.fromRGB(205, 170, 125) -- Light brown
  34. MainFrame.BorderSizePixel = 0
  35. MainFrame.Parent = ScreenGui
  36.  
  37. -- Make the GUI round
  38. local UICorner = Instance.new("UICorner")
  39. UICorner.CornerRadius = UDim.new(0, 20)
  40. UICorner.Parent = MainFrame
  41.  
  42. local Title = Instance.new("TextLabel")
  43. Title.Size = UDim2.new(1, 0, 0, 40)
  44. Title.Position = UDim2.new(0, 0, 0, 0)
  45. Title.Text = "Super Ring Parts v3"
  46. Title.TextColor3 = Color3.fromRGB(101, 67, 33) -- Dark brown
  47. Title.BackgroundColor3 = Color3.fromRGB(222, 184, 135) -- Lighter brown
  48. Title.Font = Enum.Font.Fondamento -- More elegant font
  49. Title.TextSize = 22
  50. Title.Parent = MainFrame
  51.  
  52. -- Round the title
  53. local TitleCorner = Instance.new("UICorner")
  54. TitleCorner.CornerRadius = UDim.new(0, 20)
  55. TitleCorner.Parent = Title
  56.  
  57. local ToggleButton = Instance.new("TextButton")
  58. ToggleButton.Size = UDim2.new(0.8, 0, 0, 35)
  59. ToggleButton.Position = UDim2.new(0.1, 0, 0.3, 0)
  60. ToggleButton.Text = "Ring Parts Off"
  61. ToggleButton.BackgroundColor3 = Color3.fromRGB(160, 82, 45) -- Sienna
  62. ToggleButton.TextColor3 = Color3.fromRGB(255, 248, 220) -- Cornsilk
  63. ToggleButton.Font = Enum.Font.Fondamento
  64. ToggleButton.TextSize = 18
  65. ToggleButton.Parent = MainFrame
  66.  
  67. -- Round the toggle button
  68. local ToggleCorner = Instance.new("UICorner")
  69. ToggleCorner.CornerRadius = UDim.new(0, 10)
  70. ToggleCorner.Parent = ToggleButton
  71.  
  72. local DecreaseRadius = Instance.new("TextButton")
  73. DecreaseRadius.Size = UDim2.new(0.2, 0, 0, 35)
  74. DecreaseRadius.Position = UDim2.new(0.1, 0, 0.6, 0)
  75. DecreaseRadius.Text = "<"
  76. DecreaseRadius.BackgroundColor3 = Color3.fromRGB(139, 69, 19) -- Saddle brown
  77. DecreaseRadius.TextColor3 = Color3.fromRGB(255, 248, 220) -- Cornsilk
  78. DecreaseRadius.Font = Enum.Font.Fondamento
  79. DecreaseRadius.TextSize = 18
  80. DecreaseRadius.Parent = MainFrame
  81.  
  82. -- Round the decrease button
  83. local DecreaseCorner = Instance.new("UICorner")
  84. DecreaseCorner.CornerRadius = UDim.new(0, 10)
  85. DecreaseCorner.Parent = DecreaseRadius
  86.  
  87. local IncreaseRadius = Instance.new("TextButton")
  88. IncreaseRadius.Size = UDim2.new(0.2, 0, 0, 35)
  89. IncreaseRadius.Position = UDim2.new(0.7, 0, 0.6, 0)
  90. IncreaseRadius.Text = ">"
  91. IncreaseRadius.BackgroundColor3 = Color3.fromRGB(139, 69, 19) -- Saddle brown
  92. IncreaseRadius.TextColor3 = Color3.fromRGB(255, 248, 220) -- Cornsilk
  93. IncreaseRadius.Font = Enum.Font.Fondamento
  94. IncreaseRadius.TextSize = 18
  95. IncreaseRadius.Parent = MainFrame
  96.  
  97. -- Round the increase button
  98. local IncreaseCorner = Instance.new("UICorner")
  99. IncreaseCorner.CornerRadius = UDim.new(0, 10)
  100. IncreaseCorner.Parent = IncreaseRadius
  101.  
  102. local RadiusDisplay = Instance.new("TextLabel")
  103. RadiusDisplay.Size = UDim2.new(0.4, 0, 0, 35)
  104. RadiusDisplay.Position = UDim2.new(0.3, 0, 0.6, 0)
  105. RadiusDisplay.Text = "Radius: 50"
  106. RadiusDisplay.BackgroundColor3 = Color3.fromRGB(210, 180, 140) -- Tan
  107. RadiusDisplay.TextColor3 = Color3.fromRGB(101, 67, 33) -- Dark brown
  108. RadiusDisplay.Font = Enum.Font.Fondamento
  109. RadiusDisplay.TextSize = 18
  110. RadiusDisplay.Parent = MainFrame
  111.  
  112. -- Round the radius display
  113. local RadiusCorner = Instance.new("UICorner")
  114. RadiusCorner.CornerRadius = UDim.new(0, 10)
  115. RadiusCorner.Parent = RadiusDisplay
  116.  
  117. local Watermark = Instance.new("TextLabel")
  118. Watermark.Size = UDim2.new(1, 0, 0, 20)
  119. Watermark.Position = UDim2.new(0, 0, 1, -20)
  120. Watermark.Text = "Super Ring [V3] - Cracked By Hzyl"
  121. Watermark.TextColor3 = Color3.fromRGB(101, 67, 33) -- Dark brown
  122. Watermark.BackgroundTransparency = 1
  123. Watermark.Font = Enum.Font.Fondamento
  124. Watermark.TextSize = 14
  125. Watermark.Parent = MainFrame
  126.  
  127. -- Add minimize button
  128. local MinimizeButton = Instance.new("TextButton")
  129. MinimizeButton.Size = UDim2.new(0, 30, 0, 30)
  130. MinimizeButton.Position = UDim2.new(1, -35, 0, 5)
  131. MinimizeButton.Text = "-"
  132. MinimizeButton.BackgroundColor3 = Color3.fromRGB(139, 69, 19) -- Saddle brown
  133. MinimizeButton.TextColor3 = Color3.fromRGB(255, 248, 220) -- Cornsilk
  134. MinimizeButton.Font = Enum.Font.Fondamento
  135. MinimizeButton.TextSize = 18
  136. MinimizeButton.Parent = MainFrame
  137.  
  138. -- Round the minimize button
  139. local MinimizeCorner = Instance.new("UICorner")
  140. MinimizeCorner.CornerRadius = UDim.new(0, 15)
  141. MinimizeCorner.Parent = MinimizeButton
  142.  
  143. -- Minimize functionality
  144. local minimized = false
  145. MinimizeButton.MouseButton1Click:Connect(function()
  146.     minimized = not minimized
  147.     if minimized then
  148.         MainFrame:TweenSize(UDim2.new(0, 220, 0, 40), "Out", "Quad", 0.3, true)
  149.         MinimizeButton.Text = "+"
  150.         ToggleButton.Visible = false
  151.         DecreaseRadius.Visible = false
  152.         IncreaseRadius.Visible = false
  153.         RadiusDisplay.Visible = false
  154.         Watermark.Visible = false
  155.     else
  156.         MainFrame:TweenSize(UDim2.new(0, 220, 0, 190), "Out", "Quad", 0.3, true)
  157.         MinimizeButton.Text = "-"
  158.         ToggleButton.Visible = true
  159.         DecreaseRadius.Visible = true
  160.         IncreaseRadius.Visible = true
  161.         RadiusDisplay.Visible = true
  162.         Watermark.Visible = true
  163.     end
  164.     playSound("12221967")
  165. end)
  166.  
  167. -- Make GUI draggable
  168. local dragging
  169. local dragInput
  170. local dragStart
  171. local startPos
  172.  
  173. local function update(input)
  174.     local delta = input.Position - dragStart
  175.     MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  176. end
  177.  
  178. MainFrame.InputBegan:Connect(function(input)
  179.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  180.         dragging = true
  181.         dragStart = input.Position
  182.         startPos = MainFrame.Position
  183.        
  184.         input.Changed:Connect(function()
  185.             if input.UserInputState == Enum.UserInputState.End then
  186.                 dragging = false
  187.             end
  188.         end)
  189.     end
  190. end)
  191.  
  192. MainFrame.InputChanged:Connect(function(input)
  193.     if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  194.         dragInput = input
  195.     end
  196. end)
  197.  
  198. UserInputService.InputChanged:Connect(function(input)
  199.     if input == dragInput and dragging then
  200.         update(input)
  201.     end
  202. end)
  203.  
  204. -- Ring Parts Logic
  205. if not getgenv().Network then
  206.     getgenv().Network = {
  207.         BaseParts = {},
  208.         Velocity = Vector3.new(14.46262424, 14.46262424, 14.46262424)
  209.     }
  210.     Network.RetainPart = function(Part)
  211.         if typeof(Part) == "Instance" and Part:IsA("BasePart") and Part:IsDescendantOf(workspace) then
  212.             table.insert(Network.BaseParts, Part)
  213.             Part.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  214.             Part.CanCollide = false
  215.         end
  216.     end
  217.     local function EnablePartControl()
  218.         LocalPlayer.ReplicationFocus = workspace
  219.         RunService.Heartbeat:Connect(function()
  220.             sethiddenproperty(LocalPlayer, "SimulationRadius", math.huge)
  221.             for _, Part in pairs(Network.BaseParts) do
  222.                 if Part:IsDescendantOf(workspace) then
  223.                     Part.Velocity = Network.Velocity
  224.                 end
  225.             end
  226.         end)
  227.     end
  228.     EnablePartControl()
  229. end
  230.  
  231. local radius = 50
  232. local height = 100
  233. local rotationSpeed = 10
  234. local attractionStrength = 1000
  235. local ringPartsEnabled = false
  236.  
  237. local function RetainPart(Part)
  238.     if Part:IsA("BasePart") and not Part.Anchored and Part:IsDescendantOf(workspace) then
  239.         if Part.Parent == LocalPlayer.Character or Part:IsDescendantOf(LocalPlayer.Character) then
  240.             return false
  241.         end
  242.  
  243.         Part.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  244.         Part.CanCollide = false
  245.         return true
  246.     end
  247.     return false
  248. end
  249.  
  250. local parts = {}
  251. local function addPart(part)
  252.     if RetainPart(part) then
  253.         if not table.find(parts, part) then
  254.             table.insert(parts, part)
  255.         end
  256.     end
  257. end
  258.  
  259. local function removePart(part)
  260.     local index = table.find(parts, part)
  261.     if index then
  262.         table.remove(parts, index)
  263.     end
  264. end
  265.  
  266. for _, part in pairs(workspace:GetDescendants()) do
  267.     addPart(part)
  268. end
  269.  
  270. workspace.DescendantAdded:Connect(addPart)
  271. workspace.DescendantRemoving:Connect(removePart)
  272.  
  273. RunService.Heartbeat:Connect(function()
  274.     if not ringPartsEnabled then return end
  275.    
  276.     local humanoidRootPart = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  277.     if humanoidRootPart then
  278.         local tornadoCenter = humanoidRootPart.Position
  279.         for _, part in pairs(parts) do
  280.             if part.Parent and not part.Anchored then
  281.                 local pos = part.Position
  282.                 local distance = (Vector3.new(pos.X, tornadoCenter.Y, pos.Z) - tornadoCenter).Magnitude
  283.                 local angle = math.atan2(pos.Z - tornadoCenter.Z, pos.X - tornadoCenter.X)
  284.                 local newAngle = angle + math.rad(rotationSpeed)
  285.                 local targetPos = Vector3.new(
  286.                     tornadoCenter.X + math.cos(newAngle) * math.min(radius, distance),
  287.                     tornadoCenter.Y + (height * (math.abs(math.sin((pos.Y - tornadoCenter.Y) / height)))),
  288.                     tornadoCenter.Z + math.sin(newAngle) * math.min(radius, distance)
  289.                 )
  290.                 local directionToTarget = (targetPos - part.Position).unit
  291.                 part.Velocity = directionToTarget * attractionStrength
  292.             end
  293.         end
  294.     end
  295. end)
  296.  
  297. -- Button functionality
  298. ToggleButton.MouseButton1Click:Connect(function()
  299.     ringPartsEnabled = not ringPartsEnabled
  300.     ToggleButton.Text = ringPartsEnabled and "Ring Parts On" or "Ring Parts Off"
  301.     ToggleButton.BackgroundColor3 = ringPartsEnabled and Color3.fromRGB(50, 205, 50) or Color3.fromRGB(160, 82, 45)
  302.     playSound("12221967")
  303. end)
  304.  
  305. DecreaseRadius.MouseButton1Click:Connect(function()
  306.     radius = math.max(10, radius - 5)
  307.     RadiusDisplay.Text = "Radius: " .. radius
  308.     playSound("12221967")
  309. end)
  310.  
  311. IncreaseRadius.MouseButton1Click:Connect(function()
  312.     radius = math.min(100, radius + 5)
  313.     RadiusDisplay.Text = "Radius: " .. radius
  314.     playSound("12221967")
  315. end)
  316.  
  317. -- Notifications
  318. StarterGui:SetCore("SendNotification", {
  319.     Title = "Astrion sucks",
  320.     Text = "just a reminder",
  321.     Duration = 5
  322. })
  323.  
  324. -- Get player thumbnail
  325. local userId = Players:GetUserIdFromNameAsync("NannaDev")
  326. local thumbType = Enum.ThumbnailType.HeadShot
  327. local thumbSize = Enum.ThumbnailSize.Size420x420
  328. local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
  329.  
  330. StarterGui:SetCore("SendNotification", {
  331.     Title = "Enjoy Super Ring [V3]",
  332.     Text = "Cracked By Hzyl",
  333.     Duration = 5
  334. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement