local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local remote = ReplicatedStorage :WaitForChild("Events") :WaitForChild("RemoteFunction") :WaitForChild("PlayerSpawn") local progressBar local brodidyoufirejustcurious = false local lastBarInstance = nil local function getProgress() local gui = player:WaitForChild("PlayerGui") local battle = gui:FindFirstChild("BattleScreen") if not battle then return nil end local bank = battle:FindFirstChild("BankButton") if not bank then return nil end local bar = bank:FindFirstChild("Bar") if not bar then return nil end return bar:FindFirstChild("Progress") end local function bind() progressBar = getProgress() if progressBar ~= lastBarInstance then lastBarInstance = progressBar brodidyoufirejustcurious = false end end bind() player.PlayerGui.DescendantAdded:Connect(function(obj) if obj.Name == "Progress" then task.defer(function() pcall(bind) end) end end) player.PlayerGui.DescendantRemoving:Connect(function(obj) if obj == progressBar then progressBar = nil end end) RunService.RenderStepped:Connect(function() if not progressBar or not progressBar.Parent then progressBar = getProgress() return end local size = progressBar.Size local reached = size.X.Scale <= 0.01 and size.X.Offset == 0 and size.Y.Scale >= 1 and size.Y.Offset == 0 if reached then if brodidyoufirejustcurious then return end brodidyoufirejustcurious = true pcall(function() remote:InvokeServer("Bank") end) else brodidyoufirejustcurious = false end end)