Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
- local Window = Rayfield:CreateWindow({
- Name = "Or4ng3_St4m1na Management",
- Icon = 0,
- LoadingTitle = "Stamina Tech by Or4ng3",
- LoadingSubtitle = "For Forsaken",
- Theme = "AmberGlow", -- Keeping your signature theme
- DisableRayfieldPrompts = false,
- ConfigurationSaving = {
- Enabled = true,
- FolderName = "Or4ng3_Stamina_Config",
- FileName = "StaminaSettings"
- }
- })
- -- Variables
- _G.StaminaAutoManage = false
- _G.Threshold = 10
- local player = game.Players.LocalPlayer
- local normalSpeed = 16 -- Standard walk speed
- local Tab = Window:CreateTab("Management", 4483362458)
- Tab:CreateSection("Auto Settings")
- Tab:CreateToggle({
- Name = "Enable Auto-Management",
- CurrentValue = false,
- Flag = "StaminaToggle",
- Callback = function(Value)
- _G.StaminaAutoManage = Value
- end,
- })
- Tab:CreateSlider({
- Name = "Stop Running At (Stamina %)",
- Range = {1, 100},
- Increment = 1,
- Suffix = "% Stamina",
- CurrentValue = 10,
- Flag = "StaminaSlider",
- Callback = function(Value)
- _G.Threshold = Value
- end,
- })
- Tab:CreateSection("Info")
- Tab:CreateParagraph({Title = "How it works", Content = "When enabled, if your stamina drops below the slider amount, the script will force your speed back to 16 to prevent exhaustion. It will let you run again once you are above the limit."})
- -- Logic Loop
- task.spawn(function()
- while true do
- if _G.StaminaAutoManage then
- pcall(function()
- local char = player.Character
- if char then
- local stamina = char:FindFirstChild("Stamina") or char:FindFirstChild("StaminaValue")
- local humanoid = char:FindFirstChild("Humanoid")
- if stamina and humanoid then
- -- If stamina is too low, force walk speed to normal
- if stamina.Value <= _G.Threshold then
- humanoid.WalkSpeed = normalSpeed
- end
- end
- end
- end)
- end
- task.wait(0.1) -- Runs 10 times a second for fast response
- end
- end)
- Rayfield:Notify({
- Title = "Stamina Script Loaded",
- Content = "Set your threshold to avoid exhaustion!",
- Duration = 5,
- })
Advertisement
Add Comment
Please, Sign In to add comment