local screenGui = Instance.new("ScreenGui") screenGui.Name = "Gui" screenGui.ResetOnSpawn = false screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") local button = Instance.new("TextButton") button.Name = "Button" button.Size = UDim2.fromOffset(50, 50) button.Position = UDim2.new(0, 10, 0, 30) button.Text = "Off" button.BackgroundColor3 = Color3.fromRGB(50, 50, 50) button.TextColor3 = Color3.fromRGB(255, 255, 255) button.Font = Enum.Font.SourceSans button.TextSize = 24 button.Parent = screenGui local stamina = false local function toggleStamina() stamina = not stamina button.Text = stamina and "On" or "Off" local RunService = game:GetService("RunService") RunService.RenderStepped:Wait() local sprintingModule = require(game:GetService("ReplicatedStorage").Systems.Character.Game.Sprinting) if not sprintingModule.DefaultsSet then sprintingModule.Init() end if stamina then sprintingModule.StaminaLoss = 0 sprintingModule.StaminaGain = 100 sprintingModule.MinStamina = 0 sprintingModule.MaxStamina = math.huge sprintingModule.Stamina = math.huge sprintingModule.StaminaLossDisabled = true else sprintingModule.StaminaLoss = 10 sprintingModule.StaminaGain = 20 sprintingModule.MinStamina = 0 sprintingModule.MaxStamina = 100 sprintingModule.Stamina = 100 sprintingModule.StaminaLossDisabled = false end if sprintingModule.__staminaChangedEvent then sprintingModule.__staminaChangedEvent:Fire() end end button.MouseButton1Click:Connect(toggleStamina)