
2.8k Views
194 Executions
Stamina Bar
Universal Script 📌
joaogabrielbds23Published 5
1 year ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
It's a stamina bar with a sprint or stop sprint button :/ I don't know why you would use that (ALL MY SCRIPT'S ARE MADE BY AI, I USED GEMINI FOR THAT)
-- LocalScript (dentro de StarterPlayer.StarterPlayerScripts)
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Camera = workspace.CurrentCamera
-- Configurações
local MAX_STAMINA = 100
local RUN_SPEED = 20
local WALK_SPEED = 16 -- Velocidade padrão do Roblox
local RUN_FOV = 85
local NORMAL_FOV = 70 -- FOV padrão do Roblox
local STAMINA_DECREASE_AMOUNT = 8
local STAMINA_DECREASE_INTERVAL = 2 -- segundos
local STAMINA_REGEN_AMOUNT = 5
local STAMINA_REGEN_INTERVAL = 1 -- segundo
-- Variáveis de estado
local currentStamina = MAX_STAMINA
local isRunning = false
local lastStaminaDecreaseTime = 0
local lastStaminaRegenTime = 0
-- Criar a UI
local playerGui = Player:WaitForChild("PlayerGui")
-- ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "StaminaUI"
screenGui.Parent = playerGui
-- Frame da barra de stamina (fundo)
local staminaFrame = Instance.new("Frame")
staminaFrame.Name = "StaminaFrame"
staminaFrame.Size = UDim2.new(0.3, 0, 0.03, 0) -- 30% da largura da tela, 3% da altura









It seems useless Especially when you're just limiting yourself
Why would you use this script? I use for fun :/