-- 1. Persistent UI Setup local ScreenGui = Instance.new("ScreenGui") local ToggleButton = Instance.new("TextButton") ScreenGui.Name = "SingleClickG" ScreenGui.Parent = game:GetService("CoreGui") ScreenGui.ResetOnSpawn = false ToggleButton.Name = "ToggleButton" ToggleButton.Parent = ScreenGui ToggleButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30) ToggleButton.Position = UDim2.new(0.1, 0, 0.5, 0) ToggleButton.Size = UDim2.new(0, 150, 0, 50) ToggleButton.Text = "AUTO-G: OFF" ToggleButton.TextColor3 = Color3.new(1, 1, 1) ToggleButton.Font = Enum.Font.GothamBold ToggleButton.Draggable = true -- 2. Variables & Memory local active = false local player = game.Players.LocalPlayer local clickedPrompts = {} -- This table remembers which 'G' buttons we already clicked -- 3. Toggle Function ToggleButton.MouseButton1Click:Connect(function() active = not active ToggleButton.Text = active and "AUTO-G: ON" or "AUTO-G: OFF" ToggleButton.BackgroundColor3 = active and Color3.fromRGB(0, 180, 80) or Color3.fromRGB(180, 0, 0) -- Clear memory when you turn it off/on to refresh the script if not active then clickedPrompts = {} end end) -- 4. Logic Loop task.spawn(function() while task.wait(0.2) do -- Checks 5 times per second if active and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then local rootPos = player.Character.HumanoidRootPart.Position for _, v in pairs(workspace:GetDescendants()) do if v:IsA("ProximityPrompt") then -- CHECK 1: Is it a 'G' prompt and is it enabled? if v.KeyboardKeyCode == Enum.KeyCode.G and v.Enabled then -- CHECK 2: Have we clicked this specific one before? if not clickedPrompts[v] then -- CHECK 3: Are we close enough? local mag = (rootPos - v.Parent:GetPivot().Position).Magnitude if mag <= v.MaxActivationDistance then -- TRIGGER fireproximityprompt(v) -- ADD TO MEMORY: Save this prompt so we don't click it again clickedPrompts[v] = true -- Remove from memory if the prompt is destroyed or disabled later v.AncestryChanged:Connect(function() if not v:IsDescendantOf(game) then clickedPrompts[v] = nil end end) end end end end end end end end