Citizen.CreateThread(function()
        while true do
            Citizen.Wait(1000)
            local playerPed  = PlayerPedId()
            local prevHealth = GetEntityHealth(playerPed)
            local health     = prevHealth
            local stressVal  = 0
            TriggerEvent('esx_status:getStatus', 'hunger', function(status)
                if status.val == 0 then
                    if prevHealth <= 150 then
                        health = health - 5
                    else
                        health = health - 1
                    end
                end
            end)
            TriggerEvent('esx_status:getStatus', 'thirst', function(status)
                if status.val == 0 then
                    if prevHealth <= 150 then
                        health = health - 5
                    else
                        health = health - 1
                    end
                end
            end)
              TriggerEvent('esx_status:getStatus', 'stress', function(status)
                stressVal = status.val
            end)
            if health ~= prevHealth then
                SetEntityHealth(playerPed, health)
            end
            if stressVal >= 750000 then
                Citizen.Wait(5000)
                ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.06)
                exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000)
            elseif stressVal >= 700000 then
                Citizen.Wait(10000)
                ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.03)
                exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000)
            elseif stressVal >= 600000 then
                Citizen.Wait(15000)
                ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.02)
                exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000)
            elseif stressVal >= 350000 then
                Citizen.Wait(20000)
                ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.01)
                exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000)
            end
        end
    end)
end)