-------------------------------------------------- -- SERVICES -------------------------------------------------- local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") -------------------------------------------------- -- PLAYER -------------------------------------------------- local player = Players.LocalPlayer local char = player.Character or player.CharacterAdded:Wait() local root = char:WaitForChild("HumanoidRootPart") -------------------------------------------------- -- CHARACTER HANDLING -------------------------------------------------- player.CharacterAdded:Connect(function(c) char = c root = c:WaitForChild("HumanoidRootPart") if noclipEnabled then task.wait() startNoClip() end end) -------------------------------------------------- -- CONFIG (ORBIT) -------------------------------------------------- local RADIUS = 10 local HEIGHT = 2 local SPEED = 2 local SPEED_STEP = 0.5 local MIN_SPEED = 0 local MAX_SPEED = 50 local RESPONSIVENESS = 200 -------------------------------------------------- -- CONFIG (DETECTOR) -------------------------------------------------- local DETECTOR_DISTANCE = 350 local PARTS_PER_FRAME = 60 local DETECTOR_COLOR = Color3.fromRGB(255,80,80) local DETECTOR_OUTLINE = Color3.fromRGB(255,255,255) local DETECTOR_TRANSPARENCY = 0.85 -------------------------------------------------- -- UTILS -------------------------------------------------- local function isPlayerPart(inst) local model = inst:FindFirstAncestorOfClass("Model") return model and Players:GetPlayerFromCharacter(model) ~= nil end local function getAssemblyRoot(p) return p.AssemblyRootPart or p end -------------------------------------------------- -- UI -------------------------------------------------- local gui = Instance.new("ScreenGui", player.PlayerGui) gui.ResetOnSpawn = false local frame = Instance.new("Frame", gui) frame.Size = UDim2.fromOffset(260,330) frame.Position = UDim2.fromScale(0.05,0.55) frame.BackgroundColor3 = Color3.fromRGB(25,25,25) frame.BorderSizePixel = 0 Instance.new("UICorner", frame) local bar = Instance.new("Frame", frame) bar.Size = UDim2.fromScale(1,0.14) bar.BackgroundTransparency = 1 local title = Instance.new("TextLabel", bar) title.Size = UDim2.fromScale(0.6,1) title.Position = UDim2.fromScale(0.05,0) title.BackgroundTransparency = 1 title.Text = "ORBIT SYSTEM" title.Font = Enum.Font.GothamBold title.TextScaled = true title.TextXAlignment = Enum.TextXAlignment.Left title.TextColor3 = Color3.fromRGB(235,235,235) local close = Instance.new("TextButton", bar) close.Size = UDim2.fromScale(0.18,0.7) close.Position = UDim2.fromScale(0.8,0.15) close.Text = "X" close.Font = Enum.Font.GothamBold close.TextScaled = true close.TextColor3 = Color3.new(1,1,1) close.BackgroundColor3 = Color3.fromRGB(220,80,80) Instance.new("UICorner", close) -------------------------------------------------- -- DRAG -------------------------------------------------- do local dragging, startPos, startInput bar.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true startInput = i.Position startPos = frame.Position end end) UserInputService.InputChanged:Connect(function(i) if dragging and i.UserInputType == Enum.UserInputType.MouseMovement then local d = i.Position - startInput frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y ) end end) UserInputService.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) end -------------------------------------------------- -- BUTTON FACTORY -------------------------------------------------- local function mkBtn(y,text,color) local b = Instance.new("TextButton", frame) b.Size = UDim2.fromScale(0.8,0.12) b.Position = UDim2.fromScale(0.1,y) b.Text = text b.Font = Enum.Font.GothamBold b.TextScaled = true b.BackgroundColor3 = color Instance.new("UICorner", b) return b end local toggleOrbit = mkBtn(0.18,"TOGGLE ORBIT",Color3.fromRGB(80,200,120)) local speedLabel = Instance.new("TextLabel", frame) speedLabel.Size = UDim2.fromScale(0.8,0.08) speedLabel.Position = UDim2.fromScale(0.1,0.32) speedLabel.BackgroundTransparency = 1 speedLabel.Font = Enum.Font.GothamBold speedLabel.TextScaled = true speedLabel.TextColor3 = Color3.fromRGB(235,235,235) local speedDown = mkBtn(0.42,"- SPEED",Color3.fromRGB(180,180,180)) local speedUp = mkBtn(0.54,"+ SPEED",Color3.fromRGB(180,180,180)) local detectorBtn = mkBtn(0.68,"UNANCHORED DETECTOR: OFF",Color3.fromRGB(160,160,160)) local noclipBtn = mkBtn(0.82,"UNANCHORED NOCLIP: OFF",Color3.fromRGB(160,160,160)) -------------------------------------------------- -- SPEED -------------------------------------------------- local function updateSpeed() speedLabel.Text = ("SPEED: %.1f"):format(SPEED) end updateSpeed() speedUp.MouseButton1Click:Connect(function() SPEED = math.clamp(SPEED + SPEED_STEP, MIN_SPEED, MAX_SPEED) updateSpeed() end) speedDown.MouseButton1Click:Connect(function() SPEED = math.clamp(SPEED - SPEED_STEP, MIN_SPEED, MAX_SPEED) updateSpeed() end) -------------------------------------------------- -- ORBIT -------------------------------------------------- local orbiting = false local objects = {} local function attach(rp) if objects[rp] or rp.Anchored or isPlayerPart(rp) then return end local orig = rp.CanCollide rp.CanCollide = false local a0 = Instance.new("Attachment", rp) local a1 = Instance.new("Attachment", root) local ap = Instance.new("AlignPosition", rp) ap.Attachment0 = a0 ap.Attachment1 = a1 ap.MaxForce = math.huge ap.Responsiveness = RESPONSIVENESS local ao = Instance.new("AlignOrientation", rp) ao.Attachment0 = a0 ao.Attachment1 = a1 ao.MaxTorque = math.huge ao.Responsiveness = RESPONSIVENESS objects[rp] = {a0,a1,ap,ao,orig=orig,angle=math.random()*math.pi*2} end local function collectOrbit() for _,d in ipairs(workspace:GetDescendants()) do if d:IsA("BasePart") and not isPlayerPart(d) then local r = getAssemblyRoot(d) if r and not r.Anchored then attach(r) end end end end local function clearOrbit() for p,d in pairs(objects) do p.CanCollide = d.orig for _,v in ipairs(d) do if typeof(v)=="Instance" then v:Destroy() end end end table.clear(objects) end -------------------------------------------------- -- DETECTOR -------------------------------------------------- local detectorEnabled = false local overlays = {} local parts, idx = {},1 for _,i in ipairs(workspace:GetDescendants()) do if i:IsA("BasePart") then parts[#parts+1]=i end end workspace.DescendantAdded:Connect(function(i) if i:IsA("BasePart") then parts[#parts+1]=i end end) local function addOverlay(t) if overlays[t] then return end local h = Instance.new("Highlight") h.Adornee = t h.FillColor = DETECTOR_COLOR h.OutlineColor = DETECTOR_OUTLINE h.FillTransparency = DETECTOR_TRANSPARENCY h.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop h.Parent = t overlays[t]=h end local function removeOverlay(t) if overlays[t] then overlays[t]:Destroy() overlays[t]=nil end end -------------------------------------------------- -- NOCLIP -------------------------------------------------- noclipEnabled = false local noclipConn local touched = {} function stopNoClip() if noclipConn then noclipConn:Disconnect() noclipConn=nil end for p in pairs(touched) do if p and p.Parent then p.CanCollide = true end end table.clear(touched) end function startNoClip() stopNoClip() noclipConn = RunService.Stepped:Connect(function() if not noclipEnabled or not root then return end for _,p in ipairs(root:GetTouchingParts()) do if p:IsA("BasePart") and not p.Anchored then p.CanCollide = false touched[p]=true end end end) end -------------------------------------------------- -- MAIN LOOP -------------------------------------------------- local mainConn = RunService.Heartbeat:Connect(function(dt) if detectorEnabled and root then for _=1,PARTS_PER_FRAME do local part = parts[idx]; idx+=1 if not part then idx=1 break end if not part.Parent or isPlayerPart(part) then continue end local a = part.AssemblyRootPart or part if a.Anchored or (a.Position-root.Position).Magnitude>DETECTOR_DISTANCE then removeOverlay(a) else addOverlay(a:FindFirstAncestorOfClass("Model") or a) end end end if orbiting then for _,d in pairs(objects) do d.angle += SPEED*dt d[2].WorldPosition = root.Position + Vector3.new(math.cos(d.angle)*RADIUS,HEIGHT,math.sin(d.angle)*RADIUS) end end end) -------------------------------------------------- -- BUTTONS -------------------------------------------------- toggleOrbit.MouseButton1Click:Connect(function() orbiting = not orbiting if orbiting then toggleOrbit.BackgroundColor3 = Color3.fromRGB(220,80,80) collectOrbit() else toggleOrbit.BackgroundColor3 = Color3.fromRGB(80,200,120) clearOrbit() end end) detectorBtn.MouseButton1Click:Connect(function() detectorEnabled = not detectorEnabled detectorBtn.Text = detectorEnabled and "UNANCHORED DETECTOR: ON" or "UNANCHORED DETECTOR: OFF" detectorBtn.BackgroundColor3 = detectorEnabled and Color3.fromRGB(220,120,80) or Color3.fromRGB(160,160,160) if not detectorEnabled then for t in pairs(overlays) do removeOverlay(t) end end end) noclipBtn.MouseButton1Click:Connect(function() noclipEnabled = not noclipEnabled noclipBtn.Text = noclipEnabled and "UNANCHORED NOCLIP: ON" or "UNANCHORED NOCLIP: OFF" noclipBtn.BackgroundColor3 = noclipEnabled and Color3.fromRGB(220,120,80) or Color3.fromRGB(160,160,160) if noclipEnabled then startNoClip() else stopNoClip() end end) close.MouseButton1Click:Connect(function() if mainConn then mainConn:Disconnect() end clearOrbit() stopNoClip() for t in pairs(overlays) do removeOverlay(t) end gui:Destroy() script:Destroy() end)