Stamina bar going from 100 to 0 for no reason, Stamina value not getting any interactions

For some reason whenever I launch my experience, like a second or a half passes and the bar goes from full to empty. I also can’t make any interactions with the value. (example: whenever I try to make a if condition that if it’s equal or less than 0, then it stops doing the punches. It works, but, when I try to make an if that has the condition of it being less than a hundred, that waits for 0.2 seconds, and adds 2 to the stamina value.) If I made a repeat until it’s 100, then it just starts to increment onto it for no particular reason, no matter the condition.
Maybe someone knows the answer?
ModuleScript:

local info = {
    
    stamina = Instance.new("IntValue"),
    maxstamina = Instance.new("IntValue"),
    
}
return info

Stamina bar Script:

local ms = require(game.ReplicatedStorage.ModuleScript)
if not ms then
    
    ms = require(game.ReplicatedStorage:WaitForChild("ModuleScript"))
    
end
ms.stamina.Value = 100
ms.maxstamina.Value = 100

local TW = game:GetService("TweenService")--Get Tween Service

local Staminabar = script.Parent -- Get The Stamina bar

local function UpdateStaminabar() --Stamina Bar Size Change Function
    local stamina = math.clamp(ms.stamina.Value / ms.maxstamina.Value, 0, 1) --Maths
    local info = TweenInfo.new(ms.stamina.Value / ms.maxstamina.Value,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0) --Tween Info
    TW:Create(script.Parent,info,{Size = UDim2.fromScale(ms.stamina, 1)}):Play() -- Create The Tween Then Play It
end

UpdateStaminabar()--Update The Health Bar

ms.stamina.Changed:Connect(function()
    
    UpdateStaminabar()
    
end)

PunchScript:

local ms = require(game.ReplicatedStorage.ModuleScript)
if not ms then
    
    ms = require(game.ReplicatedStorage:WaitForChild("ModuleScript"))
    
end 
local uis = game:GetService("UserInputService")
local cas = game:GetService("ContextActionService")
local rs = game:GetService("ReplicatedStorage")

local events = rs:WaitForChild("Events")
local hitbox = events:WaitForChild("Hitbox")

local plr = game.Players.LocalPlayer
local character = plr.Character
if not character then
    
    plr:WaitForChild("Character")
    
end
local humanoid = character.Humanoid
local animator = humanoid:WaitForChild("Animator")

local idle = animator:LoadAnimation(script:WaitForChild("idle"))
local jab = animator:LoadAnimation(script:WaitForChild("jab"))
local rightcross = animator:LoadAnimation(script:WaitForChild("rightstraight"))
local lefthook = animator:LoadAnimation(script:WaitForChild("lefthook"))
local righthook = animator:LoadAnimation(script:WaitForChild("righthook"))
local swingsfx = script:WaitForChild("Air swing")

local currentPunch = 0
local currentPunch2 = 0
local debounce1 = false
local debounce2 = false

local function onInputBegan(input)
    
    if debounce2 == true then return end
    if ms.stamina.Value <= 0 then return end
    
    
    if input.KeyCode == Enum.KeyCode.Q then
        
        ms.stamina.Value -= 20
        debounce2 = true
        humanoid.WalkSpeed = 0.5
        lefthook:Play()
        swingsfx:Play()
        hitbox:FireServer(Vector3.new(4, 5, 3), Vector3.new(4.5, 1), 7.5, 0.15)
        task.wait(0.5)
        humanoid.WalkSpeed = 10
        lefthook:Stop()
        task.wait(6)
        debounce2 = false
        
    end 
    
    if input.KeyCode == Enum.KeyCode.E then

        ms.stamina.Value -= 20
        debounce2 = true
        humanoid.WalkSpeed = 0.5
        righthook:Play()
        swingsfx:Play()
        hitbox:FireServer(Vector3.new(4, 5, 3), Vector3.new(4.5, 1), 7.5, 0.15)
        task.wait(0.5)
        humanoid.WalkSpeed = 10
        righthook:Stop()
        task.wait(6)
        debounce2 = false

    end 
end

local function punch()
    
    if debounce1 then return end
    
    debounce1 = true
    
    if currentPunch == 0 then
        if ms.stamina.Value >= 1 then
            ms.stamina.Value -= 10
            humanoid.WalkSpeed = 0.6
            jab:Play()
            swingsfx:Play()
            hitbox:FireServer(Vector3.new(4, 5, 3), Vector3.new(5.7, 1), 2.5, 0.15)
            task.wait(0.5)
            humanoid.WalkSpeed = 10
            jab:Stop()
            debounce1 = false
        end 
        
    elseif currentPunch == 1 then
        if ms.stamina.Value >= 1 then
            ms.stamina.Value -= 10
            humanoid.WalkSpeed = 0.6
            rightcross:Play()
            swingsfx:Play()
            hitbox:FireServer(Vector3.new(4, 5, 3), Vector3.new(5.7, 1), 2.5, 0.15)
            task.wait(0.5)
            humanoid.WalkSpeed = 10
            rightcross:Stop()
            debounce1 = false
        end
    elseif currentPunch == 2 then
        if ms.stamina.Value >= 1 then
            ms.stamina.Value -= 10
            humanoid.WalkSpeed = 0.6
            jab:Play()
            swingsfx:Play()
            hitbox:FireServer(Vector3.new(4, 5, 3), Vector3.new(5.7, 1), 2.5, 0.15)
            task.wait(0.5)
            humanoid.WalkSpeed = 10
            jab:Stop()
            debounce1 = false
        end
    elseif currentPunch == 3 then
        if ms.stamina.Value >= 1 then
            ms.stamina.Value -= 10
            debounce2 = true
            humanoid.WalkSpeed = 0.6
            rightcross:Play()
            swingsfx:Play()
            hitbox:FireServer(Vector3.new(4, 5, 3), Vector3.new(5.7, 1), 5, 0.15)
            task.wait(0.5)
            humanoid.WalkSpeed = 10
            rightcross:Stop()
            debounce1 = false
            debounce2 = false
        end
    end

    if currentPunch == 3  then
        
        currentPunch = 0
        debounce1 = true
        wait(2)
        debounce1 = false
        
    else
        
        currentPunch += 1
        
    end
    
end

cas:BindAction("Punch", punch, true, Enum.UserInputType.MouseButton1)
uis.InputBegan:Connect(onInputBegan)

Hope that will help solve the case.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật