local service = game:GetService("ProximityPromptService") local RunService = game:GetService("RunService") local player = game:GetService("Players").LocalPlayer local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui")) gui.ResetOnSpawn = false local track = Instance.new("Frame", gui) track.AnchorPoint = Vector2.new(0.5, 0) track.Position, track.Size = UDim2.fromScale(0.5, 0.75), UDim2.fromOffset(170, 12) track.Visible = false local fill = Instance.new("Frame", track) fill.BackgroundColor3 = Color3.fromRGB(64, 230, 219) local active, began service.PromptButtonHoldBegan:Connect(function(prompt, who) if who ~= player or prompt.HoldDuration <= 0 then return end active, began = prompt, os.clock() track.Visible = true end) local function finish(prompt) if active == prompt then active = nil; track.Visible = false end end service.PromptButtonHoldEnded:Connect(finish) service.PromptHidden:Connect(finish) service.PromptTriggered:Connect(finish) RunService.RenderStepped:Connect(function() if active then fill.Size = UDim2.fromScale(math.clamp((os.clock() - began) / active.HoldDuration, 0, 1), 1) end end)