-- LocalScript inside StarterPlayerScripts local player = game.Players.LocalPlayer -- Create ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Name = "AutoTriggerGui" screenGui.ResetOnSpawn = false screenGui.Parent = player:WaitForChild("PlayerGui") -- Create Button local button = Instance.new("TextButton") button.Size = UDim2.new(0, 200, 0, 50) button.Position = UDim2.new(0, 20, 0, 20) button.Text = "Auto Trigger: OFF" button.BackgroundColor3 = Color3.fromRGB(200, 0, 0) button.Parent = screenGui -- Toggle state local autoTriggerEnabled = false button.MouseButton1Click:Connect(function() autoTriggerEnabled = not autoTriggerEnabled button.Text = "Auto Trigger: " .. (autoTriggerEnabled and "ON" or "OFF") button.BackgroundColor3 = autoTriggerEnabled and Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0) end) -- Function to configure prompts local function setupPrompt(prompt) if prompt:IsA("ProximityPrompt") then -- Always make instant prompt.HoldDuration = 0 prompt.RequiresLineOfSight = false -- Hook auto-trigger prompt.PromptShown:Connect(function() if autoTriggerEnabled then prompt:InputHoldBegin() prompt:InputHoldEnd() end end) end end -- Apply to existing prompts for _, descendant in ipairs(workspace:GetDescendants()) do setupPrompt(descendant) end -- Apply to new prompts added later workspace.DescendantAdded:Connect(function(descendant) setupPrompt(descendant) end) -- Make GUI draggable local dragging = false local dragInput, dragStart, startPos local function update(input) local delta = input.Position - dragStart button.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end button.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = button.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) button.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement then dragInput = input end end) game:GetService("UserInputService").InputChanged:Connect(function(input) if input == dragInput and dragging then update(input) end end)