-- LocalScript: StarterPlayer > StarterPlayerScripts > BoostClient local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local player = Players.LocalPlayer local remotes = ReplicatedStorage:WaitForChild("BoostRemotes") local request = remotes:WaitForChild("RequestBoost") local feedback = remotes:WaitForChild("BoostFeedback") local gui = Instance.new("ScreenGui") gui.Name = "BoostGui" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local button = Instance.new("TextButton") button.Name = "RequestButton" button.AnchorPoint = Vector2.new(1, 1) button.Position = UDim2.new(1, -20, 1, -100) button.Size = UDim2.fromOffset(220, 56) button.BackgroundColor3 = Color3.fromRGB(30, 100, 60) button.TextColor3 = Color3.new(1, 1, 1) button.TextSize = 22 button.Text = "Request boost" button.Parent = gui local status = Instance.new("TextLabel") status.Name = "StatusLabel" status.AnchorPoint = Vector2.new(1, 1) status.Position = UDim2.new(1, -20, 1, -164) status.Size = UDim2.fromOffset(260, 76) status.BackgroundColor3 = Color3.fromRGB(25, 30, 40) status.TextColor3 = Color3.new(1, 1, 1) status.TextSize = 18 status.TextWrapped = true status.Text = "Stand near the green station and request a boost" status.Parent = gui local REQUEST_TIMEOUT = 4 local lastClick = -math.huge local latestRequestId = 0 local pending = false button.Activated:Connect(function() if pending or os.clock() - lastClick < 0.6 then return end lastClick = os.clock() latestRequestId += 1 local requestId = latestRequestId pending = true button.Text = "Waiting..." status.Text = "Requesting..." request:FireServer("speed", requestId) task.delay(REQUEST_TIMEOUT, function() if pending and latestRequestId == requestId then pending = false button.Text = "Request boost" status.Text = "No reply yet. Check your status, then tap to retry." status.TextColor3 = Color3.fromRGB(255, 205, 160) end end) end) feedback.OnClientEvent:Connect(function(requestId, ok, message) if requestId ~= latestRequestId then return end pending = false button.Text = "Request boost" status.Text = message status.TextColor3 = ok and Color3.fromRGB(180, 255, 190) or Color3.fromRGB(255, 205, 160) end)