-- LocalScript (in StarterPlayerScripts) local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local localPlayer = Players.LocalPlayer local character = localPlayer.Character or localPlayer.CharacterAdded:Wait() local rootPart = character:WaitForChild("HumanoidRootPart") -- Remove old GUI if it exists local existingGui = localPlayer:WaitForChild("PlayerGui"):FindFirstChild("ToggleGui") if existingGui then existingGui:Destroy() end local proximityPrompt = game:GetService("Workspace"):WaitForChild("Environment") :WaitForChild("PointOfInterest") :WaitForChild("SpinnerGames") :WaitForChild("SlotMinigame") :WaitForChild("Button") :WaitForChild("Head") :WaitForChild("ProximityPrompt") -- State local isRunning = false local isUIVisible = true local isDragging = false local dragOffset = Vector2.new(0, 0) -- Create UI local screenGui = Instance.new("ScreenGui") screenGui.Name = "ToggleGui" screenGui.ResetOnSpawn = false screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling screenGui.Parent = localPlayer:WaitForChild("PlayerGui") -- Outer frame local outerFrame = Instance.new("Frame") outerFrame.Name = "MainFrame" outerFrame.Size = UDim2.new(0, 160, 0, 72) outerFrame.Position = UDim2.new(0, 20, 0.5, -36) outerFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) outerFrame.BorderSizePixel = 0 outerFrame.Active = true outerFrame.ClipsDescendants = true outerFrame.Parent = screenGui local outerCorner = Instance.new("UICorner") outerCorner.CornerRadius = UDim.new(0, 14) outerCorner.Parent = outerFrame -- Shadow local shadow = Instance.new("ImageLabel") shadow.Name = "Shadow" shadow.Size = UDim2.new(1, 20, 1, 20) shadow.Position = UDim2.new(0, -10, 0, -10) shadow.BackgroundTransparency = 1 shadow.Image = "rbxassetid://5028857084" shadow.ImageColor3 = Color3.fromRGB(0, 0, 0) shadow.ImageTransparency = 0.6 shadow.ScaleType = Enum.ScaleType.Slice shadow.SliceCenter = Rect.new(24, 24, 276, 276) shadow.ZIndex = 0 shadow.Parent = outerFrame -- Terminate background local terminateBg = Instance.new("Frame") terminateBg.Name = "TerminateBg" terminateBg.Size = UDim2.new(1, -20, 0, 30) terminateBg.Position = UDim2.new(0, 10, 0, -14) terminateBg.BackgroundColor3 = Color3.fromRGB(60, 60, 60) terminateBg.BorderSizePixel = 0 terminateBg.ZIndex = 2 terminateBg.Parent = outerFrame local terminateCorner = Instance.new("UICorner") terminateCorner.CornerRadius = UDim.new(0, 10) terminateCorner.Parent = terminateBg -- Terminate button local terminateBtn = Instance.new("TextButton") terminateBtn.Name = "TerminateButton" terminateBtn.Size = UDim2.new(1, -20, 0, 16) terminateBtn.Position = UDim2.new(0, 10, 0, 0) terminateBtn.BackgroundTransparency = 1 terminateBtn.TextColor3 = Color3.fromRGB(200, 200, 200) terminateBtn.Text = "Terminate" terminateBtn.Font = Enum.Font.GothamBold terminateBtn.TextSize = 11 terminateBtn.ZIndex = 3 terminateBtn.Parent = outerFrame -- Terminate hover terminateBtn.MouseEnter:Connect(function() terminateBg.BackgroundColor3 = Color3.fromHex("#8A4137") end) terminateBtn.MouseLeave:Connect(function() terminateBg.BackgroundColor3 = Color3.fromRGB(60, 60, 60) end) -- Toggle button local button = Instance.new("TextButton") button.Name = "ToggleButton" button.Size = UDim2.new(1, -20, 0, 46) button.Position = UDim2.new(0, 10, 0, 20) button.BackgroundColor3 = Color3.fromRGB(60, 60, 60) button.TextColor3 = Color3.fromRGB(255, 255, 255) button.Text = "● OFF" button.Font = Enum.Font.GothamBold button.TextSize = 16 button.BorderSizePixel = 0 button.ZIndex = 2 button.Parent = outerFrame local buttonCorner = Instance.new("UICorner") buttonCorner.CornerRadius = UDim.new(0, 10) buttonCorner.Parent = button -- Toggle hover button.MouseEnter:Connect(function() if not isRunning then button.BackgroundColor3 = Color3.fromRGB(50, 160, 80) else button.BackgroundColor3 = Color3.fromHex("#8A4137") end end) button.MouseLeave:Connect(function() if not isRunning then button.BackgroundColor3 = Color3.fromRGB(60, 60, 60) else button.BackgroundColor3 = Color3.fromRGB(50, 160, 80) end end) -- Dragging logic outerFrame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then isDragging = true local mousePos = UserInputService:GetMouseLocation() local framePos = outerFrame.AbsolutePosition dragOffset = Vector2.new(mousePos.X - framePos.X, mousePos.Y - framePos.Y) end end) outerFrame.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then isDragging = false end end) UserInputService.InputChanged:Connect(function(input) if isDragging and input.UserInputType == Enum.UserInputType.MouseMovement then local mousePos = UserInputService:GetMouseLocation() local screenSize = screenGui.AbsoluteSize local frameSize = outerFrame.AbsoluteSize local newX = math.clamp(mousePos.X - dragOffset.X, 0, screenSize.X - frameSize.X) local newY = math.clamp(mousePos.Y - dragOffset.Y, 0, screenSize.Y - frameSize.Y) outerFrame.Position = UDim2.new(0, newX, 0, newY) end end) -- Terminate terminateBtn.MouseButton1Click:Connect(function() isRunning = false screenGui:Destroy() end) -- Button toggle button.MouseButton1Click:Connect(function() isRunning = not isRunning if isRunning then button.Text = "● ON" button.BackgroundColor3 = Color3.fromRGB(50, 160, 80) task.spawn(function() while isRunning and screenGui.Parent ~= nil do if not proximityPrompt.Enabled then repeat proximityPrompt:GetPropertyChangedSignal("Enabled"):Wait() until proximityPrompt.Enabled or not isRunning end if not isRunning or screenGui.Parent == nil then break end local distance = (rootPart.Position - proximityPrompt.Parent.Position).Magnitude if distance <= proximityPrompt.MaxActivationDistance then fireproximityprompt(proximityPrompt) end task.wait(0.1) end end) else button.Text = "● OFF" button.BackgroundColor3 = Color3.fromRGB(60, 60, 60) end end) -- RCTRL = toggle UI visibility UserInputService.InputBegan:Connect(function(input, gameProcessed) if input.KeyCode == Enum.KeyCode.RightControl then isUIVisible = not isUIVisible outerFrame.Visible = isUIVisible end end)