Script Dump Report

Click on a script to view source code.

Script Health Workspace.Roblox2026054.Health
-- [SERVER SCRIPT] Source hidden from client.
LocalScript Animate Workspace.Roblox2026054.Animate
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:02:51
-- Luau version 6, Types version 3
-- Time taken: 0.045815 seconds

local Parent_upvr = script.Parent
local Humanoid_upvr = Parent_upvr:WaitForChild("Humanoid")
local var11_upvw = "Standing"
local pcall_result1_3, pcall_result2_2 = pcall(function() -- Line 7
    return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop")
end)
local var15_upvr = pcall_result1_3 and pcall_result2_2
local pcall_result1_2, pcall_result2 = pcall(function() -- Line 10
    return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun")
end)
local var19_upvr = pcall_result1_2 and pcall_result2
local function getRigScale_upvr() -- Line 13, Named "getRigScale"
    --[[ Upvalues[2]:
        [1]: var19_upvr (readonly)
        [2]: Parent_upvr (readonly)
    ]]
    if var19_upvr then
        return Parent_upvr:GetScale()
    end
    return 1
end
local var20_upvw = ""
local var21_upvw
local var22_upvw
local var23_upvw
local var24_upvw = 1
local var25_upvw
local var26_upvw
local tbl_upvr_3 = {}
local tbl_upvr_2 = {
    idle = {{
        id = "http://www.roblox.com/asset/?id=507766666";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766951";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766388";
        weight = 9;
    }};
    walk = {{
        id = "http://www.roblox.com/asset/?id=507777826";
        weight = 10;
    }};
    run = {{
        id = "http://www.roblox.com/asset/?id=507767714";
        weight = 10;
    }};
    swim = {{
        id = "http://www.roblox.com/asset/?id=507784897";
        weight = 10;
    }};
    swimidle = {{
        id = "http://www.roblox.com/asset/?id=507785072";
        weight = 10;
    }};
    jump = {{
        id = "http://www.roblox.com/asset/?id=507765000";
        weight = 10;
    }};
    fall = {{
        id = "http://www.roblox.com/asset/?id=507767968";
        weight = 10;
    }};
    climb = {{
        id = "http://www.roblox.com/asset/?id=507765644";
        weight = 10;
    }};
    sit = {{
        id = "http://www.roblox.com/asset/?id=2506281703";
        weight = 10;
    }};
    toolnone = {{
        id = "http://www.roblox.com/asset/?id=507768375";
        weight = 10;
    }};
    toolslash = {{
        id = "http://www.roblox.com/asset/?id=522635514";
        weight = 10;
    }};
    toollunge = {{
        id = "http://www.roblox.com/asset/?id=522638767";
        weight = 10;
    }};
    wave = {{
        id = "http://www.roblox.com/asset/?id=507770239";
        weight = 10;
    }};
    point = {{
        id = "http://www.roblox.com/asset/?id=507770453";
        weight = 10;
    }};
    dance = {{
        id = "http://www.roblox.com/asset/?id=507771019";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507771955";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507772104";
        weight = 10;
    }};
    dance2 = {{
        id = "http://www.roblox.com/asset/?id=507776043";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776720";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776879";
        weight = 10;
    }};
    dance3 = {{
        id = "http://www.roblox.com/asset/?id=507777268";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777451";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777623";
        weight = 10;
    }};
    laugh = {{
        id = "http://www.roblox.com/asset/?id=507770818";
        weight = 10;
    }};
    cheer = {{
        id = "http://www.roblox.com/asset/?id=507770677";
        weight = 10;
    }};
}
local tbl_upvr_4 = {
    wave = false;
    point = false;
    dance = true;
    dance2 = true;
    dance3 = true;
    laugh = false;
    cheer = false;
}
math.randomseed(tick())
function findExistingAnimationInSet(arg1, arg2) -- Line 111
    if arg1 == nil or arg2 == nil then
        return 0
    end
    for i = 1, arg1.count do
        if arg1[i].anim.AnimationId == arg2.AnimationId then
            return i
        end
    end
    return 0
end
local tbl_upvr = {}
function configureAnimationSet(arg1, arg2) -- Line 125
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: tbl_upvr (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var96
    if var96 ~= nil then
        var96 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_5_upvw, pairs_result2, pairs_result3_2 = pairs(tbl_upvr_3[arg1].connections)
        for _, v in pairs_result1_5_upvw, pairs_result2, pairs_result3_2 do
            v:disconnect()
        end
    end
    pairs_result1_5_upvw = tbl_upvr_3
    pairs_result1_5_upvw[arg1] = {}
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.count = 0
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.totalWeight = 0
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.connections = {}
    pairs_result1_5_upvw = true
    local pcall_result1, _ = pcall(function() -- Line 138
        --[[ Upvalues[1]:
            [1]: pairs_result1_5_upvw (read and write)
        ]]
        pairs_result1_5_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1 then
        pairs_result1_5_upvw = true
    end
    local SOME = script:FindFirstChild(arg1)
    if pairs_result1_5_upvw and SOME ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildAdded:connect(function(arg1_2) -- Line 146
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildRemoved:connect(function(arg1_3) -- Line 147
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        for _, v_2 in pairs(SOME:GetChildren()) do
            if v_2:IsA("Animation") then
                local var109 = 1
                local Weight = v_2:FindFirstChild("Weight")
                if Weight ~= nil then
                    var109 = Weight.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                local count = tbl_upvr_3[arg1].count
                tbl_upvr_3[arg1][count] = {}
                tbl_upvr_3[arg1][count].anim = v_2
                tbl_upvr_3[arg1][count].weight = var109
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][count].weight
                table.insert(tbl_upvr_3[arg1].connections, v_2.Changed:connect(function(arg1_4) -- Line 163
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildAdded:connect(function(arg1_5) -- Line 164
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildRemoved:connect(function(arg1_6) -- Line 165
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_4, v_3 in pairs(arg2) do
            v_2 = tbl_upvr_3[arg1]
            v_2[i_4] = {}
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.anim = Instance.new("Animation")
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.Name = arg1
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.AnimationId = v_3.id
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.weight = v_3.weight
            v_2 = tbl_upvr_3[arg1]
            v_2.count = tbl_upvr_3[arg1].count + 1
            v_2 = tbl_upvr_3[arg1]
            v_2.totalWeight = tbl_upvr_3[arg1].totalWeight + v_3.weight
        end
    end
    for _, v_4 in pairs(tbl_upvr_3) do
        for i_6 = 1, v_4.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            if tbl_upvr[v_4[i_6].anim.AnimationId] == nil then
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                Humanoid_upvr:LoadAnimation(v_4[i_6].anim)
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                tbl_upvr[v_4[i_6].anim.AnimationId] = true
            end
        end
    end
end
function configureAnimationSetOld(arg1, arg2) -- Line 196
    --[[ Upvalues[2]:
        [1]: tbl_upvr_3 (readonly)
        [2]: Humanoid_upvr (readonly)
    ]]
    local var139
    if var139 ~= nil then
        var139 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_upvw, pairs_result2_5, pairs_result3_6 = pairs(tbl_upvr_3[arg1].connections)
        for _, v_5 in pairs_result1_upvw, pairs_result2_5, pairs_result3_6 do
            v_5:disconnect()
        end
    end
    pairs_result1_upvw = tbl_upvr_3
    pairs_result1_upvw[arg1] = {}
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.count = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.totalWeight = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.connections = {}
    pairs_result1_upvw = true
    local pcall_result1_4, _ = pcall(function() -- Line 209
        --[[ Upvalues[1]:
            [1]: pairs_result1_upvw (read and write)
        ]]
        pairs_result1_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1_4 then
        pairs_result1_upvw = true
    end
    local SOME_2 = script:FindFirstChild(arg1)
    if pairs_result1_upvw and SOME_2 ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildAdded:connect(function(arg1_7) -- Line 217
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildRemoved:connect(function(arg1_8) -- Line 218
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        local var149 = 1
        for _, v_6 in pairs(SOME_2:GetChildren()) do
            if v_6:IsA("Animation") then
                table.insert(tbl_upvr_3[arg1].connections, v_6.Changed:connect(function(arg1_9) -- Line 222
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                tbl_upvr_3[arg1][var149] = {}
                tbl_upvr_3[arg1][var149].anim = v_6
                local Weight_2 = v_6:FindFirstChild("Weight")
                if Weight_2 == nil then
                    tbl_upvr_3[arg1][var149].weight = 1
                else
                    tbl_upvr_3[arg1][var149].weight = Weight_2.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][var149].weight
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_9, v_7 in pairs(arg2) do
            v_6 = tbl_upvr_3[arg1]
            v_6[i_9] = {}
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.anim = Instance.new("Animation")
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.Name = arg1
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.AnimationId = v_7.id
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.weight = v_7.weight
            v_6 = tbl_upvr_3[arg1]
            v_6.count = tbl_upvr_3[arg1].count + 1
            v_6 = tbl_upvr_3[arg1]
            v_6.totalWeight = tbl_upvr_3[arg1].totalWeight + v_7.weight
        end
    end
    for _, v_8 in pairs(tbl_upvr_3) do
        for i_11 = 1, v_8.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            Humanoid_upvr:LoadAnimation(v_8[i_11].anim)
        end
    end
end
function scriptChildModified(arg1) -- Line 261
    --[[ Upvalues[1]:
        [1]: tbl_upvr_2 (readonly)
    ]]
    local var161 = tbl_upvr_2[arg1.Name]
    if var161 ~= nil then
        configureAnimationSet(arg1.Name, var161)
    end
end
script.ChildAdded:connect(scriptChildModified)
script.ChildRemoved:connect(scriptChildModified)
local var162
if Humanoid_upvr then
    var162 = Humanoid_upvr:FindFirstChildOfClass("Animator")
else
    var162 = nil
end
if var162 then
    for _, v_9 in ipairs(var162:GetPlayingAnimationTracks()) do
        v_9:Stop(0)
        v_9:Destroy()
    end
end
for i_13, _ in pairs(tbl_upvr_2) do
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [441.27]
    configureAnimationSet(i_13, nil)
end
local var169_upvw = "None"
local var170_upvw = 0
local var171_upvw = false
function stopAllAnimations() -- Line 302
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: var171_upvw (read and write)
        [4]: var21_upvw (read and write)
        [5]: var23_upvw (read and write)
        [6]: var22_upvw (read and write)
        [7]: var26_upvw (read and write)
        [8]: var25_upvw (read and write)
    ]]
    local var172
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var172] == false then
        var172 = "idle"
    end
    if var171_upvw then
        var172 = "idle"
        var171_upvw = false
    end
    var20_upvw = ""
    var21_upvw = nil
    if var23_upvw ~= nil then
        var23_upvw:disconnect()
    end
    if var22_upvw ~= nil then
        var22_upvw:Stop()
        var22_upvw:Destroy()
        var22_upvw = nil
    end
    if var26_upvw ~= nil then
        var26_upvw:disconnect()
    end
    if var25_upvw ~= nil then
        var25_upvw:Stop()
        var25_upvw:Destroy()
        var25_upvw = nil
    end
    return var172
end
local ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
function getHeightScale() -- Line 341
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: getRigScale_upvr (readonly)
        [3]: ScaleDampeningPercent_upvw (read and write)
    ]]
    local var174
    if var174 then
        var174 = Humanoid_upvr.AutomaticScalingEnabled
        if not var174 then
            var174 = getRigScale_upvr()
            return var174
        end
        var174 = Humanoid_upvr.HipHeight / 2
        if ScaleDampeningPercent_upvw == nil then
            ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
        end
        if ScaleDampeningPercent_upvw ~= nil then
            var174 = 1 + (Humanoid_upvr.HipHeight - 2) * ScaleDampeningPercent_upvw.Value / 2
        end
        return var174
    end
    return getRigScale_upvr()
end
local function _(arg1) -- Line 361, Named "rootMotionCompensation"
    return arg1 * 1.25 / getHeightScale()
end
local function setRunSpeed_upvr(arg1) -- Line 369, Named "setRunSpeed"
    --[[ Upvalues[2]:
        [1]: var22_upvw (read and write)
        [2]: var25_upvw (read and write)
    ]]
    local var175 = arg1 * 1.25 / getHeightScale()
    local var176 = 0.0001
    local var177 = 0.0001
    local var178 = 1
    if var175 <= 0.5 then
        var176 = 1
        var178 = var175 / 0.5
    elseif var175 < 1 then
        local var179 = (var175 - 0.5) / 0.5
        var176 = 1 - var179
        var177 = var179
    else
        var178 = var175 / 1
        var177 = 1
    end
    var22_upvw:AdjustWeight(var176)
    var25_upvw:AdjustWeight(var177)
    var22_upvw:AdjustSpeed(var178)
    var25_upvw:AdjustSpeed(var178)
end
function setAnimationSpeed(arg1) -- Line 395
    --[[ Upvalues[4]:
        [1]: var20_upvw (read and write)
        [2]: setRunSpeed_upvr (readonly)
        [3]: var24_upvw (read and write)
        [4]: var22_upvw (read and write)
    ]]
    if var20_upvw == "walk" then
        setRunSpeed_upvr(arg1)
    elseif arg1 ~= var24_upvw then
        var24_upvw = arg1
        var22_upvw:AdjustSpeed(var24_upvw)
    end
end
function keyFrameReachedFunc(arg1) -- Line 406
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: var15_upvr (readonly)
        [3]: var25_upvw (read and write)
        [4]: var22_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var171_upvw (read and write)
        [7]: var24_upvw (read and write)
        [8]: Humanoid_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [36] 26. Error Block 22 start (CF ANALYSIS FAILED)
    local var180
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var180] == false then
        var180 = "idle"
    end
    if var171_upvw then
        if var22_upvw.Looped then return end
        var180 = "idle"
        var171_upvw = false
    end
    playAnimation(var180, 0.15, Humanoid_upvr)
    setAnimationSpeed(var24_upvw)
    -- KONSTANTERROR: [36] 26. Error Block 22 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 end (CF ANALYSIS FAILED)
end
function rollAnimation(arg1) -- Line 444
    --[[ Upvalues[1]:
        [1]: tbl_upvr_3 (readonly)
    ]]
    local var182
    while tbl_upvr_3[arg1][var182].weight < math.random(1, tbl_upvr_3[arg1].totalWeight) do
        var182 += 1
    end
    return var182
end
local function switchToAnim_upvr(arg1, arg2, arg3, arg4) -- Line 455, Named "switchToAnim"
    --[[ Upvalues[9]:
        [1]: var21_upvw (read and write)
        [2]: var22_upvw (read and write)
        [3]: var25_upvw (read and write)
        [4]: var15_upvr (readonly)
        [5]: var24_upvw (read and write)
        [6]: var20_upvw (read and write)
        [7]: var23_upvw (read and write)
        [8]: tbl_upvr_3 (readonly)
        [9]: var26_upvw (read and write)
    ]]
    if arg1 ~= var21_upvw then
        if var22_upvw ~= nil then
            var22_upvw:Stop(arg3)
            var22_upvw:Destroy()
        end
        if var25_upvw ~= nil then
            var25_upvw:Stop(arg3)
            var25_upvw:Destroy()
            if var15_upvr == true then
                var25_upvw = nil
            end
        end
        var24_upvw = 1
        var22_upvw = arg4:LoadAnimation(arg1)
        var22_upvw.Priority = Enum.AnimationPriority.Core
        var22_upvw:Play(arg3)
        var20_upvw = arg2
        var21_upvw = arg1
        if var23_upvw ~= nil then
            var23_upvw:disconnect()
        end
        var23_upvw = var22_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        if arg2 == "walk" then
            var25_upvw = arg4:LoadAnimation(tbl_upvr_3.run[rollAnimation("run")].anim)
            var25_upvw.Priority = Enum.AnimationPriority.Core
            var25_upvw:Play(arg3)
            if var26_upvw ~= nil then
                var26_upvw:disconnect()
            end
            var26_upvw = var25_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        end
    end
end
function playAnimation(arg1, arg2, arg3) -- Line 506
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: switchToAnim_upvr (readonly)
        [3]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(tbl_upvr_3[arg1][rollAnimation(arg1)].anim, arg1, arg2, arg3)
    var171_upvw = false
end
function playEmote(arg1, arg2, arg3) -- Line 514
    --[[ Upvalues[2]:
        [1]: switchToAnim_upvr (readonly)
        [2]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(arg1, arg1.Name, arg2, arg3)
    var171_upvw = true
end
local var183_upvw = ""
local var184_upvw
local var185_upvw
local var186_upvw
function toolKeyFrameReachedFunc(arg1) -- Line 527
    --[[ Upvalues[2]:
        [1]: var183_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if arg1 == "End" then
        playToolAnimation(var183_upvw, 0, Humanoid_upvr)
    end
end
function playToolAnimation(arg1, arg2, arg3, arg4) -- Line 534
    --[[ Upvalues[5]:
        [1]: tbl_upvr_3 (readonly)
        [2]: var185_upvw (read and write)
        [3]: var184_upvw (read and write)
        [4]: var183_upvw (read and write)
        [5]: var186_upvw (read and write)
    ]]
    local anim = tbl_upvr_3[arg1][rollAnimation(arg1)].anim
    local var188
    if var185_upvw ~= anim then
        if var184_upvw ~= nil then
            var184_upvw:Stop()
            var184_upvw:Destroy()
            var188 = 0
        end
        var184_upvw = arg3:LoadAnimation(anim)
        if arg4 then
            var184_upvw.Priority = arg4
        end
        var184_upvw:Play(var188)
        var183_upvw = arg1
        var185_upvw = anim
        var186_upvw = var184_upvw.KeyframeReached:connect(toolKeyFrameReachedFunc)
    end
end
function stopToolAnimations() -- Line 561
    --[[ Upvalues[4]:
        [1]: var183_upvw (read and write)
        [2]: var186_upvw (read and write)
        [3]: var185_upvw (read and write)
        [4]: var184_upvw (read and write)
    ]]
    if var186_upvw ~= nil then
        var186_upvw:disconnect()
    end
    var183_upvw = ""
    var185_upvw = nil
    if var184_upvw ~= nil then
        var184_upvw:Stop()
        var184_upvw:Destroy()
        var184_upvw = nil
    end
    return var183_upvw
end
function onRunning(arg1) -- Line 583
    --[[ Upvalues[6]:
        [1]: var19_upvr (readonly)
        [2]: var171_upvw (read and write)
        [3]: Humanoid_upvr (readonly)
        [4]: var11_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var20_upvw (read and write)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local var189
    if var189 then
        local _ = getHeightScale()
    else
    end
    var189 = var171_upvw
    if var189 then
        if Humanoid_upvr.MoveDirection ~= Vector3.new(0, 0, 0) then
            var189 = false
        else
            var189 = true
        end
    end
    if not var189 or not (Humanoid_upvr.WalkSpeed / 1) then
    end
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    if 0.75 * 1 < arg1 then
        playAnimation("walk", 0.2, Humanoid_upvr)
        setAnimationSpeed(arg1 / 16)
        var11_upvw = "Running"
    elseif tbl_upvr_4[var20_upvw] == nil and not var171_upvw then
        playAnimation("idle", 0.2, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function onDied() -- Line 601
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Dead"
end
function onJumping() -- Line 605
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
    ]]
    playAnimation("jump", 0.1, Humanoid_upvr)
    var170_upvw = 0.31
    var11_upvw = "Jumping"
end
function onClimbing(arg1) -- Line 611
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var191
    if var19_upvr then
        var191 /= getHeightScale()
    end
    playAnimation("climb", 0.1, Humanoid_upvr)
    setAnimationSpeed(var191 / 5)
    var11_upvw = "Climbing"
end
function onGettingUp() -- Line 621
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "GettingUp"
end
function onFreeFall() -- Line 625
    --[[ Upvalues[3]:
        [1]: var170_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    if var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    end
    var11_upvw = "FreeFall"
end
function onFallingDown() -- Line 632
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "FallingDown"
end
function onSeated() -- Line 636
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Seated"
end
function onPlatformStanding() -- Line 640
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "PlatformStanding"
end
function onSwimming(arg1) -- Line 647
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var192
    if var19_upvr then
        var192 /= getHeightScale()
    end
    if 1 < var192 then
        playAnimation("swim", 0.4, Humanoid_upvr)
        setAnimationSpeed(var192 / 10)
        var11_upvw = "Swimming"
    else
        playAnimation("swimidle", 0.4, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function animateTool() -- Line 662
    --[[ Upvalues[2]:
        [1]: var169_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if var169_upvw == "None" then
        playToolAnimation("toolnone", 0.1, Humanoid_upvr, Enum.AnimationPriority.Idle)
    else
        if var169_upvw == "Slash" then
            playToolAnimation("toolslash", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
        if var169_upvw == "Lunge" then
            playToolAnimation("toollunge", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
    end
end
function getToolAnim(arg1) -- Line 679
    for _, v_11 in ipairs(arg1:GetChildren()) do
        if v_11.Name == "toolanim" and v_11.className == "StringValue" then
            return v_11
        end
    end
    return nil
end
local var198_upvw = 0
local var199_upvw = 0
function stepAnimate(arg1) -- Line 690
    --[[ Upvalues[8]:
        [1]: var198_upvw (read and write)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
        [4]: Humanoid_upvr (readonly)
        [5]: Parent_upvr (readonly)
        [6]: var169_upvw (read and write)
        [7]: var199_upvw (read and write)
        [8]: var185_upvw (read and write)
    ]]
    var198_upvw = arg1
    if 0 < var170_upvw then
        var170_upvw -= arg1 - var198_upvw
    end
    if var11_upvw == "FreeFall" and var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    else
        if var11_upvw == "Seated" then
            playAnimation("sit", 0.5, Humanoid_upvr)
            return
        end
        if var11_upvw == "Running" then
            playAnimation("walk", 0.2, Humanoid_upvr)
        elseif var11_upvw == "Dead" or var11_upvw == "GettingUp" or var11_upvw == "FallingDown" or var11_upvw == "Seated" or var11_upvw == "PlatformStanding" then
            stopAllAnimations()
        end
    end
    local class_Tool = Parent_upvr:FindFirstChildOfClass("Tool")
    if class_Tool and class_Tool:FindFirstChild("Handle") then
        local getToolAnim_result1 = getToolAnim(class_Tool)
        if getToolAnim_result1 then
            var169_upvw = getToolAnim_result1.Value
            getToolAnim_result1.Parent = nil
            var199_upvw = arg1 + 0.3
        end
        if var199_upvw < arg1 then
            var199_upvw = 0
            var169_upvw = "None"
        end
        animateTool()
    else
        stopToolAnimations()
        var169_upvw = "None"
        var185_upvw = nil
        var199_upvw = 0
    end
end
Humanoid_upvr.Died:connect(onDied)
Humanoid_upvr.Running:connect(onRunning)
Humanoid_upvr.Jumping:connect(onJumping)
Humanoid_upvr.Climbing:connect(onClimbing)
Humanoid_upvr.GettingUp:connect(onGettingUp)
Humanoid_upvr.FreeFalling:connect(onFreeFall)
Humanoid_upvr.FallingDown:connect(onFallingDown)
Humanoid_upvr.Seated:connect(onSeated)
Humanoid_upvr.PlatformStanding:connect(onPlatformStanding)
Humanoid_upvr.Swimming:connect(onSwimming)
game:GetService("Players").LocalPlayer.Chatted:connect(function(arg1) -- Line 756
    --[[ Upvalues[3]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var203
    if string.sub(arg1, 1, 3) == "/e " then
        var203 = string.sub(arg1, 4)
    elseif string.sub(arg1, 1, 7) == "/emote " then
        var203 = string.sub(arg1, 8)
    end
    if var11_upvw == "Standing" and tbl_upvr_4[var203] ~= nil then
        playAnimation(var203, 0.1, Humanoid_upvr)
    end
end)
script:WaitForChild("PlayEmote").OnInvoke = function(arg1) -- Line 770
    --[[ Upvalues[4]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
        [4]: var22_upvw (read and write)
    ]]
    if var11_upvw ~= "Standing" then return end
    if tbl_upvr_4[arg1] ~= nil then
        playAnimation(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    if typeof(arg1) == "Instance" and arg1:IsA("Animation") then
        playEmote(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    return false
end
if Parent_upvr.Parent ~= nil then
    playAnimation("idle", 0.1, Humanoid_upvr)
    var11_upvw = "Standing"
end
while Parent_upvr.Parent ~= nil do
    local _, wait_result2 = wait(0.1)
    stepAnimate(wait_result2)
end
Script Health Workspace.qwDiVRcY5.Health
-- [SERVER SCRIPT] Source hidden from client.
LocalScript Animate Workspace.qwDiVRcY5.Animate
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:02:52
-- Luau version 6, Types version 3
-- Time taken: 0.039636 seconds

local Parent_upvr = script.Parent
local Humanoid_upvr = Parent_upvr:WaitForChild("Humanoid")
local var11_upvw = "Standing"
local pcall_result1_4, pcall_result2_2 = pcall(function() -- Line 7
    return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop")
end)
local var15_upvr = pcall_result1_4 and pcall_result2_2
local pcall_result1, pcall_result2 = pcall(function() -- Line 10
    return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun")
end)
local var19_upvr = pcall_result1 and pcall_result2
local function getRigScale_upvr() -- Line 13, Named "getRigScale"
    --[[ Upvalues[2]:
        [1]: var19_upvr (readonly)
        [2]: Parent_upvr (readonly)
    ]]
    if var19_upvr then
        return Parent_upvr:GetScale()
    end
    return 1
end
local var20_upvw = ""
local var21_upvw
local var22_upvw
local var23_upvw
local var24_upvw = 1
local var25_upvw
local var26_upvw
local tbl_upvr_3 = {}
local tbl_upvr_2 = {
    idle = {{
        id = "http://www.roblox.com/asset/?id=507766666";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766951";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766388";
        weight = 9;
    }};
    walk = {{
        id = "http://www.roblox.com/asset/?id=507777826";
        weight = 10;
    }};
    run = {{
        id = "http://www.roblox.com/asset/?id=507767714";
        weight = 10;
    }};
    swim = {{
        id = "http://www.roblox.com/asset/?id=507784897";
        weight = 10;
    }};
    swimidle = {{
        id = "http://www.roblox.com/asset/?id=507785072";
        weight = 10;
    }};
    jump = {{
        id = "http://www.roblox.com/asset/?id=507765000";
        weight = 10;
    }};
    fall = {{
        id = "http://www.roblox.com/asset/?id=507767968";
        weight = 10;
    }};
    climb = {{
        id = "http://www.roblox.com/asset/?id=507765644";
        weight = 10;
    }};
    sit = {{
        id = "http://www.roblox.com/asset/?id=2506281703";
        weight = 10;
    }};
    toolnone = {{
        id = "http://www.roblox.com/asset/?id=507768375";
        weight = 10;
    }};
    toolslash = {{
        id = "http://www.roblox.com/asset/?id=522635514";
        weight = 10;
    }};
    toollunge = {{
        id = "http://www.roblox.com/asset/?id=522638767";
        weight = 10;
    }};
    wave = {{
        id = "http://www.roblox.com/asset/?id=507770239";
        weight = 10;
    }};
    point = {{
        id = "http://www.roblox.com/asset/?id=507770453";
        weight = 10;
    }};
    dance = {{
        id = "http://www.roblox.com/asset/?id=507771019";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507771955";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507772104";
        weight = 10;
    }};
    dance2 = {{
        id = "http://www.roblox.com/asset/?id=507776043";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776720";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776879";
        weight = 10;
    }};
    dance3 = {{
        id = "http://www.roblox.com/asset/?id=507777268";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777451";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777623";
        weight = 10;
    }};
    laugh = {{
        id = "http://www.roblox.com/asset/?id=507770818";
        weight = 10;
    }};
    cheer = {{
        id = "http://www.roblox.com/asset/?id=507770677";
        weight = 10;
    }};
}
local tbl_upvr_4 = {
    wave = false;
    point = false;
    dance = true;
    dance2 = true;
    dance3 = true;
    laugh = false;
    cheer = false;
}
math.randomseed(tick())
function findExistingAnimationInSet(arg1, arg2) -- Line 111
    if arg1 == nil or arg2 == nil then
        return 0
    end
    for i = 1, arg1.count do
        if arg1[i].anim.AnimationId == arg2.AnimationId then
            return i
        end
    end
    return 0
end
local tbl_upvr = {}
function configureAnimationSet(arg1, arg2) -- Line 125
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: tbl_upvr (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var96
    if var96 ~= nil then
        var96 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_3_upvw, pairs_result2, pairs_result3_6 = pairs(tbl_upvr_3[arg1].connections)
        for _, v in pairs_result1_3_upvw, pairs_result2, pairs_result3_6 do
            v:disconnect()
        end
    end
    pairs_result1_3_upvw = tbl_upvr_3
    pairs_result1_3_upvw[arg1] = {}
    pairs_result1_3_upvw = tbl_upvr_3[arg1]
    pairs_result1_3_upvw.count = 0
    pairs_result1_3_upvw = tbl_upvr_3[arg1]
    pairs_result1_3_upvw.totalWeight = 0
    pairs_result1_3_upvw = tbl_upvr_3[arg1]
    pairs_result1_3_upvw.connections = {}
    pairs_result1_3_upvw = true
    local pcall_result1_3, _ = pcall(function() -- Line 138
        --[[ Upvalues[1]:
            [1]: pairs_result1_3_upvw (read and write)
        ]]
        pairs_result1_3_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1_3 then
        pairs_result1_3_upvw = true
    end
    local SOME = script:FindFirstChild(arg1)
    if pairs_result1_3_upvw and SOME ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildAdded:connect(function(arg1_2) -- Line 146
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildRemoved:connect(function(arg1_3) -- Line 147
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        for _, v_2 in pairs(SOME:GetChildren()) do
            if v_2:IsA("Animation") then
                local var109 = 1
                local Weight = v_2:FindFirstChild("Weight")
                if Weight ~= nil then
                    var109 = Weight.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                local count = tbl_upvr_3[arg1].count
                tbl_upvr_3[arg1][count] = {}
                tbl_upvr_3[arg1][count].anim = v_2
                tbl_upvr_3[arg1][count].weight = var109
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][count].weight
                table.insert(tbl_upvr_3[arg1].connections, v_2.Changed:connect(function(arg1_4) -- Line 163
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildAdded:connect(function(arg1_5) -- Line 164
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildRemoved:connect(function(arg1_6) -- Line 165
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_4, v_3 in pairs(arg2) do
            v_2 = tbl_upvr_3[arg1]
            v_2[i_4] = {}
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.anim = Instance.new("Animation")
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.Name = arg1
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.AnimationId = v_3.id
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.weight = v_3.weight
            v_2 = tbl_upvr_3[arg1]
            v_2.count = tbl_upvr_3[arg1].count + 1
            v_2 = tbl_upvr_3[arg1]
            v_2.totalWeight = tbl_upvr_3[arg1].totalWeight + v_3.weight
        end
    end
    for _, v_4 in pairs(tbl_upvr_3) do
        for i_6 = 1, v_4.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            if tbl_upvr[v_4[i_6].anim.AnimationId] == nil then
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                Humanoid_upvr:LoadAnimation(v_4[i_6].anim)
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                tbl_upvr[v_4[i_6].anim.AnimationId] = true
            end
        end
    end
end
function configureAnimationSetOld(arg1, arg2) -- Line 196
    --[[ Upvalues[2]:
        [1]: tbl_upvr_3 (readonly)
        [2]: Humanoid_upvr (readonly)
    ]]
    local var139
    if var139 ~= nil then
        var139 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_upvw, pairs_result2_3, pairs_result3_5 = pairs(tbl_upvr_3[arg1].connections)
        for _, v_5 in pairs_result1_upvw, pairs_result2_3, pairs_result3_5 do
            v_5:disconnect()
        end
    end
    pairs_result1_upvw = tbl_upvr_3
    pairs_result1_upvw[arg1] = {}
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.count = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.totalWeight = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.connections = {}
    pairs_result1_upvw = true
    local pcall_result1_2, _ = pcall(function() -- Line 209
        --[[ Upvalues[1]:
            [1]: pairs_result1_upvw (read and write)
        ]]
        pairs_result1_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1_2 then
        pairs_result1_upvw = true
    end
    local SOME_2 = script:FindFirstChild(arg1)
    if pairs_result1_upvw and SOME_2 ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildAdded:connect(function(arg1_7) -- Line 217
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildRemoved:connect(function(arg1_8) -- Line 218
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        local var149 = 1
        for _, v_6 in pairs(SOME_2:GetChildren()) do
            if v_6:IsA("Animation") then
                table.insert(tbl_upvr_3[arg1].connections, v_6.Changed:connect(function(arg1_9) -- Line 222
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                tbl_upvr_3[arg1][var149] = {}
                tbl_upvr_3[arg1][var149].anim = v_6
                local Weight_2 = v_6:FindFirstChild("Weight")
                if Weight_2 == nil then
                    tbl_upvr_3[arg1][var149].weight = 1
                else
                    tbl_upvr_3[arg1][var149].weight = Weight_2.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][var149].weight
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_9, v_7 in pairs(arg2) do
            v_6 = tbl_upvr_3[arg1]
            v_6[i_9] = {}
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.anim = Instance.new("Animation")
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.Name = arg1
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.AnimationId = v_7.id
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.weight = v_7.weight
            v_6 = tbl_upvr_3[arg1]
            v_6.count = tbl_upvr_3[arg1].count + 1
            v_6 = tbl_upvr_3[arg1]
            v_6.totalWeight = tbl_upvr_3[arg1].totalWeight + v_7.weight
        end
    end
    for _, v_8 in pairs(tbl_upvr_3) do
        for i_11 = 1, v_8.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            Humanoid_upvr:LoadAnimation(v_8[i_11].anim)
        end
    end
end
function scriptChildModified(arg1) -- Line 261
    --[[ Upvalues[1]:
        [1]: tbl_upvr_2 (readonly)
    ]]
    local var161 = tbl_upvr_2[arg1.Name]
    if var161 ~= nil then
        configureAnimationSet(arg1.Name, var161)
    end
end
script.ChildAdded:connect(scriptChildModified)
script.ChildRemoved:connect(scriptChildModified)
local var162
if Humanoid_upvr then
    var162 = Humanoid_upvr:FindFirstChildOfClass("Animator")
else
    var162 = nil
end
if var162 then
    for _, v_9 in ipairs(var162:GetPlayingAnimationTracks()) do
        v_9:Stop(0)
        v_9:Destroy()
    end
end
for i_13, _ in pairs(tbl_upvr_2) do
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [441.27]
    configureAnimationSet(i_13, nil)
end
local var169_upvw = "None"
local var170_upvw = 0
local var171_upvw = false
function stopAllAnimations() -- Line 302
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: var171_upvw (read and write)
        [4]: var21_upvw (read and write)
        [5]: var23_upvw (read and write)
        [6]: var22_upvw (read and write)
        [7]: var26_upvw (read and write)
        [8]: var25_upvw (read and write)
    ]]
    local var172
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var172] == false then
        var172 = "idle"
    end
    if var171_upvw then
        var172 = "idle"
        var171_upvw = false
    end
    var20_upvw = ""
    var21_upvw = nil
    if var23_upvw ~= nil then
        var23_upvw:disconnect()
    end
    if var22_upvw ~= nil then
        var22_upvw:Stop()
        var22_upvw:Destroy()
        var22_upvw = nil
    end
    if var26_upvw ~= nil then
        var26_upvw:disconnect()
    end
    if var25_upvw ~= nil then
        var25_upvw:Stop()
        var25_upvw:Destroy()
        var25_upvw = nil
    end
    return var172
end
local ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
function getHeightScale() -- Line 341
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: getRigScale_upvr (readonly)
        [3]: ScaleDampeningPercent_upvw (read and write)
    ]]
    local var174
    if var174 then
        var174 = Humanoid_upvr.AutomaticScalingEnabled
        if not var174 then
            var174 = getRigScale_upvr()
            return var174
        end
        var174 = Humanoid_upvr.HipHeight / 2
        if ScaleDampeningPercent_upvw == nil then
            ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
        end
        if ScaleDampeningPercent_upvw ~= nil then
            var174 = 1 + (Humanoid_upvr.HipHeight - 2) * ScaleDampeningPercent_upvw.Value / 2
        end
        return var174
    end
    return getRigScale_upvr()
end
local function _(arg1) -- Line 361, Named "rootMotionCompensation"
    return arg1 * 1.25 / getHeightScale()
end
local function setRunSpeed_upvr(arg1) -- Line 369, Named "setRunSpeed"
    --[[ Upvalues[2]:
        [1]: var22_upvw (read and write)
        [2]: var25_upvw (read and write)
    ]]
    local var175 = arg1 * 1.25 / getHeightScale()
    local var176 = 0.0001
    local var177 = 0.0001
    local var178 = 1
    if var175 <= 0.5 then
        var176 = 1
        var178 = var175 / 0.5
    elseif var175 < 1 then
        local var179 = (var175 - 0.5) / 0.5
        var176 = 1 - var179
        var177 = var179
    else
        var178 = var175 / 1
        var177 = 1
    end
    var22_upvw:AdjustWeight(var176)
    var25_upvw:AdjustWeight(var177)
    var22_upvw:AdjustSpeed(var178)
    var25_upvw:AdjustSpeed(var178)
end
function setAnimationSpeed(arg1) -- Line 395
    --[[ Upvalues[4]:
        [1]: var20_upvw (read and write)
        [2]: setRunSpeed_upvr (readonly)
        [3]: var24_upvw (read and write)
        [4]: var22_upvw (read and write)
    ]]
    if var20_upvw == "walk" then
        setRunSpeed_upvr(arg1)
    elseif arg1 ~= var24_upvw then
        var24_upvw = arg1
        var22_upvw:AdjustSpeed(var24_upvw)
    end
end
function keyFrameReachedFunc(arg1) -- Line 406
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: var15_upvr (readonly)
        [3]: var25_upvw (read and write)
        [4]: var22_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var171_upvw (read and write)
        [7]: var24_upvw (read and write)
        [8]: Humanoid_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [36] 26. Error Block 22 start (CF ANALYSIS FAILED)
    local var180
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var180] == false then
        var180 = "idle"
    end
    if var171_upvw then
        if var22_upvw.Looped then return end
        var180 = "idle"
        var171_upvw = false
    end
    playAnimation(var180, 0.15, Humanoid_upvr)
    setAnimationSpeed(var24_upvw)
    -- KONSTANTERROR: [36] 26. Error Block 22 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 end (CF ANALYSIS FAILED)
end
function rollAnimation(arg1) -- Line 444
    --[[ Upvalues[1]:
        [1]: tbl_upvr_3 (readonly)
    ]]
    local var182
    while tbl_upvr_3[arg1][var182].weight < math.random(1, tbl_upvr_3[arg1].totalWeight) do
        var182 += 1
    end
    return var182
end
local function switchToAnim_upvr(arg1, arg2, arg3, arg4) -- Line 455, Named "switchToAnim"
    --[[ Upvalues[9]:
        [1]: var21_upvw (read and write)
        [2]: var22_upvw (read and write)
        [3]: var25_upvw (read and write)
        [4]: var15_upvr (readonly)
        [5]: var24_upvw (read and write)
        [6]: var20_upvw (read and write)
        [7]: var23_upvw (read and write)
        [8]: tbl_upvr_3 (readonly)
        [9]: var26_upvw (read and write)
    ]]
    if arg1 ~= var21_upvw then
        if var22_upvw ~= nil then
            var22_upvw:Stop(arg3)
            var22_upvw:Destroy()
        end
        if var25_upvw ~= nil then
            var25_upvw:Stop(arg3)
            var25_upvw:Destroy()
            if var15_upvr == true then
                var25_upvw = nil
            end
        end
        var24_upvw = 1
        var22_upvw = arg4:LoadAnimation(arg1)
        var22_upvw.Priority = Enum.AnimationPriority.Core
        var22_upvw:Play(arg3)
        var20_upvw = arg2
        var21_upvw = arg1
        if var23_upvw ~= nil then
            var23_upvw:disconnect()
        end
        var23_upvw = var22_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        if arg2 == "walk" then
            var25_upvw = arg4:LoadAnimation(tbl_upvr_3.run[rollAnimation("run")].anim)
            var25_upvw.Priority = Enum.AnimationPriority.Core
            var25_upvw:Play(arg3)
            if var26_upvw ~= nil then
                var26_upvw:disconnect()
            end
            var26_upvw = var25_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        end
    end
end
function playAnimation(arg1, arg2, arg3) -- Line 506
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: switchToAnim_upvr (readonly)
        [3]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(tbl_upvr_3[arg1][rollAnimation(arg1)].anim, arg1, arg2, arg3)
    var171_upvw = false
end
function playEmote(arg1, arg2, arg3) -- Line 514
    --[[ Upvalues[2]:
        [1]: switchToAnim_upvr (readonly)
        [2]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(arg1, arg1.Name, arg2, arg3)
    var171_upvw = true
end
local var183_upvw = ""
local var184_upvw
local var185_upvw
local var186_upvw
function toolKeyFrameReachedFunc(arg1) -- Line 527
    --[[ Upvalues[2]:
        [1]: var183_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if arg1 == "End" then
        playToolAnimation(var183_upvw, 0, Humanoid_upvr)
    end
end
function playToolAnimation(arg1, arg2, arg3, arg4) -- Line 534
    --[[ Upvalues[5]:
        [1]: tbl_upvr_3 (readonly)
        [2]: var185_upvw (read and write)
        [3]: var184_upvw (read and write)
        [4]: var183_upvw (read and write)
        [5]: var186_upvw (read and write)
    ]]
    local anim = tbl_upvr_3[arg1][rollAnimation(arg1)].anim
    local var188
    if var185_upvw ~= anim then
        if var184_upvw ~= nil then
            var184_upvw:Stop()
            var184_upvw:Destroy()
            var188 = 0
        end
        var184_upvw = arg3:LoadAnimation(anim)
        if arg4 then
            var184_upvw.Priority = arg4
        end
        var184_upvw:Play(var188)
        var183_upvw = arg1
        var185_upvw = anim
        var186_upvw = var184_upvw.KeyframeReached:connect(toolKeyFrameReachedFunc)
    end
end
function stopToolAnimations() -- Line 561
    --[[ Upvalues[4]:
        [1]: var183_upvw (read and write)
        [2]: var186_upvw (read and write)
        [3]: var185_upvw (read and write)
        [4]: var184_upvw (read and write)
    ]]
    if var186_upvw ~= nil then
        var186_upvw:disconnect()
    end
    var183_upvw = ""
    var185_upvw = nil
    if var184_upvw ~= nil then
        var184_upvw:Stop()
        var184_upvw:Destroy()
        var184_upvw = nil
    end
    return var183_upvw
end
function onRunning(arg1) -- Line 583
    --[[ Upvalues[6]:
        [1]: var19_upvr (readonly)
        [2]: var171_upvw (read and write)
        [3]: Humanoid_upvr (readonly)
        [4]: var11_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var20_upvw (read and write)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local var189
    if var189 then
        local _ = getHeightScale()
    else
    end
    var189 = var171_upvw
    if var189 then
        if Humanoid_upvr.MoveDirection ~= Vector3.new(0, 0, 0) then
            var189 = false
        else
            var189 = true
        end
    end
    if not var189 or not (Humanoid_upvr.WalkSpeed / 1) then
    end
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    if 0.75 * 1 < arg1 then
        playAnimation("walk", 0.2, Humanoid_upvr)
        setAnimationSpeed(arg1 / 16)
        var11_upvw = "Running"
    elseif tbl_upvr_4[var20_upvw] == nil and not var171_upvw then
        playAnimation("idle", 0.2, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function onDied() -- Line 601
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Dead"
end
function onJumping() -- Line 605
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
    ]]
    playAnimation("jump", 0.1, Humanoid_upvr)
    var170_upvw = 0.31
    var11_upvw = "Jumping"
end
function onClimbing(arg1) -- Line 611
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var191
    if var19_upvr then
        var191 /= getHeightScale()
    end
    playAnimation("climb", 0.1, Humanoid_upvr)
    setAnimationSpeed(var191 / 5)
    var11_upvw = "Climbing"
end
function onGettingUp() -- Line 621
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "GettingUp"
end
function onFreeFall() -- Line 625
    --[[ Upvalues[3]:
        [1]: var170_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    if var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    end
    var11_upvw = "FreeFall"
end
function onFallingDown() -- Line 632
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "FallingDown"
end
function onSeated() -- Line 636
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Seated"
end
function onPlatformStanding() -- Line 640
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "PlatformStanding"
end
function onSwimming(arg1) -- Line 647
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var192
    if var19_upvr then
        var192 /= getHeightScale()
    end
    if 1 < var192 then
        playAnimation("swim", 0.4, Humanoid_upvr)
        setAnimationSpeed(var192 / 10)
        var11_upvw = "Swimming"
    else
        playAnimation("swimidle", 0.4, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function animateTool() -- Line 662
    --[[ Upvalues[2]:
        [1]: var169_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if var169_upvw == "None" then
        playToolAnimation("toolnone", 0.1, Humanoid_upvr, Enum.AnimationPriority.Idle)
    else
        if var169_upvw == "Slash" then
            playToolAnimation("toolslash", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
        if var169_upvw == "Lunge" then
            playToolAnimation("toollunge", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
    end
end
function getToolAnim(arg1) -- Line 679
    for _, v_11 in ipairs(arg1:GetChildren()) do
        if v_11.Name == "toolanim" and v_11.className == "StringValue" then
            return v_11
        end
    end
    return nil
end
local var198_upvw = 0
local var199_upvw = 0
function stepAnimate(arg1) -- Line 690
    --[[ Upvalues[8]:
        [1]: var198_upvw (read and write)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
        [4]: Humanoid_upvr (readonly)
        [5]: Parent_upvr (readonly)
        [6]: var169_upvw (read and write)
        [7]: var199_upvw (read and write)
        [8]: var185_upvw (read and write)
    ]]
    var198_upvw = arg1
    if 0 < var170_upvw then
        var170_upvw -= arg1 - var198_upvw
    end
    if var11_upvw == "FreeFall" and var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    else
        if var11_upvw == "Seated" then
            playAnimation("sit", 0.5, Humanoid_upvr)
            return
        end
        if var11_upvw == "Running" then
            playAnimation("walk", 0.2, Humanoid_upvr)
        elseif var11_upvw == "Dead" or var11_upvw == "GettingUp" or var11_upvw == "FallingDown" or var11_upvw == "Seated" or var11_upvw == "PlatformStanding" then
            stopAllAnimations()
        end
    end
    local class_Tool = Parent_upvr:FindFirstChildOfClass("Tool")
    if class_Tool and class_Tool:FindFirstChild("Handle") then
        local getToolAnim_result1 = getToolAnim(class_Tool)
        if getToolAnim_result1 then
            var169_upvw = getToolAnim_result1.Value
            getToolAnim_result1.Parent = nil
            var199_upvw = arg1 + 0.3
        end
        if var199_upvw < arg1 then
            var199_upvw = 0
            var169_upvw = "None"
        end
        animateTool()
    else
        stopToolAnimations()
        var169_upvw = "None"
        var185_upvw = nil
        var199_upvw = 0
    end
end
Humanoid_upvr.Died:connect(onDied)
Humanoid_upvr.Running:connect(onRunning)
Humanoid_upvr.Jumping:connect(onJumping)
Humanoid_upvr.Climbing:connect(onClimbing)
Humanoid_upvr.GettingUp:connect(onGettingUp)
Humanoid_upvr.FreeFalling:connect(onFreeFall)
Humanoid_upvr.FallingDown:connect(onFallingDown)
Humanoid_upvr.Seated:connect(onSeated)
Humanoid_upvr.PlatformStanding:connect(onPlatformStanding)
Humanoid_upvr.Swimming:connect(onSwimming)
game:GetService("Players").LocalPlayer.Chatted:connect(function(arg1) -- Line 756
    --[[ Upvalues[3]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var203
    if string.sub(arg1, 1, 3) == "/e " then
        var203 = string.sub(arg1, 4)
    elseif string.sub(arg1, 1, 7) == "/emote " then
        var203 = string.sub(arg1, 8)
    end
    if var11_upvw == "Standing" and tbl_upvr_4[var203] ~= nil then
        playAnimation(var203, 0.1, Humanoid_upvr)
    end
end)
script:WaitForChild("PlayEmote").OnInvoke = function(arg1) -- Line 770
    --[[ Upvalues[4]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
        [4]: var22_upvw (read and write)
    ]]
    if var11_upvw ~= "Standing" then return end
    if tbl_upvr_4[arg1] ~= nil then
        playAnimation(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    if typeof(arg1) == "Instance" and arg1:IsA("Animation") then
        playEmote(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    return false
end
if Parent_upvr.Parent ~= nil then
    playAnimation("idle", 0.1, Humanoid_upvr)
    var11_upvw = "Standing"
end
while Parent_upvr.Parent ~= nil do
    local _, wait_result2 = wait(0.1)
    stepAnimate(wait_result2)
end
Script Health Workspace.15121134a.Health
-- [SERVER SCRIPT] Source hidden from client.
LocalScript Animate Workspace.15121134a.Animate
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:02:54
-- Luau version 6, Types version 3
-- Time taken: 0.043251 seconds

local Parent_upvr = script.Parent
local Humanoid_upvr = Parent_upvr:WaitForChild("Humanoid")
local var11_upvw = "Standing"
local pcall_result1_3, pcall_result2_2 = pcall(function() -- Line 7
    return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop")
end)
local var15_upvr = pcall_result1_3 and pcall_result2_2
local pcall_result1_2, pcall_result2 = pcall(function() -- Line 10
    return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun")
end)
local var19_upvr = pcall_result1_2 and pcall_result2
local function getRigScale_upvr() -- Line 13, Named "getRigScale"
    --[[ Upvalues[2]:
        [1]: var19_upvr (readonly)
        [2]: Parent_upvr (readonly)
    ]]
    if var19_upvr then
        return Parent_upvr:GetScale()
    end
    return 1
end
local var20_upvw = ""
local var21_upvw
local var22_upvw
local var23_upvw
local var24_upvw = 1
local var25_upvw
local var26_upvw
local tbl_upvr_3 = {}
local tbl_upvr_2 = {
    idle = {{
        id = "http://www.roblox.com/asset/?id=507766666";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766951";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766388";
        weight = 9;
    }};
    walk = {{
        id = "http://www.roblox.com/asset/?id=507777826";
        weight = 10;
    }};
    run = {{
        id = "http://www.roblox.com/asset/?id=507767714";
        weight = 10;
    }};
    swim = {{
        id = "http://www.roblox.com/asset/?id=507784897";
        weight = 10;
    }};
    swimidle = {{
        id = "http://www.roblox.com/asset/?id=507785072";
        weight = 10;
    }};
    jump = {{
        id = "http://www.roblox.com/asset/?id=507765000";
        weight = 10;
    }};
    fall = {{
        id = "http://www.roblox.com/asset/?id=507767968";
        weight = 10;
    }};
    climb = {{
        id = "http://www.roblox.com/asset/?id=507765644";
        weight = 10;
    }};
    sit = {{
        id = "http://www.roblox.com/asset/?id=2506281703";
        weight = 10;
    }};
    toolnone = {{
        id = "http://www.roblox.com/asset/?id=507768375";
        weight = 10;
    }};
    toolslash = {{
        id = "http://www.roblox.com/asset/?id=522635514";
        weight = 10;
    }};
    toollunge = {{
        id = "http://www.roblox.com/asset/?id=522638767";
        weight = 10;
    }};
    wave = {{
        id = "http://www.roblox.com/asset/?id=507770239";
        weight = 10;
    }};
    point = {{
        id = "http://www.roblox.com/asset/?id=507770453";
        weight = 10;
    }};
    dance = {{
        id = "http://www.roblox.com/asset/?id=507771019";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507771955";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507772104";
        weight = 10;
    }};
    dance2 = {{
        id = "http://www.roblox.com/asset/?id=507776043";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776720";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776879";
        weight = 10;
    }};
    dance3 = {{
        id = "http://www.roblox.com/asset/?id=507777268";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777451";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777623";
        weight = 10;
    }};
    laugh = {{
        id = "http://www.roblox.com/asset/?id=507770818";
        weight = 10;
    }};
    cheer = {{
        id = "http://www.roblox.com/asset/?id=507770677";
        weight = 10;
    }};
}
local tbl_upvr_4 = {
    wave = false;
    point = false;
    dance = true;
    dance2 = true;
    dance3 = true;
    laugh = false;
    cheer = false;
}
math.randomseed(tick())
function findExistingAnimationInSet(arg1, arg2) -- Line 111
    if arg1 == nil or arg2 == nil then
        return 0
    end
    for i = 1, arg1.count do
        if arg1[i].anim.AnimationId == arg2.AnimationId then
            return i
        end
    end
    return 0
end
local tbl_upvr = {}
function configureAnimationSet(arg1, arg2) -- Line 125
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: tbl_upvr (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var96
    if var96 ~= nil then
        var96 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_5_upvw, pairs_result2, pairs_result3_2 = pairs(tbl_upvr_3[arg1].connections)
        for _, v in pairs_result1_5_upvw, pairs_result2, pairs_result3_2 do
            v:disconnect()
        end
    end
    pairs_result1_5_upvw = tbl_upvr_3
    pairs_result1_5_upvw[arg1] = {}
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.count = 0
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.totalWeight = 0
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.connections = {}
    pairs_result1_5_upvw = true
    local pcall_result1, _ = pcall(function() -- Line 138
        --[[ Upvalues[1]:
            [1]: pairs_result1_5_upvw (read and write)
        ]]
        pairs_result1_5_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1 then
        pairs_result1_5_upvw = true
    end
    local SOME = script:FindFirstChild(arg1)
    if pairs_result1_5_upvw and SOME ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildAdded:connect(function(arg1_2) -- Line 146
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildRemoved:connect(function(arg1_3) -- Line 147
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        for _, v_2 in pairs(SOME:GetChildren()) do
            if v_2:IsA("Animation") then
                local var109 = 1
                local Weight = v_2:FindFirstChild("Weight")
                if Weight ~= nil then
                    var109 = Weight.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                local count = tbl_upvr_3[arg1].count
                tbl_upvr_3[arg1][count] = {}
                tbl_upvr_3[arg1][count].anim = v_2
                tbl_upvr_3[arg1][count].weight = var109
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][count].weight
                table.insert(tbl_upvr_3[arg1].connections, v_2.Changed:connect(function(arg1_4) -- Line 163
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildAdded:connect(function(arg1_5) -- Line 164
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildRemoved:connect(function(arg1_6) -- Line 165
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_4, v_3 in pairs(arg2) do
            v_2 = tbl_upvr_3[arg1]
            v_2[i_4] = {}
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.anim = Instance.new("Animation")
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.Name = arg1
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.AnimationId = v_3.id
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.weight = v_3.weight
            v_2 = tbl_upvr_3[arg1]
            v_2.count = tbl_upvr_3[arg1].count + 1
            v_2 = tbl_upvr_3[arg1]
            v_2.totalWeight = tbl_upvr_3[arg1].totalWeight + v_3.weight
        end
    end
    for _, v_4 in pairs(tbl_upvr_3) do
        for i_6 = 1, v_4.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            if tbl_upvr[v_4[i_6].anim.AnimationId] == nil then
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                Humanoid_upvr:LoadAnimation(v_4[i_6].anim)
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                tbl_upvr[v_4[i_6].anim.AnimationId] = true
            end
        end
    end
end
function configureAnimationSetOld(arg1, arg2) -- Line 196
    --[[ Upvalues[2]:
        [1]: tbl_upvr_3 (readonly)
        [2]: Humanoid_upvr (readonly)
    ]]
    local var139
    if var139 ~= nil then
        var139 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_upvw, pairs_result2_5, pairs_result3_6 = pairs(tbl_upvr_3[arg1].connections)
        for _, v_5 in pairs_result1_upvw, pairs_result2_5, pairs_result3_6 do
            v_5:disconnect()
        end
    end
    pairs_result1_upvw = tbl_upvr_3
    pairs_result1_upvw[arg1] = {}
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.count = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.totalWeight = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.connections = {}
    pairs_result1_upvw = true
    local pcall_result1_4, _ = pcall(function() -- Line 209
        --[[ Upvalues[1]:
            [1]: pairs_result1_upvw (read and write)
        ]]
        pairs_result1_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1_4 then
        pairs_result1_upvw = true
    end
    local SOME_2 = script:FindFirstChild(arg1)
    if pairs_result1_upvw and SOME_2 ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildAdded:connect(function(arg1_7) -- Line 217
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildRemoved:connect(function(arg1_8) -- Line 218
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        local var149 = 1
        for _, v_6 in pairs(SOME_2:GetChildren()) do
            if v_6:IsA("Animation") then
                table.insert(tbl_upvr_3[arg1].connections, v_6.Changed:connect(function(arg1_9) -- Line 222
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                tbl_upvr_3[arg1][var149] = {}
                tbl_upvr_3[arg1][var149].anim = v_6
                local Weight_2 = v_6:FindFirstChild("Weight")
                if Weight_2 == nil then
                    tbl_upvr_3[arg1][var149].weight = 1
                else
                    tbl_upvr_3[arg1][var149].weight = Weight_2.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][var149].weight
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_9, v_7 in pairs(arg2) do
            v_6 = tbl_upvr_3[arg1]
            v_6[i_9] = {}
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.anim = Instance.new("Animation")
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.Name = arg1
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.AnimationId = v_7.id
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.weight = v_7.weight
            v_6 = tbl_upvr_3[arg1]
            v_6.count = tbl_upvr_3[arg1].count + 1
            v_6 = tbl_upvr_3[arg1]
            v_6.totalWeight = tbl_upvr_3[arg1].totalWeight + v_7.weight
        end
    end
    for _, v_8 in pairs(tbl_upvr_3) do
        for i_11 = 1, v_8.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            Humanoid_upvr:LoadAnimation(v_8[i_11].anim)
        end
    end
end
function scriptChildModified(arg1) -- Line 261
    --[[ Upvalues[1]:
        [1]: tbl_upvr_2 (readonly)
    ]]
    local var161 = tbl_upvr_2[arg1.Name]
    if var161 ~= nil then
        configureAnimationSet(arg1.Name, var161)
    end
end
script.ChildAdded:connect(scriptChildModified)
script.ChildRemoved:connect(scriptChildModified)
local var162
if Humanoid_upvr then
    var162 = Humanoid_upvr:FindFirstChildOfClass("Animator")
else
    var162 = nil
end
if var162 then
    for _, v_9 in ipairs(var162:GetPlayingAnimationTracks()) do
        v_9:Stop(0)
        v_9:Destroy()
    end
end
for i_13, _ in pairs(tbl_upvr_2) do
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [441.27]
    configureAnimationSet(i_13, nil)
end
local var169_upvw = "None"
local var170_upvw = 0
local var171_upvw = false
function stopAllAnimations() -- Line 302
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: var171_upvw (read and write)
        [4]: var21_upvw (read and write)
        [5]: var23_upvw (read and write)
        [6]: var22_upvw (read and write)
        [7]: var26_upvw (read and write)
        [8]: var25_upvw (read and write)
    ]]
    local var172
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var172] == false then
        var172 = "idle"
    end
    if var171_upvw then
        var172 = "idle"
        var171_upvw = false
    end
    var20_upvw = ""
    var21_upvw = nil
    if var23_upvw ~= nil then
        var23_upvw:disconnect()
    end
    if var22_upvw ~= nil then
        var22_upvw:Stop()
        var22_upvw:Destroy()
        var22_upvw = nil
    end
    if var26_upvw ~= nil then
        var26_upvw:disconnect()
    end
    if var25_upvw ~= nil then
        var25_upvw:Stop()
        var25_upvw:Destroy()
        var25_upvw = nil
    end
    return var172
end
local ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
function getHeightScale() -- Line 341
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: getRigScale_upvr (readonly)
        [3]: ScaleDampeningPercent_upvw (read and write)
    ]]
    local var174
    if var174 then
        var174 = Humanoid_upvr.AutomaticScalingEnabled
        if not var174 then
            var174 = getRigScale_upvr()
            return var174
        end
        var174 = Humanoid_upvr.HipHeight / 2
        if ScaleDampeningPercent_upvw == nil then
            ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
        end
        if ScaleDampeningPercent_upvw ~= nil then
            var174 = 1 + (Humanoid_upvr.HipHeight - 2) * ScaleDampeningPercent_upvw.Value / 2
        end
        return var174
    end
    return getRigScale_upvr()
end
local function _(arg1) -- Line 361, Named "rootMotionCompensation"
    return arg1 * 1.25 / getHeightScale()
end
local function setRunSpeed_upvr(arg1) -- Line 369, Named "setRunSpeed"
    --[[ Upvalues[2]:
        [1]: var22_upvw (read and write)
        [2]: var25_upvw (read and write)
    ]]
    local var175 = arg1 * 1.25 / getHeightScale()
    local var176 = 0.0001
    local var177 = 0.0001
    local var178 = 1
    if var175 <= 0.5 then
        var176 = 1
        var178 = var175 / 0.5
    elseif var175 < 1 then
        local var179 = (var175 - 0.5) / 0.5
        var176 = 1 - var179
        var177 = var179
    else
        var178 = var175 / 1
        var177 = 1
    end
    var22_upvw:AdjustWeight(var176)
    var25_upvw:AdjustWeight(var177)
    var22_upvw:AdjustSpeed(var178)
    var25_upvw:AdjustSpeed(var178)
end
function setAnimationSpeed(arg1) -- Line 395
    --[[ Upvalues[4]:
        [1]: var20_upvw (read and write)
        [2]: setRunSpeed_upvr (readonly)
        [3]: var24_upvw (read and write)
        [4]: var22_upvw (read and write)
    ]]
    if var20_upvw == "walk" then
        setRunSpeed_upvr(arg1)
    elseif arg1 ~= var24_upvw then
        var24_upvw = arg1
        var22_upvw:AdjustSpeed(var24_upvw)
    end
end
function keyFrameReachedFunc(arg1) -- Line 406
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: var15_upvr (readonly)
        [3]: var25_upvw (read and write)
        [4]: var22_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var171_upvw (read and write)
        [7]: var24_upvw (read and write)
        [8]: Humanoid_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [36] 26. Error Block 22 start (CF ANALYSIS FAILED)
    local var180
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var180] == false then
        var180 = "idle"
    end
    if var171_upvw then
        if var22_upvw.Looped then return end
        var180 = "idle"
        var171_upvw = false
    end
    playAnimation(var180, 0.15, Humanoid_upvr)
    setAnimationSpeed(var24_upvw)
    -- KONSTANTERROR: [36] 26. Error Block 22 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 end (CF ANALYSIS FAILED)
end
function rollAnimation(arg1) -- Line 444
    --[[ Upvalues[1]:
        [1]: tbl_upvr_3 (readonly)
    ]]
    local var182
    while tbl_upvr_3[arg1][var182].weight < math.random(1, tbl_upvr_3[arg1].totalWeight) do
        var182 += 1
    end
    return var182
end
local function switchToAnim_upvr(arg1, arg2, arg3, arg4) -- Line 455, Named "switchToAnim"
    --[[ Upvalues[9]:
        [1]: var21_upvw (read and write)
        [2]: var22_upvw (read and write)
        [3]: var25_upvw (read and write)
        [4]: var15_upvr (readonly)
        [5]: var24_upvw (read and write)
        [6]: var20_upvw (read and write)
        [7]: var23_upvw (read and write)
        [8]: tbl_upvr_3 (readonly)
        [9]: var26_upvw (read and write)
    ]]
    if arg1 ~= var21_upvw then
        if var22_upvw ~= nil then
            var22_upvw:Stop(arg3)
            var22_upvw:Destroy()
        end
        if var25_upvw ~= nil then
            var25_upvw:Stop(arg3)
            var25_upvw:Destroy()
            if var15_upvr == true then
                var25_upvw = nil
            end
        end
        var24_upvw = 1
        var22_upvw = arg4:LoadAnimation(arg1)
        var22_upvw.Priority = Enum.AnimationPriority.Core
        var22_upvw:Play(arg3)
        var20_upvw = arg2
        var21_upvw = arg1
        if var23_upvw ~= nil then
            var23_upvw:disconnect()
        end
        var23_upvw = var22_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        if arg2 == "walk" then
            var25_upvw = arg4:LoadAnimation(tbl_upvr_3.run[rollAnimation("run")].anim)
            var25_upvw.Priority = Enum.AnimationPriority.Core
            var25_upvw:Play(arg3)
            if var26_upvw ~= nil then
                var26_upvw:disconnect()
            end
            var26_upvw = var25_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        end
    end
end
function playAnimation(arg1, arg2, arg3) -- Line 506
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: switchToAnim_upvr (readonly)
        [3]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(tbl_upvr_3[arg1][rollAnimation(arg1)].anim, arg1, arg2, arg3)
    var171_upvw = false
end
function playEmote(arg1, arg2, arg3) -- Line 514
    --[[ Upvalues[2]:
        [1]: switchToAnim_upvr (readonly)
        [2]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(arg1, arg1.Name, arg2, arg3)
    var171_upvw = true
end
local var183_upvw = ""
local var184_upvw
local var185_upvw
local var186_upvw
function toolKeyFrameReachedFunc(arg1) -- Line 527
    --[[ Upvalues[2]:
        [1]: var183_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if arg1 == "End" then
        playToolAnimation(var183_upvw, 0, Humanoid_upvr)
    end
end
function playToolAnimation(arg1, arg2, arg3, arg4) -- Line 534
    --[[ Upvalues[5]:
        [1]: tbl_upvr_3 (readonly)
        [2]: var185_upvw (read and write)
        [3]: var184_upvw (read and write)
        [4]: var183_upvw (read and write)
        [5]: var186_upvw (read and write)
    ]]
    local anim = tbl_upvr_3[arg1][rollAnimation(arg1)].anim
    local var188
    if var185_upvw ~= anim then
        if var184_upvw ~= nil then
            var184_upvw:Stop()
            var184_upvw:Destroy()
            var188 = 0
        end
        var184_upvw = arg3:LoadAnimation(anim)
        if arg4 then
            var184_upvw.Priority = arg4
        end
        var184_upvw:Play(var188)
        var183_upvw = arg1
        var185_upvw = anim
        var186_upvw = var184_upvw.KeyframeReached:connect(toolKeyFrameReachedFunc)
    end
end
function stopToolAnimations() -- Line 561
    --[[ Upvalues[4]:
        [1]: var183_upvw (read and write)
        [2]: var186_upvw (read and write)
        [3]: var185_upvw (read and write)
        [4]: var184_upvw (read and write)
    ]]
    if var186_upvw ~= nil then
        var186_upvw:disconnect()
    end
    var183_upvw = ""
    var185_upvw = nil
    if var184_upvw ~= nil then
        var184_upvw:Stop()
        var184_upvw:Destroy()
        var184_upvw = nil
    end
    return var183_upvw
end
function onRunning(arg1) -- Line 583
    --[[ Upvalues[6]:
        [1]: var19_upvr (readonly)
        [2]: var171_upvw (read and write)
        [3]: Humanoid_upvr (readonly)
        [4]: var11_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var20_upvw (read and write)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local var189
    if var189 then
        local _ = getHeightScale()
    else
    end
    var189 = var171_upvw
    if var189 then
        if Humanoid_upvr.MoveDirection ~= Vector3.new(0, 0, 0) then
            var189 = false
        else
            var189 = true
        end
    end
    if not var189 or not (Humanoid_upvr.WalkSpeed / 1) then
    end
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    if 0.75 * 1 < arg1 then
        playAnimation("walk", 0.2, Humanoid_upvr)
        setAnimationSpeed(arg1 / 16)
        var11_upvw = "Running"
    elseif tbl_upvr_4[var20_upvw] == nil and not var171_upvw then
        playAnimation("idle", 0.2, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function onDied() -- Line 601
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Dead"
end
function onJumping() -- Line 605
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
    ]]
    playAnimation("jump", 0.1, Humanoid_upvr)
    var170_upvw = 0.31
    var11_upvw = "Jumping"
end
function onClimbing(arg1) -- Line 611
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var191
    if var19_upvr then
        var191 /= getHeightScale()
    end
    playAnimation("climb", 0.1, Humanoid_upvr)
    setAnimationSpeed(var191 / 5)
    var11_upvw = "Climbing"
end
function onGettingUp() -- Line 621
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "GettingUp"
end
function onFreeFall() -- Line 625
    --[[ Upvalues[3]:
        [1]: var170_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    if var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    end
    var11_upvw = "FreeFall"
end
function onFallingDown() -- Line 632
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "FallingDown"
end
function onSeated() -- Line 636
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Seated"
end
function onPlatformStanding() -- Line 640
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "PlatformStanding"
end
function onSwimming(arg1) -- Line 647
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var192
    if var19_upvr then
        var192 /= getHeightScale()
    end
    if 1 < var192 then
        playAnimation("swim", 0.4, Humanoid_upvr)
        setAnimationSpeed(var192 / 10)
        var11_upvw = "Swimming"
    else
        playAnimation("swimidle", 0.4, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function animateTool() -- Line 662
    --[[ Upvalues[2]:
        [1]: var169_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if var169_upvw == "None" then
        playToolAnimation("toolnone", 0.1, Humanoid_upvr, Enum.AnimationPriority.Idle)
    else
        if var169_upvw == "Slash" then
            playToolAnimation("toolslash", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
        if var169_upvw == "Lunge" then
            playToolAnimation("toollunge", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
    end
end
function getToolAnim(arg1) -- Line 679
    for _, v_11 in ipairs(arg1:GetChildren()) do
        if v_11.Name == "toolanim" and v_11.className == "StringValue" then
            return v_11
        end
    end
    return nil
end
local var198_upvw = 0
local var199_upvw = 0
function stepAnimate(arg1) -- Line 690
    --[[ Upvalues[8]:
        [1]: var198_upvw (read and write)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
        [4]: Humanoid_upvr (readonly)
        [5]: Parent_upvr (readonly)
        [6]: var169_upvw (read and write)
        [7]: var199_upvw (read and write)
        [8]: var185_upvw (read and write)
    ]]
    var198_upvw = arg1
    if 0 < var170_upvw then
        var170_upvw -= arg1 - var198_upvw
    end
    if var11_upvw == "FreeFall" and var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    else
        if var11_upvw == "Seated" then
            playAnimation("sit", 0.5, Humanoid_upvr)
            return
        end
        if var11_upvw == "Running" then
            playAnimation("walk", 0.2, Humanoid_upvr)
        elseif var11_upvw == "Dead" or var11_upvw == "GettingUp" or var11_upvw == "FallingDown" or var11_upvw == "Seated" or var11_upvw == "PlatformStanding" then
            stopAllAnimations()
        end
    end
    local class_Tool = Parent_upvr:FindFirstChildOfClass("Tool")
    if class_Tool and class_Tool:FindFirstChild("Handle") then
        local getToolAnim_result1 = getToolAnim(class_Tool)
        if getToolAnim_result1 then
            var169_upvw = getToolAnim_result1.Value
            getToolAnim_result1.Parent = nil
            var199_upvw = arg1 + 0.3
        end
        if var199_upvw < arg1 then
            var199_upvw = 0
            var169_upvw = "None"
        end
        animateTool()
    else
        stopToolAnimations()
        var169_upvw = "None"
        var185_upvw = nil
        var199_upvw = 0
    end
end
Humanoid_upvr.Died:connect(onDied)
Humanoid_upvr.Running:connect(onRunning)
Humanoid_upvr.Jumping:connect(onJumping)
Humanoid_upvr.Climbing:connect(onClimbing)
Humanoid_upvr.GettingUp:connect(onGettingUp)
Humanoid_upvr.FreeFalling:connect(onFreeFall)
Humanoid_upvr.FallingDown:connect(onFallingDown)
Humanoid_upvr.Seated:connect(onSeated)
Humanoid_upvr.PlatformStanding:connect(onPlatformStanding)
Humanoid_upvr.Swimming:connect(onSwimming)
game:GetService("Players").LocalPlayer.Chatted:connect(function(arg1) -- Line 756
    --[[ Upvalues[3]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var203
    if string.sub(arg1, 1, 3) == "/e " then
        var203 = string.sub(arg1, 4)
    elseif string.sub(arg1, 1, 7) == "/emote " then
        var203 = string.sub(arg1, 8)
    end
    if var11_upvw == "Standing" and tbl_upvr_4[var203] ~= nil then
        playAnimation(var203, 0.1, Humanoid_upvr)
    end
end)
script:WaitForChild("PlayEmote").OnInvoke = function(arg1) -- Line 770
    --[[ Upvalues[4]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
        [4]: var22_upvw (read and write)
    ]]
    if var11_upvw ~= "Standing" then return end
    if tbl_upvr_4[arg1] ~= nil then
        playAnimation(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    if typeof(arg1) == "Instance" and arg1:IsA("Animation") then
        playEmote(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    return false
end
if Parent_upvr.Parent ~= nil then
    playAnimation("idle", 0.1, Humanoid_upvr)
    var11_upvw = "Standing"
end
while Parent_upvr.Parent ~= nil do
    local _, wait_result2 = wait(0.1)
    stepAnimate(wait_result2)
end
Script Health Workspace.Salahkaram1.Health
-- [SERVER SCRIPT] Source hidden from client.
LocalScript Animate Workspace.Salahkaram1.Animate
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:02:56
-- Luau version 6, Types version 3
-- Time taken: 0.044590 seconds

local Parent_upvr = script.Parent
local Humanoid_upvr = Parent_upvr:WaitForChild("Humanoid")
local var11_upvw = "Standing"
local pcall_result1_3, pcall_result2_2 = pcall(function() -- Line 7
    return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop")
end)
local var15_upvr = pcall_result1_3 and pcall_result2_2
local pcall_result1_2, pcall_result2 = pcall(function() -- Line 10
    return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun")
end)
local var19_upvr = pcall_result1_2 and pcall_result2
local function getRigScale_upvr() -- Line 13, Named "getRigScale"
    --[[ Upvalues[2]:
        [1]: var19_upvr (readonly)
        [2]: Parent_upvr (readonly)
    ]]
    if var19_upvr then
        return Parent_upvr:GetScale()
    end
    return 1
end
local var20_upvw = ""
local var21_upvw
local var22_upvw
local var23_upvw
local var24_upvw = 1
local var25_upvw
local var26_upvw
local tbl_upvr_3 = {}
local tbl_upvr_2 = {
    idle = {{
        id = "http://www.roblox.com/asset/?id=507766666";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766951";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766388";
        weight = 9;
    }};
    walk = {{
        id = "http://www.roblox.com/asset/?id=507777826";
        weight = 10;
    }};
    run = {{
        id = "http://www.roblox.com/asset/?id=507767714";
        weight = 10;
    }};
    swim = {{
        id = "http://www.roblox.com/asset/?id=507784897";
        weight = 10;
    }};
    swimidle = {{
        id = "http://www.roblox.com/asset/?id=507785072";
        weight = 10;
    }};
    jump = {{
        id = "http://www.roblox.com/asset/?id=507765000";
        weight = 10;
    }};
    fall = {{
        id = "http://www.roblox.com/asset/?id=507767968";
        weight = 10;
    }};
    climb = {{
        id = "http://www.roblox.com/asset/?id=507765644";
        weight = 10;
    }};
    sit = {{
        id = "http://www.roblox.com/asset/?id=2506281703";
        weight = 10;
    }};
    toolnone = {{
        id = "http://www.roblox.com/asset/?id=507768375";
        weight = 10;
    }};
    toolslash = {{
        id = "http://www.roblox.com/asset/?id=522635514";
        weight = 10;
    }};
    toollunge = {{
        id = "http://www.roblox.com/asset/?id=522638767";
        weight = 10;
    }};
    wave = {{
        id = "http://www.roblox.com/asset/?id=507770239";
        weight = 10;
    }};
    point = {{
        id = "http://www.roblox.com/asset/?id=507770453";
        weight = 10;
    }};
    dance = {{
        id = "http://www.roblox.com/asset/?id=507771019";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507771955";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507772104";
        weight = 10;
    }};
    dance2 = {{
        id = "http://www.roblox.com/asset/?id=507776043";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776720";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776879";
        weight = 10;
    }};
    dance3 = {{
        id = "http://www.roblox.com/asset/?id=507777268";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777451";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777623";
        weight = 10;
    }};
    laugh = {{
        id = "http://www.roblox.com/asset/?id=507770818";
        weight = 10;
    }};
    cheer = {{
        id = "http://www.roblox.com/asset/?id=507770677";
        weight = 10;
    }};
}
local tbl_upvr_4 = {
    wave = false;
    point = false;
    dance = true;
    dance2 = true;
    dance3 = true;
    laugh = false;
    cheer = false;
}
math.randomseed(tick())
function findExistingAnimationInSet(arg1, arg2) -- Line 111
    if arg1 == nil or arg2 == nil then
        return 0
    end
    for i = 1, arg1.count do
        if arg1[i].anim.AnimationId == arg2.AnimationId then
            return i
        end
    end
    return 0
end
local tbl_upvr = {}
function configureAnimationSet(arg1, arg2) -- Line 125
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: tbl_upvr (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var96
    if var96 ~= nil then
        var96 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_5_upvw, pairs_result2, pairs_result3_2 = pairs(tbl_upvr_3[arg1].connections)
        for _, v in pairs_result1_5_upvw, pairs_result2, pairs_result3_2 do
            v:disconnect()
        end
    end
    pairs_result1_5_upvw = tbl_upvr_3
    pairs_result1_5_upvw[arg1] = {}
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.count = 0
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.totalWeight = 0
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.connections = {}
    pairs_result1_5_upvw = true
    local pcall_result1, _ = pcall(function() -- Line 138
        --[[ Upvalues[1]:
            [1]: pairs_result1_5_upvw (read and write)
        ]]
        pairs_result1_5_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1 then
        pairs_result1_5_upvw = true
    end
    local SOME = script:FindFirstChild(arg1)
    if pairs_result1_5_upvw and SOME ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildAdded:connect(function(arg1_2) -- Line 146
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildRemoved:connect(function(arg1_3) -- Line 147
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        for _, v_2 in pairs(SOME:GetChildren()) do
            if v_2:IsA("Animation") then
                local var109 = 1
                local Weight = v_2:FindFirstChild("Weight")
                if Weight ~= nil then
                    var109 = Weight.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                local count = tbl_upvr_3[arg1].count
                tbl_upvr_3[arg1][count] = {}
                tbl_upvr_3[arg1][count].anim = v_2
                tbl_upvr_3[arg1][count].weight = var109
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][count].weight
                table.insert(tbl_upvr_3[arg1].connections, v_2.Changed:connect(function(arg1_4) -- Line 163
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildAdded:connect(function(arg1_5) -- Line 164
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildRemoved:connect(function(arg1_6) -- Line 165
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_4, v_3 in pairs(arg2) do
            v_2 = tbl_upvr_3[arg1]
            v_2[i_4] = {}
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.anim = Instance.new("Animation")
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.Name = arg1
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.AnimationId = v_3.id
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.weight = v_3.weight
            v_2 = tbl_upvr_3[arg1]
            v_2.count = tbl_upvr_3[arg1].count + 1
            v_2 = tbl_upvr_3[arg1]
            v_2.totalWeight = tbl_upvr_3[arg1].totalWeight + v_3.weight
        end
    end
    for _, v_4 in pairs(tbl_upvr_3) do
        for i_6 = 1, v_4.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            if tbl_upvr[v_4[i_6].anim.AnimationId] == nil then
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                Humanoid_upvr:LoadAnimation(v_4[i_6].anim)
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                tbl_upvr[v_4[i_6].anim.AnimationId] = true
            end
        end
    end
end
function configureAnimationSetOld(arg1, arg2) -- Line 196
    --[[ Upvalues[2]:
        [1]: tbl_upvr_3 (readonly)
        [2]: Humanoid_upvr (readonly)
    ]]
    local var139
    if var139 ~= nil then
        var139 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_upvw, pairs_result2_5, pairs_result3_6 = pairs(tbl_upvr_3[arg1].connections)
        for _, v_5 in pairs_result1_upvw, pairs_result2_5, pairs_result3_6 do
            v_5:disconnect()
        end
    end
    pairs_result1_upvw = tbl_upvr_3
    pairs_result1_upvw[arg1] = {}
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.count = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.totalWeight = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.connections = {}
    pairs_result1_upvw = true
    local pcall_result1_4, _ = pcall(function() -- Line 209
        --[[ Upvalues[1]:
            [1]: pairs_result1_upvw (read and write)
        ]]
        pairs_result1_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1_4 then
        pairs_result1_upvw = true
    end
    local SOME_2 = script:FindFirstChild(arg1)
    if pairs_result1_upvw and SOME_2 ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildAdded:connect(function(arg1_7) -- Line 217
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildRemoved:connect(function(arg1_8) -- Line 218
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        local var149 = 1
        for _, v_6 in pairs(SOME_2:GetChildren()) do
            if v_6:IsA("Animation") then
                table.insert(tbl_upvr_3[arg1].connections, v_6.Changed:connect(function(arg1_9) -- Line 222
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                tbl_upvr_3[arg1][var149] = {}
                tbl_upvr_3[arg1][var149].anim = v_6
                local Weight_2 = v_6:FindFirstChild("Weight")
                if Weight_2 == nil then
                    tbl_upvr_3[arg1][var149].weight = 1
                else
                    tbl_upvr_3[arg1][var149].weight = Weight_2.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][var149].weight
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_9, v_7 in pairs(arg2) do
            v_6 = tbl_upvr_3[arg1]
            v_6[i_9] = {}
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.anim = Instance.new("Animation")
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.Name = arg1
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.AnimationId = v_7.id
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.weight = v_7.weight
            v_6 = tbl_upvr_3[arg1]
            v_6.count = tbl_upvr_3[arg1].count + 1
            v_6 = tbl_upvr_3[arg1]
            v_6.totalWeight = tbl_upvr_3[arg1].totalWeight + v_7.weight
        end
    end
    for _, v_8 in pairs(tbl_upvr_3) do
        for i_11 = 1, v_8.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            Humanoid_upvr:LoadAnimation(v_8[i_11].anim)
        end
    end
end
function scriptChildModified(arg1) -- Line 261
    --[[ Upvalues[1]:
        [1]: tbl_upvr_2 (readonly)
    ]]
    local var161 = tbl_upvr_2[arg1.Name]
    if var161 ~= nil then
        configureAnimationSet(arg1.Name, var161)
    end
end
script.ChildAdded:connect(scriptChildModified)
script.ChildRemoved:connect(scriptChildModified)
local var162
if Humanoid_upvr then
    var162 = Humanoid_upvr:FindFirstChildOfClass("Animator")
else
    var162 = nil
end
if var162 then
    for _, v_9 in ipairs(var162:GetPlayingAnimationTracks()) do
        v_9:Stop(0)
        v_9:Destroy()
    end
end
for i_13, _ in pairs(tbl_upvr_2) do
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [441.27]
    configureAnimationSet(i_13, nil)
end
local var169_upvw = "None"
local var170_upvw = 0
local var171_upvw = false
function stopAllAnimations() -- Line 302
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: var171_upvw (read and write)
        [4]: var21_upvw (read and write)
        [5]: var23_upvw (read and write)
        [6]: var22_upvw (read and write)
        [7]: var26_upvw (read and write)
        [8]: var25_upvw (read and write)
    ]]
    local var172
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var172] == false then
        var172 = "idle"
    end
    if var171_upvw then
        var172 = "idle"
        var171_upvw = false
    end
    var20_upvw = ""
    var21_upvw = nil
    if var23_upvw ~= nil then
        var23_upvw:disconnect()
    end
    if var22_upvw ~= nil then
        var22_upvw:Stop()
        var22_upvw:Destroy()
        var22_upvw = nil
    end
    if var26_upvw ~= nil then
        var26_upvw:disconnect()
    end
    if var25_upvw ~= nil then
        var25_upvw:Stop()
        var25_upvw:Destroy()
        var25_upvw = nil
    end
    return var172
end
local ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
function getHeightScale() -- Line 341
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: getRigScale_upvr (readonly)
        [3]: ScaleDampeningPercent_upvw (read and write)
    ]]
    local var174
    if var174 then
        var174 = Humanoid_upvr.AutomaticScalingEnabled
        if not var174 then
            var174 = getRigScale_upvr()
            return var174
        end
        var174 = Humanoid_upvr.HipHeight / 2
        if ScaleDampeningPercent_upvw == nil then
            ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
        end
        if ScaleDampeningPercent_upvw ~= nil then
            var174 = 1 + (Humanoid_upvr.HipHeight - 2) * ScaleDampeningPercent_upvw.Value / 2
        end
        return var174
    end
    return getRigScale_upvr()
end
local function _(arg1) -- Line 361, Named "rootMotionCompensation"
    return arg1 * 1.25 / getHeightScale()
end
local function setRunSpeed_upvr(arg1) -- Line 369, Named "setRunSpeed"
    --[[ Upvalues[2]:
        [1]: var22_upvw (read and write)
        [2]: var25_upvw (read and write)
    ]]
    local var175 = arg1 * 1.25 / getHeightScale()
    local var176 = 0.0001
    local var177 = 0.0001
    local var178 = 1
    if var175 <= 0.5 then
        var176 = 1
        var178 = var175 / 0.5
    elseif var175 < 1 then
        local var179 = (var175 - 0.5) / 0.5
        var176 = 1 - var179
        var177 = var179
    else
        var178 = var175 / 1
        var177 = 1
    end
    var22_upvw:AdjustWeight(var176)
    var25_upvw:AdjustWeight(var177)
    var22_upvw:AdjustSpeed(var178)
    var25_upvw:AdjustSpeed(var178)
end
function setAnimationSpeed(arg1) -- Line 395
    --[[ Upvalues[4]:
        [1]: var20_upvw (read and write)
        [2]: setRunSpeed_upvr (readonly)
        [3]: var24_upvw (read and write)
        [4]: var22_upvw (read and write)
    ]]
    if var20_upvw == "walk" then
        setRunSpeed_upvr(arg1)
    elseif arg1 ~= var24_upvw then
        var24_upvw = arg1
        var22_upvw:AdjustSpeed(var24_upvw)
    end
end
function keyFrameReachedFunc(arg1) -- Line 406
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: var15_upvr (readonly)
        [3]: var25_upvw (read and write)
        [4]: var22_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var171_upvw (read and write)
        [7]: var24_upvw (read and write)
        [8]: Humanoid_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [36] 26. Error Block 22 start (CF ANALYSIS FAILED)
    local var180
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var180] == false then
        var180 = "idle"
    end
    if var171_upvw then
        if var22_upvw.Looped then return end
        var180 = "idle"
        var171_upvw = false
    end
    playAnimation(var180, 0.15, Humanoid_upvr)
    setAnimationSpeed(var24_upvw)
    -- KONSTANTERROR: [36] 26. Error Block 22 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 end (CF ANALYSIS FAILED)
end
function rollAnimation(arg1) -- Line 444
    --[[ Upvalues[1]:
        [1]: tbl_upvr_3 (readonly)
    ]]
    local var182
    while tbl_upvr_3[arg1][var182].weight < math.random(1, tbl_upvr_3[arg1].totalWeight) do
        var182 += 1
    end
    return var182
end
local function switchToAnim_upvr(arg1, arg2, arg3, arg4) -- Line 455, Named "switchToAnim"
    --[[ Upvalues[9]:
        [1]: var21_upvw (read and write)
        [2]: var22_upvw (read and write)
        [3]: var25_upvw (read and write)
        [4]: var15_upvr (readonly)
        [5]: var24_upvw (read and write)
        [6]: var20_upvw (read and write)
        [7]: var23_upvw (read and write)
        [8]: tbl_upvr_3 (readonly)
        [9]: var26_upvw (read and write)
    ]]
    if arg1 ~= var21_upvw then
        if var22_upvw ~= nil then
            var22_upvw:Stop(arg3)
            var22_upvw:Destroy()
        end
        if var25_upvw ~= nil then
            var25_upvw:Stop(arg3)
            var25_upvw:Destroy()
            if var15_upvr == true then
                var25_upvw = nil
            end
        end
        var24_upvw = 1
        var22_upvw = arg4:LoadAnimation(arg1)
        var22_upvw.Priority = Enum.AnimationPriority.Core
        var22_upvw:Play(arg3)
        var20_upvw = arg2
        var21_upvw = arg1
        if var23_upvw ~= nil then
            var23_upvw:disconnect()
        end
        var23_upvw = var22_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        if arg2 == "walk" then
            var25_upvw = arg4:LoadAnimation(tbl_upvr_3.run[rollAnimation("run")].anim)
            var25_upvw.Priority = Enum.AnimationPriority.Core
            var25_upvw:Play(arg3)
            if var26_upvw ~= nil then
                var26_upvw:disconnect()
            end
            var26_upvw = var25_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        end
    end
end
function playAnimation(arg1, arg2, arg3) -- Line 506
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: switchToAnim_upvr (readonly)
        [3]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(tbl_upvr_3[arg1][rollAnimation(arg1)].anim, arg1, arg2, arg3)
    var171_upvw = false
end
function playEmote(arg1, arg2, arg3) -- Line 514
    --[[ Upvalues[2]:
        [1]: switchToAnim_upvr (readonly)
        [2]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(arg1, arg1.Name, arg2, arg3)
    var171_upvw = true
end
local var183_upvw = ""
local var184_upvw
local var185_upvw
local var186_upvw
function toolKeyFrameReachedFunc(arg1) -- Line 527
    --[[ Upvalues[2]:
        [1]: var183_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if arg1 == "End" then
        playToolAnimation(var183_upvw, 0, Humanoid_upvr)
    end
end
function playToolAnimation(arg1, arg2, arg3, arg4) -- Line 534
    --[[ Upvalues[5]:
        [1]: tbl_upvr_3 (readonly)
        [2]: var185_upvw (read and write)
        [3]: var184_upvw (read and write)
        [4]: var183_upvw (read and write)
        [5]: var186_upvw (read and write)
    ]]
    local anim = tbl_upvr_3[arg1][rollAnimation(arg1)].anim
    local var188
    if var185_upvw ~= anim then
        if var184_upvw ~= nil then
            var184_upvw:Stop()
            var184_upvw:Destroy()
            var188 = 0
        end
        var184_upvw = arg3:LoadAnimation(anim)
        if arg4 then
            var184_upvw.Priority = arg4
        end
        var184_upvw:Play(var188)
        var183_upvw = arg1
        var185_upvw = anim
        var186_upvw = var184_upvw.KeyframeReached:connect(toolKeyFrameReachedFunc)
    end
end
function stopToolAnimations() -- Line 561
    --[[ Upvalues[4]:
        [1]: var183_upvw (read and write)
        [2]: var186_upvw (read and write)
        [3]: var185_upvw (read and write)
        [4]: var184_upvw (read and write)
    ]]
    if var186_upvw ~= nil then
        var186_upvw:disconnect()
    end
    var183_upvw = ""
    var185_upvw = nil
    if var184_upvw ~= nil then
        var184_upvw:Stop()
        var184_upvw:Destroy()
        var184_upvw = nil
    end
    return var183_upvw
end
function onRunning(arg1) -- Line 583
    --[[ Upvalues[6]:
        [1]: var19_upvr (readonly)
        [2]: var171_upvw (read and write)
        [3]: Humanoid_upvr (readonly)
        [4]: var11_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var20_upvw (read and write)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local var189
    if var189 then
        local _ = getHeightScale()
    else
    end
    var189 = var171_upvw
    if var189 then
        if Humanoid_upvr.MoveDirection ~= Vector3.new(0, 0, 0) then
            var189 = false
        else
            var189 = true
        end
    end
    if not var189 or not (Humanoid_upvr.WalkSpeed / 1) then
    end
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    if 0.75 * 1 < arg1 then
        playAnimation("walk", 0.2, Humanoid_upvr)
        setAnimationSpeed(arg1 / 16)
        var11_upvw = "Running"
    elseif tbl_upvr_4[var20_upvw] == nil and not var171_upvw then
        playAnimation("idle", 0.2, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function onDied() -- Line 601
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Dead"
end
function onJumping() -- Line 605
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
    ]]
    playAnimation("jump", 0.1, Humanoid_upvr)
    var170_upvw = 0.31
    var11_upvw = "Jumping"
end
function onClimbing(arg1) -- Line 611
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var191
    if var19_upvr then
        var191 /= getHeightScale()
    end
    playAnimation("climb", 0.1, Humanoid_upvr)
    setAnimationSpeed(var191 / 5)
    var11_upvw = "Climbing"
end
function onGettingUp() -- Line 621
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "GettingUp"
end
function onFreeFall() -- Line 625
    --[[ Upvalues[3]:
        [1]: var170_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    if var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    end
    var11_upvw = "FreeFall"
end
function onFallingDown() -- Line 632
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "FallingDown"
end
function onSeated() -- Line 636
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Seated"
end
function onPlatformStanding() -- Line 640
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "PlatformStanding"
end
function onSwimming(arg1) -- Line 647
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var192
    if var19_upvr then
        var192 /= getHeightScale()
    end
    if 1 < var192 then
        playAnimation("swim", 0.4, Humanoid_upvr)
        setAnimationSpeed(var192 / 10)
        var11_upvw = "Swimming"
    else
        playAnimation("swimidle", 0.4, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function animateTool() -- Line 662
    --[[ Upvalues[2]:
        [1]: var169_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if var169_upvw == "None" then
        playToolAnimation("toolnone", 0.1, Humanoid_upvr, Enum.AnimationPriority.Idle)
    else
        if var169_upvw == "Slash" then
            playToolAnimation("toolslash", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
        if var169_upvw == "Lunge" then
            playToolAnimation("toollunge", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
    end
end
function getToolAnim(arg1) -- Line 679
    for _, v_11 in ipairs(arg1:GetChildren()) do
        if v_11.Name == "toolanim" and v_11.className == "StringValue" then
            return v_11
        end
    end
    return nil
end
local var198_upvw = 0
local var199_upvw = 0
function stepAnimate(arg1) -- Line 690
    --[[ Upvalues[8]:
        [1]: var198_upvw (read and write)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
        [4]: Humanoid_upvr (readonly)
        [5]: Parent_upvr (readonly)
        [6]: var169_upvw (read and write)
        [7]: var199_upvw (read and write)
        [8]: var185_upvw (read and write)
    ]]
    var198_upvw = arg1
    if 0 < var170_upvw then
        var170_upvw -= arg1 - var198_upvw
    end
    if var11_upvw == "FreeFall" and var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    else
        if var11_upvw == "Seated" then
            playAnimation("sit", 0.5, Humanoid_upvr)
            return
        end
        if var11_upvw == "Running" then
            playAnimation("walk", 0.2, Humanoid_upvr)
        elseif var11_upvw == "Dead" or var11_upvw == "GettingUp" or var11_upvw == "FallingDown" or var11_upvw == "Seated" or var11_upvw == "PlatformStanding" then
            stopAllAnimations()
        end
    end
    local class_Tool = Parent_upvr:FindFirstChildOfClass("Tool")
    if class_Tool and class_Tool:FindFirstChild("Handle") then
        local getToolAnim_result1 = getToolAnim(class_Tool)
        if getToolAnim_result1 then
            var169_upvw = getToolAnim_result1.Value
            getToolAnim_result1.Parent = nil
            var199_upvw = arg1 + 0.3
        end
        if var199_upvw < arg1 then
            var199_upvw = 0
            var169_upvw = "None"
        end
        animateTool()
    else
        stopToolAnimations()
        var169_upvw = "None"
        var185_upvw = nil
        var199_upvw = 0
    end
end
Humanoid_upvr.Died:connect(onDied)
Humanoid_upvr.Running:connect(onRunning)
Humanoid_upvr.Jumping:connect(onJumping)
Humanoid_upvr.Climbing:connect(onClimbing)
Humanoid_upvr.GettingUp:connect(onGettingUp)
Humanoid_upvr.FreeFalling:connect(onFreeFall)
Humanoid_upvr.FallingDown:connect(onFallingDown)
Humanoid_upvr.Seated:connect(onSeated)
Humanoid_upvr.PlatformStanding:connect(onPlatformStanding)
Humanoid_upvr.Swimming:connect(onSwimming)
game:GetService("Players").LocalPlayer.Chatted:connect(function(arg1) -- Line 756
    --[[ Upvalues[3]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var203
    if string.sub(arg1, 1, 3) == "/e " then
        var203 = string.sub(arg1, 4)
    elseif string.sub(arg1, 1, 7) == "/emote " then
        var203 = string.sub(arg1, 8)
    end
    if var11_upvw == "Standing" and tbl_upvr_4[var203] ~= nil then
        playAnimation(var203, 0.1, Humanoid_upvr)
    end
end)
script:WaitForChild("PlayEmote").OnInvoke = function(arg1) -- Line 770
    --[[ Upvalues[4]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
        [4]: var22_upvw (read and write)
    ]]
    if var11_upvw ~= "Standing" then return end
    if tbl_upvr_4[arg1] ~= nil then
        playAnimation(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    if typeof(arg1) == "Instance" and arg1:IsA("Animation") then
        playEmote(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    return false
end
if Parent_upvr.Parent ~= nil then
    playAnimation("idle", 0.1, Humanoid_upvr)
    var11_upvw = "Standing"
end
while Parent_upvr.Parent ~= nil do
    local _, wait_result2 = wait(0.1)
    stepAnimate(wait_result2)
end
Script Health Workspace.BbBear614.Health
-- [SERVER SCRIPT] Source hidden from client.
LocalScript Animate Workspace.BbBear614.Animate
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:02:58
-- Luau version 6, Types version 3
-- Time taken: 0.041570 seconds

local Parent_upvr = script.Parent
local Humanoid_upvr = Parent_upvr:WaitForChild("Humanoid")
local var11_upvw = "Standing"
local pcall_result1_3, pcall_result2_2 = pcall(function() -- Line 7
    return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop")
end)
local var15_upvr = pcall_result1_3 and pcall_result2_2
local pcall_result1_2, pcall_result2 = pcall(function() -- Line 10
    return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun")
end)
local var19_upvr = pcall_result1_2 and pcall_result2
local function getRigScale_upvr() -- Line 13, Named "getRigScale"
    --[[ Upvalues[2]:
        [1]: var19_upvr (readonly)
        [2]: Parent_upvr (readonly)
    ]]
    if var19_upvr then
        return Parent_upvr:GetScale()
    end
    return 1
end
local var20_upvw = ""
local var21_upvw
local var22_upvw
local var23_upvw
local var24_upvw = 1
local var25_upvw
local var26_upvw
local tbl_upvr_3 = {}
local tbl_upvr_2 = {
    idle = {{
        id = "http://www.roblox.com/asset/?id=507766666";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766951";
        weight = 1;
    }, {
        id = "http://www.roblox.com/asset/?id=507766388";
        weight = 9;
    }};
    walk = {{
        id = "http://www.roblox.com/asset/?id=507777826";
        weight = 10;
    }};
    run = {{
        id = "http://www.roblox.com/asset/?id=507767714";
        weight = 10;
    }};
    swim = {{
        id = "http://www.roblox.com/asset/?id=507784897";
        weight = 10;
    }};
    swimidle = {{
        id = "http://www.roblox.com/asset/?id=507785072";
        weight = 10;
    }};
    jump = {{
        id = "http://www.roblox.com/asset/?id=507765000";
        weight = 10;
    }};
    fall = {{
        id = "http://www.roblox.com/asset/?id=507767968";
        weight = 10;
    }};
    climb = {{
        id = "http://www.roblox.com/asset/?id=507765644";
        weight = 10;
    }};
    sit = {{
        id = "http://www.roblox.com/asset/?id=2506281703";
        weight = 10;
    }};
    toolnone = {{
        id = "http://www.roblox.com/asset/?id=507768375";
        weight = 10;
    }};
    toolslash = {{
        id = "http://www.roblox.com/asset/?id=522635514";
        weight = 10;
    }};
    toollunge = {{
        id = "http://www.roblox.com/asset/?id=522638767";
        weight = 10;
    }};
    wave = {{
        id = "http://www.roblox.com/asset/?id=507770239";
        weight = 10;
    }};
    point = {{
        id = "http://www.roblox.com/asset/?id=507770453";
        weight = 10;
    }};
    dance = {{
        id = "http://www.roblox.com/asset/?id=507771019";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507771955";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507772104";
        weight = 10;
    }};
    dance2 = {{
        id = "http://www.roblox.com/asset/?id=507776043";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776720";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507776879";
        weight = 10;
    }};
    dance3 = {{
        id = "http://www.roblox.com/asset/?id=507777268";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777451";
        weight = 10;
    }, {
        id = "http://www.roblox.com/asset/?id=507777623";
        weight = 10;
    }};
    laugh = {{
        id = "http://www.roblox.com/asset/?id=507770818";
        weight = 10;
    }};
    cheer = {{
        id = "http://www.roblox.com/asset/?id=507770677";
        weight = 10;
    }};
}
local tbl_upvr_4 = {
    wave = false;
    point = false;
    dance = true;
    dance2 = true;
    dance3 = true;
    laugh = false;
    cheer = false;
}
math.randomseed(tick())
function findExistingAnimationInSet(arg1, arg2) -- Line 111
    if arg1 == nil or arg2 == nil then
        return 0
    end
    for i = 1, arg1.count do
        if arg1[i].anim.AnimationId == arg2.AnimationId then
            return i
        end
    end
    return 0
end
local tbl_upvr = {}
function configureAnimationSet(arg1, arg2) -- Line 125
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: tbl_upvr (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var96
    if var96 ~= nil then
        var96 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_5_upvw, pairs_result2, pairs_result3_2 = pairs(tbl_upvr_3[arg1].connections)
        for _, v in pairs_result1_5_upvw, pairs_result2, pairs_result3_2 do
            v:disconnect()
        end
    end
    pairs_result1_5_upvw = tbl_upvr_3
    pairs_result1_5_upvw[arg1] = {}
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.count = 0
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.totalWeight = 0
    pairs_result1_5_upvw = tbl_upvr_3[arg1]
    pairs_result1_5_upvw.connections = {}
    pairs_result1_5_upvw = true
    local pcall_result1, _ = pcall(function() -- Line 138
        --[[ Upvalues[1]:
            [1]: pairs_result1_5_upvw (read and write)
        ]]
        pairs_result1_5_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1 then
        pairs_result1_5_upvw = true
    end
    local SOME = script:FindFirstChild(arg1)
    if pairs_result1_5_upvw and SOME ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildAdded:connect(function(arg1_2) -- Line 146
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME.ChildRemoved:connect(function(arg1_3) -- Line 147
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        for _, v_2 in pairs(SOME:GetChildren()) do
            if v_2:IsA("Animation") then
                local var109 = 1
                local Weight = v_2:FindFirstChild("Weight")
                if Weight ~= nil then
                    var109 = Weight.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                local count = tbl_upvr_3[arg1].count
                tbl_upvr_3[arg1][count] = {}
                tbl_upvr_3[arg1][count].anim = v_2
                tbl_upvr_3[arg1][count].weight = var109
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][count].weight
                table.insert(tbl_upvr_3[arg1].connections, v_2.Changed:connect(function(arg1_4) -- Line 163
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildAdded:connect(function(arg1_5) -- Line 164
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                table.insert(tbl_upvr_3[arg1].connections, v_2.ChildRemoved:connect(function(arg1_6) -- Line 165
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_4, v_3 in pairs(arg2) do
            v_2 = tbl_upvr_3[arg1]
            v_2[i_4] = {}
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.anim = Instance.new("Animation")
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.Name = arg1
            v_2 = tbl_upvr_3[arg1][i_4].anim
            v_2.AnimationId = v_3.id
            v_2 = tbl_upvr_3[arg1][i_4]
            v_2.weight = v_3.weight
            v_2 = tbl_upvr_3[arg1]
            v_2.count = tbl_upvr_3[arg1].count + 1
            v_2 = tbl_upvr_3[arg1]
            v_2.totalWeight = tbl_upvr_3[arg1].totalWeight + v_3.weight
        end
    end
    for _, v_4 in pairs(tbl_upvr_3) do
        for i_6 = 1, v_4.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            if tbl_upvr[v_4[i_6].anim.AnimationId] == nil then
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                Humanoid_upvr:LoadAnimation(v_4[i_6].anim)
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                tbl_upvr[v_4[i_6].anim.AnimationId] = true
            end
        end
    end
end
function configureAnimationSetOld(arg1, arg2) -- Line 196
    --[[ Upvalues[2]:
        [1]: tbl_upvr_3 (readonly)
        [2]: Humanoid_upvr (readonly)
    ]]
    local var139
    if var139 ~= nil then
        var139 = pairs(tbl_upvr_3[arg1].connections)
        local pairs_result1_upvw, pairs_result2_5, pairs_result3_6 = pairs(tbl_upvr_3[arg1].connections)
        for _, v_5 in pairs_result1_upvw, pairs_result2_5, pairs_result3_6 do
            v_5:disconnect()
        end
    end
    pairs_result1_upvw = tbl_upvr_3
    pairs_result1_upvw[arg1] = {}
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.count = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.totalWeight = 0
    pairs_result1_upvw = tbl_upvr_3[arg1]
    pairs_result1_upvw.connections = {}
    pairs_result1_upvw = true
    local pcall_result1_4, _ = pcall(function() -- Line 209
        --[[ Upvalues[1]:
            [1]: pairs_result1_upvw (read and write)
        ]]
        pairs_result1_upvw = game:GetService("StarterPlayer").AllowCustomAnimations
    end)
    if not pcall_result1_4 then
        pairs_result1_upvw = true
    end
    local SOME_2 = script:FindFirstChild(arg1)
    if pairs_result1_upvw and SOME_2 ~= nil then
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildAdded:connect(function(arg1_7) -- Line 217
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        table.insert(tbl_upvr_3[arg1].connections, SOME_2.ChildRemoved:connect(function(arg1_8) -- Line 218
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            configureAnimationSet(arg1, arg2)
        end))
        local var149 = 1
        for _, v_6 in pairs(SOME_2:GetChildren()) do
            if v_6:IsA("Animation") then
                table.insert(tbl_upvr_3[arg1].connections, v_6.Changed:connect(function(arg1_9) -- Line 222
                    --[[ Upvalues[2]:
                        [1]: arg1 (readonly)
                        [2]: arg2 (readonly)
                    ]]
                    configureAnimationSet(arg1, arg2)
                end))
                tbl_upvr_3[arg1][var149] = {}
                tbl_upvr_3[arg1][var149].anim = v_6
                local Weight_2 = v_6:FindFirstChild("Weight")
                if Weight_2 == nil then
                    tbl_upvr_3[arg1][var149].weight = 1
                else
                    tbl_upvr_3[arg1][var149].weight = Weight_2.Value
                end
                tbl_upvr_3[arg1].count = tbl_upvr_3[arg1].count + 1
                tbl_upvr_3[arg1].totalWeight = tbl_upvr_3[arg1].totalWeight + tbl_upvr_3[arg1][var149].weight
            end
        end
    end
    if tbl_upvr_3[arg1].count <= 0 then
        for i_9, v_7 in pairs(arg2) do
            v_6 = tbl_upvr_3[arg1]
            v_6[i_9] = {}
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.anim = Instance.new("Animation")
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.Name = arg1
            v_6 = tbl_upvr_3[arg1][i_9].anim
            v_6.AnimationId = v_7.id
            v_6 = tbl_upvr_3[arg1][i_9]
            v_6.weight = v_7.weight
            v_6 = tbl_upvr_3[arg1]
            v_6.count = tbl_upvr_3[arg1].count + 1
            v_6 = tbl_upvr_3[arg1]
            v_6.totalWeight = tbl_upvr_3[arg1].totalWeight + v_7.weight
        end
    end
    for _, v_8 in pairs(tbl_upvr_3) do
        for i_11 = 1, v_8.count do
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            Humanoid_upvr:LoadAnimation(v_8[i_11].anim)
        end
    end
end
function scriptChildModified(arg1) -- Line 261
    --[[ Upvalues[1]:
        [1]: tbl_upvr_2 (readonly)
    ]]
    local var161 = tbl_upvr_2[arg1.Name]
    if var161 ~= nil then
        configureAnimationSet(arg1.Name, var161)
    end
end
script.ChildAdded:connect(scriptChildModified)
script.ChildRemoved:connect(scriptChildModified)
local var162
if Humanoid_upvr then
    var162 = Humanoid_upvr:FindFirstChildOfClass("Animator")
else
    var162 = nil
end
if var162 then
    for _, v_9 in ipairs(var162:GetPlayingAnimationTracks()) do
        v_9:Stop(0)
        v_9:Destroy()
    end
end
for i_13, _ in pairs(tbl_upvr_2) do
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [441.27]
    configureAnimationSet(i_13, nil)
end
local var169_upvw = "None"
local var170_upvw = 0
local var171_upvw = false
function stopAllAnimations() -- Line 302
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: var171_upvw (read and write)
        [4]: var21_upvw (read and write)
        [5]: var23_upvw (read and write)
        [6]: var22_upvw (read and write)
        [7]: var26_upvw (read and write)
        [8]: var25_upvw (read and write)
    ]]
    local var172
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var172] == false then
        var172 = "idle"
    end
    if var171_upvw then
        var172 = "idle"
        var171_upvw = false
    end
    var20_upvw = ""
    var21_upvw = nil
    if var23_upvw ~= nil then
        var23_upvw:disconnect()
    end
    if var22_upvw ~= nil then
        var22_upvw:Stop()
        var22_upvw:Destroy()
        var22_upvw = nil
    end
    if var26_upvw ~= nil then
        var26_upvw:disconnect()
    end
    if var25_upvw ~= nil then
        var25_upvw:Stop()
        var25_upvw:Destroy()
        var25_upvw = nil
    end
    return var172
end
local ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
function getHeightScale() -- Line 341
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: getRigScale_upvr (readonly)
        [3]: ScaleDampeningPercent_upvw (read and write)
    ]]
    local var174
    if var174 then
        var174 = Humanoid_upvr.AutomaticScalingEnabled
        if not var174 then
            var174 = getRigScale_upvr()
            return var174
        end
        var174 = Humanoid_upvr.HipHeight / 2
        if ScaleDampeningPercent_upvw == nil then
            ScaleDampeningPercent_upvw = script:FindFirstChild("ScaleDampeningPercent")
        end
        if ScaleDampeningPercent_upvw ~= nil then
            var174 = 1 + (Humanoid_upvr.HipHeight - 2) * ScaleDampeningPercent_upvw.Value / 2
        end
        return var174
    end
    return getRigScale_upvr()
end
local function _(arg1) -- Line 361, Named "rootMotionCompensation"
    return arg1 * 1.25 / getHeightScale()
end
local function setRunSpeed_upvr(arg1) -- Line 369, Named "setRunSpeed"
    --[[ Upvalues[2]:
        [1]: var22_upvw (read and write)
        [2]: var25_upvw (read and write)
    ]]
    local var175 = arg1 * 1.25 / getHeightScale()
    local var176 = 0.0001
    local var177 = 0.0001
    local var178 = 1
    if var175 <= 0.5 then
        var176 = 1
        var178 = var175 / 0.5
    elseif var175 < 1 then
        local var179 = (var175 - 0.5) / 0.5
        var176 = 1 - var179
        var177 = var179
    else
        var178 = var175 / 1
        var177 = 1
    end
    var22_upvw:AdjustWeight(var176)
    var25_upvw:AdjustWeight(var177)
    var22_upvw:AdjustSpeed(var178)
    var25_upvw:AdjustSpeed(var178)
end
function setAnimationSpeed(arg1) -- Line 395
    --[[ Upvalues[4]:
        [1]: var20_upvw (read and write)
        [2]: setRunSpeed_upvr (readonly)
        [3]: var24_upvw (read and write)
        [4]: var22_upvw (read and write)
    ]]
    if var20_upvw == "walk" then
        setRunSpeed_upvr(arg1)
    elseif arg1 ~= var24_upvw then
        var24_upvw = arg1
        var22_upvw:AdjustSpeed(var24_upvw)
    end
end
function keyFrameReachedFunc(arg1) -- Line 406
    --[[ Upvalues[8]:
        [1]: var20_upvw (read and write)
        [2]: var15_upvr (readonly)
        [3]: var25_upvw (read and write)
        [4]: var22_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var171_upvw (read and write)
        [7]: var24_upvw (read and write)
        [8]: Humanoid_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 6 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [36] 26. Error Block 22 start (CF ANALYSIS FAILED)
    local var180
    if tbl_upvr_4[var20_upvw] ~= nil and tbl_upvr_4[var180] == false then
        var180 = "idle"
    end
    if var171_upvw then
        if var22_upvw.Looped then return end
        var180 = "idle"
        var171_upvw = false
    end
    playAnimation(var180, 0.15, Humanoid_upvr)
    setAnimationSpeed(var24_upvw)
    -- KONSTANTERROR: [36] 26. Error Block 22 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [67] 52. Error Block 17 end (CF ANALYSIS FAILED)
end
function rollAnimation(arg1) -- Line 444
    --[[ Upvalues[1]:
        [1]: tbl_upvr_3 (readonly)
    ]]
    local var182
    while tbl_upvr_3[arg1][var182].weight < math.random(1, tbl_upvr_3[arg1].totalWeight) do
        var182 += 1
    end
    return var182
end
local function switchToAnim_upvr(arg1, arg2, arg3, arg4) -- Line 455, Named "switchToAnim"
    --[[ Upvalues[9]:
        [1]: var21_upvw (read and write)
        [2]: var22_upvw (read and write)
        [3]: var25_upvw (read and write)
        [4]: var15_upvr (readonly)
        [5]: var24_upvw (read and write)
        [6]: var20_upvw (read and write)
        [7]: var23_upvw (read and write)
        [8]: tbl_upvr_3 (readonly)
        [9]: var26_upvw (read and write)
    ]]
    if arg1 ~= var21_upvw then
        if var22_upvw ~= nil then
            var22_upvw:Stop(arg3)
            var22_upvw:Destroy()
        end
        if var25_upvw ~= nil then
            var25_upvw:Stop(arg3)
            var25_upvw:Destroy()
            if var15_upvr == true then
                var25_upvw = nil
            end
        end
        var24_upvw = 1
        var22_upvw = arg4:LoadAnimation(arg1)
        var22_upvw.Priority = Enum.AnimationPriority.Core
        var22_upvw:Play(arg3)
        var20_upvw = arg2
        var21_upvw = arg1
        if var23_upvw ~= nil then
            var23_upvw:disconnect()
        end
        var23_upvw = var22_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        if arg2 == "walk" then
            var25_upvw = arg4:LoadAnimation(tbl_upvr_3.run[rollAnimation("run")].anim)
            var25_upvw.Priority = Enum.AnimationPriority.Core
            var25_upvw:Play(arg3)
            if var26_upvw ~= nil then
                var26_upvw:disconnect()
            end
            var26_upvw = var25_upvw.KeyframeReached:connect(keyFrameReachedFunc)
        end
    end
end
function playAnimation(arg1, arg2, arg3) -- Line 506
    --[[ Upvalues[3]:
        [1]: tbl_upvr_3 (readonly)
        [2]: switchToAnim_upvr (readonly)
        [3]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(tbl_upvr_3[arg1][rollAnimation(arg1)].anim, arg1, arg2, arg3)
    var171_upvw = false
end
function playEmote(arg1, arg2, arg3) -- Line 514
    --[[ Upvalues[2]:
        [1]: switchToAnim_upvr (readonly)
        [2]: var171_upvw (read and write)
    ]]
    switchToAnim_upvr(arg1, arg1.Name, arg2, arg3)
    var171_upvw = true
end
local var183_upvw = ""
local var184_upvw
local var185_upvw
local var186_upvw
function toolKeyFrameReachedFunc(arg1) -- Line 527
    --[[ Upvalues[2]:
        [1]: var183_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if arg1 == "End" then
        playToolAnimation(var183_upvw, 0, Humanoid_upvr)
    end
end
function playToolAnimation(arg1, arg2, arg3, arg4) -- Line 534
    --[[ Upvalues[5]:
        [1]: tbl_upvr_3 (readonly)
        [2]: var185_upvw (read and write)
        [3]: var184_upvw (read and write)
        [4]: var183_upvw (read and write)
        [5]: var186_upvw (read and write)
    ]]
    local anim = tbl_upvr_3[arg1][rollAnimation(arg1)].anim
    local var188
    if var185_upvw ~= anim then
        if var184_upvw ~= nil then
            var184_upvw:Stop()
            var184_upvw:Destroy()
            var188 = 0
        end
        var184_upvw = arg3:LoadAnimation(anim)
        if arg4 then
            var184_upvw.Priority = arg4
        end
        var184_upvw:Play(var188)
        var183_upvw = arg1
        var185_upvw = anim
        var186_upvw = var184_upvw.KeyframeReached:connect(toolKeyFrameReachedFunc)
    end
end
function stopToolAnimations() -- Line 561
    --[[ Upvalues[4]:
        [1]: var183_upvw (read and write)
        [2]: var186_upvw (read and write)
        [3]: var185_upvw (read and write)
        [4]: var184_upvw (read and write)
    ]]
    if var186_upvw ~= nil then
        var186_upvw:disconnect()
    end
    var183_upvw = ""
    var185_upvw = nil
    if var184_upvw ~= nil then
        var184_upvw:Stop()
        var184_upvw:Destroy()
        var184_upvw = nil
    end
    return var183_upvw
end
function onRunning(arg1) -- Line 583
    --[[ Upvalues[6]:
        [1]: var19_upvr (readonly)
        [2]: var171_upvw (read and write)
        [3]: Humanoid_upvr (readonly)
        [4]: var11_upvw (read and write)
        [5]: tbl_upvr_4 (readonly)
        [6]: var20_upvw (read and write)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local var189
    if var189 then
        local _ = getHeightScale()
    else
    end
    var189 = var171_upvw
    if var189 then
        if Humanoid_upvr.MoveDirection ~= Vector3.new(0, 0, 0) then
            var189 = false
        else
            var189 = true
        end
    end
    if not var189 or not (Humanoid_upvr.WalkSpeed / 1) then
    end
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    if 0.75 * 1 < arg1 then
        playAnimation("walk", 0.2, Humanoid_upvr)
        setAnimationSpeed(arg1 / 16)
        var11_upvw = "Running"
    elseif tbl_upvr_4[var20_upvw] == nil and not var171_upvw then
        playAnimation("idle", 0.2, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function onDied() -- Line 601
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Dead"
end
function onJumping() -- Line 605
    --[[ Upvalues[3]:
        [1]: Humanoid_upvr (readonly)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
    ]]
    playAnimation("jump", 0.1, Humanoid_upvr)
    var170_upvw = 0.31
    var11_upvw = "Jumping"
end
function onClimbing(arg1) -- Line 611
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var191
    if var19_upvr then
        var191 /= getHeightScale()
    end
    playAnimation("climb", 0.1, Humanoid_upvr)
    setAnimationSpeed(var191 / 5)
    var11_upvw = "Climbing"
end
function onGettingUp() -- Line 621
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "GettingUp"
end
function onFreeFall() -- Line 625
    --[[ Upvalues[3]:
        [1]: var170_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    if var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    end
    var11_upvw = "FreeFall"
end
function onFallingDown() -- Line 632
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "FallingDown"
end
function onSeated() -- Line 636
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "Seated"
end
function onPlatformStanding() -- Line 640
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = "PlatformStanding"
end
function onSwimming(arg1) -- Line 647
    --[[ Upvalues[3]:
        [1]: var19_upvr (readonly)
        [2]: Humanoid_upvr (readonly)
        [3]: var11_upvw (read and write)
    ]]
    local var192
    if var19_upvr then
        var192 /= getHeightScale()
    end
    if 1 < var192 then
        playAnimation("swim", 0.4, Humanoid_upvr)
        setAnimationSpeed(var192 / 10)
        var11_upvw = "Swimming"
    else
        playAnimation("swimidle", 0.4, Humanoid_upvr)
        var11_upvw = "Standing"
    end
end
function animateTool() -- Line 662
    --[[ Upvalues[2]:
        [1]: var169_upvw (read and write)
        [2]: Humanoid_upvr (readonly)
    ]]
    if var169_upvw == "None" then
        playToolAnimation("toolnone", 0.1, Humanoid_upvr, Enum.AnimationPriority.Idle)
    else
        if var169_upvw == "Slash" then
            playToolAnimation("toolslash", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
        if var169_upvw == "Lunge" then
            playToolAnimation("toollunge", 0, Humanoid_upvr, Enum.AnimationPriority.Action)
            return
        end
    end
end
function getToolAnim(arg1) -- Line 679
    for _, v_11 in ipairs(arg1:GetChildren()) do
        if v_11.Name == "toolanim" and v_11.className == "StringValue" then
            return v_11
        end
    end
    return nil
end
local var198_upvw = 0
local var199_upvw = 0
function stepAnimate(arg1) -- Line 690
    --[[ Upvalues[8]:
        [1]: var198_upvw (read and write)
        [2]: var170_upvw (read and write)
        [3]: var11_upvw (read and write)
        [4]: Humanoid_upvr (readonly)
        [5]: Parent_upvr (readonly)
        [6]: var169_upvw (read and write)
        [7]: var199_upvw (read and write)
        [8]: var185_upvw (read and write)
    ]]
    var198_upvw = arg1
    if 0 < var170_upvw then
        var170_upvw -= arg1 - var198_upvw
    end
    if var11_upvw == "FreeFall" and var170_upvw <= 0 then
        playAnimation("fall", 0.2, Humanoid_upvr)
    else
        if var11_upvw == "Seated" then
            playAnimation("sit", 0.5, Humanoid_upvr)
            return
        end
        if var11_upvw == "Running" then
            playAnimation("walk", 0.2, Humanoid_upvr)
        elseif var11_upvw == "Dead" or var11_upvw == "GettingUp" or var11_upvw == "FallingDown" or var11_upvw == "Seated" or var11_upvw == "PlatformStanding" then
            stopAllAnimations()
        end
    end
    local class_Tool = Parent_upvr:FindFirstChildOfClass("Tool")
    if class_Tool and class_Tool:FindFirstChild("Handle") then
        local getToolAnim_result1 = getToolAnim(class_Tool)
        if getToolAnim_result1 then
            var169_upvw = getToolAnim_result1.Value
            getToolAnim_result1.Parent = nil
            var199_upvw = arg1 + 0.3
        end
        if var199_upvw < arg1 then
            var199_upvw = 0
            var169_upvw = "None"
        end
        animateTool()
    else
        stopToolAnimations()
        var169_upvw = "None"
        var185_upvw = nil
        var199_upvw = 0
    end
end
Humanoid_upvr.Died:connect(onDied)
Humanoid_upvr.Running:connect(onRunning)
Humanoid_upvr.Jumping:connect(onJumping)
Humanoid_upvr.Climbing:connect(onClimbing)
Humanoid_upvr.GettingUp:connect(onGettingUp)
Humanoid_upvr.FreeFalling:connect(onFreeFall)
Humanoid_upvr.FallingDown:connect(onFallingDown)
Humanoid_upvr.Seated:connect(onSeated)
Humanoid_upvr.PlatformStanding:connect(onPlatformStanding)
Humanoid_upvr.Swimming:connect(onSwimming)
game:GetService("Players").LocalPlayer.Chatted:connect(function(arg1) -- Line 756
    --[[ Upvalues[3]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
    ]]
    local var203
    if string.sub(arg1, 1, 3) == "/e " then
        var203 = string.sub(arg1, 4)
    elseif string.sub(arg1, 1, 7) == "/emote " then
        var203 = string.sub(arg1, 8)
    end
    if var11_upvw == "Standing" and tbl_upvr_4[var203] ~= nil then
        playAnimation(var203, 0.1, Humanoid_upvr)
    end
end)
script:WaitForChild("PlayEmote").OnInvoke = function(arg1) -- Line 770
    --[[ Upvalues[4]:
        [1]: var11_upvw (read and write)
        [2]: tbl_upvr_4 (readonly)
        [3]: Humanoid_upvr (readonly)
        [4]: var22_upvw (read and write)
    ]]
    if var11_upvw ~= "Standing" then return end
    if tbl_upvr_4[arg1] ~= nil then
        playAnimation(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    if typeof(arg1) == "Instance" and arg1:IsA("Animation") then
        playEmote(arg1, 0.1, Humanoid_upvr)
        return true, var22_upvw
    end
    return false
end
if Parent_upvr.Parent ~= nil then
    playAnimation("idle", 0.1, Humanoid_upvr)
    var11_upvw = "Standing"
end
while Parent_upvr.Parent ~= nil do
    local _, wait_result2 = wait(0.1)
    stepAnimate(wait_result2)
end
LocalScript PlayerScriptsLoader PlayerScriptsLoader
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:02:59
-- Luau version 6, Types version 3
-- Time taken: 0.000289 seconds

require(script.Parent:WaitForChild("PlayerModule"))
ModuleScript PlayerModule PlayerModule
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:00
-- Luau version 6, Types version 3
-- Time taken: 0.001196 seconds

local module_upvr = {}
module_upvr.__index = module_upvr
function module_upvr.new() -- Line 12
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, module_upvr)
    setmetatable_result1.cameras = require(script:WaitForChild("CameraModule"))
    setmetatable_result1.controls = require(script:WaitForChild("ControlModule"))
    return setmetatable_result1
end
function module_upvr.GetCameras(arg1) -- Line 19
    return arg1.cameras
end
function module_upvr.GetControls(arg1) -- Line 23
    return arg1.controls
end
function module_upvr.GetClickToMoveController(arg1) -- Line 27
    return arg1.controls:GetClickToMoveController()
end
return module_upvr.new()
ModuleScript ControlModule ControlModule
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:02
-- Luau version 6, Types version 3
-- Time taken: 0.030000 seconds

local module_upvr_3 = {}
module_upvr_3.__index = module_upvr_3
local Players_upvr = game:GetService("Players")
local UserInputService_upvr = game:GetService("UserInputService")
local GuiService_upvr = game:GetService("GuiService")
local UserGameSettings_upvr = UserSettings():GetService("UserGameSettings")
local VRService_upvr = game:GetService("VRService")
local module_upvr_8 = require(script:WaitForChild("Keyboard"))
local module_upvr_7 = require(script:WaitForChild("Gamepad"))
local module_upvr_4 = require(script:WaitForChild("DynamicThumbstick"))
local pcall_result1, pcall_result2 = pcall(function() -- Line 41
    return UserSettings():IsUserFeatureEnabled("UserDynamicThumbstickSafeAreaUpdate")
end)
local module_upvr_2 = require(script:WaitForChild("TouchThumbstick"))
local module_upvr_5 = require(script:WaitForChild("ClickToMoveController"))
local Value_upvr = Enum.ContextActionPriority.Medium.Value
local tbl_upvr = {
    [Enum.TouchMovementMode.DPad] = module_upvr_4;
    [Enum.DevTouchMovementMode.DPad] = module_upvr_4;
    [Enum.TouchMovementMode.Thumbpad] = module_upvr_4;
    [Enum.DevTouchMovementMode.Thumbpad] = module_upvr_4;
    [Enum.TouchMovementMode.Thumbstick] = module_upvr_2;
    [Enum.DevTouchMovementMode.Thumbstick] = module_upvr_2;
    [Enum.TouchMovementMode.DynamicThumbstick] = module_upvr_4;
    [Enum.DevTouchMovementMode.DynamicThumbstick] = module_upvr_4;
    [Enum.TouchMovementMode.ClickToMove] = module_upvr_5;
    [Enum.DevTouchMovementMode.ClickToMove] = module_upvr_5;
    [Enum.TouchMovementMode.Default] = module_upvr_4;
    [Enum.ComputerMovementMode.Default] = module_upvr_8;
    [Enum.ComputerMovementMode.KeyboardMouse] = module_upvr_8;
    [Enum.DevComputerMovementMode.KeyboardMouse] = module_upvr_8;
    [Enum.DevComputerMovementMode.Scriptable] = nil;
    [Enum.ComputerMovementMode.ClickToMove] = module_upvr_5;
    [Enum.DevComputerMovementMode.ClickToMove] = module_upvr_5;
}
local module_upvr_6 = require(script:WaitForChild("VehicleController"))
local RunService_upvr = game:GetService("RunService")
function module_upvr_3.new() -- Line 84
    --[[ Upvalues[8]:
        [1]: module_upvr_3 (readonly)
        [2]: Players_upvr (readonly)
        [3]: module_upvr_6 (readonly)
        [4]: Value_upvr (readonly)
        [5]: RunService_upvr (readonly)
        [6]: UserGameSettings_upvr (readonly)
        [7]: GuiService_upvr (readonly)
        [8]: UserInputService_upvr (readonly)
    ]]
    local setmetatable_result1_upvr = setmetatable({}, module_upvr_3)
    setmetatable_result1_upvr.controllers = {}
    setmetatable_result1_upvr.activeControlModule = nil
    setmetatable_result1_upvr.activeController = nil
    setmetatable_result1_upvr.touchJumpController = nil
    setmetatable_result1_upvr.moveFunction = Players_upvr.LocalPlayer.Move
    setmetatable_result1_upvr.humanoid = nil
    setmetatable_result1_upvr.controlsEnabled = true
    setmetatable_result1_upvr.humanoidSeatedConn = nil
    setmetatable_result1_upvr.vehicleController = nil
    setmetatable_result1_upvr.touchControlFrame = nil
    setmetatable_result1_upvr.currentTorsoAngle = 0
    setmetatable_result1_upvr.inputMoveVector = Vector3.new(0, 0, 0)
    setmetatable_result1_upvr.vehicleController = module_upvr_6.new(Value_upvr)
    Players_upvr.LocalPlayer.CharacterAdded:Connect(function(arg1) -- Line 109
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:OnCharacterAdded(arg1)
    end)
    Players_upvr.LocalPlayer.CharacterRemoving:Connect(function(arg1) -- Line 110
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:OnCharacterRemoving(arg1)
    end)
    if Players_upvr.LocalPlayer.Character then
        setmetatable_result1_upvr:OnCharacterAdded(Players_upvr.LocalPlayer.Character)
    end
    RunService_upvr:BindToRenderStep("ControlScriptRenderstep", Enum.RenderPriority.Input.Value, function(arg1) -- Line 115
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:OnRenderStepped(arg1)
    end)
    UserGameSettings_upvr:GetPropertyChangedSignal("TouchMovementMode"):Connect(function() -- Line 119
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:UpdateMovementMode()
    end)
    Players_upvr.LocalPlayer:GetPropertyChangedSignal("DevTouchMovementMode"):Connect(function() -- Line 122
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:UpdateMovementMode()
    end)
    UserGameSettings_upvr:GetPropertyChangedSignal("ComputerMovementMode"):Connect(function() -- Line 126
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:UpdateMovementMode()
    end)
    Players_upvr.LocalPlayer:GetPropertyChangedSignal("DevComputerMovementMode"):Connect(function() -- Line 129
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:UpdateMovementMode()
    end)
    setmetatable_result1_upvr.playerGui = nil
    setmetatable_result1_upvr.touchGui = nil
    setmetatable_result1_upvr.playerGuiAddedConn = nil
    GuiService_upvr:GetPropertyChangedSignal("TouchControlsEnabled"):Connect(function() -- Line 138
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:UpdateMovementMode()
        setmetatable_result1_upvr:UpdateActiveControlModuleEnabled()
    end)
    UserInputService_upvr:GetPropertyChangedSignal("PreferredInput"):Connect(function() -- Line 143
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:UpdateMovementMode()
    end)
    setmetatable_result1_upvr.playerGui = Players_upvr.LocalPlayer:FindFirstChildOfClass("PlayerGui")
    if not setmetatable_result1_upvr.playerGui then
        setmetatable_result1_upvr.playerGuiAddedConn = Players_upvr.LocalPlayer.ChildAdded:Connect(function(arg1) -- Line 149
            --[[ Upvalues[1]:
                [1]: setmetatable_result1_upvr (readonly)
            ]]
            if arg1:IsA("PlayerGui") then
                setmetatable_result1_upvr.playerGui = arg1
                setmetatable_result1_upvr.playerGuiAddedConn:Disconnect()
                setmetatable_result1_upvr.playerGuiAddedConn = nil
                setmetatable_result1_upvr:UpdateMovementMode()
            end
        end)
    end
    setmetatable_result1_upvr:UpdateMovementMode()
    return setmetatable_result1_upvr
end
function module_upvr_3.GetMoveVector(arg1) -- Line 167
    if arg1.activeController then
        return arg1.activeController:GetMoveVector()
    end
    return Vector3.new(0, 0, 0)
end
local function _(arg1) -- Line 174, Named "NormalizeAngle"
    arg1 = (arg1 + 12.566370614359172) % (-math.pi*2)
    local var30 = arg1
    if math.pi < var30 then
        var30 -= (-math.pi*2)
    end
    return var30
end
local function _(arg1, arg2) -- Line 182, Named "AverageAngle"
    local var31 = (arg2 - arg1 + 12.566370614359172) % (-math.pi*2)
    if math.pi < var31 then
        var31 -= (-math.pi*2)
    end
    local var32 = (arg1 + var31 / 2 + 12.566370614359172) % (-math.pi*2)
    if math.pi < var32 then
        var32 -= (-math.pi*2)
    end
    return var32
end
function module_upvr_3.GetEstimatedVRTorsoFrame(arg1) -- Line 187
    --[[ Upvalues[1]:
        [1]: VRService_upvr (readonly)
    ]]
    local any_GetUserCFrame_result1_2 = VRService_upvr:GetUserCFrame(Enum.UserCFrame.Head)
    local _, any_ToEulerAnglesYXZ_result2, _ = any_GetUserCFrame_result1_2:ToEulerAnglesYXZ()
    local var37
    if not VRService_upvr:GetUserCFrameEnabled(Enum.UserCFrame.RightHand) or not VRService_upvr:GetUserCFrameEnabled(Enum.UserCFrame.LeftHand) then
        arg1.currentTorsoAngle = -any_ToEulerAnglesYXZ_result2
    else
        local var38 = any_GetUserCFrame_result1_2.Position - VRService_upvr:GetUserCFrame(Enum.UserCFrame.LeftHand).Position
        local _ = any_GetUserCFrame_result1_2.Position - VRService_upvr:GetUserCFrame(Enum.UserCFrame.RightHand).Position
        local _ = -math.atan2(var38.X, var38.Z)
        var37 = _.Z
        var37 = -math.atan2(_.X, var37) - _
        var37 = (var37 + 12.566370614359172) % (-math.pi*2)
        if math.pi < var37 then
            var37 -= (-math.pi*2)
        end
        var37 = _ + var37 / 2
        var37 = (var37 + 12.566370614359172) % (-math.pi*2)
        if math.pi < var37 then
            var37 -= (-math.pi*2)
        end
        -- KONSTANTERROR: Expression was reused, decompilation is incorrect
        if math.pi < (-any_ToEulerAnglesYXZ_result2 - arg1.currentTorsoAngle + 12.566370614359172) % (-math.pi*2) then
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
        end
        local var41 = (-any_ToEulerAnglesYXZ_result2 - arg1.currentTorsoAngle + 12.566370614359172) % (-math.pi*2) - (-math.pi*2)
        local var42 = (var37 - arg1.currentTorsoAngle + 12.566370614359172) % (-math.pi*2)
        if math.pi < var42 then
            var42 -= (-math.pi*2)
        end
        var42 = false
        local var43 = var42
        if (-math.pi/2) < var42 then
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            if var42 >= (math.pi/2) then
                var43 = false
            else
                var43 = true
            end
        end
        if not var43 then
        end
        local minimum = math.min(var41, var41)
        -- KONSTANTERROR: Expression was reused, decompilation is incorrect
        local maximum = math.max(var41, var41)
        local var46 = 0
        if 0 < minimum then
            var46 = minimum
        elseif maximum < 0 then
            var46 = maximum
        end
        arg1.currentTorsoAngle = var46 + arg1.currentTorsoAngle
    end
    return CFrame.new(any_GetUserCFrame_result1_2.Position) * CFrame.fromEulerAnglesYXZ(0, -arg1.currentTorsoAngle, 0)
end
function module_upvr_3.GetActiveController(arg1) -- Line 231
    return arg1.activeController
end
local module_upvr = require(script:WaitForChild("TouchJump"))
function module_upvr_3.UpdateActiveControlModuleEnabled(arg1) -- Line 236
    --[[ Upvalues[7]:
        [1]: Players_upvr (readonly)
        [2]: UserInputService_upvr (readonly)
        [3]: module_upvr_5 (readonly)
        [4]: module_upvr_2 (readonly)
        [5]: module_upvr_4 (readonly)
        [6]: module_upvr (readonly)
        [7]: GuiService_upvr (readonly)
    ]]
    local function _() -- Line 238
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: Players_upvr (copied, readonly)
        ]]
        arg1.activeController:Enable(false)
        if arg1.touchJumpController then
            arg1.touchJumpController:Enable(false)
        end
        if arg1.moveFunction then
            arg1.moveFunction(Players_upvr.LocalPlayer, Vector3.new(0, 0, 0), true)
        end
    end
    if not arg1.activeController then
    else
        if not arg1.controlsEnabled then
            arg1.activeController:Enable(false)
            if arg1.touchJumpController then
                arg1.touchJumpController:Enable(false)
            end
            if arg1.moveFunction then
                arg1.moveFunction(Players_upvr.LocalPlayer, Vector3.new(0, 0, 0), true)
            end
            return
        end
        if not GuiService_upvr.TouchControlsEnabled and UserInputService_upvr.PreferredInput == Enum.PreferredInput.Touch and (arg1.activeControlModule == module_upvr_5 or arg1.activeControlModule == module_upvr_2 or arg1.activeControlModule == module_upvr_4) then
            arg1.activeController:Enable(false)
            if arg1.touchJumpController then
                arg1.touchJumpController:Enable(false)
            end
            if arg1.moveFunction then
                arg1.moveFunction(Players_upvr.LocalPlayer, Vector3.new(0, 0, 0), true)
            end
            return
        end
        ;(function() -- Line 249
            --[[ Upvalues[7]:
                [1]: arg1 (readonly)
                [2]: UserInputService_upvr (copied, readonly)
                [3]: module_upvr_5 (copied, readonly)
                [4]: module_upvr_2 (copied, readonly)
                [5]: module_upvr_4 (copied, readonly)
                [6]: module_upvr (copied, readonly)
                [7]: Players_upvr (copied, readonly)
            ]]
            if arg1.touchControlFrame and UserInputService_upvr.PreferredInput == Enum.PreferredInput.Touch and (arg1.activeControlModule == module_upvr_5 or arg1.activeControlModule == module_upvr_2 or arg1.activeControlModule == module_upvr_4) then
                if not arg1.controllers[module_upvr] then
                    arg1.controllers[module_upvr] = module_upvr.new()
                end
                arg1.touchJumpController = arg1.controllers[module_upvr]
                arg1.touchJumpController:Enable(true, arg1.touchControlFrame)
            elseif arg1.touchJumpController then
                arg1.touchJumpController:Enable(false)
            end
            local var50
            if arg1.activeControlModule == module_upvr_5 then
                if Players_upvr.LocalPlayer.DevComputerMovementMode ~= Enum.DevComputerMovementMode.UserChoice then
                    var50 = false
                else
                    var50 = true
                end
                arg1.activeController:Enable(true, var50, arg1.touchJumpController)
            else
                if arg1.touchControlFrame then
                    var50 = arg1.touchControlFrame
                    arg1.activeController:Enable(true, var50)
                    return
                end
                arg1.activeController:Enable(true)
            end
        end)()
    end
end
function module_upvr_3.Enable(arg1, arg2) -- Line 307
    if arg2 == nil then
        local var51 = true
    end
    if arg1.controlsEnabled == var51 then
    else
        arg1.controlsEnabled = var51
        if not arg1.activeController then return end
        arg1:UpdateActiveControlModuleEnabled()
    end
end
function module_upvr_3.Disable(arg1) -- Line 322
    arg1:Enable(false)
end
function module_upvr_3.SelectComputerMovementModule(arg1) -- Line 328
    --[[ Upvalues[7]:
        [1]: UserInputService_upvr (readonly)
        [2]: Players_upvr (readonly)
        [3]: module_upvr_7 (readonly)
        [4]: module_upvr_8 (readonly)
        [5]: UserGameSettings_upvr (readonly)
        [6]: module_upvr_5 (readonly)
        [7]: tbl_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [4] 4. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [4] 4. Error Block 2 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [8] 7. Error Block 3 start (CF ANALYSIS FAILED)
    do
        return nil, false
    end
    -- KONSTANTERROR: [8] 7. Error Block 3 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [11] 10. Error Block 4 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [11] 10. Error Block 4 end (CF ANALYSIS FAILED)
end
function module_upvr_3.SelectTouchModule(arg1) -- Line 371
    --[[ Upvalues[3]:
        [1]: Players_upvr (readonly)
        [2]: tbl_upvr (readonly)
        [3]: UserGameSettings_upvr (readonly)
    ]]
    local var52
    local DevTouchMovementMode = Players_upvr.LocalPlayer.DevTouchMovementMode
    if DevTouchMovementMode == Enum.DevTouchMovementMode.UserChoice then
        var52 = tbl_upvr[UserGameSettings_upvr.TouchMovementMode]
    else
        if DevTouchMovementMode == Enum.DevTouchMovementMode.Scriptable then
            return nil, true
        end
        var52 = tbl_upvr[DevTouchMovementMode]
    end
    return var52, true
end
local function getGamepadRightThumbstickPosition_upvr() -- Line 384, Named "getGamepadRightThumbstickPosition"
    --[[ Upvalues[1]:
        [1]: UserInputService_upvr (readonly)
    ]]
    for _, v in pairs(UserInputService_upvr:GetGamepadState(Enum.UserInputType.Gamepad1)) do
        if v.KeyCode == Enum.KeyCode.Thumbstick2 then
            return v.Position
        end
    end
    return Vector3.new(0, 0, 0)
end
local Workspace_upvr = game:GetService("Workspace")
function module_upvr_3.calculateRawMoveVector(arg1, arg2, arg3) -- Line 394
    --[[ Upvalues[3]:
        [1]: Workspace_upvr (readonly)
        [2]: VRService_upvr (readonly)
        [3]: getGamepadRightThumbstickPosition_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local CurrentCamera = Workspace_upvr.CurrentCamera
    if not CurrentCamera then
        return arg3
    end
    local var61
    if VRService_upvr.VREnabled and arg2.RootPart then
        local any_GetEstimatedVRTorsoFrame_result1 = arg1:GetEstimatedVRTorsoFrame()
        if (CurrentCamera.Focus.Position - var61.Position).Magnitude < 3 then
            var61 *= any_GetEstimatedVRTorsoFrame_result1
        else
            var61 = CurrentCamera.CFrame * (any_GetEstimatedVRTorsoFrame_result1.Rotation + any_GetEstimatedVRTorsoFrame_result1.Position * CurrentCamera.HeadScale)
        end
    end
    if arg2:GetState() == Enum.HumanoidStateType.Swimming then
        if VRService_upvr.VREnabled then
            local vector3 = Vector3.new(arg3.X, 0, arg3.Z)
            if vector3.Magnitude < 0.01 then
                return Vector3.new(0, 0, 0)
            end
            local _, any_ToEulerAnglesYXZ_result2_2, _ = var61:ToEulerAnglesYXZ()
            return CFrame.fromEulerAnglesYXZ(-getGamepadRightThumbstickPosition_upvr().Y * 1.3962634015954636, math.atan2(-vector3.X, -vector3.Z) + any_ToEulerAnglesYXZ_result2_2, 0).LookVector
        end
        return var61:VectorToWorldSpace(vector3)
    end
    local _, _, _, any_GetComponents_result4, any_GetComponents_result5, any_GetComponents_result6, _, _, any_GetComponents_result9, _, _, any_GetComponents_result12 = var61:GetComponents()
    local var79
    if any_GetComponents_result9 < 1 and -1 < any_GetComponents_result9 then
        var79 = any_GetComponents_result12
        local _ = any_GetComponents_result6
    else
        var79 = any_GetComponents_result4
    end
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    local squareroot = math.sqrt(var79 * var79 + (-any_GetComponents_result5 * math.sign(any_GetComponents_result9)) * (-any_GetComponents_result5 * math.sign(any_GetComponents_result9)))
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect (x2)
    return Vector3.new((var79 * vector3.X + -any_GetComponents_result5 * math.sign(any_GetComponents_result9) * vector3.Z) / squareroot, 0, (var79 * vector3.Z - -any_GetComponents_result5 * math.sign(any_GetComponents_result9) * vector3.X) / squareroot)
end
function module_upvr_3.OnRenderStepped(arg1, arg2) -- Line 453
    --[[ Upvalues[3]:
        [1]: module_upvr_7 (readonly)
        [2]: VRService_upvr (readonly)
        [3]: Players_upvr (readonly)
    ]]
    if arg1.activeController and arg1.activeController.enabled then
        local var89
        if var89 then
            var89 = arg1.activeController:GetMoveVector()
            local any_IsMoveVectorCameraRelative_result1 = arg1.activeController:IsMoveVectorCameraRelative()
            local any_GetClickToMoveController_result1 = arg1:GetClickToMoveController()
            local var92
            if arg1.activeController == any_GetClickToMoveController_result1 then
                any_GetClickToMoveController_result1:OnRenderStepped(arg2)
            elseif 0 < var89.magnitude then
                any_GetClickToMoveController_result1:CleanupPath()
            else
                any_GetClickToMoveController_result1:OnRenderStepped(arg2)
                var89 = any_GetClickToMoveController_result1:GetMoveVector()
                any_IsMoveVectorCameraRelative_result1 = any_GetClickToMoveController_result1:IsMoveVectorCameraRelative()
            end
            if arg1.vehicleController then
                if arg1.activeControlModule ~= module_upvr_7 then
                    var92 = false
                else
                    var92 = true
                end
                local any_Update_result1_2, _ = arg1.vehicleController:Update(var89, any_IsMoveVectorCameraRelative_result1, var92)
                var89 = any_Update_result1_2
            end
            if any_IsMoveVectorCameraRelative_result1 then
                var89 = arg1:calculateRawMoveVector(arg1.humanoid, var89)
            end
            arg1.inputMoveVector = var89
            if VRService_upvr.VREnabled then
            end
            arg1.moveFunction(Players_upvr.LocalPlayer, arg1:updateVRMoveVector(var89), false)
            local any_GetIsJumping_result1 = arg1.activeController:GetIsJumping()
            if not any_GetIsJumping_result1 then
                any_GetIsJumping_result1 = arg1.touchJumpController
                if any_GetIsJumping_result1 then
                    any_GetIsJumping_result1 = arg1.touchJumpController:GetIsJumping()
                end
            end
            arg1.humanoid.Jump = any_GetIsJumping_result1
        end
    end
end
function module_upvr_3.updateVRMoveVector(arg1, arg2) -- Line 502
    --[[ Upvalues[1]:
        [1]: VRService_upvr (readonly)
    ]]
    local CurrentCamera_2 = workspace.CurrentCamera
    local var97
    if (CurrentCamera_2.Focus.Position - CurrentCamera_2.CFrame.Position).Magnitude < 5 then
        var97 = true
    end
    if arg2.Magnitude == 0 and var97 and VRService_upvr.AvatarGestures and arg1.humanoid and not arg1.humanoid.Sit then
        local any_GetUserCFrame_result1 = VRService_upvr:GetUserCFrame(Enum.UserCFrame.Head)
        local var99 = (CurrentCamera_2.CFrame * (any_GetUserCFrame_result1.Rotation + any_GetUserCFrame_result1.Position * CurrentCamera_2.HeadScale) * CFrame.new(0, -0.7 * arg1.humanoid.RootPart.Size.Y / 2, 0)).Position - arg1.humanoid.RootPart.CFrame.Position
        return Vector3.new(var99.x, 0, var99.z)
    end
    return arg2
end
function module_upvr_3.OnHumanoidSeated(arg1, arg2, arg3) -- Line 527
    --[[ Upvalues[1]:
        [1]: Value_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [7] 7. Error Block 12 start (CF ANALYSIS FAILED)
    if not arg1.vehicleController then
        arg1.vehicleController = arg1.vehicleController.new(Value_upvr)
    end
    arg1.vehicleController:Enable(true, arg3)
    do
        return
    end
    -- KONSTANTERROR: [7] 7. Error Block 12 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [26] 20. Error Block 10 start (CF ANALYSIS FAILED)
    if arg1.vehicleController then
        arg1.vehicleController:Enable(false, arg3)
    end
    -- KONSTANTERROR: [26] 20. Error Block 10 end (CF ANALYSIS FAILED)
end
function module_upvr_3.OnCharacterAdded(arg1, arg2) -- Line 542
    arg1.humanoid = arg2:FindFirstChildOfClass("Humanoid")
    while not arg1.humanoid do
        arg2.ChildAdded:wait()
        arg1.humanoid = arg2:FindFirstChildOfClass("Humanoid")
    end
    if arg1.humanoidSeatedConn then
        arg1.humanoidSeatedConn:Disconnect()
        arg1.humanoidSeatedConn = nil
    end
    arg1.humanoidSeatedConn = arg1.humanoid.Seated:Connect(function(arg1_2, arg2_2) -- Line 553
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:OnHumanoidSeated(arg1_2, arg2_2)
    end)
    arg1:UpdateMovementMode()
end
function module_upvr_3.OnCharacterRemoving(arg1, arg2) -- Line 560
    arg1.humanoid = nil
    arg1:UpdateMovementMode()
end
function module_upvr_3.UpdateTouchGuiVisibility(arg1) -- Line 566
    --[[ Upvalues[2]:
        [1]: GuiService_upvr (readonly)
        [2]: UserInputService_upvr (readonly)
    ]]
    local var102
    if var102 then
        var102 = GuiService_upvr.TouchControlsEnabled
        if var102 then
            if UserInputService_upvr.PreferredInput ~= Enum.PreferredInput.Touch then
                var102 = false
            else
                var102 = true
            end
        end
    end
    if var102 and not arg1.touchGui then
        arg1:CreateTouchGuiContainer()
    end
    if arg1.touchGui then
        arg1.touchGui.Enabled = not not var102
    end
end
function module_upvr_3.SwitchToController(arg1, arg2) -- Line 585
    --[[ Upvalues[1]:
        [1]: Value_upvr (readonly)
    ]]
    if not arg2 then
        if arg1.activeController then
            arg1.activeController:Enable(false)
        end
        arg1.activeController = nil
        arg1.activeControlModule = nil
    else
        if not arg1.controllers[arg2] then
            arg1.controllers[arg2] = arg2.new(Value_upvr)
        end
        if arg1.activeController ~= arg1.controllers[arg2] then
            if arg1.activeController then
                arg1.activeController:Enable(false)
            end
            arg1.activeController = arg1.controllers[arg2]
            arg1.activeControlModule = arg2
            arg1:UpdateActiveControlModuleEnabled()
        end
    end
end
function module_upvr_3.UpdateMovementMode(arg1) -- Line 624
    --[[ Upvalues[1]:
        [1]: UserInputService_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    arg1:UpdateTouchGuiVisibility()
    local PreferredInput = UserInputService_upvr.PreferredInput
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [17] 12. Error Block 4 start (CF ANALYSIS FAILED)
    arg1:SwitchToController(PreferredInput)
    do
        return
    end
    -- KONSTANTERROR: [17] 12. Error Block 4 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [22] 16. Error Block 5 start (CF ANALYSIS FAILED)
    arg1:SwitchToController(arg1:SelectComputerMovementModule())
    -- KONSTANTERROR: [22] 16. Error Block 5 end (CF ANALYSIS FAILED)
end
local var104_upvw = pcall_result1 and pcall_result2
function module_upvr_3.CreateTouchGuiContainer(arg1) -- Line 640
    --[[ Upvalues[1]:
        [1]: var104_upvw (read and write)
    ]]
    if not arg1.playerGui then
    else
        if arg1.touchGui then
            arg1.touchGui:Destroy()
        end
        arg1.touchGui = Instance.new("ScreenGui")
        arg1.touchGui.Name = "TouchGui"
        arg1.touchGui.ResetOnSpawn = false
        arg1.touchGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
        if var104_upvw then
            arg1.touchGui.ClipToDeviceSafeArea = false
        end
        arg1.touchControlFrame = Instance.new("Frame")
        arg1.touchControlFrame.Name = "TouchControlFrame"
        arg1.touchControlFrame.Size = UDim2.new(1, 0, 1, 0)
        arg1.touchControlFrame.BackgroundTransparency = 1
        arg1.touchControlFrame.Parent = arg1.touchGui
        arg1.touchGui.Parent = arg1.playerGui
    end
end
function module_upvr_3.GetClickToMoveController(arg1) -- Line 666
    --[[ Upvalues[2]:
        [1]: module_upvr_5 (readonly)
        [2]: Value_upvr (readonly)
    ]]
    if not arg1.controllers[module_upvr_5] then
        arg1.controllers[module_upvr_5] = module_upvr_5.new(Value_upvr)
    end
    return arg1.controllers[module_upvr_5]
end
return module_upvr_3.new()
ModuleScript PathDisplay PathDisplay
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:03
-- Luau version 6, Types version 3
-- Time taken: 0.005816 seconds

local RaycastParams_new_result1_upvr = RaycastParams.new()
RaycastParams_new_result1_upvr.FilterType = Enum.RaycastFilterType.Exclude
local module_upvr = {
    spacing = 8;
    image = "rbxasset://textures/Cursors/Gamepad/Pointer.png";
    imageSize = Vector2.new(2, 2);
}
local tbl_upvw_2 = {}
local tbl_upvw = {}
local Model_upvr = Instance.new("Model")
Model_upvr.Name = "PathDisplayPoints"
local Part = Instance.new("Part")
Part.Anchored = true
Part.CanCollide = false
Part.Transparency = 1
Part.Name = "PathDisplayAdornee"
Part.CFrame = CFrame.new(0, 0, 0)
Part.Parent = Model_upvr
local tbl_upvr = {}
local var10_upvw = 30
for i = 1, var10_upvw do
    local ImageHandleAdornment = Instance.new("ImageHandleAdornment")
    ImageHandleAdornment.Archivable = false
    ImageHandleAdornment.Adornee = Part
    ImageHandleAdornment.Image = module_upvr.image
    ImageHandleAdornment.Size = module_upvr.imageSize
    tbl_upvr[i] = ImageHandleAdornment
end
local function _() -- Line 41, Named "retrieveFromPool"
    --[[ Upvalues[2]:
        [1]: tbl_upvr (readonly)
        [2]: var10_upvw (read and write)
    ]]
    local _1 = tbl_upvr[1]
    if not _1 then
        return nil
    end
    tbl_upvr[1] = tbl_upvr[var10_upvw]
    tbl_upvr[var10_upvw] = nil
    var10_upvw -= 1
    return _1
end
local function _(arg1) -- Line 52, Named "returnToPool"
    --[[ Upvalues[2]:
        [1]: var10_upvw (read and write)
        [2]: tbl_upvr (readonly)
    ]]
    var10_upvw += 1
    tbl_upvr[var10_upvw] = arg1
end
local any_getUserFlag_result1_upvr = require(script.Parent.Parent:WaitForChild("CommonUtils"):WaitForChild("FlagUtil")).getUserFlag("UserRaycastUpdateAPI")
local function renderPoint_upvr(arg1, arg2) -- Line 57, Named "renderPoint"
    --[[ Upvalues[5]:
        [1]: var10_upvw (read and write)
        [2]: tbl_upvr (readonly)
        [3]: any_getUserFlag_result1_upvr (readonly)
        [4]: RaycastParams_new_result1_upvr (readonly)
        [5]: Model_upvr (readonly)
    ]]
    local var14
    if var14 == 0 then
        var14 = nil
        return var14
    end
    local _1_2 = tbl_upvr[1]
    if not _1_2 then
        var14 = nil
    else
        tbl_upvr[1] = tbl_upvr[var10_upvw]
        tbl_upvr[var10_upvw] = nil
        var10_upvw -= 1
        var14 = _1_2
    end
    if any_getUserFlag_result1_upvr then
        RaycastParams_new_result1_upvr.FilterDescendantsInstances = {game.Players.LocalPlayer.Character, workspace.CurrentCamera}
        local workspace_Raycast_result1 = workspace:Raycast(arg1 + Vector3.new(0, 2, 0), Vector3.new(0, -8, 0), RaycastParams_new_result1_upvr)
        if not workspace_Raycast_result1 then
            return nil
        end
        var14.CFrame = CFrame.lookAlong(workspace_Raycast_result1.Position, workspace_Raycast_result1.Normal)
        var14.Parent = Model_upvr
        return var14
    end
    local workspace_FindPartOnRayWithIgnoreList_result1, workspace_FindPartOnRayWithIgnoreList_result2, workspace_FindPartOnRayWithIgnoreList_result3 = workspace:FindPartOnRayWithIgnoreList(Ray.new(arg1 + Vector3.new(0, 2, 0), Vector3.new(0, -8, 0)), {game.Players.LocalPlayer.Character, workspace.CurrentCamera})
    if not workspace_FindPartOnRayWithIgnoreList_result1 then
        return nil
    end
    var14.CFrame = CFrame.new(workspace_FindPartOnRayWithIgnoreList_result2, workspace_FindPartOnRayWithIgnoreList_result2 + workspace_FindPartOnRayWithIgnoreList_result3)
    var14.Parent = Model_upvr
    return var14
end
function module_upvr.setCurrentPoints(arg1) -- Line 89
    --[[ Upvalues[1]:
        [1]: tbl_upvw_2 (read and write)
    ]]
    if typeof(arg1) == "table" then
        tbl_upvw_2 = arg1
    else
        tbl_upvw_2 = {}
    end
end
function module_upvr.clearRenderedPath() -- Line 97
    --[[ Upvalues[4]:
        [1]: tbl_upvw (read and write)
        [2]: var10_upvw (read and write)
        [3]: tbl_upvr (readonly)
        [4]: Model_upvr (readonly)
    ]]
    for _, v in ipairs(tbl_upvw) do
        v.Parent = nil
        var10_upvw += 1
        tbl_upvr[var10_upvw] = v
    end
    tbl_upvw = {}
    Model_upvr.Parent = nil
end
function module_upvr.renderPath() -- Line 106
    --[[ Upvalues[5]:
        [1]: module_upvr (readonly)
        [2]: tbl_upvw_2 (read and write)
        [3]: tbl_upvw (read and write)
        [4]: renderPoint_upvr (readonly)
        [5]: Model_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 21 start (CF ANALYSIS FAILED)
    module_upvr.clearRenderedPath()
    local var27
    local function INLINED() -- Internal function, doesn't exist in bytecode
        var27 = #tbl_upvw_2
        return var27 == 0
    end
    if not var27 or INLINED() then return end
    var27 = #tbl_upvw_2
    local const_number = 0
    tbl_upvw[1] = renderPoint_upvr(tbl_upvw_2[var27], true)
    local var29 = tbl_upvw
    local _1_3 = var29[1]
    -- KONSTANTERROR: [0] 1. Error Block 21 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [25] 24. Error Block 6 start (CF ANALYSIS FAILED)
    do
        return
    end
    -- KONSTANTERROR: [25] 24. Error Block 6 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [35] 33. Error Block 28 start (CF ANALYSIS FAILED)
    local var31 = var29 - _1_3
    local magnitude = var31.magnitude
    if magnitude < const_number then
        var27 -= 1
    else
        local renderPoint_result1 = renderPoint_upvr(_1_3 + var31.unit * (const_number - magnitude), false)
        if renderPoint_result1 then
            tbl_upvw[#tbl_upvw + 1] = renderPoint_result1
        end
        -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    end
    -- KONSTANTERROR: [35] 33. Error Block 28 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [26] 25. Error Block 7 start (CF ANALYSIS FAILED)
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [61.263163]
    -- KONSTANTERROR: [26] 25. Error Block 7 end (CF ANALYSIS FAILED)
end
return module_upvr
ModuleScript Keyboard Keyboard
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:04
-- Luau version 6, Types version 3
-- Time taken: 0.006864 seconds

local zero_vector3_upvr = Vector3.new()
local module_upvr = require(script.Parent:WaitForChild("BaseCharacterController"))
local setmetatable_result1_2_upvr = setmetatable({}, module_upvr)
setmetatable_result1_2_upvr.__index = setmetatable_result1_2_upvr
function setmetatable_result1_2_upvr.new(arg1) -- Line 22
    --[[ Upvalues[2]:
        [1]: module_upvr (readonly)
        [2]: setmetatable_result1_2_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable(module_upvr.new(), setmetatable_result1_2_upvr)
    setmetatable_result1.CONTROL_ACTION_PRIORITY = arg1
    setmetatable_result1.forwardValue = 0
    setmetatable_result1.backwardValue = 0
    setmetatable_result1.leftValue = 0
    setmetatable_result1.rightValue = 0
    setmetatable_result1.jumpEnabled = true
    return setmetatable_result1
end
function setmetatable_result1_2_upvr.Enable(arg1, arg2) -- Line 37
    --[[ Upvalues[1]:
        [1]: zero_vector3_upvr (readonly)
    ]]
    if arg2 == arg1.enabled then
        return true
    end
    arg1.forwardValue = 0
    arg1.backwardValue = 0
    arg1.leftValue = 0
    arg1.rightValue = 0
    arg1.moveVector = zero_vector3_upvr
    arg1.jumpRequested = false
    arg1:UpdateJump()
    if arg2 then
        arg1:BindContextActions()
        arg1:ConnectFocusEventListeners()
    else
        arg1._connectionUtil:disconnectAll()
    end
    arg1.enabled = arg2
    return true
end
function setmetatable_result1_2_upvr.UpdateMovement(arg1, arg2) -- Line 64
    --[[ Upvalues[1]:
        [1]: zero_vector3_upvr (readonly)
    ]]
    if arg2 == Enum.UserInputState.Cancel then
        arg1.moveVector = zero_vector3_upvr
    else
        arg1.moveVector = Vector3.new(arg1.leftValue + arg1.rightValue, 0, arg1.forwardValue + arg1.backwardValue)
    end
end
function setmetatable_result1_2_upvr.UpdateJump(arg1) -- Line 72
    arg1.isJumping = arg1.jumpRequested
end
local ContextActionService_upvr = game:GetService("ContextActionService")
function setmetatable_result1_2_upvr.BindContextActions(arg1) -- Line 76
    --[[ Upvalues[1]:
        [1]: ContextActionService_upvr (readonly)
    ]]
    ContextActionService_upvr:BindActionAtPriority("moveForwardAction", function(arg1_2, arg2, arg3) -- Line 82
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        local var7
        if arg2 == Enum.UserInputState.Begin then
            var7 = -1
        else
            var7 = 0
        end
        arg1.forwardValue = var7
        arg1:UpdateMovement(arg2)
        return Enum.ContextActionResult.Pass
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterForward)
    ContextActionService_upvr:BindActionAtPriority("moveBackwardAction", function(arg1_3, arg2, arg3) -- Line 88
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        local var9
        if arg2 == Enum.UserInputState.Begin then
            var9 = 1
        else
            var9 = 0
        end
        arg1.backwardValue = var9
        arg1:UpdateMovement(arg2)
        return Enum.ContextActionResult.Pass
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterBackward)
    ContextActionService_upvr:BindActionAtPriority("moveLeftAction", function(arg1_4, arg2, arg3) -- Line 94
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        local var11
        if arg2 == Enum.UserInputState.Begin then
            var11 = -1
        else
            var11 = 0
        end
        arg1.leftValue = var11
        arg1:UpdateMovement(arg2)
        return Enum.ContextActionResult.Pass
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterLeft)
    ContextActionService_upvr:BindActionAtPriority("moveRightAction", function(arg1_5, arg2, arg3) -- Line 100
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        local var13
        if arg2 == Enum.UserInputState.Begin then
            var13 = 1
        else
            var13 = 0
        end
        arg1.rightValue = var13
        arg1:UpdateMovement(arg2)
        return Enum.ContextActionResult.Pass
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterRight)
    ContextActionService_upvr:BindActionAtPriority("jumpAction", function(arg1_6, arg2, arg3) -- Line 106
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        local jumpEnabled = arg1.jumpEnabled
        if jumpEnabled then
            if arg2 ~= Enum.UserInputState.Begin then
                jumpEnabled = false
            else
                jumpEnabled = true
            end
        end
        arg1.jumpRequested = jumpEnabled
        arg1:UpdateJump()
        return Enum.ContextActionResult.Pass
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterJump)
    arg1._connectionUtil:trackBoundFunction("moveForwardAction", function() -- Line 125
        --[[ Upvalues[1]:
            [1]: ContextActionService_upvr (copied, readonly)
        ]]
        ContextActionService_upvr:UnbindAction("moveForwardAction")
    end)
    arg1._connectionUtil:trackBoundFunction("moveBackwardAction", function() -- Line 126
        --[[ Upvalues[1]:
            [1]: ContextActionService_upvr (copied, readonly)
        ]]
        ContextActionService_upvr:UnbindAction("moveBackwardAction")
    end)
    arg1._connectionUtil:trackBoundFunction("moveLeftAction", function() -- Line 127
        --[[ Upvalues[1]:
            [1]: ContextActionService_upvr (copied, readonly)
        ]]
        ContextActionService_upvr:UnbindAction("moveLeftAction")
    end)
    arg1._connectionUtil:trackBoundFunction("moveRightAction", function() -- Line 128
        --[[ Upvalues[1]:
            [1]: ContextActionService_upvr (copied, readonly)
        ]]
        ContextActionService_upvr:UnbindAction("moveRightAction")
    end)
    arg1._connectionUtil:trackBoundFunction("jumpAction", function() -- Line 129
        --[[ Upvalues[1]:
            [1]: ContextActionService_upvr (copied, readonly)
        ]]
        ContextActionService_upvr:UnbindAction("jumpAction")
    end)
end
local UserInputService_upvr = game:GetService("UserInputService")
function setmetatable_result1_2_upvr.ConnectFocusEventListeners(arg1) -- Line 132
    --[[ Upvalues[2]:
        [1]: zero_vector3_upvr (readonly)
        [2]: UserInputService_upvr (readonly)
    ]]
    local function onFocusReleased() -- Line 133
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: zero_vector3_upvr (copied, readonly)
        ]]
        arg1.moveVector = zero_vector3_upvr
        arg1.forwardValue = 0
        arg1.backwardValue = 0
        arg1.leftValue = 0
        arg1.rightValue = 0
        arg1.jumpRequested = false
        arg1:UpdateJump()
    end
    arg1._connectionUtil:trackConnection("textBoxFocusReleased", UserInputService_upvr.TextBoxFocusReleased:Connect(onFocusReleased))
    arg1._connectionUtil:trackConnection("textBoxFocused", UserInputService_upvr.TextBoxFocused:Connect(function(arg1_7) -- Line 143, Named "onTextFocusGained"
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1.jumpRequested = false
        arg1:UpdateJump()
    end))
    arg1._connectionUtil:trackConnection("windowFocusReleased", UserInputService_upvr.WindowFocused:Connect(onFocusReleased))
end
return setmetatable_result1_2_upvr
ModuleScript BaseCharacterController BaseCharacterController
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:06
-- Luau version 6, Types version 3
-- Time taken: 0.001464 seconds

local module_upvr_2 = {}
module_upvr_2.__index = module_upvr_2
local zero_vector3_upvr = Vector3.new()
local module_upvr = require(script.Parent.Parent:WaitForChild("CommonUtils"):WaitForChild("ConnectionUtil"))
function module_upvr_2.new() -- Line 33
    --[[ Upvalues[3]:
        [1]: module_upvr_2 (readonly)
        [2]: zero_vector3_upvr (readonly)
        [3]: module_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, module_upvr_2)
    setmetatable_result1.enabled = false
    setmetatable_result1.moveVector = zero_vector3_upvr
    setmetatable_result1.moveVectorIsCameraRelative = true
    setmetatable_result1.isJumping = false
    setmetatable_result1._connectionUtil = module_upvr.new()
    return setmetatable_result1
end
function module_upvr_2.GetMoveVector(arg1) -- Line 45
    return arg1.moveVector
end
function module_upvr_2.IsMoveVectorCameraRelative(arg1) -- Line 49
    return arg1.moveVectorIsCameraRelative
end
function module_upvr_2.GetIsJumping(arg1) -- Line 53
    return arg1.isJumping
end
function module_upvr_2.Enable(arg1, arg2) -- Line 59
    error("BaseCharacterController:Enable must be overridden in derived classes and should not be called.")
    return false
end
return module_upvr_2
ModuleScript Gamepad Gamepad
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:07
-- Luau version 6, Types version 3
-- Time taken: 0.006530 seconds

local UserInputService_upvr = game:GetService("UserInputService")
local ContextActionService_upvr = game:GetService("ContextActionService")
local None_upvr = Enum.UserInputType.None
local module_upvr = require(script.Parent:WaitForChild("BaseCharacterController"))
local setmetatable_result1_upvr = setmetatable({}, module_upvr)
setmetatable_result1_upvr.__index = setmetatable_result1_upvr
function setmetatable_result1_upvr.new(arg1) -- Line 23
    --[[ Upvalues[3]:
        [1]: module_upvr (readonly)
        [2]: setmetatable_result1_upvr (readonly)
        [3]: None_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable(module_upvr.new(), setmetatable_result1_upvr)
    setmetatable_result1.CONTROL_ACTION_PRIORITY = arg1
    setmetatable_result1.forwardValue = 0
    setmetatable_result1.backwardValue = 0
    setmetatable_result1.leftValue = 0
    setmetatable_result1.rightValue = 0
    setmetatable_result1.activeGamepad = None_upvr
    setmetatable_result1.gamepadConnectedConn = nil
    setmetatable_result1.gamepadDisconnectedConn = nil
    return setmetatable_result1
end
function setmetatable_result1_upvr.Enable(arg1, arg2) -- Line 39
    --[[ Upvalues[1]:
        [1]: None_upvr (readonly)
    ]]
    if arg2 == arg1.enabled then
        return true
    end
    arg1.forwardValue = 0
    arg1.backwardValue = 0
    arg1.leftValue = 0
    arg1.rightValue = 0
    arg1.moveVector = Vector3.new(0, 0, 0)
    arg1.isJumping = false
    if arg2 then
        arg1.activeGamepad = arg1:GetHighestPriorityGamepad()
        if arg1.activeGamepad ~= None_upvr then
            arg1:BindContextActions()
            arg1:ConnectGamepadConnectionListeners()
        else
            return false
        end
    else
        arg1:UnbindContextActions()
        arg1:DisconnectGamepadConnectionListeners()
        arg1.activeGamepad = None_upvr
    end
    arg1.enabled = arg2
    return true
end
function setmetatable_result1_upvr.GetHighestPriorityGamepad(arg1) -- Line 75
    --[[ Upvalues[2]:
        [1]: UserInputService_upvr (readonly)
        [2]: None_upvr (readonly)
    ]]
    local var14
    for _, v in pairs(UserInputService_upvr:GetConnectedGamepads()) do
        if v.Value < var14.Value then
            var14 = v
        end
    end
    return var14
end
function setmetatable_result1_upvr.BindContextActions(arg1) -- Line 86
    --[[ Upvalues[2]:
        [1]: None_upvr (readonly)
        [2]: ContextActionService_upvr (readonly)
    ]]
    if arg1.activeGamepad == None_upvr then
        return false
    end
    ContextActionService_upvr:BindActivate(arg1.activeGamepad, Enum.KeyCode.ButtonR2)
    ContextActionService_upvr:BindActionAtPriority("jumpAction", function(arg1_2, arg2, arg3) -- Line 93
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        local var16
        if arg2 ~= Enum.UserInputState.Begin then
            var16 = false
        else
            var16 = true
        end
        arg1.isJumping = var16
        return Enum.ContextActionResult.Sink
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.KeyCode.ButtonA)
    ContextActionService_upvr:BindActionAtPriority("moveThumbstick", function(arg1_3, arg2, arg3) -- Line 98
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        if arg2 == Enum.UserInputState.Cancel then
            arg1.moveVector = Vector3.new(0, 0, 0)
            return Enum.ContextActionResult.Sink
        end
        if arg1.activeGamepad ~= arg3.UserInputType then
            return Enum.ContextActionResult.Pass
        end
        if arg3.KeyCode ~= Enum.KeyCode.Thumbstick1 then return end
        if 0.2 < arg3.Position.magnitude then
            arg1.moveVector = Vector3.new(arg3.Position.X, 0, -arg3.Position.Y)
        else
            arg1.moveVector = Vector3.new(0, 0, 0)
        end
        return Enum.ContextActionResult.Sink
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Thumbstick1)
    return true
end
function setmetatable_result1_upvr.UnbindContextActions(arg1) -- Line 127
    --[[ Upvalues[2]:
        [1]: None_upvr (readonly)
        [2]: ContextActionService_upvr (readonly)
    ]]
    if arg1.activeGamepad ~= None_upvr then
        ContextActionService_upvr:UnbindActivate(arg1.activeGamepad, Enum.KeyCode.ButtonR2)
    end
    ContextActionService_upvr:UnbindAction("moveThumbstick")
    ContextActionService_upvr:UnbindAction("jumpAction")
end
function setmetatable_result1_upvr.OnNewGamepadConnected(arg1) -- Line 135
    --[[ Upvalues[1]:
        [1]: None_upvr (readonly)
    ]]
    local any_GetHighestPriorityGamepad_result1_2 = arg1:GetHighestPriorityGamepad()
    if any_GetHighestPriorityGamepad_result1_2 == arg1.activeGamepad then
    else
        if any_GetHighestPriorityGamepad_result1_2 == None_upvr then
            warn("Gamepad:OnNewGamepadConnected found no connected gamepads")
            arg1:UnbindContextActions()
            return
        end
        if arg1.activeGamepad ~= None_upvr then
            arg1:UnbindContextActions()
        end
        arg1.activeGamepad = any_GetHighestPriorityGamepad_result1_2
        arg1:BindContextActions()
    end
end
function setmetatable_result1_upvr.OnCurrentGamepadDisconnected(arg1) -- Line 162
    --[[ Upvalues[2]:
        [1]: None_upvr (readonly)
        [2]: ContextActionService_upvr (readonly)
    ]]
    if arg1.activeGamepad ~= None_upvr then
        ContextActionService_upvr:UnbindActivate(arg1.activeGamepad, Enum.KeyCode.ButtonR2)
    end
    local any_GetHighestPriorityGamepad_result1 = arg1:GetHighestPriorityGamepad()
    if arg1.activeGamepad ~= None_upvr and any_GetHighestPriorityGamepad_result1 == arg1.activeGamepad then
        warn("Gamepad:OnCurrentGamepadDisconnected found the supposedly disconnected gamepad in connectedGamepads.")
        arg1:UnbindContextActions()
        arg1.activeGamepad = None_upvr
    else
        if any_GetHighestPriorityGamepad_result1 == None_upvr then
            arg1:UnbindContextActions()
            arg1.activeGamepad = None_upvr
            return
        end
        arg1.activeGamepad = any_GetHighestPriorityGamepad_result1
        ContextActionService_upvr:BindActivate(arg1.activeGamepad, Enum.KeyCode.ButtonR2)
    end
end
function setmetatable_result1_upvr.ConnectGamepadConnectionListeners(arg1) -- Line 187
    --[[ Upvalues[1]:
        [1]: UserInputService_upvr (readonly)
    ]]
    arg1.gamepadConnectedConn = UserInputService_upvr.GamepadConnected:Connect(function(arg1_4) -- Line 188
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:OnNewGamepadConnected()
    end)
    arg1.gamepadDisconnectedConn = UserInputService_upvr.GamepadDisconnected:Connect(function(arg1_5) -- Line 192
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        if arg1.activeGamepad == arg1_5 then
            arg1:OnCurrentGamepadDisconnected()
        end
    end)
end
function setmetatable_result1_upvr.DisconnectGamepadConnectionListeners(arg1) -- Line 200
    if arg1.gamepadConnectedConn then
        arg1.gamepadConnectedConn:Disconnect()
        arg1.gamepadConnectedConn = nil
    end
    if arg1.gamepadDisconnectedConn then
        arg1.gamepadDisconnectedConn:Disconnect()
        arg1.gamepadDisconnectedConn = nil
    end
end
return setmetatable_result1_upvr
ModuleScript VRNavigation VRNavigation
KONSTANTERROR: After: K:0: attempt to index nil with 'debug_name'
K
K
K
K
K
K
K
ModuleScript ClickToMoveDisplay ClickToMoveDisplay
KONSTANTERROR: After: Unknown constant type 251
K
K
K
K
K
K
K
ModuleScript TouchThumbstick TouchThumbstick
KONSTANTERROR: After: invalid argument #1 to 'create' (size out of range)
K
K
K
K
K
K
K
ModuleScript ClickToMoveController ClickToMoveController
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:12
-- Luau version 6, Types version 3
-- Time taken: 0.096437 seconds

local pcall_result1, pcall_result2 = pcall(function() -- Line 10
    return UserSettings():IsUserFeatureEnabled("UserExcludeNonCollidableForPathfinding")
end)
local pcall_result1_2, pcall_result2_2 = pcall(function() -- Line 14
    return UserSettings():IsUserFeatureEnabled("UserClickToMoveSupportAgentCanClimb2")
end)
local UserInputService_upvr = game:GetService("UserInputService")
local Players_upvr = game:GetService("Players")
local Workspace_upvr = game:GetService("Workspace")
local any_getUserFlag_result1_upvr = require(script.Parent.Parent:WaitForChild("CommonUtils"):WaitForChild("FlagUtil")).getUserFlag("UserRaycastUpdateAPI")
local var11_upvw = true
local var12_upvw = true
local var13_upvw = false
local var14_upvw = 1
local var15_upvw = 8
local tbl_4_upvr = {
    [Enum.KeyCode.W] = true;
    [Enum.KeyCode.A] = true;
    [Enum.KeyCode.S] = true;
    [Enum.KeyCode.D] = true;
    [Enum.KeyCode.Up] = true;
    [Enum.KeyCode.Down] = true;
}
local LocalPlayer_upvr = Players_upvr.LocalPlayer
local module_upvr = require(script.Parent:WaitForChild("ClickToMoveDisplay"))
local RaycastParams_new_result1_upvr = RaycastParams.new()
RaycastParams_new_result1_upvr.FilterType = Enum.RaycastFilterType.Exclude
local tbl_6_upvr = {}
if not any_getUserFlag_result1_upvr then
    local function FindCharacterAncestor_upvr(arg1) -- Line 65, Named "FindCharacterAncestor"
        --[[ Upvalues[1]:
            [1]: FindCharacterAncestor_upvr (readonly)
        ]]
        if arg1 then
            local class_Humanoid = arg1:FindFirstChildOfClass("Humanoid")
            if class_Humanoid then
                return arg1, class_Humanoid
            end
            return FindCharacterAncestor_upvr(arg1.Parent)
        end
    end
    tbl_6_upvr.FindCharacterAncestor = FindCharacterAncestor_upvr
    local function findPlayerHumanoid_upvr(arg1, arg2, arg3) -- Line 77, Named "Raycast"
        --[[ Upvalues[3]:
            [1]: Workspace_upvr (readonly)
            [2]: FindCharacterAncestor_upvr (readonly)
            [3]: findPlayerHumanoid_upvr (readonly)
        ]]
        local var32 = arg3
        if not var32 then
            var32 = {}
        end
        local var33 = var32
        local any_FindPartOnRayWithIgnoreList_result1, any_FindPartOnRayWithIgnoreList_result2_2, any_FindPartOnRayWithIgnoreList_result3_2, any_FindPartOnRayWithIgnoreList_result4_2 = Workspace_upvr:FindPartOnRayWithIgnoreList(arg1, var33)
        if any_FindPartOnRayWithIgnoreList_result1 then
            if arg2 then
                local var38
                if any_FindPartOnRayWithIgnoreList_result1.CanCollide == false then
                    if any_FindPartOnRayWithIgnoreList_result1 then
                        local class_Humanoid_2 = any_FindPartOnRayWithIgnoreList_result1:FindFirstChildOfClass("Humanoid")
                        if class_Humanoid_2 then
                            var38 = class_Humanoid_2
                        else
                            local _, FindCharacterAncestor_result2 = FindCharacterAncestor_upvr(any_FindPartOnRayWithIgnoreList_result1.Parent)
                            var38 = FindCharacterAncestor_result2
                        end
                    else
                        var38 = nil
                    end
                    if var38 == nil then
                        table.insert(var33, any_FindPartOnRayWithIgnoreList_result1)
                        return findPlayerHumanoid_upvr(arg1, arg2, var33)
                    end
                end
            end
            return any_FindPartOnRayWithIgnoreList_result1, any_FindPartOnRayWithIgnoreList_result2_2, any_FindPartOnRayWithIgnoreList_result3_2, any_FindPartOnRayWithIgnoreList_result4_2
        end
        return nil, nil
    end
    tbl_6_upvr.Raycast = findPlayerHumanoid_upvr
end
FindCharacterAncestor_upvr = {}
local var42_upvr = FindCharacterAncestor_upvr
function findPlayerHumanoid_upvr(arg1) -- Line 99, Named "findPlayerHumanoid"
    --[[ Upvalues[1]:
        [1]: var42_upvr (readonly)
    ]]
    local var43 = arg1
    if var43 then
        var43 = arg1.Character
    end
    if var43 then
        local var44 = var42_upvr[arg1]
        if var44 and var44.Parent == var43 then
            return var44
        end
        var42_upvr[arg1] = nil
        local class_Humanoid_7 = var43:FindFirstChildOfClass("Humanoid")
        if class_Humanoid_7 then
            var42_upvr[arg1] = class_Humanoid_7
        end
        return class_Humanoid_7
    end
end
local var46_upvw
local var47_upvw
local function _() -- Line 123, Named "GetCharacter"
    --[[ Upvalues[1]:
        [1]: LocalPlayer_upvr (readonly)
    ]]
    local var48 = LocalPlayer_upvr
    if var48 then
        var48 = LocalPlayer_upvr.Character
    end
    return var48
end
local var49_upvw
local var50_upvw
local CollectionService_upvr = game:GetService("CollectionService")
local function UpdateIgnoreTag_upvr(arg1) -- Line 127, Named "UpdateIgnoreTag"
    --[[ Upvalues[6]:
        [1]: var47_upvw (read and write)
        [2]: var49_upvw (read and write)
        [3]: var50_upvw (read and write)
        [4]: var46_upvw (read and write)
        [5]: LocalPlayer_upvr (readonly)
        [6]: CollectionService_upvr (readonly)
    ]]
    if arg1 == var47_upvw then
    else
        if var49_upvw then
            var49_upvw:Disconnect()
            var49_upvw = nil
        end
        if var50_upvw then
            var50_upvw:Disconnect()
            var50_upvw = nil
        end
        var47_upvw = arg1
        local tbl_5 = {}
        local var57 = LocalPlayer_upvr
        if var57 then
            var57 = LocalPlayer_upvr.Character
        end
        tbl_5[1] = var57
        var46_upvw = tbl_5
        if var47_upvw ~= nil then
            for _, v_7 in ipairs(CollectionService_upvr:GetTagged(var47_upvw)) do
                table.insert(var46_upvw, v_7)
            end
            var49_upvw = CollectionService_upvr:GetInstanceAddedSignal(var47_upvw):Connect(function(arg1_2) -- Line 147
                --[[ Upvalues[1]:
                    [1]: var46_upvw (copied, read and write)
                ]]
                table.insert(var46_upvw, arg1_2)
            end)
            var50_upvw = CollectionService_upvr:GetInstanceRemovedSignal(var47_upvw):Connect(function(arg1_3) -- Line 151
                --[[ Upvalues[1]:
                    [1]: var46_upvw (copied, read and write)
                ]]
                for i_8 = 1, #var46_upvw do
                    if var46_upvw[i_8] == arg1_3 then
                        var46_upvw[i_8] = var46_upvw[#var46_upvw]
                        table.remove(var46_upvw)
                        return
                    end
                end
            end)
        end
    end
end
local function _() -- Line 163, Named "getIgnoreList"
    --[[ Upvalues[2]:
        [1]: var46_upvw (read and write)
        [2]: LocalPlayer_upvr (readonly)
    ]]
    if var46_upvw then
        return var46_upvw
    end
    var46_upvw = {}
    assert(var46_upvw, "")
    local var64 = LocalPlayer_upvr
    if var64 then
        var64 = LocalPlayer_upvr.Character
    end
    table.insert(var46_upvw, var64)
    return var46_upvw
end
local function _(arg1, arg2) -- Line 173, Named "minV"
    return Vector3.new(math.min(arg1.X, arg2.X), math.min(arg1.Y, arg2.Y), math.min(arg1.Z, arg2.Z))
end
local function _(arg1, arg2) -- Line 176, Named "maxV"
    return Vector3.new(math.max(arg1.X, arg2.X), math.max(arg1.Y, arg2.Y), math.max(arg1.Z, arg2.Z))
end
local function getCollidableExtentsSize_upvr(arg1) -- Line 179, Named "getCollidableExtentsSize"
    if arg1 == nil or arg1.PrimaryPart == nil then return end
    assert(arg1, "")
    assert(arg1.PrimaryPart, "")
    for _, v in pairs(arg1:GetDescendants()) do
        if v:IsA("BasePart") and v.CanCollide then
            local vector3 = Vector3.new(v.Size.X / 2, v.Size.Y / 2, v.Size.Z / 2)
            for _, v_2 in ipairs({Vector3.new(vector3.X, vector3.Y, vector3.Z), Vector3.new(vector3.X, vector3.Y, -vector3.Z), Vector3.new(vector3.X, -vector3.Y, vector3.Z), Vector3.new(vector3.X, -vector3.Y, -vector3.Z), Vector3.new(-vector3.X, vector3.Y, vector3.Z), Vector3.new(-vector3.X, vector3.Y, -vector3.Z), Vector3.new(-vector3.X, -vector3.Y, vector3.Z), Vector3.new(-vector3.X, -vector3.Y, -vector3.Z)}) do
                local var81 = arg1.PrimaryPart.CFrame:Inverse() * v.CFrame * v_2
                local const_vector = Vector3.new(math.huge, math.huge, math.huge)
                local const_vector_2 = Vector3.new((-math.huge), (-math.huge), (-math.huge))
                local var84
            end
        end
    end
    local var85 = Vector3.new(math.max(const_vector_2.X, var81.X), math.max(const_vector_2.Y, var81.Y), math.max(const_vector_2.Z, var81.Z)) - Vector3.new(math.min(const_vector.X, var81.X), math.min(const_vector.Y, var81.Y), math.min(const_vector.Z, var81.Z))
    if var85.X < 0 or var85.Y < 0 or var85.Z < 0 then
        return nil
    end
    return var85
end
local var86_upvr = pcall_result1 and pcall_result2
local var87_upvr = pcall_result1_2 and pcall_result2_2
local PathfindingService_upvr = game:GetService("PathfindingService")
local function Pather_upvr(arg1, arg2, arg3) -- Line 214, Named "Pather"
    --[[ Upvalues[15]:
        [1]: var13_upvw (read and write)
        [2]: LocalPlayer_upvr (readonly)
        [3]: var42_upvr (readonly)
        [4]: var14_upvw (read and write)
        [5]: var86_upvr (readonly)
        [6]: getCollidableExtentsSize_upvr (readonly)
        [7]: var87_upvr (readonly)
        [8]: PathfindingService_upvr (readonly)
        [9]: var11_upvw (read and write)
        [10]: module_upvr (readonly)
        [11]: var15_upvw (read and write)
        [12]: any_getUserFlag_result1_upvr (readonly)
        [13]: RaycastParams_new_result1_upvr (readonly)
        [14]: var46_upvw (read and write)
        [15]: Workspace_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    -- KONSTANTERROR: [0] 1. Error Block 112 start (CF ANALYSIS FAILED)
    local module_upvr_2 = {}
    local var141
    if arg3 ~= nil then
        local _ = arg3
    else
    end
    module_upvr_2.Cancelled = false
    module_upvr_2.Started = false
    module_upvr_2.Finished = Instance.new("BindableEvent")
    module_upvr_2.PathFailed = Instance.new("BindableEvent")
    module_upvr_2.PathComputing = false
    module_upvr_2.PathComputed = false
    module_upvr_2.OriginalTargetPoint = arg1
    module_upvr_2.TargetPoint = arg1
    module_upvr_2.TargetSurfaceNormal = arg2
    module_upvr_2.DiedConn = nil
    module_upvr_2.SeatedConn = nil
    module_upvr_2.BlockedConn = nil
    module_upvr_2.TeleportedConn = nil
    module_upvr_2.CurrentPoint = 0
    module_upvr_2.HumanoidOffsetFromPath = Vector3.new(0, 0, 0)
    module_upvr_2.CurrentWaypointPosition = nil
    module_upvr_2.CurrentWaypointPlaneNormal = Vector3.new(0, 0, 0)
    module_upvr_2.CurrentWaypointPlaneDistance = 0
    module_upvr_2.CurrentWaypointNeedsJump = false
    module_upvr_2.CurrentHumanoidPosition = Vector3.new(0, 0, 0)
    module_upvr_2.CurrentHumanoidVelocity = 0
    module_upvr_2.NextActionMoveDirection = Vector3.new(0, 0, 0)
    module_upvr_2.NextActionJump = false
    module_upvr_2.Timeout = 0
    local var143 = LocalPlayer_upvr
    var141 = var143
    if var141 then
        var141 = var143.Character
    end
    if var141 then
        local var144 = var42_upvr[var143]
        if var144 and var144.Parent == var141 then
        else
            var42_upvr[var143] = nil
            local class_Humanoid_8 = var141:FindFirstChildOfClass("Humanoid")
            if class_Humanoid_8 then
                var42_upvr[var143] = class_Humanoid_8
            end
        end
    else
    end
    module_upvr_2.Humanoid = nil
    module_upvr_2.OriginPoint = nil
    module_upvr_2.AgentCanFollowPath = false
    module_upvr_2.DirectPath = false
    module_upvr_2.DirectPathRiseFirst = false
    module_upvr_2.stopTraverseFunc = nil
    module_upvr_2.setPointFunc = nil
    module_upvr_2.pointList = nil
    if module_upvr_2.Humanoid then
        local RootPart_2 = module_upvr_2.Humanoid.RootPart
        local var147
    end
    if RootPart_2 then
        var141 = RootPart_2.CFrame
        module_upvr_2.OriginPoint = var141.Position
        var141 = 5
        var147 = module_upvr_2.Humanoid
        local SeatPart = var147.SeatPart
        if SeatPart then
            var147 = SeatPart:IsA("VehicleSeat")
            if var147 then
                var147 = SeatPart:FindFirstAncestorOfClass("Model")
                if var147 then
                    var147.PrimaryPart = SeatPart
                    if true then
                        var141 = var14_upvw * var147:GetExtentsSize().Y
                        module_upvr_2.AgentCanFollowPath = true
                        -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                        module_upvr_2.DirectPath = true
                    end
                    var147.PrimaryPart = var147.PrimaryPart
                    -- KONSTANTWARNING: GOTO [282] #200
                end
                -- KONSTANTWARNING: GOTO [282] #200
            end
        end
        var147 = nil
        local var150
        if var86_upvr then
            local var151 = LocalPlayer_upvr
            if var151 then
                var151 = LocalPlayer_upvr.Character
            end
            if var151 ~= nil then
                var147 = getCollidableExtentsSize_upvr(var151)
            end
        end
        if var147 == nil then
            var151 = LocalPlayer_upvr
            local var152 = var151
            if var152 then
                var152 = LocalPlayer_upvr.Character
            end
            var147 = var152:GetExtentsSize()
        end
        assert(var147, "")
        var141 = var14_upvw * var147.Y
        if 0 >= module_upvr_2.Humanoid.JumpPower then
        else
        end
        module_upvr_2.AgentCanFollowPath = true
        module_upvr_2.DirectPath = var13_upvw
        module_upvr_2.DirectPathRiseFirst = module_upvr_2.Humanoid.Sit
        var147 = var87_upvr
        if var147 then
            var147 = PathfindingService_upvr
            var147 = var147:CreatePath({
                AgentRadius = var14_upvw * 0.5 * math.sqrt(var147.X * var147.X + var147.Z * var147.Z);
                AgentHeight = var141;
                AgentCanJump = true;
                AgentCanClimb = true;
            })
            module_upvr_2.pathResult = var147
        else
            var147 = PathfindingService_upvr
            local tbl = {}
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            tbl.AgentRadius = var14_upvw * 0.5 * math.sqrt(var147.X * var147.X + var147.Z * var147.Z)
            tbl.AgentHeight = var141
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            tbl.AgentCanJump = true
            var147 = var147:CreatePath(tbl)
            module_upvr_2.pathResult = var147
        end
    end
    function module_upvr_2.Cleanup(arg1_18) -- Line 332
        --[[ Upvalues[1]:
            [1]: module_upvr_2 (readonly)
        ]]
        if module_upvr_2.stopTraverseFunc then
            module_upvr_2.stopTraverseFunc()
            module_upvr_2.stopTraverseFunc = nil
        end
        if module_upvr_2.BlockedConn then
            module_upvr_2.BlockedConn:Disconnect()
            module_upvr_2.BlockedConn = nil
        end
        if module_upvr_2.DiedConn then
            module_upvr_2.DiedConn:Disconnect()
            module_upvr_2.DiedConn = nil
        end
        if module_upvr_2.SeatedConn then
            module_upvr_2.SeatedConn:Disconnect()
            module_upvr_2.SeatedConn = nil
        end
        if module_upvr_2.TeleportedConn then
            module_upvr_2.TeleportedConn:Disconnect()
            module_upvr_2.TeleportedConn = nil
        end
        module_upvr_2.Started = false
    end
    function module_upvr_2.Cancel(arg1_19) -- Line 361
        --[[ Upvalues[1]:
            [1]: module_upvr_2 (readonly)
        ]]
        module_upvr_2.Cancelled = true
        module_upvr_2:Cleanup()
    end
    function module_upvr_2.IsActive(arg1_20) -- Line 366
        --[[ Upvalues[1]:
            [1]: module_upvr_2 (readonly)
        ]]
        local AgentCanFollowPath = module_upvr_2.AgentCanFollowPath
        if AgentCanFollowPath then
            AgentCanFollowPath = module_upvr_2.Started
            if AgentCanFollowPath then
                AgentCanFollowPath = not module_upvr_2.Cancelled
            end
        end
        return AgentCanFollowPath
    end
    function module_upvr_2.OnPathInterrupted(arg1_21) -- Line 370
        --[[ Upvalues[1]:
            [1]: module_upvr_2 (readonly)
        ]]
        module_upvr_2.Cancelled = true
        module_upvr_2:OnPointReached(false)
    end
    function module_upvr_2.ComputePath(arg1_22) -- Line 376
        --[[ Upvalues[1]:
            [1]: module_upvr_2 (readonly)
        ]]
        -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
        if module_upvr_2.OriginPoint then
            if module_upvr_2.PathComputed or module_upvr_2.PathComputing then return end
            module_upvr_2.PathComputing = true
            if module_upvr_2.AgentCanFollowPath then
                local var156
                if module_upvr_2.DirectPath then
                    var156 = {}
                    if not module_upvr_2.DirectPathRiseFirst or not Enum.PathWaypointAction.Jump then
                    end
                    var156[1] = PathWaypoint.new(module_upvr_2.OriginPoint, Enum.PathWaypointAction.Walk)
                    var156[2] = PathWaypoint.new(module_upvr_2.TargetPoint, Enum.PathWaypointAction.Walk)
                    module_upvr_2.pointList = var156
                    var156 = true
                    module_upvr_2.PathComputed = var156
                else
                    var156 = module_upvr_2
                    var156.pathResult:ComputeAsync(module_upvr_2.OriginPoint, module_upvr_2.TargetPoint)
                    var156 = module_upvr_2.pathResult:GetWaypoints()
                    module_upvr_2.pointList = var156
                    var156 = module_upvr_2.pathResult.Blocked
                    var156 = var156:Connect(function(arg1_23) -- Line 390
                        --[[ Upvalues[1]:
                            [1]: module_upvr_2 (copied, readonly)
                        ]]
                        module_upvr_2:OnPathBlocked(arg1_23)
                    end)
                    module_upvr_2.BlockedConn = var156
                    if module_upvr_2.pathResult.Status ~= Enum.PathStatus.Success then
                        var156 = false
                    else
                        var156 = true
                    end
                    module_upvr_2.PathComputed = var156
                end
            end
            module_upvr_2.PathComputing = false
        end
    end
    function module_upvr_2.IsValidPath(arg1_24) -- Line 398
        --[[ Upvalues[1]:
            [1]: module_upvr_2 (readonly)
        ]]
        module_upvr_2:ComputePath()
        local PathComputed_2 = module_upvr_2.PathComputed
        if PathComputed_2 then
            PathComputed_2 = module_upvr_2.AgentCanFollowPath
        end
        return PathComputed_2
    end
    module_upvr_2.Recomputing = false
    function module_upvr_2.OnPathBlocked(arg1_25, arg2_8) -- Line 404
        --[[ Upvalues[3]:
            [1]: module_upvr_2 (readonly)
            [2]: var11_upvw (copied, read and write)
            [3]: module_upvr (copied, readonly)
        ]]
        -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
        local var159
        if module_upvr_2.CurrentPoint > arg2_8 then
            var159 = false
        else
            var159 = true
        end
        if not var159 or module_upvr_2.Recomputing then
        else
            module_upvr_2.Recomputing = true
            if module_upvr_2.stopTraverseFunc then
                module_upvr_2.stopTraverseFunc()
                module_upvr_2.stopTraverseFunc = nil
            end
            module_upvr_2.OriginPoint = module_upvr_2.Humanoid.RootPart.CFrame.p
            module_upvr_2.pathResult:ComputeAsync(module_upvr_2.OriginPoint, module_upvr_2.TargetPoint)
            module_upvr_2.pointList = module_upvr_2.pathResult:GetWaypoints()
            if 0 < #module_upvr_2.pointList then
                module_upvr_2.HumanoidOffsetFromPath = module_upvr_2.pointList[1].Position - module_upvr_2.OriginPoint
            end
            if module_upvr_2.pathResult.Status ~= Enum.PathStatus.Success then
            else
            end
            module_upvr_2.PathComputed = true
            if var11_upvw then
                local any_CreatePathDisplay_result1_4, any_CreatePathDisplay_result2 = module_upvr.CreatePathDisplay(module_upvr_2.pointList)
                module_upvr_2.stopTraverseFunc = any_CreatePathDisplay_result1_4
                module_upvr_2.setPointFunc = any_CreatePathDisplay_result2
            end
            if module_upvr_2.PathComputed then
                module_upvr_2.CurrentPoint = 1
                module_upvr_2:OnPointReached(true)
            else
                module_upvr_2.PathFailed:Fire()
                module_upvr_2:Cleanup()
            end
            module_upvr_2.Recomputing = false
        end
    end
    local function OnRenderStepped(arg1_26, arg2_9) -- Line 440
        --[[ Upvalues[2]:
            [1]: module_upvr_2 (readonly)
            [2]: var15_upvw (copied, read and write)
        ]]
        if module_upvr_2.Started then
            if not module_upvr_2.Cancelled then
                module_upvr_2.Timeout += arg2_9
                if var15_upvw < module_upvr_2.Timeout then
                    module_upvr_2:OnPointReached(false)
                    return
                end
                module_upvr_2.CurrentHumanoidPosition = module_upvr_2.Humanoid.RootPart.Position + module_upvr_2.HumanoidOffsetFromPath
                module_upvr_2.CurrentHumanoidVelocity = module_upvr_2.Humanoid.RootPart.Velocity
                while module_upvr_2.Started and module_upvr_2:IsCurrentWaypointReached() do
                    module_upvr_2:OnPointReached(true)
                end
                if module_upvr_2.Started then
                    module_upvr_2.NextActionMoveDirection = module_upvr_2.CurrentWaypointPosition - module_upvr_2.CurrentHumanoidPosition
                    if 0.000001 < module_upvr_2.NextActionMoveDirection.Magnitude then
                        module_upvr_2.NextActionMoveDirection = module_upvr_2.NextActionMoveDirection.Unit
                    else
                        module_upvr_2.NextActionMoveDirection = Vector3.new(0, 0, 0)
                    end
                    if module_upvr_2.CurrentWaypointNeedsJump then
                        module_upvr_2.NextActionJump = true
                        module_upvr_2.CurrentWaypointNeedsJump = false
                        return
                    end
                    module_upvr_2.NextActionJump = false
                end
            end
        end
    end
    module_upvr_2.OnRenderStepped = OnRenderStepped
    function module_upvr_2.IsCurrentWaypointReached(arg1_27) -- Line 478
        --[[ Upvalues[1]:
            [1]: module_upvr_2 (readonly)
        ]]
        local var162 = false
        if module_upvr_2.CurrentWaypointPlaneNormal ~= Vector3.new(0, 0, 0) then
            if module_upvr_2.CurrentWaypointPlaneNormal:Dot(module_upvr_2.CurrentHumanoidPosition) - module_upvr_2.CurrentWaypointPlaneDistance >= math.max(1, 0.0625 * -module_upvr_2.CurrentWaypointPlaneNormal:Dot(module_upvr_2.CurrentHumanoidVelocity)) then
                var162 = false
            else
                var162 = true
            end
        else
            var162 = true
        end
        if var162 then
            module_upvr_2.CurrentWaypointPosition = nil
            module_upvr_2.CurrentWaypointPlaneNormal = Vector3.new(0, 0, 0)
            module_upvr_2.CurrentWaypointPlaneDistance = 0
        end
        return var162
    end
    function module_upvr_2.OnPointReached(arg1_28, arg2_10) -- Line 504
        --[[ Upvalues[1]:
            [1]: module_upvr_2 (readonly)
        ]]
        if arg2_10 and not module_upvr_2.Cancelled then
            if module_upvr_2.setPointFunc then
                module_upvr_2.setPointFunc(module_upvr_2.CurrentPoint)
            end
            local var163 = module_upvr_2.CurrentPoint + 1
            if #module_upvr_2.pointList < var163 then
                if module_upvr_2.stopTraverseFunc then
                    module_upvr_2.stopTraverseFunc()
                end
                module_upvr_2.Finished:Fire()
                module_upvr_2:Cleanup()
            else
                local var164 = module_upvr_2.pointList[module_upvr_2.CurrentPoint]
                local var165 = module_upvr_2.pointList[var163]
                local any_GetState_result1_3 = module_upvr_2.Humanoid:GetState()
                local var167 = true
                if any_GetState_result1_3 ~= Enum.HumanoidStateType.FallingDown then
                    var167 = true
                    if any_GetState_result1_3 ~= Enum.HumanoidStateType.Freefall then
                        if any_GetState_result1_3 ~= Enum.HumanoidStateType.Jumping then
                            var167 = false
                        else
                            var167 = true
                        end
                    end
                end
                if var167 then
                    local var168
                    if var165.Action ~= Enum.PathWaypointAction.Jump then
                        var168 = false
                    else
                        var168 = true
                    end
                    if not var168 and 1 < module_upvr_2.CurrentPoint then
                        local var169 = var164.Position - module_upvr_2.pointList[module_upvr_2.CurrentPoint - 1].Position
                        local var170 = var165.Position - var164.Position
                        if Vector2.new(var169.x, var169.z).Unit:Dot(Vector2.new(var170.x, var170.z).Unit) >= 0.996 then
                            var168 = false
                        else
                            var168 = true
                        end
                    end
                    if var168 then
                        module_upvr_2.Humanoid.FreeFalling:Wait()
                        wait(0.1)
                    end
                end
                module_upvr_2:MoveToNextWayPoint(var164, var165, var163)
            end
        end
        module_upvr_2.PathFailed:Fire()
        module_upvr_2:Cleanup()
    end
    function module_upvr_2.MoveToNextWayPoint(arg1_29, arg2_11, arg3_3, arg4) -- Line 567
        --[[ Upvalues[2]:
            [1]: module_upvr_2 (readonly)
            [2]: var87_upvr (copied, readonly)
        ]]
        module_upvr_2.CurrentWaypointPlaneNormal = arg2_11.Position - arg3_3.Position
        local var171
        if not var87_upvr or arg3_3.Label ~= "Climb" then
            var171 = Vector3.new(module_upvr_2.CurrentWaypointPlaneNormal.X, 0, module_upvr_2.CurrentWaypointPlaneNormal.Z)
            module_upvr_2.CurrentWaypointPlaneNormal = var171
        end
        var171 = module_upvr_2.CurrentWaypointPlaneNormal
        var171 = 0.000001
        if var171 < var171.Magnitude then
            var171 = module_upvr_2.CurrentWaypointPlaneNormal.Unit
            module_upvr_2.CurrentWaypointPlaneNormal = var171
            var171 = module_upvr_2.CurrentWaypointPlaneNormal:Dot(arg3_3.Position)
            module_upvr_2.CurrentWaypointPlaneDistance = var171
        else
            var171 = Vector3.new(0, 0, 0)
            module_upvr_2.CurrentWaypointPlaneNormal = var171
            var171 = 0
            module_upvr_2.CurrentWaypointPlaneDistance = var171
        end
        if arg3_3.Action ~= Enum.PathWaypointAction.Jump then
            var171 = false
        else
            var171 = true
        end
        module_upvr_2.CurrentWaypointNeedsJump = var171
        var171 = arg3_3.Position
        module_upvr_2.CurrentWaypointPosition = var171
        module_upvr_2.CurrentPoint = arg4
        var171 = 0
        module_upvr_2.Timeout = var171
    end
    local function Start(arg1_30, arg2_12) -- Line 599
        --[[ Upvalues[3]:
            [1]: module_upvr_2 (readonly)
            [2]: module_upvr (copied, readonly)
            [3]: var11_upvw (copied, read and write)
        ]]
        if not module_upvr_2.AgentCanFollowPath then
            module_upvr_2.PathFailed:Fire()
        else
            if module_upvr_2.Started then return end
            module_upvr_2.Started = true
            module_upvr.CancelFailureAnimation()
            if var11_upvw and (arg2_12 == nil or arg2_12) then
                local any_CreatePathDisplay_result1, any_CreatePathDisplay_result2_2 = module_upvr.CreatePathDisplay(module_upvr_2.pointList, module_upvr_2.OriginalTargetPoint)
                module_upvr_2.stopTraverseFunc = any_CreatePathDisplay_result1
                module_upvr_2.setPointFunc = any_CreatePathDisplay_result2_2
            end
            if 0 < #module_upvr_2.pointList then
                module_upvr_2.HumanoidOffsetFromPath = Vector3.new(0, module_upvr_2.pointList[1].Position.Y - module_upvr_2.OriginPoint.Y, 0)
                module_upvr_2.CurrentHumanoidPosition = module_upvr_2.Humanoid.RootPart.Position + module_upvr_2.HumanoidOffsetFromPath
                module_upvr_2.CurrentHumanoidVelocity = module_upvr_2.Humanoid.RootPart.Velocity
                module_upvr_2.SeatedConn = module_upvr_2.Humanoid.Seated:Connect(function(arg1_31, arg2_13) -- Line 626
                    --[[ Upvalues[1]:
                        [1]: module_upvr_2 (copied, readonly)
                    ]]
                    module_upvr_2:OnPathInterrupted()
                end)
                module_upvr_2.DiedConn = module_upvr_2.Humanoid.Died:Connect(function() -- Line 627
                    --[[ Upvalues[1]:
                        [1]: module_upvr_2 (copied, readonly)
                    ]]
                    module_upvr_2:OnPathInterrupted()
                end)
                module_upvr_2.TeleportedConn = module_upvr_2.Humanoid.RootPart:GetPropertyChangedSignal("CFrame"):Connect(function() -- Line 628
                    --[[ Upvalues[1]:
                        [1]: module_upvr_2 (copied, readonly)
                    ]]
                    module_upvr_2:OnPathInterrupted()
                end)
                module_upvr_2.CurrentPoint = 1
                module_upvr_2:OnPointReached(true)
                return
            end
            module_upvr_2.PathFailed:Fire()
            if module_upvr_2.stopTraverseFunc then
                module_upvr_2.stopTraverseFunc()
            end
        end
    end
    module_upvr_2.Start = Start
    var141 = module_upvr_2.TargetPoint
    var141 = any_getUserFlag_result1_upvr
    local var177
    if var141 then
        var141 = RaycastParams_new_result1_upvr
        if var46_upvw then
        else
            var46_upvw = {}
            var147 = var46_upvw
            var177 = ""
            assert(var147, var177)
            var147 = var46_upvw
            var177 = LocalPlayer_upvr
            if var177 then
                var177 = LocalPlayer_upvr.Character
            end
            table.insert(var147, var177)
        end
        var141.FilterDescendantsInstances = var46_upvw
        var141 = Workspace_upvr
        var147 = Vector3.new(-0, -50, -0)
        var141 = var141:Raycast(var141 + module_upvr_2.TargetSurfaceNormal * 1.5, var147, RaycastParams_new_result1_upvr)
        if var141 then
            module_upvr_2.TargetPoint = var141.Position
            -- KONSTANTWARNING: GOTO [460] #333
        end
    else
        var141 = Ray.new
        -- KONSTANTERROR: Expression was reused, decompilation is incorrect
        var141 = var141(var141 + module_upvr_2.TargetSurfaceNormal * 1.5, Vector3.new(0, -50, 0))
        var147 = var141
        if var46_upvw then
        else
            var46_upvw = {}
            assert(var46_upvw, "")
            local var178 = LocalPlayer_upvr
            if var178 then
                var178 = LocalPlayer_upvr.Character
            end
            table.insert(var46_upvw, var178)
        end
        local any_FindPartOnRayWithIgnoreList_result1_4, any_FindPartOnRayWithIgnoreList_result2_4 = Workspace_upvr:FindPartOnRayWithIgnoreList(var147, var46_upvw)
        if any_FindPartOnRayWithIgnoreList_result1_4 then
            module_upvr_2.TargetPoint = any_FindPartOnRayWithIgnoreList_result2_4
        end
    end
    -- KONSTANTERROR: [0] 1. Error Block 112 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [460] 333. Error Block 63 start (CF ANALYSIS FAILED)
    var141 = module_upvr_2:ComputePath
    var141()
    do
        return module_upvr_2
    end
    -- KONSTANTERROR: [460] 333. Error Block 63 end (CF ANALYSIS FAILED)
end
local function _() -- Line 664, Named "CheckAlive"
    --[[ Upvalues[2]:
        [1]: LocalPlayer_upvr (readonly)
        [2]: var42_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local var181 = LocalPlayer_upvr
    local var182 = var181
    if var182 then
        var182 = var181.Character
    end
    if var182 then
        local var183 = var42_upvr[var181]
        if var183 and var183.Parent == var182 then
            local _ = var183
        else
            var42_upvr[var181] = nil
            local class_Humanoid_5 = var182:FindFirstChildOfClass("Humanoid")
            if class_Humanoid_5 then
                var42_upvr[var181] = class_Humanoid_5
            end
        end
    else
    end
    var181 = false
    local var186 = var181
    if nil ~= nil then
        -- KONSTANTERROR: Expression was reused, decompilation is incorrect
        if 0 >= nil.Health then
            var186 = false
        else
            var186 = true
        end
    end
    return var186
end
local function GetEquippedTool_upvr(arg1) -- Line 669, Named "GetEquippedTool"
    if arg1 ~= nil then
        for _, v_3 in pairs(arg1:GetChildren()) do
            if v_3:IsA("Tool") then
                return v_3
            end
        end
    end
end
local var192_upvw
local var193_upvw
local var194_upvw
local function CleanupPath() -- Line 684
    --[[ Upvalues[3]:
        [1]: var192_upvw (read and write)
        [2]: var193_upvw (read and write)
        [3]: var194_upvw (read and write)
    ]]
    if var192_upvw then
        var192_upvw:Cancel()
        var192_upvw = nil
    end
    if var193_upvw then
        var193_upvw:Disconnect()
        var193_upvw = nil
    end
    if var194_upvw then
        var194_upvw:Disconnect()
        var194_upvw = nil
    end
end
local function HandleMoveTo_upvr(arg1, arg2, arg3, arg4, arg5) -- Line 702, Named "HandleMoveTo"
    --[[ Upvalues[6]:
        [1]: var192_upvw (read and write)
        [2]: var193_upvw (read and write)
        [3]: var194_upvw (read and write)
        [4]: GetEquippedTool_upvr (readonly)
        [5]: var12_upvw (read and write)
        [6]: module_upvr (readonly)
    ]]
    if var192_upvw then
        if var192_upvw then
            var192_upvw:Cancel()
            var192_upvw = nil
        end
        if var193_upvw then
            var193_upvw:Disconnect()
            var193_upvw = nil
        end
        if var194_upvw then
            var194_upvw:Disconnect()
            var194_upvw = nil
        end
    end
    var192_upvw = arg1
    arg1:Start(arg5)
    var193_upvw = arg1.Finished.Event:Connect(function() -- Line 709
        --[[ Upvalues[6]:
            [1]: var192_upvw (copied, read and write)
            [2]: var193_upvw (copied, read and write)
            [3]: var194_upvw (copied, read and write)
            [4]: arg3 (readonly)
            [5]: GetEquippedTool_upvr (copied, readonly)
            [6]: arg4 (readonly)
        ]]
        if var192_upvw then
            var192_upvw:Cancel()
            var192_upvw = nil
        end
        if var193_upvw then
            var193_upvw:Disconnect()
            var193_upvw = nil
        end
        if var194_upvw then
            var194_upvw:Disconnect()
            var194_upvw = nil
        end
        if arg3 then
            local GetEquippedTool_upvr_result1 = GetEquippedTool_upvr(arg4)
            if GetEquippedTool_upvr_result1 then
                GetEquippedTool_upvr_result1:Activate()
            end
        end
    end)
    var194_upvw = arg1.PathFailed.Event:Connect(function() -- Line 718
        --[[ Upvalues[7]:
            [1]: var192_upvw (copied, read and write)
            [2]: var193_upvw (copied, read and write)
            [3]: var194_upvw (copied, read and write)
            [4]: arg5 (readonly)
            [5]: var12_upvw (copied, read and write)
            [6]: module_upvr (copied, readonly)
            [7]: arg2 (readonly)
        ]]
        -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [2] 3. Error Block 2 start (CF ANALYSIS FAILED)
        var192_upvw:Cancel()
        var192_upvw = nil
        -- KONSTANTERROR: [2] 3. Error Block 2 end (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [8] 8. Error Block 3 start (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [8] 8. Error Block 3 end (CF ANALYSIS FAILED)
    end)
end
local function _(arg1) -- Line 730, Named "ShowPathFailedFeedback"
    --[[ Upvalues[3]:
        [1]: var192_upvw (read and write)
        [2]: var12_upvw (read and write)
        [3]: module_upvr (readonly)
    ]]
    if var192_upvw and var192_upvw:IsActive() then
        var192_upvw:Cancel()
    end
    if var12_upvw then
        module_upvr.PlayFailureAnimation()
    end
    module_upvr.DisplayFailureWaypoint(arg1)
end
local StarterGui_upvr = game:GetService("StarterGui")
function OnTap(arg1, arg2, arg3) -- Line 740
    --[[ Upvalues[17]:
        [1]: Workspace_upvr (readonly)
        [2]: LocalPlayer_upvr (readonly)
        [3]: var42_upvr (readonly)
        [4]: any_getUserFlag_result1_upvr (readonly)
        [5]: var46_upvw (read and write)
        [6]: RaycastParams_new_result1_upvr (readonly)
        [7]: StarterGui_upvr (readonly)
        [8]: Players_upvr (readonly)
        [9]: var192_upvw (read and write)
        [10]: var193_upvw (read and write)
        [11]: var194_upvw (read and write)
        [12]: Pather_upvr (readonly)
        [13]: HandleMoveTo_upvr (readonly)
        [14]: var12_upvw (read and write)
        [15]: module_upvr (readonly)
        [16]: tbl_6_upvr (readonly)
        [17]: GetEquippedTool_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    -- KONSTANTERROR: [0] 1. Error Block 176 start (CF ANALYSIS FAILED)
    local var200 = LocalPlayer_upvr
    local var201 = var200
    if var201 then
        var201 = var200.Character
    end
    if var201 then
        local var202 = var42_upvr[var200]
        if var202 and var202.Parent == var201 then
            local _ = var202
        else
            var42_upvr[var200] = nil
            local class_Humanoid_4 = var201:FindFirstChildOfClass("Humanoid")
            if class_Humanoid_4 then
                var42_upvr[var200] = class_Humanoid_4
            end
        end
    else
    end
    -- KONSTANTERROR: [0] 1. Error Block 176 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [37] 31. Error Block 166 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    if 0 >= nil.Health then
    else
    end
    -- KONSTANTERROR: [37] 31. Error Block 166 end (CF ANALYSIS FAILED)
end
local function _(arg1) -- Line 850, Named "DisconnectEvent"
    if arg1 then
        arg1:Disconnect()
    end
end
local module_upvr_4 = require(script.Parent:WaitForChild("Keyboard"))
local setmetatable_result1_2_upvr = setmetatable({}, module_upvr_4)
setmetatable_result1_2_upvr.__index = setmetatable_result1_2_upvr
function setmetatable_result1_2_upvr.new(arg1) -- Line 861
    --[[ Upvalues[2]:
        [1]: module_upvr_4 (readonly)
        [2]: setmetatable_result1_2_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable(module_upvr_4.new(arg1), setmetatable_result1_2_upvr)
    setmetatable_result1.fingerTouches = {}
    setmetatable_result1.numUnsunkTouches = 0
    setmetatable_result1.mouse2DownTime = tick()
    setmetatable_result1.mouse2DownPos = Vector2.new()
    setmetatable_result1.mouse2UpTime = tick()
    setmetatable_result1.keyboardMoveVector = Vector3.new(0, 0, 0)
    setmetatable_result1.tapConn = nil
    setmetatable_result1.inputBeganConn = nil
    setmetatable_result1.inputChangedConn = nil
    setmetatable_result1.inputEndedConn = nil
    setmetatable_result1.humanoidDiedConn = nil
    setmetatable_result1.characterChildAddedConn = nil
    setmetatable_result1.onCharacterAddedConn = nil
    setmetatable_result1.characterChildRemovedConn = nil
    setmetatable_result1.renderSteppedConn = nil
    setmetatable_result1.menuOpenedConnection = nil
    setmetatable_result1.preferredInputChangedConnection = nil
    setmetatable_result1.running = false
    setmetatable_result1.wasdEnabled = false
    return setmetatable_result1
end
function setmetatable_result1_2_upvr.DisconnectEvents(arg1) -- Line 892
    local tapConn = arg1.tapConn
    if tapConn then
        tapConn:Disconnect()
    end
    local inputBeganConn = arg1.inputBeganConn
    if inputBeganConn then
        inputBeganConn:Disconnect()
    end
    local inputChangedConn = arg1.inputChangedConn
    if inputChangedConn then
        inputChangedConn:Disconnect()
    end
    local inputEndedConn = arg1.inputEndedConn
    if inputEndedConn then
        inputEndedConn:Disconnect()
    end
    local humanoidDiedConn_2 = arg1.humanoidDiedConn
    if humanoidDiedConn_2 then
        humanoidDiedConn_2:Disconnect()
    end
    local characterChildAddedConn = arg1.characterChildAddedConn
    if characterChildAddedConn then
        characterChildAddedConn:Disconnect()
    end
    local onCharacterAddedConn = arg1.onCharacterAddedConn
    if onCharacterAddedConn then
        onCharacterAddedConn:Disconnect()
    end
    local renderSteppedConn = arg1.renderSteppedConn
    if renderSteppedConn then
        renderSteppedConn:Disconnect()
    end
    local characterChildRemovedConn = arg1.characterChildRemovedConn
    if characterChildRemovedConn then
        characterChildRemovedConn:Disconnect()
    end
    local menuOpenedConnection = arg1.menuOpenedConnection
    if menuOpenedConnection then
        menuOpenedConnection:Disconnect()
    end
    local preferredInputChangedConnection = arg1.preferredInputChangedConnection
    if preferredInputChangedConnection then
        preferredInputChangedConnection:Disconnect()
    end
end
function setmetatable_result1_2_upvr.OnTouchBegan(arg1, arg2, arg3) -- Line 906
    if arg1.fingerTouches[arg2] == nil then
        if not arg3 then
            arg1.numUnsunkTouches += 1
        end
    end
    arg1.fingerTouches[arg2] = arg3
end
function setmetatable_result1_2_upvr.OnTouchChanged(arg1, arg2, arg3) -- Line 913
    if arg1.fingerTouches[arg2] == nil then
        arg1.fingerTouches[arg2] = arg3
        if not arg3 then
            arg1.numUnsunkTouches += 1
        end
    end
end
function setmetatable_result1_2_upvr.OnTouchEnded(arg1, arg2, arg3) -- Line 922
    if arg1.fingerTouches[arg2] ~= nil then
        if arg1.fingerTouches[arg2] == false then
            arg1.numUnsunkTouches -= 1
        end
    end
    arg1.fingerTouches[arg2] = nil
end
function setmetatable_result1_2_upvr.OnPreferredInputChanged(arg1) -- Line 929
    --[[ Upvalues[2]:
        [1]: LocalPlayer_upvr (readonly)
        [2]: UserInputService_upvr (readonly)
    ]]
    local Character_4 = LocalPlayer_upvr.Character
    local var224
    if Character_4 then
        if UserInputService_upvr.PreferredInput ~= Enum.PreferredInput.Touch then
            var224 = false
        else
            var224 = true
        end
        for _, v_4 in pairs(Character_4:GetChildren()) do
            if v_4:IsA("Tool") then
                v_4.ManualActivationOnly = var224
            end
        end
    end
end
local GuiService_upvr = game:GetService("GuiService")
function setmetatable_result1_2_upvr.OnCharacterAdded(arg1, arg2) -- Line 941
    --[[ Upvalues[7]:
        [1]: UserInputService_upvr (readonly)
        [2]: tbl_4_upvr (readonly)
        [3]: var192_upvw (read and write)
        [4]: var193_upvw (read and write)
        [5]: var194_upvw (read and write)
        [6]: module_upvr (readonly)
        [7]: GuiService_upvr (readonly)
    ]]
    arg1:DisconnectEvents()
    arg1.inputBeganConn = UserInputService_upvr.InputBegan:Connect(function(arg1_32, arg2_14) -- Line 944
        --[[ Upvalues[6]:
            [1]: arg1 (readonly)
            [2]: tbl_4_upvr (copied, readonly)
            [3]: var192_upvw (copied, read and write)
            [4]: var193_upvw (copied, read and write)
            [5]: var194_upvw (copied, read and write)
            [6]: module_upvr (copied, readonly)
        ]]
        if arg1_32.UserInputType == Enum.UserInputType.Touch then
            arg1:OnTouchBegan(arg1_32, arg2_14)
        end
        if arg1.wasdEnabled then
            if arg2_14 == false and arg1_32.UserInputType == Enum.UserInputType.Keyboard and tbl_4_upvr[arg1_32.KeyCode] then
                if var192_upvw then
                    var192_upvw:Cancel()
                    var192_upvw = nil
                end
                if var193_upvw then
                    var193_upvw:Disconnect()
                    var193_upvw = nil
                end
                if var194_upvw then
                    var194_upvw:Disconnect()
                    var194_upvw = nil
                end
                module_upvr.CancelFailureAnimation()
            end
        end
        if arg1_32.UserInputType == Enum.UserInputType.MouseButton2 then
            arg1.mouse2DownTime = tick()
            arg1.mouse2DownPos = arg1_32.Position
        end
    end)
    arg1.inputChangedConn = UserInputService_upvr.InputChanged:Connect(function(arg1_33, arg2_15) -- Line 961
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        if arg1_33.UserInputType == Enum.UserInputType.Touch then
            arg1:OnTouchChanged(arg1_33, arg2_15)
        end
    end)
    arg1.inputEndedConn = UserInputService_upvr.InputEnded:Connect(function(arg1_34, arg2_16) -- Line 967
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: var192_upvw (copied, read and write)
        ]]
        if arg1_34.UserInputType == Enum.UserInputType.Touch then
            arg1:OnTouchEnded(arg1_34, arg2_16)
        end
        local var236
        if arg1_34.UserInputType == var236 then
            var236 = tick()
            arg1.mouse2UpTime = var236
            local Position = arg1_34.Position
            var236 = var192_upvw
            if not var236 then
                if arg1.keyboardMoveVector.Magnitude > 0 then
                    var236 = false
                else
                    var236 = true
                end
            end
            if arg1.mouse2UpTime - arg1.mouse2DownTime < 0.25 and (Position - arg1.mouse2DownPos).magnitude < 5 and var236 then
                OnTap({Position})
            end
        end
    end)
    arg1.tapConn = UserInputService_upvr.TouchTap:Connect(function(arg1_35, arg2_17) -- Line 984
        if not arg2_17 then
            OnTap(arg1_35, nil, true)
        end
    end)
    arg1.menuOpenedConnection = GuiService_upvr.MenuOpened:Connect(function() -- Line 990
        --[[ Upvalues[3]:
            [1]: var192_upvw (copied, read and write)
            [2]: var193_upvw (copied, read and write)
            [3]: var194_upvw (copied, read and write)
        ]]
        if var192_upvw then
            var192_upvw:Cancel()
            var192_upvw = nil
        end
        if var193_upvw then
            var193_upvw:Disconnect()
            var193_upvw = nil
        end
        if var194_upvw then
            var194_upvw:Disconnect()
            var194_upvw = nil
        end
    end)
    local function OnCharacterChildAdded_upvr(arg1_36) -- Line 994, Named "OnCharacterChildAdded"
        --[[ Upvalues[2]:
            [1]: UserInputService_upvr (copied, readonly)
            [2]: arg1 (readonly)
        ]]
        if UserInputService_upvr.PreferredInput == Enum.PreferredInput.Touch and arg1_36:IsA("Tool") then
            arg1_36.ManualActivationOnly = true
        end
        if arg1_36:IsA("Humanoid") then
            local humanoidDiedConn = arg1.humanoidDiedConn
            if humanoidDiedConn then
                humanoidDiedConn:Disconnect()
            end
            arg1.humanoidDiedConn = arg1_36.Died:Connect(function() -- Line 1002
            end)
        end
    end
    arg1.characterChildAddedConn = arg2.ChildAdded:Connect(function(arg1_37) -- Line 1010
        --[[ Upvalues[1]:
            [1]: OnCharacterChildAdded_upvr (readonly)
        ]]
        OnCharacterChildAdded_upvr(arg1_37)
    end)
    arg1.characterChildRemovedConn = arg2.ChildRemoved:Connect(function(arg1_38) -- Line 1013
        --[[ Upvalues[1]:
            [1]: UserInputService_upvr (copied, readonly)
        ]]
        if UserInputService_upvr.PreferredInput == Enum.PreferredInput.Touch and arg1_38:IsA("Tool") then
            arg1_38.ManualActivationOnly = false
        end
    end)
    for _, v_5 in pairs(arg2:GetChildren()) do
        OnCharacterChildAdded_upvr(v_5)
    end
    arg1.preferredInputChangedConnection = UserInputService_upvr:GetPropertyChangedSignal("PreferredInput"):Connect(function() -- Line 1024
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:OnPreferredInputChanged()
    end)
end
function setmetatable_result1_2_upvr.Start(arg1) -- Line 1029
    arg1:Enable(true)
end
function setmetatable_result1_2_upvr.Stop(arg1) -- Line 1033
    arg1:Enable(false)
end
function setmetatable_result1_2_upvr.CleanupPath(arg1) -- Line 1037
    --[[ Upvalues[3]:
        [1]: var192_upvw (read and write)
        [2]: var193_upvw (read and write)
        [3]: var194_upvw (read and write)
    ]]
    if var192_upvw then
        var192_upvw:Cancel()
        var192_upvw = nil
    end
    if var193_upvw then
        var193_upvw:Disconnect()
        var193_upvw = nil
    end
    if var194_upvw then
        var194_upvw:Disconnect()
        var194_upvw = nil
    end
end
function setmetatable_result1_2_upvr.Enable(arg1, arg2, arg3, arg4) -- Line 1041
    --[[ Upvalues[6]:
        [1]: LocalPlayer_upvr (readonly)
        [2]: var192_upvw (read and write)
        [3]: var193_upvw (read and write)
        [4]: var194_upvw (read and write)
        [5]: UserInputService_upvr (readonly)
        [6]: module_upvr_4 (readonly)
    ]]
    if arg2 then
        if not arg1.running then
            if LocalPlayer_upvr.Character then
                arg1:OnCharacterAdded(LocalPlayer_upvr.Character)
            end
            arg1.onCharacterAddedConn = LocalPlayer_upvr.CharacterAdded:Connect(function(arg1_40) -- Line 1047
                --[[ Upvalues[1]:
                    [1]: arg1 (readonly)
                ]]
                arg1:OnCharacterAdded(arg1_40)
            end)
            arg1.running = true
        end
        arg1.touchJumpController = arg4
        if arg1.touchJumpController then
            arg1.touchJumpController:Enable(arg1.jumpEnabled)
            -- KONSTANTWARNING: GOTO [116] #84
        end
    else
        if arg1.running then
            arg1:DisconnectEvents()
            if var192_upvw then
                var192_upvw:Cancel()
                var192_upvw = nil
            end
            if var193_upvw then
                var193_upvw:Disconnect()
                var193_upvw = nil
            end
            if var194_upvw then
                var194_upvw:Disconnect()
                var194_upvw = nil
            end
            if UserInputService_upvr.PreferredInput == Enum.PreferredInput.Touch then
                local Character = LocalPlayer_upvr.Character
                if Character then
                    for _, v_6 in pairs(Character:GetChildren()) do
                        if v_6:IsA("Tool") then
                            v_6.ManualActivationOnly = false
                        end
                    end
                end
            end
            arg1.running = false
        end
        if arg1.touchJumpController and not arg1.jumpEnabled then
            arg1.touchJumpController:Enable(true)
        end
        arg1.touchJumpController = nil
    end
    module_upvr_4.Enable(arg1, arg2)
    if not arg2 or not arg3 then
    end
    arg1.wasdEnabled = false
    arg1.enabled = arg2
end
function setmetatable_result1_2_upvr.OnRenderStepped(arg1, arg2) -- Line 1086
    --[[ Upvalues[1]:
        [1]: var192_upvw (read and write)
    ]]
    arg1.isJumping = false
    if var192_upvw then
        var192_upvw:OnRenderStepped(arg2)
        if var192_upvw then
            arg1.moveVector = var192_upvw.NextActionMoveDirection
            arg1.moveVectorIsCameraRelative = false
            if var192_upvw.NextActionJump then
                arg1.isJumping = true
                -- KONSTANTWARNING: GOTO [43] #31
            end
        else
            arg1.moveVector = arg1.keyboardMoveVector
            arg1.moveVectorIsCameraRelative = true
        end
    else
        arg1.moveVector = arg1.keyboardMoveVector
        arg1.moveVectorIsCameraRelative = true
    end
    if arg1.jumpRequested then
        arg1.isJumping = true
    end
end
function setmetatable_result1_2_upvr.UpdateMovement(arg1, arg2) -- Line 1121
    if arg2 == Enum.UserInputState.Cancel then
        arg1.keyboardMoveVector = Vector3.new(0, 0, 0)
    elseif arg1.wasdEnabled then
        arg1.keyboardMoveVector = Vector3.new(arg1.leftValue + arg1.rightValue, 0, arg1.forwardValue + arg1.backwardValue)
    end
end
function setmetatable_result1_2_upvr.UpdateJump(arg1) -- Line 1130
end
function setmetatable_result1_2_upvr.SetShowPath(arg1, arg2) -- Line 1135
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    var11_upvw = arg2
end
function setmetatable_result1_2_upvr.GetShowPath(arg1) -- Line 1139
    --[[ Upvalues[1]:
        [1]: var11_upvw (read and write)
    ]]
    return var11_upvw
end
function setmetatable_result1_2_upvr.SetWaypointTexture(arg1, arg2) -- Line 1143
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    module_upvr.SetWaypointTexture(arg2)
end
function setmetatable_result1_2_upvr.GetWaypointTexture(arg1) -- Line 1147
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    return module_upvr.GetWaypointTexture()
end
function setmetatable_result1_2_upvr.SetWaypointRadius(arg1, arg2) -- Line 1151
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    module_upvr.SetWaypointRadius(arg2)
end
function setmetatable_result1_2_upvr.GetWaypointRadius(arg1) -- Line 1155
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    return module_upvr.GetWaypointRadius()
end
function setmetatable_result1_2_upvr.SetEndWaypointTexture(arg1, arg2) -- Line 1159
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    module_upvr.SetEndWaypointTexture(arg2)
end
function setmetatable_result1_2_upvr.GetEndWaypointTexture(arg1) -- Line 1163
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    return module_upvr.GetEndWaypointTexture()
end
function setmetatable_result1_2_upvr.SetWaypointsAlwaysOnTop(arg1, arg2) -- Line 1167
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    module_upvr.SetWaypointsAlwaysOnTop(arg2)
end
function setmetatable_result1_2_upvr.GetWaypointsAlwaysOnTop(arg1) -- Line 1171
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    return module_upvr.GetWaypointsAlwaysOnTop()
end
function setmetatable_result1_2_upvr.SetFailureAnimationEnabled(arg1, arg2) -- Line 1175
    --[[ Upvalues[1]:
        [1]: var12_upvw (read and write)
    ]]
    var12_upvw = arg2
end
function setmetatable_result1_2_upvr.GetFailureAnimationEnabled(arg1) -- Line 1179
    --[[ Upvalues[1]:
        [1]: var12_upvw (read and write)
    ]]
    return var12_upvw
end
function setmetatable_result1_2_upvr.SetIgnoredPartsTag(arg1, arg2) -- Line 1183
    --[[ Upvalues[1]:
        [1]: UpdateIgnoreTag_upvr (readonly)
    ]]
    UpdateIgnoreTag_upvr(arg2)
end
function setmetatable_result1_2_upvr.GetIgnoredPartsTag(arg1) -- Line 1187
    --[[ Upvalues[1]:
        [1]: var47_upvw (read and write)
    ]]
    return var47_upvw
end
function setmetatable_result1_2_upvr.SetUseDirectPath(arg1, arg2) -- Line 1191
    --[[ Upvalues[1]:
        [1]: var13_upvw (read and write)
    ]]
    var13_upvw = arg2
end
function setmetatable_result1_2_upvr.GetUseDirectPath(arg1) -- Line 1195
    --[[ Upvalues[1]:
        [1]: var13_upvw (read and write)
    ]]
    return var13_upvw
end
function setmetatable_result1_2_upvr.SetAgentSizeIncreaseFactor(arg1, arg2) -- Line 1199
    --[[ Upvalues[1]:
        [1]: var14_upvw (read and write)
    ]]
    var14_upvw = arg2 / 100 + 1
end
function setmetatable_result1_2_upvr.GetAgentSizeIncreaseFactor(arg1) -- Line 1203
    --[[ Upvalues[1]:
        [1]: var14_upvw (read and write)
    ]]
    return (var14_upvw - 1) * 100
end
function setmetatable_result1_2_upvr.SetUnreachableWaypointTimeout(arg1, arg2) -- Line 1207
    --[[ Upvalues[1]:
        [1]: var15_upvw (read and write)
    ]]
    var15_upvw = arg2
end
function setmetatable_result1_2_upvr.GetUnreachableWaypointTimeout(arg1) -- Line 1211
    --[[ Upvalues[1]:
        [1]: var15_upvw (read and write)
    ]]
    return var15_upvw
end
function setmetatable_result1_2_upvr.SetUserJumpEnabled(arg1, arg2) -- Line 1215
    arg1.jumpEnabled = arg2
    if arg1.touchJumpController then
        arg1.touchJumpController:Enable(arg2)
    end
end
function setmetatable_result1_2_upvr.GetUserJumpEnabled(arg1) -- Line 1222
    return arg1.jumpEnabled
end
function setmetatable_result1_2_upvr.MoveTo(arg1, arg2, arg3, arg4) -- Line 1226
    --[[ Upvalues[3]:
        [1]: LocalPlayer_upvr (readonly)
        [2]: Pather_upvr (readonly)
        [3]: HandleMoveTo_upvr (readonly)
    ]]
    local Character_2 = LocalPlayer_upvr.Character
    if Character_2 == nil then
        return false
    end
    local Pather_result1 = Pather_upvr(arg2, Vector3.new(0, 1, 0), arg4)
    if Pather_result1 then
        if Pather_result1:IsValidPath() then
            HandleMoveTo_upvr(Pather_result1, arg2, nil, Character_2, arg3)
            return true
        end
    end
    return false
end
return setmetatable_result1_2_upvr
ModuleScript VehicleController VehicleController
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:14
-- Luau version 6, Types version 3
-- Time taken: 0.005867 seconds

local ContextActionService_upvr = game:GetService("ContextActionService")
local module_upvr = {}
module_upvr.__index = module_upvr
function module_upvr.new(arg1) -- Line 27
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, module_upvr)
    setmetatable_result1.CONTROL_ACTION_PRIORITY = arg1
    setmetatable_result1.enabled = false
    setmetatable_result1.vehicleSeat = nil
    setmetatable_result1.throttle = 0
    setmetatable_result1.steer = 0
    setmetatable_result1.acceleration = 0
    setmetatable_result1.decceleration = 0
    setmetatable_result1.turningRight = 0
    setmetatable_result1.turningLeft = 0
    setmetatable_result1.vehicleMoveVector = Vector3.new(0, 0, 0)
    setmetatable_result1.autoPilot = {}
    setmetatable_result1.autoPilot.MaxSpeed = 0
    setmetatable_result1.autoPilot.MaxSteeringAngle = 0
    return setmetatable_result1
end
function module_upvr.BindContextActions(arg1) -- Line 51
    --[[ Upvalues[1]:
        [1]: ContextActionService_upvr (readonly)
    ]]
    ContextActionService_upvr:BindActionAtPriority("throttleAccel", function(arg1_2, arg2, arg3) -- Line 53
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:OnThrottleAccel(arg1_2, arg2, arg3)
        return Enum.ContextActionResult.Pass
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.KeyCode.ButtonR2)
    ContextActionService_upvr:BindActionAtPriority("throttleDeccel", function(arg1_3, arg2, arg3) -- Line 57
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:OnThrottleDeccel(arg1_3, arg2, arg3)
        return Enum.ContextActionResult.Pass
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.KeyCode.ButtonL2)
    ContextActionService_upvr:BindActionAtPriority("arrowSteerRight", function(arg1_4, arg2, arg3) -- Line 62
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:OnSteerRight(arg1_4, arg2, arg3)
        return Enum.ContextActionResult.Pass
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Right)
    ContextActionService_upvr:BindActionAtPriority("arrowSteerLeft", function(arg1_5, arg2, arg3) -- Line 66
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:OnSteerLeft(arg1_5, arg2, arg3)
        return Enum.ContextActionResult.Pass
    end, false, arg1.CONTROL_ACTION_PRIORITY, Enum.KeyCode.Left)
end
function module_upvr.Enable(arg1, arg2, arg3) -- Line 72
    --[[ Upvalues[1]:
        [1]: ContextActionService_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [4] 3. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [4] 3. Error Block 2 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [8] 5. Error Block 3 start (CF ANALYSIS FAILED)
    do
        return
    end
    -- KONSTANTERROR: [8] 5. Error Block 3 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [9] 6. Error Block 4 start (CF ANALYSIS FAILED)
    arg1.enabled = arg2
    arg1.vehicleMoveVector = Vector3.new(0, 0, 0)
    -- KONSTANTERROR: [9] 6. Error Block 4 end (CF ANALYSIS FAILED)
end
function module_upvr.OnThrottleAccel(arg1, arg2, arg3, arg4) -- Line 98
    if arg3 == Enum.UserInputState.End or arg3 == Enum.UserInputState.Cancel then
        arg1.acceleration = 0
    else
        arg1.acceleration = -1
    end
    arg1.throttle = arg1.acceleration + arg1.decceleration
end
function module_upvr.OnThrottleDeccel(arg1, arg2, arg3, arg4) -- Line 107
    if arg3 == Enum.UserInputState.End or arg3 == Enum.UserInputState.Cancel then
        arg1.decceleration = 0
    else
        arg1.decceleration = 1
    end
    arg1.throttle = arg1.acceleration + arg1.decceleration
end
function module_upvr.OnSteerRight(arg1, arg2, arg3, arg4) -- Line 116
    if arg3 == Enum.UserInputState.End or arg3 == Enum.UserInputState.Cancel then
        arg1.turningRight = 0
    else
        arg1.turningRight = 1
    end
    arg1.steer = arg1.turningRight + arg1.turningLeft
end
function module_upvr.OnSteerLeft(arg1, arg2, arg3, arg4) -- Line 125
    if arg3 == Enum.UserInputState.End or arg3 == Enum.UserInputState.Cancel then
        arg1.turningLeft = 0
    else
        arg1.turningLeft = -1
    end
    arg1.steer = arg1.turningRight + arg1.turningLeft
end
function module_upvr.Update(arg1, arg2, arg3, arg4) -- Line 135
    -- KONSTANTERROR: Failed to generate AST for function `Update`:
K:0: attempt to index nil with 'reads'
Traceback:
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K

end
function module_upvr.ComputeThrottle(arg1, arg2) -- Line 161
    if arg2 ~= Vector3.new(0, 0, 0) then
        return -arg2.Z
    end
    return 0
end
function module_upvr.ComputeSteer(arg1, arg2) -- Line 170
    if arg2 ~= Vector3.new(0, 0, 0) then
        return -math.atan2(-arg2.x, -arg2.z) * 57.29577951308232 / arg1.autoPilot.MaxSteeringAngle
    end
    return 0
end
function module_upvr.SetupAutoPilot(arg1) -- Line 179
    arg1.autoPilot.MaxSpeed = arg1.vehicleSeat.MaxSpeed
    arg1.autoPilot.MaxSteeringAngle = 35
end
return module_upvr
ModuleScript TouchJump TouchJump
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:15
-- Luau version 6, Types version 3
-- Time taken: 0.008601 seconds

local CommonUtils = script.Parent.Parent:WaitForChild("CommonUtils")
local module_upvr_2 = require(CommonUtils:WaitForChild("CharacterUtil"))
local tbl_upvr = {
    HUMANOID_STATE_ENABLED_CHANGED = "HUMANOID_STATE_ENABLED_CHANGED";
    HUMANOID_JUMP_POWER = "HUMANOID_JUMP_POWER";
    HUMANOID_JUMP_HEIGHT = "HUMANOID_JUMP_HEIGHT";
    HUMANOID = "HUMANOID";
    JUMP_INPUT_ENDED = "JUMP_INPUT_ENDED";
    MENU_OPENED = "MENU_OPENED";
}
local module_upvr = require(script.Parent:WaitForChild("BaseCharacterController"))
local setmetatable_result1_upvr = setmetatable({}, module_upvr)
setmetatable_result1_upvr.__index = setmetatable_result1_upvr
local module_upvr_3 = require(CommonUtils:WaitForChild("ConnectionUtil"))
function setmetatable_result1_upvr.new() -- Line 51
    --[[ Upvalues[3]:
        [1]: module_upvr (readonly)
        [2]: setmetatable_result1_upvr (readonly)
        [3]: module_upvr_3 (readonly)
    ]]
    local setmetatable_result1 = setmetatable(module_upvr.new(), setmetatable_result1_upvr)
    setmetatable_result1.parentUIFrame = nil
    setmetatable_result1.jumpButton = nil
    setmetatable_result1.externallyEnabled = false
    setmetatable_result1.isJumping = false
    setmetatable_result1._active = false
    setmetatable_result1._connectionUtil = module_upvr_3.new()
    return setmetatable_result1
end
function setmetatable_result1_upvr._reset(arg1) -- Line 65
    arg1.isJumping = false
    arg1.touchObject = nil
    if arg1.jumpButton then
        arg1.jumpButton.ImageRectOffset = Vector2.new(1, 146)
    end
end
local GuiService_upvr = game:GetService("GuiService")
function setmetatable_result1_upvr.EnableButton(arg1, arg2) -- Line 76
    --[[ Upvalues[2]:
        [1]: tbl_upvr (readonly)
        [2]: GuiService_upvr (readonly)
    ]]
    if arg2 == arg1._active then
    else
        if arg2 then
            if not arg1.jumpButton then
                arg1:Create()
            end
            arg1.jumpButton.Visible = true
            arg1._connectionUtil:trackConnection(tbl_upvr.JUMP_INPUT_ENDED, arg1.jumpButton.InputEnded:Connect(function(arg1_2) -- Line 91
                --[[ Upvalues[1]:
                    [1]: arg1 (readonly)
                ]]
                if arg1_2 == arg1.touchObject then
                    arg1:_reset()
                end
            end))
            arg1._connectionUtil:trackConnection(tbl_upvr.MENU_OPENED, GuiService_upvr.MenuOpened:Connect(function() -- Line 101
                --[[ Upvalues[1]:
                    [1]: arg1 (readonly)
                ]]
                if arg1.touchObject then
                    arg1:_reset()
                end
            end))
        else
            if arg1.jumpButton then
                arg1.jumpButton.Visible = false
            end
            arg1._connectionUtil:disconnect(tbl_upvr.JUMP_INPUT_ENDED)
            arg1._connectionUtil:disconnect(tbl_upvr.MENU_OPENED)
        end
        arg1:_reset()
        arg1._active = arg2
    end
end
function setmetatable_result1_upvr.UpdateEnabled(arg1) -- Line 118
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    local any_getChild_result1 = module_upvr_2.getChild("Humanoid", "Humanoid")
    if any_getChild_result1 and arg1.externallyEnabled then
        if any_getChild_result1.UseJumpPower and 0 < any_getChild_result1.JumpPower or not any_getChild_result1.UseJumpPower and 0 < any_getChild_result1.JumpHeight then
            if any_getChild_result1:GetStateEnabled(Enum.HumanoidStateType.Jumping) then
                arg1:EnableButton(true)
                return
            end
        end
    end
    arg1:EnableButton(false)
end
function setmetatable_result1_upvr._setupConfigurations(arg1) -- Line 127
    --[[ Upvalues[2]:
        [1]: module_upvr_2 (readonly)
        [2]: tbl_upvr (readonly)
    ]]
    local function update_upvr() -- Line 128, Named "update"
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:UpdateEnabled()
    end
    arg1._connectionUtil:trackConnection(tbl_upvr.HUMANOID, module_upvr_2.onChild("Humanoid", "Humanoid", function(arg1_3) -- Line 133
        --[[ Upvalues[3]:
            [1]: arg1 (readonly)
            [2]: tbl_upvr (copied, readonly)
            [3]: update_upvr (readonly)
        ]]
        arg1:UpdateEnabled()
        arg1:_reset()
        arg1._connectionUtil:trackConnection(tbl_upvr.HUMANOID_JUMP_POWER, arg1_3:GetPropertyChangedSignal("JumpPower"):Connect(update_upvr))
        arg1._connectionUtil:trackConnection(tbl_upvr.HUMANOID_JUMP_HEIGHT, arg1_3:GetPropertyChangedSignal("JumpHeight"):Connect(update_upvr))
        arg1._connectionUtil:trackConnection(tbl_upvr.HUMANOID_STATE_ENABLED_CHANGED, arg1_3.StateEnabledChanged:Connect(function(arg1_4, arg2) -- Line 146
            --[[ Upvalues[1]:
                [1]: arg1 (copied, readonly)
            ]]
            if arg1_4 == Enum.HumanoidStateType.Jumping and arg2 ~= arg1._active then
                arg1:UpdateEnabled()
            end
        end))
    end))
end
function setmetatable_result1_upvr.Enable(arg1, arg2, arg3) -- Line 158
    if arg3 then
        arg1.parentUIFrame = arg3
    end
    if arg1.externallyEnabled == arg2 then
    else
        arg1.externallyEnabled = arg2
        arg1:UpdateEnabled()
        if arg2 then
            arg1:_setupConfigurations()
            return
        end
        arg1._connectionUtil:disconnectAll()
    end
end
function setmetatable_result1_upvr.Create(arg1) -- Line 175
    if not arg1.parentUIFrame then
    else
        if arg1.jumpButton then
            arg1.jumpButton:Destroy()
            arg1.jumpButton = nil
        end
        if arg1.absoluteSizeChangedConn then
            arg1.absoluteSizeChangedConn:Disconnect()
            arg1.absoluteSizeChangedConn = nil
        end
        arg1.jumpButton = Instance.new("ImageButton")
        arg1.jumpButton.Name = "JumpButton"
        arg1.jumpButton.Visible = false
        arg1.jumpButton.BackgroundTransparency = 1
        arg1.jumpButton.Image = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"
        arg1.jumpButton.ImageRectOffset = Vector2.new(1, 146)
        arg1.jumpButton.ImageRectSize = Vector2.new(144, 144)
        local function ResizeJumpButton() -- Line 198
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
            local x = arg1.parentUIFrame.AbsoluteSize.x
            local var15
            if math.min(x, arg1.parentUIFrame.AbsoluteSize.y) > var15 then
                x = false
            else
                x = true
            end
            if x then
                var15 = 70
            else
                var15 = 120
            end
            arg1.jumpButton.Size = UDim2.new(0, var15, 0, var15)
            if not x or not UDim2.new(1, -(var15 * 1.5 - 10), 1, -var15 - 20) then
            end
            arg1.jumpButton.Position = UDim2.new(1, -(var15 * 1.5 - 10), 1, -var15 * 1.75)
        end
        ResizeJumpButton()
        arg1.absoluteSizeChangedConn = arg1.parentUIFrame:GetPropertyChangedSignal("AbsoluteSize"):Connect(ResizeJumpButton)
        arg1.touchObject = nil
        arg1.jumpButton.InputBegan:connect(function(arg1_5) -- Line 212
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            if arg1.touchObject or arg1_5.UserInputType ~= Enum.UserInputType.Touch or arg1_5.UserInputState ~= Enum.UserInputState.Begin then
            else
                arg1.touchObject = arg1_5
                arg1.jumpButton.ImageRectOffset = Vector2.new(146, 146)
                arg1.isJumping = true
            end
        end)
        arg1.jumpButton.Parent = arg1.parentUIFrame
    end
end
return setmetatable_result1_upvr
ModuleScript DynamicThumbstick DynamicThumbstick
KONSTANTERROR: After: K:0: attempt to index nil with 'debug_name'
K
K
K
K
K
K
K
ModuleScript CameraModule CameraModule
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:17
-- Luau version 6, Types version 3
-- Time taken: 0.023353 seconds

local tbl_upvr_3 = {}
tbl_upvr_3.__index = tbl_upvr_3
local tbl_2_upvr = {"CameraMinZoomDistance", "CameraMaxZoomDistance", "CameraMode", "DevCameraOcclusionMode", "DevComputerCameraMode", "DevTouchCameraMode", "DevComputerMovementMode", "DevTouchMovementMode", "DevEnableMouseLock"}
local tbl_upvr = {"ComputerCameraMovementMode", "ComputerMovementMode", "ControlMode", "GamepadCameraSensitivity", "MouseSensitivity", "RotationType", "TouchCameraMovementMode", "TouchMovementMode"}
local Players_upvr = game:GetService("Players")
local UserInputService_upvr = game:GetService("UserInputService")
local UserGameSettings_upvr = UserSettings():GetService("UserGameSettings")
local CommonUtils = script.Parent:WaitForChild("CommonUtils")
local module = require(CommonUtils:WaitForChild("FlagUtil"))
local module_upvr_7 = require(script:WaitForChild("CameraUtils"))
if not Players_upvr.LocalPlayer then
    return {}
end
assert(Players_upvr.LocalPlayer, "Strict typing check")
local PlayerScripts = Players_upvr.LocalPlayer:WaitForChild("PlayerScripts")
PlayerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Default)
PlayerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Follow)
PlayerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Classic)
PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Default)
PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Follow)
PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Classic)
PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.CameraToggle)
local any_getUserFlag_result1_upvr_2 = module.getUserFlag("UserPlayerConnectionMemoryLeak")
local module_upvr_10 = require(script:WaitForChild("TransparencyController"))
local module_upvr_2 = require(CommonUtils:WaitForChild("ConnectionUtil"))
local module_upvr_8 = require(script:WaitForChild("MouseLockController"))
local RunService_upvr = game:GetService("RunService")
function tbl_upvr_3.new() -- Line 144
    --[[ Upvalues[11]:
        [1]: module_upvr_10 (readonly)
        [2]: any_getUserFlag_result1_upvr_2 (readonly)
        [3]: module_upvr_2 (readonly)
        [4]: tbl_upvr_3 (readonly)
        [5]: Players_upvr (readonly)
        [6]: module_upvr_8 (readonly)
        [7]: RunService_upvr (readonly)
        [8]: tbl_2_upvr (readonly)
        [9]: tbl_upvr (readonly)
        [10]: UserGameSettings_upvr (readonly)
        [11]: UserInputService_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local tbl = {}
    local any_new_result1 = module_upvr_10.new()
    tbl.activeTransparencyController = any_new_result1
    if any_getUserFlag_result1_upvr_2 then
        any_new_result1 = module_upvr_2.new()
    else
        any_new_result1 = nil
    end
    tbl.connectionUtil = any_new_result1
    local setmetatable_result1 = setmetatable(tbl, tbl_upvr_3)
    setmetatable_result1.activeCameraController = nil
    setmetatable_result1.activeOcclusionModule = nil
    setmetatable_result1.activeMouseLockController = nil
    setmetatable_result1.currentComputerCameraMovementMode = nil
    setmetatable_result1.cameraSubjectChangedConn = nil
    setmetatable_result1.cameraTypeChangedConn = nil
    for var50, v in pairs(Players_upvr:GetPlayers()) do
        setmetatable_result1:OnPlayerAdded(v)
        local var46_upvr
    end
    Players_upvr.PlayerAdded:Connect(function(arg1) -- Line 167
        --[[ Upvalues[1]:
            [1]: var46_upvr (readonly)
        ]]
        var46_upvr:OnPlayerAdded(arg1)
    end)
    if any_getUserFlag_result1_upvr_2 then
        Players_upvr.PlayerRemoving:Connect(function(arg1) -- Line 172
            --[[ Upvalues[1]:
                [1]: var46_upvr (readonly)
            ]]
            var46_upvr:OnPlayerRemoving(arg1)
        end)
    end
    var46_upvr.activeTransparencyController:Enable(true)
    var46_upvr.activeMouseLockController = module_upvr_8.new()
    assert(var46_upvr.activeMouseLockController, "Strict typing check")
    local any_GetBindableToggleEvent_result1 = var46_upvr.activeMouseLockController:GetBindableToggleEvent()
    if any_GetBindableToggleEvent_result1 then
        function var50() -- Line 184
            --[[ Upvalues[1]:
                [1]: var46_upvr (readonly)
            ]]
            var46_upvr:OnMouseLockToggled()
        end
        any_GetBindableToggleEvent_result1:Connect(var50)
    end
    var46_upvr:ActivateCameraController()
    var46_upvr:ActivateOcclusionModule(Players_upvr.LocalPlayer.DevCameraOcclusionMode)
    var46_upvr:OnCurrentCameraChanged()
    RunService_upvr:BindToRenderStep("cameraRenderUpdate", Enum.RenderPriority.Camera.Value, function(arg1) -- Line 192
        --[[ Upvalues[1]:
            [1]: var46_upvr (readonly)
        ]]
        var46_upvr:Update(arg1)
    end)
    for _, v_2_upvr in pairs(tbl_2_upvr) do
        Players_upvr.LocalPlayer:GetPropertyChangedSignal(v_2_upvr):Connect(function() -- Line 196
            --[[ Upvalues[2]:
                [1]: var46_upvr (readonly)
                [2]: v_2_upvr (readonly)
            ]]
            var46_upvr:OnLocalPlayerCameraPropertyChanged(v_2_upvr)
        end)
        local var56_upvr
    end
    for _, v_3_upvr in pairs(tbl_upvr) do
        UserGameSettings_upvr:GetPropertyChangedSignal(v_3_upvr):Connect(function() -- Line 202
            --[[ Upvalues[2]:
                [1]: var56_upvr (readonly)
                [2]: v_3_upvr (readonly)
            ]]
            var56_upvr:OnUserGameSettingsPropertyChanged(v_3_upvr)
        end)
        local var61_upvr
    end
    game.Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function() -- Line 206
        --[[ Upvalues[1]:
            [1]: var61_upvr (readonly)
        ]]
        var61_upvr:OnCurrentCameraChanged()
    end)
    UserInputService_upvr:GetPropertyChangedSignal("PreferredInput"):Connect(function() -- Line 209
        --[[ Upvalues[1]:
            [1]: var61_upvr (readonly)
        ]]
        var61_upvr:OnPreferredInputChanged()
    end)
    return var61_upvr
end
function tbl_upvr_3.GetCameraMovementModeFromSettings(arg1) -- Line 216
    --[[ Upvalues[4]:
        [1]: Players_upvr (readonly)
        [2]: module_upvr_7 (readonly)
        [3]: UserInputService_upvr (readonly)
        [4]: UserGameSettings_upvr (readonly)
    ]]
    local var64
    if Players_upvr.LocalPlayer.CameraMode == Enum.CameraMode.LockFirstPerson then
        var64 = module_upvr_7
        var64 = Enum.ComputerCameraMovementMode.Classic
        return var64.ConvertCameraModeEnumToStandard(var64)
    end
    local var65
    var64 = nil
    if UserInputService_upvr.PreferredInput == Enum.PreferredInput.Touch then
        var65 = module_upvr_7.ConvertCameraModeEnumToStandard(Players_upvr.LocalPlayer.DevTouchCameraMode)
        var64 = module_upvr_7.ConvertCameraModeEnumToStandard(UserGameSettings_upvr.TouchCameraMovementMode)
    else
        var65 = module_upvr_7.ConvertCameraModeEnumToStandard(Players_upvr.LocalPlayer.DevComputerCameraMode)
        var64 = module_upvr_7.ConvertCameraModeEnumToStandard(UserGameSettings_upvr.ComputerCameraMovementMode)
    end
    if var65 == Enum.DevComputerCameraMovementMode.UserChoice then
        return var64
    end
    return var65
end
local module_upvr_5 = require(script:WaitForChild("Poppercam"))
local module_upvr_4 = require(script:WaitForChild("Invisicam"))
local tbl_3_upvr = {}
function tbl_upvr_3.ActivateOcclusionModule(arg1, arg2) -- Line 241
    --[[ Upvalues[4]:
        [1]: module_upvr_5 (readonly)
        [2]: module_upvr_4 (readonly)
        [3]: tbl_3_upvr (readonly)
        [4]: Players_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 51 start (CF ANALYSIS FAILED)
    local var69
    if arg2 == Enum.DevCameraOcclusionMode.Zoom then
        var69 = module_upvr_5
    elseif arg2 == Enum.DevCameraOcclusionMode.Invisicam then
        var69 = module_upvr_4
    else
        warn("CameraScript ActivateOcclusionModule called with unsupported mode")
        return
    end
    arg1.occlusionMode = arg2
    -- KONSTANTERROR: [0] 1. Error Block 51 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [23] 17. Error Block 9 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [23] 17. Error Block 9 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [30] 21. Error Block 38 start (CF ANALYSIS FAILED)
    if not arg1.activeOcclusionModule:GetEnabled() then
        arg1.activeOcclusionModule:Enable(true)
    end
    do
        return
    end
    -- KONSTANTERROR: [30] 21. Error Block 38 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [43] 30. Error Block 13 start (CF ANALYSIS FAILED)
    arg1.activeOcclusionModule = tbl_3_upvr[var69]
    -- KONSTANTERROR: [43] 30. Error Block 13 end (CF ANALYSIS FAILED)
end
function tbl_upvr_3.ShouldUseVehicleCamera(arg1) -- Line 320
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local CurrentCamera_5 = workspace.CurrentCamera
    local var77
    if not CurrentCamera_5 then
        return false
    end
    local CameraType_3 = CurrentCamera_5.CameraType
    local var80 = true
    var77 = Enum.CameraType.Custom
    if CameraType_3 ~= var77 then
        var77 = Enum.CameraType.Follow
        if CameraType_3 ~= var77 then
            var80 = false
        else
            var80 = true
        end
    end
    local function INLINED_2() -- Internal function, doesn't exist in bytecode
        var77 = CurrentCamera_5.CameraSubject:IsA("VehicleSeat")
        return var77
    end
    if not CurrentCamera_5.CameraSubject or not INLINED_2() then
        var77 = false
    end
    if arg1.occlusionMode == Enum.DevCameraOcclusionMode.Invisicam then
    else
    end
    if var77 then
        if var80 then
        end
    end
    return true
end
local module_upvr_3 = require(script:WaitForChild("LegacyCamera"))
local VRService_upvr = game:GetService("VRService")
local module_upvr_9 = require(script:WaitForChild("VRCamera"))
local module_upvr_6 = require(script:WaitForChild("ClassicCamera"))
local module_upvr_13 = require(script:WaitForChild("OrbitalCamera"))
local module_upvr = require(script:WaitForChild("VRVehicleCamera"))
local module_upvr_12 = require(script:WaitForChild("VehicleCamera"))
local tbl_upvr_2 = {}
local any_getUserFlag_result1_upvr = module.getUserFlag("UserPSFixCameraControllerReset")
function tbl_upvr_3.ActivateCameraController(arg1) -- Line 336
    --[[ Upvalues[9]:
        [1]: module_upvr_3 (readonly)
        [2]: VRService_upvr (readonly)
        [3]: module_upvr_9 (readonly)
        [4]: module_upvr_6 (readonly)
        [5]: module_upvr_13 (readonly)
        [6]: module_upvr (readonly)
        [7]: module_upvr_12 (readonly)
        [8]: tbl_upvr_2 (readonly)
        [9]: any_getUserFlag_result1_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 104 start (CF ANALYSIS FAILED)
    local CameraType = workspace.CurrentCamera.CameraType
    if CameraType == Enum.CameraType.Scriptable then
        if arg1.activeCameraController then
            arg1.activeCameraController:Enable(false)
            arg1.activeCameraController = nil
        end
        return
    end
    if CameraType == Enum.CameraType.Custom then
        -- KONSTANTWARNING: GOTO [76] #48
    end
    -- KONSTANTERROR: [0] 1. Error Block 104 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [36] 24. Error Block 98 start (CF ANALYSIS FAILED)
    if CameraType == Enum.CameraType.Track then
        -- KONSTANTWARNING: GOTO [76] #48
    end
    -- KONSTANTERROR: [36] 24. Error Block 98 end (CF ANALYSIS FAILED)
end
function tbl_upvr_3.OnCameraSubjectChanged(arg1) -- Line 442
    local CurrentCamera = workspace.CurrentCamera
    local var92
    if CurrentCamera then
        var92 = CurrentCamera.CameraSubject
    else
        var92 = nil
    end
    if arg1.activeTransparencyController then
        arg1.activeTransparencyController:SetSubject(var92)
    end
    if arg1.activeOcclusionModule then
        arg1.activeOcclusionModule:OnCameraSubjectChanged(var92)
    end
    arg1:ActivateCameraController()
end
function tbl_upvr_3.OnCameraTypeChanged(arg1, arg2) -- Line 457
    --[[ Upvalues[2]:
        [1]: UserInputService_upvr (readonly)
        [2]: module_upvr_7 (readonly)
    ]]
    if arg2 == Enum.CameraType.Scriptable and UserInputService_upvr.MouseBehavior == Enum.MouseBehavior.LockCenter then
        module_upvr_7.restoreMouseBehavior()
    end
    arg1:ActivateCameraController()
end
function tbl_upvr_3.OnCurrentCameraChanged(arg1) -- Line 469
    local CurrentCamera_4_upvr = game.Workspace.CurrentCamera
    if not CurrentCamera_4_upvr then
    else
        if arg1.cameraSubjectChangedConn then
            arg1.cameraSubjectChangedConn:Disconnect()
        end
        if arg1.cameraTypeChangedConn then
            arg1.cameraTypeChangedConn:Disconnect()
        end
        arg1.cameraSubjectChangedConn = CurrentCamera_4_upvr:GetPropertyChangedSignal("CameraSubject"):Connect(function() -- Line 481
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            arg1:OnCameraSubjectChanged()
        end)
        arg1.cameraTypeChangedConn = CurrentCamera_4_upvr:GetPropertyChangedSignal("CameraType"):Connect(function() -- Line 485
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: CurrentCamera_4_upvr (readonly)
            ]]
            arg1:OnCameraTypeChanged(CurrentCamera_4_upvr.CameraType)
        end)
        arg1:OnCameraSubjectChanged()
        arg1:OnCameraTypeChanged(CurrentCamera_4_upvr.CameraType)
    end
end
function tbl_upvr_3.OnLocalPlayerCameraPropertyChanged(arg1, arg2) -- Line 493
    --[[ Upvalues[1]:
        [1]: Players_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [33] 21. Error Block 34 start (CF ANALYSIS FAILED)
    if Players_upvr.LocalPlayer.CameraMode == Enum.CameraMode.Classic then
        arg1:ActivateCameraController()
        return
    end
    warn("Unhandled value for property player.CameraMode: ", Players_upvr.LocalPlayer.CameraMode)
    do
        return
    end
    -- KONSTANTERROR: [33] 21. Error Block 34 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [56] 36. Error Block 12 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [56] 36. Error Block 12 end (CF ANALYSIS FAILED)
end
function tbl_upvr_3.OnUserGameSettingsPropertyChanged(arg1, arg2) -- Line 535
    if arg2 == "ComputerCameraMovementMode" or arg2 == "TouchCameraMovementMode" then
        arg1:ActivateCameraController()
    end
end
function tbl_upvr_3.OnPreferredInputChanged(arg1) -- Line 541
    arg1:ActivateCameraController()
end
local module_upvr_11 = require(script:WaitForChild("CameraInput"))
function tbl_upvr_3.Update(arg1, arg2) -- Line 551
    --[[ Upvalues[1]:
        [1]: module_upvr_11 (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    if arg1.activeCameraController then
        arg1.activeCameraController:UpdateMouseBehavior()
        local any_Update_result1_2, any_Update_result2_2 = arg1.activeCameraController:Update(arg2)
        if arg1.activeOcclusionModule then
            local any_Update_result1, any_Update_result2 = arg1.activeOcclusionModule:Update(arg2, any_Update_result1_2, any_Update_result2_2)
            any_Update_result1_2 = any_Update_result1
        end
        local CurrentCamera_2 = game.Workspace.CurrentCamera
        CurrentCamera_2.CFrame = any_Update_result1_2
        CurrentCamera_2.Focus = any_Update_result2
        if arg1.activeTransparencyController then
            arg1.activeTransparencyController:Update(arg2)
        end
        if module_upvr_11.getInputEnabled() then
            module_upvr_11.resetInputForFrameEnd()
        end
    end
end
function tbl_upvr_3.OnCharacterAdded(arg1, arg2, arg3) -- Line 577
    if arg1.activeOcclusionModule then
        arg1.activeOcclusionModule:CharacterAdded(arg2, arg3)
    end
end
function tbl_upvr_3.OnCharacterRemoving(arg1, arg2, arg3) -- Line 583
    if arg1.activeOcclusionModule then
        arg1.activeOcclusionModule:CharacterRemoving(arg2, arg3)
    end
end
function tbl_upvr_3.OnPlayerAdded(arg1, arg2) -- Line 589
    --[[ Upvalues[1]:
        [1]: any_getUserFlag_result1_upvr_2 (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [5] 5. Error Block 3 start (CF ANALYSIS FAILED)
    arg1.connectionUtil:trackConnection(`{arg2.UserId}CharacterAdded`, arg2.CharacterAdded:Connect(function(arg1_2) -- Line 593
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: arg2 (readonly)
        ]]
        arg1:OnCharacterAdded(arg1_2, arg2)
    end))
    arg1.connectionUtil:trackConnection(`{arg2.UserId}CharacterRemoving`, arg2.CharacterRemoving:Connect(function(arg1_3) -- Line 596
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: arg2 (readonly)
        ]]
        arg1:OnCharacterRemoving(arg1_3, arg2)
    end))
    do
        return
    end
    -- KONSTANTERROR: [5] 5. Error Block 3 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [46] 34. Error Block 4 start (CF ANALYSIS FAILED)
    arg2.CharacterAdded:Connect(function(arg1_4) -- Line 601
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: arg2 (readonly)
        ]]
        arg1:OnCharacterAdded(arg1_4, arg2)
    end)
    arg2.CharacterRemoving:Connect(function(arg1_5) -- Line 604
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: arg2 (readonly)
        ]]
        arg1:OnCharacterRemoving(arg1_5, arg2)
    end)
    -- KONSTANTERROR: [46] 34. Error Block 4 end (CF ANALYSIS FAILED)
end
function tbl_upvr_3.OnPlayerRemoving(arg1, arg2) -- Line 610
    if arg1.connectionUtil then
        arg1.connectionUtil:disconnect(`{arg2.UserId}CharacterAdded`)
        arg1.connectionUtil:disconnect(`{arg2.UserId}CharacterRemoving`)
    end
end
function tbl_upvr_3.OnMouseLockToggled(arg1) -- Line 618
    if arg1.activeMouseLockController and arg1.activeCameraController then
        arg1.activeCameraController:SetIsMouseLocked(arg1.activeMouseLockController:GetIsMouseLocked())
        arg1.activeCameraController:SetMouseLockOffset(arg1.activeMouseLockController:GetMouseLockOffset())
    end
end
tbl_upvr_3.new()
return {}
ModuleScript CameraToggleStateController CameraToggleStateController
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:19
-- Luau version 6, Types version 3
-- Time taken: 0.006340 seconds

local module_upvr_2 = require(script.Parent:WaitForChild("CameraUI"))
module_upvr_2.setCameraModeToastEnabled(false)
local module_upvr = require(script.Parent:WaitForChild("CameraInput"))
local var4_upvw = false
local var5_upvw = false
local tick_result1_upvw = tick()
local var7_upvw = false
local var8_upvw = false
local module_upvr_3 = require(script.Parent:WaitForChild("CameraUtils"))
return function(arg1) -- Line 20
    --[[ Upvalues[8]:
        [1]: module_upvr (readonly)
        [2]: var4_upvw (read and write)
        [3]: var5_upvw (read and write)
        [4]: tick_result1_upvw (read and write)
        [5]: module_upvr_2 (readonly)
        [6]: var7_upvw (read and write)
        [7]: var8_upvw (read and write)
        [8]: module_upvr_3 (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local any_getTogglePan_result1 = module_upvr.getTogglePan()
    if arg1 and any_getTogglePan_result1 ~= var4_upvw then
        var5_upvw = true
    end
    if var4_upvw ~= any_getTogglePan_result1 or 3 < tick() - tick_result1_upvw then
        local var11 = any_getTogglePan_result1
        if var11 then
            if tick() - tick_result1_upvw >= 3 then
            else
            end
        end
        module_upvr_2.setCameraModeToastOpen(true)
        if any_getTogglePan_result1 then
            var5_upvw = false
        end
        tick_result1_upvw = tick()
        var4_upvw = any_getTogglePan_result1
    end
    if arg1 ~= var7_upvw then
        if arg1 then
            var8_upvw = module_upvr.getTogglePan()
            module_upvr.setTogglePan(true)
        elseif not var5_upvw then
            module_upvr.setTogglePan(var8_upvw)
        end
    end
    if arg1 then
        if module_upvr.getTogglePan() then
            module_upvr_3.setMouseIconOverride("rbxasset://textures/Cursors/CrossMouseIcon.png")
            module_upvr_3.setMouseBehaviorOverride(Enum.MouseBehavior.LockCenter)
            module_upvr_3.setRotationTypeOverride(Enum.RotationType.CameraRelative)
        else
            module_upvr_3.restoreMouseIcon()
            module_upvr_3.restoreMouseBehavior()
            module_upvr_3.setRotationTypeOverride(Enum.RotationType.CameraRelative)
        end
    elseif module_upvr.getTogglePan() then
        module_upvr_3.setMouseIconOverride("rbxasset://textures/Cursors/CrossMouseIcon.png")
        module_upvr_3.setMouseBehaviorOverride(Enum.MouseBehavior.LockCenter)
        module_upvr_3.setRotationTypeOverride(Enum.RotationType.MovementRelative)
    elseif module_upvr.getHoldPan() then
        module_upvr_3.restoreMouseIcon()
        module_upvr_3.setMouseBehaviorOverride(Enum.MouseBehavior.LockCurrentPosition)
        module_upvr_3.setRotationTypeOverride(Enum.RotationType.MovementRelative)
    else
        module_upvr_3.restoreMouseIcon()
        module_upvr_3.restoreMouseBehavior()
        module_upvr_3.restoreRotationType()
    end
    var7_upvw = arg1
end
ModuleScript ZoomController ZoomController
KONSTANTERROR: After: buffer access out of bounds
K
K
K
K
K
K
K
ModuleScript Popper Popper
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:21
-- Luau version 6, Types version 3
-- Time taken: 0.019852 seconds

-- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
local Players = game:GetService("Players")
local module = require(script.Parent.Parent.Parent:WaitForChild("CommonUtils"):WaitForChild("FlagUtil"))
local any_getUserFlag_result1_upvr_2 = module.getUserFlag("UserRaycastUpdateAPI")
local any_getUserFlag_result1_upvr_3 = module.getUserFlag("UserCurrentCameraUpdate2")
local var22_upvr = "UserPlayerConnectionMemoryLeak"
local any_getUserFlag_result1_upvr = module.getUserFlag(var22_upvr)
if any_getUserFlag_result1_upvr_3 then
    var22_upvr = require(script.Parent.Parent.Parent:WaitForChild("CommonUtils"):WaitForChild("CameraWrapper")).new()
else
    var22_upvr = nil
end
if any_getUserFlag_result1_upvr_3 then
    local _
else
end
if any_getUserFlag_result1_upvr_3 then
    var22_upvr:Enable()
end
local tan_upvr = math.tan
local rad_upvr = math.rad
local new_upvr = Ray.new
local RaycastParams_new_result1_upvr = RaycastParams.new()
RaycastParams_new_result1_upvr.IgnoreWater = true
RaycastParams_new_result1_upvr.FilterType = Enum.RaycastFilterType.Exclude
local RaycastParams_new_result1_upvr_2 = RaycastParams.new()
RaycastParams_new_result1_upvr_2.IgnoreWater = true
local Include_upvr = Enum.RaycastFilterType.Include
RaycastParams_new_result1_upvr_2.FilterType = Include_upvr
if any_getUserFlag_result1_upvr then
    Include_upvr = require(script.Parent.Parent.Parent:WaitForChild("CommonUtils"):WaitForChild("ConnectionUtil")).new()
else
    Include_upvr = nil
end
local function _(arg1) -- Line 42, Named "getTotalTransparency"
    return 1 - (1 - arg1.Transparency) * (1 - arg1.LocalTransparencyModifier)
end
local function _(arg1, arg2) -- Line 46, Named "eraseFromEnd"
    for i = #arg1, arg2 + 1, -1 do
        arg1[i] = nil
    end
end
if any_getUserFlag_result1_upvr_3 then
    local var32_upvw
    local var33_upvw
    local function updateProjection() -- Line 56
        --[[ Upvalues[5]:
            [1]: var22_upvr (readonly)
            [2]: rad_upvr (readonly)
            [3]: var32_upvw (read and write)
            [4]: tan_upvr (readonly)
            [5]: var33_upvw (read and write)
        ]]
        local any_getCamera_result1_2 = var22_upvr:getCamera()
        local ViewportSize_2 = any_getCamera_result1_2.ViewportSize
        var32_upvw = tan_upvr(rad_upvr(any_getCamera_result1_2.FieldOfView) / 2) * 2
        var33_upvw = ViewportSize_2.X / ViewportSize_2.Y * var32_upvw
    end
    var22_upvr:Connect("FieldOfView", updateProjection)
    var22_upvr:Connect("ViewportSize", updateProjection)
    local any_getCamera_result1 = var22_upvr:getCamera()
    local ViewportSize = any_getCamera_result1.ViewportSize
    var32_upvw = tan_upvr(rad_upvr(any_getCamera_result1.FieldOfView) / 2) * 2
    local var38_upvw = var32_upvw
    var33_upvw = ViewportSize.X / ViewportSize.Y * var38_upvw
    local NearPlaneZ_upvw = var22_upvr:getCamera().NearPlaneZ
    var22_upvr:Connect("NearPlaneZ", function() -- Line 72
        --[[ Upvalues[2]:
            [1]: NearPlaneZ_upvw (read and write)
            [2]: var22_upvr (readonly)
        ]]
        NearPlaneZ_upvw = var22_upvr:getCamera().NearPlaneZ
    end)
    -- KONSTANTWARNING: GOTO [213] #159
end
local CurrentCamera_upvw = game.Workspace.CurrentCamera
local function updateProjection() -- Line 78
    --[[ Upvalues[5]:
        [1]: CurrentCamera_upvw (read and write)
        [2]: rad_upvr (readonly)
        [3]: var38_upvw (read and write)
        [4]: tan_upvr (readonly)
        [5]: var33_upvw (read and write)
    ]]
    local ViewportSize_4 = CurrentCamera_upvw.ViewportSize
    var38_upvw = tan_upvr(rad_upvr(CurrentCamera_upvw.FieldOfView) / 2) * 2
    var33_upvw = ViewportSize_4.X / ViewportSize_4.Y * var38_upvw
end
CurrentCamera_upvw:GetPropertyChangedSignal("FieldOfView"):Connect(updateProjection)
CurrentCamera_upvw:GetPropertyChangedSignal("ViewportSize"):Connect(updateProjection)
local ViewportSize_5 = CurrentCamera_upvw.ViewportSize
var38_upvw = tan_upvr(rad_upvr(CurrentCamera_upvw.FieldOfView) / 2) * 2
local var44_upvw = var38_upvw
var33_upvw = ViewportSize_5.X / ViewportSize_5.Y * var44_upvw
NearPlaneZ_upvw = CurrentCamera_upvw.NearPlaneZ
local var45_upvw = NearPlaneZ_upvw
CurrentCamera_upvw:GetPropertyChangedSignal("NearPlaneZ"):Connect(function() -- Line 92
    --[[ Upvalues[2]:
        [1]: var45_upvw (read and write)
        [2]: CurrentCamera_upvw (read and write)
    ]]
    var45_upvw = CurrentCamera_upvw.NearPlaneZ
end)
local tbl_upvw = {}
local tbl_upvr = {}
local function _() -- Line 101, Named "refreshIgnoreList"
    --[[ Upvalues[2]:
        [1]: tbl_upvw (read and write)
        [2]: tbl_upvr (readonly)
    ]]
    local var53 = 1
    tbl_upvw = {}
    for _, v in pairs(tbl_upvr) do
        tbl_upvw[var53] = v
        var53 += 1
    end
end
local function playerAdded(arg1) -- Line 110
    --[[ Upvalues[4]:
        [1]: tbl_upvr (readonly)
        [2]: tbl_upvw (read and write)
        [3]: any_getUserFlag_result1_upvr (readonly)
        [4]: Include_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local function characterAdded(arg1_2) -- Line 111
        --[[ Upvalues[3]:
            [1]: tbl_upvr (copied, readonly)
            [2]: arg1 (readonly)
            [3]: tbl_upvw (copied, read and write)
        ]]
        tbl_upvr[arg1] = arg1_2
        local var69 = 1
        tbl_upvw = {}
        for _, v_2 in pairs(tbl_upvr) do
            tbl_upvw[var69] = v_2
            var69 += 1
        end
    end
    local function characterRemoving() -- Line 115
        --[[ Upvalues[3]:
            [1]: tbl_upvr (copied, readonly)
            [2]: arg1 (readonly)
            [3]: tbl_upvw (copied, read and write)
        ]]
        tbl_upvr[arg1] = nil
        local var77 = 1
        tbl_upvw = {}
        for _, v_3 in pairs(tbl_upvr) do
            tbl_upvw[var77] = v_3
            var77 += 1
        end
    end
    if any_getUserFlag_result1_upvr then
        Include_upvr:trackConnection(`{arg1.UserId}CharacterAdded`, arg1.CharacterAdded:Connect(characterAdded))
        Include_upvr:trackConnection(`{arg1.UserId}CharacterRemoving`, arg1.CharacterRemoving:Connect(characterRemoving))
    else
        arg1.CharacterAdded:Connect(characterAdded)
        arg1.CharacterRemoving:Connect(characterRemoving)
    end
    if arg1.Character then
        tbl_upvr[arg1] = arg1.Character
        tbl_upvw = {}
        for _, v_4 in pairs(tbl_upvr) do
            tbl_upvw[1] = v_4
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            local var84
        end
    end
end
Players.PlayerAdded:Connect(playerAdded)
Players.PlayerRemoving:Connect(function(arg1) -- Line 133, Named "playerRemoving"
    --[[ Upvalues[4]:
        [1]: tbl_upvr (readonly)
        [2]: tbl_upvw (read and write)
        [3]: any_getUserFlag_result1_upvr (readonly)
        [4]: Include_upvr (readonly)
    ]]
    tbl_upvr[arg1] = nil
    local var89 = 1
    tbl_upvw = {}
    for _, v_5 in pairs(tbl_upvr) do
        tbl_upvw[var89] = v_5
        var89 += 1
    end
    if any_getUserFlag_result1_upvr then
        v_5 = arg1.UserId
        Include_upvr:disconnect(`{v_5}CharacterAdded`)
        v_5 = arg1.UserId
        Include_upvr:disconnect(`{v_5}CharacterRemoving`)
    end
end)
for _, v_6 in ipairs(Players:GetPlayers()) do
    playerAdded(v_6)
    local var96
end
tbl_upvw = {}
local var97_upvw = tbl_upvw
for _, v_7 in pairs(tbl_upvr) do
    var97_upvw[1] = v_7
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    local var101
end
tbl_upvr = nil
local var102_upvw = tbl_upvr
local var103_upvw
if any_getUserFlag_result1_upvr_3 then
    var101 = "CameraSubject"
    nil(var101, function() -- Line 173
        --[[ Upvalues[2]:
            [1]: var22_upvr (readonly)
            [2]: var103_upvw (read and write)
        ]]
        local CameraSubject_2 = var22_upvr:getCamera().CameraSubject
        if CameraSubject_2 and CameraSubject_2:IsA("Humanoid") then
            var103_upvw = CameraSubject_2.RootPart
        else
            if CameraSubject_2 and CameraSubject_2:IsA("BasePart") then
                var103_upvw = CameraSubject_2
                return
            end
            var103_upvw = nil
        end
    end)
else
    CurrentCamera_upvw:GetPropertyChangedSignal("CameraSubject"):Connect(function() -- Line 184
        --[[ Upvalues[2]:
            [1]: CurrentCamera_upvw (read and write)
            [2]: var103_upvw (read and write)
        ]]
        local CameraSubject = CurrentCamera_upvw.CameraSubject
        if CameraSubject:IsA("Humanoid") then
            var103_upvw = CameraSubject.RootPart
        else
            if CameraSubject:IsA("BasePart") then
                var103_upvw = CameraSubject
                return
            end
            var103_upvw = nil
        end
    end)
end
local function _(arg1) -- Line 196, Named "canOcclude"
    --[[ Upvalues[1]:
        [1]: var102_upvw (read and write)
    ]]
    local var110 = false
    if 1 - (1 - arg1.Transparency) * (1 - arg1.LocalTransparencyModifier) < 0.25 then
        var110 = arg1.CanCollide
        if var110 then
            var110 = false
            if var102_upvw ~= (arg1:GetRootPart() or arg1) then
                var110 = not arg1:IsA("TrussPart")
            end
        end
    end
    return var110
end
local tbl_upvr_2 = {Vector2.new(0.4, 0), Vector2.new(-0.4, 0), Vector2.new(0, -0.4), Vector2.new(0, 0.4), Vector2.new(0, 0.2)}
local function getCollisionPoint_upvr(arg1, arg2) -- Line 224, Named "getCollisionPoint"
    --[[ Upvalues[4]:
        [1]: any_getUserFlag_result1_upvr_2 (readonly)
        [2]: RaycastParams_new_result1_upvr (readonly)
        [3]: var97_upvw (read and write)
        [4]: new_upvr (readonly)
    ]]
    -- KONSTANTERROR: Failed to generate AST for function `getCollisionPoint`:
assertion failed!
Traceback:
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K

end
local function queryPoint_upvr(arg1, arg2, arg3, arg4) -- Line 262, Named "queryPoint"
    --[[ Upvalues[7]:
        [1]: var97_upvw (read and write)
        [2]: var45_upvw (read and write)
        [3]: any_getUserFlag_result1_upvr_2 (readonly)
        [4]: RaycastParams_new_result1_upvr (readonly)
        [5]: var102_upvw (read and write)
        [6]: RaycastParams_new_result1_upvr_2 (readonly)
        [7]: new_upvr (readonly)
    ]]
    -- KONSTANTERROR: Failed to generate AST for function `queryPoint`:
assertion failed!
Traceback:
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K
K

end
local function queryViewport_upvr(arg1, arg2) -- Line 365, Named "queryViewport"
    --[[ Upvalues[7]:
        [1]: CurrentCamera_upvw (read and write)
        [2]: any_getUserFlag_result1_upvr_3 (readonly)
        [3]: var22_upvr (readonly)
        [4]: var33_upvw (read and write)
        [5]: var44_upvw (read and write)
        [6]: var45_upvw (read and write)
        [7]: queryPoint_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    debug.profilebegin("queryViewport")
    local lookVector = arg1.lookVector
    local var121
    if any_getUserFlag_result1_upvr_3 then
        lookVector = var22_upvr:getCamera()
    else
        lookVector = CurrentCamera_upvw
    end
    CurrentCamera_upvw = lookVector
    local ViewportSize_3 = CurrentCamera_upvw.ViewportSize
    var121 = math.huge
    for i_9 = 0, 1 do
        for i_10 = 0, 1 do
            local queryPoint_result1, queryPoint_result2 = queryPoint_upvr(arg1.p + var45_upvw * ((arg1.rightVector) * ((i_9 - 0.5) * var33_upvw) + (arg1.upVector) * ((i_10 - 0.5) * var44_upvw)), -lookVector, arg2, CurrentCamera_upvw:ViewportPointToRay(ViewportSize_3.x * i_9, ViewportSize_3.y * i_10).Origin)
            if queryPoint_result2 < math.huge then
            end
            if queryPoint_result1 < var121 then
                var121 = queryPoint_result1
            end
        end
    end
    debug.profileend()
    return var121, queryPoint_result2
end
local min_upvr = math.min
local function testPromotion_upvr(arg1, arg2, arg3) -- Line 408, Named "testPromotion"
    --[[ Upvalues[4]:
        [1]: getCollisionPoint_upvr (readonly)
        [2]: min_upvr (readonly)
        [3]: queryPoint_upvr (readonly)
        [4]: tbl_upvr_2 (readonly)
    ]]
    debug.profilebegin("testPromotion")
    local p = arg1.p
    debug.profilebegin("extrapolate")
    for i_11 = 0, min_upvr(1.25, arg3.rotVelocity.magnitude + (getCollisionPoint_upvr(p, arg3.posVelocity * 1.25) - p).Magnitude / arg3.posVelocity.magnitude), 0.0625 do
        local any_extrapolate_result1 = arg3.extrapolate(i_11)
        if arg2 <= queryPoint_upvr(any_extrapolate_result1.p, -any_extrapolate_result1.lookVector, arg2) then
            return false
        end
    end
    debug.profileend()
    debug.profilebegin("testOffsets")
    for _, v_8 in ipairs(tbl_upvr_2) do
        local getCollisionPoint_result1 = getCollisionPoint_upvr(p, arg1.rightVector * v_8.x + arg1.upVector * v_8.y)
        if queryPoint_upvr(getCollisionPoint_result1, (p + -arg1.lookVector * arg2 - getCollisionPoint_result1).Unit, arg2) == math.huge then
            return false
        end
    end
    debug.profileend()
    debug.profileend()
    return true
end
return function(arg1, arg2, arg3) -- Line 457, Named "Popper"
    --[[ Upvalues[4]:
        [1]: var102_upvw (read and write)
        [2]: var103_upvw (read and write)
        [3]: queryViewport_upvr (readonly)
        [4]: testPromotion_upvr (readonly)
    ]]
    debug.profilebegin("popper")
    local var135
    local function INLINED() -- Internal function, doesn't exist in bytecode
        var135 = var103_upvw:GetRootPart()
        return var135
    end
    if not var103_upvw or not INLINED() then
        var135 = var103_upvw
    end
    var102_upvw = var135
    var135 = arg2
    local queryViewport_upvr_result1, queryViewport_upvr_result2 = queryViewport_upvr(arg1, arg2)
    if queryViewport_upvr_result2 < var135 then
        var135 = queryViewport_upvr_result2
    end
    if queryViewport_upvr_result1 < var135 and testPromotion_upvr(arg1, arg2, arg3) then
        var135 = queryViewport_upvr_result1
    end
    var102_upvw = nil
    debug.profileend()
    return var135
end
ModuleScript OrbitalCamera OrbitalCamera
KONSTANTERROR: After: K:0: attempt to index nil with 'debug_name'
K
K
K
K
K
K
K
ModuleScript TransparencyController TransparencyController
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:23
-- Luau version 6, Types version 3
-- Time taken: 0.012920 seconds

local tbl_2_upvr = {"BasePart", "Decal", "Beam", "ParticleEmitter", "Trail", "Fire", "Smoke", "Sparkles", "Explosion"}
local pcall_result1, pcall_result2 = pcall(function() -- Line 27
    return UserSettings():IsUserFeatureEnabled("UserHideCharacterParticlesInFirstPerson")
end)
local module_upvr = {}
module_upvr.__index = module_upvr
function module_upvr.new() -- Line 38
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, module_upvr)
    setmetatable_result1.transparencyDirty = false
    setmetatable_result1.enabled = false
    setmetatable_result1.lastTransparency = nil
    setmetatable_result1.descendantAddedConn = nil
    setmetatable_result1.descendantRemovingConn = nil
    setmetatable_result1.toolDescendantAddedConns = {}
    setmetatable_result1.toolDescendantRemovingConns = {}
    setmetatable_result1.cachedParts = {}
    return setmetatable_result1
end
function module_upvr.HasToolAncestor(arg1, arg2) -- Line 54
    if arg2.Parent == nil then
        return false
    end
    assert(arg2.Parent, "")
    local children = arg2.Parent:IsA("Tool")
    if not children then
        children = arg1:HasToolAncestor(arg2.Parent)
    end
    return children
end
local var8_upvw = pcall_result1 and pcall_result2
function module_upvr.IsValidPartToModify(arg1, arg2) -- Line 60
    --[[ Upvalues[2]:
        [1]: var8_upvw (read and write)
        [2]: tbl_2_upvr (readonly)
    ]]
    if var8_upvw then
        for i, v in tbl_2_upvr do
            if arg2:IsA(v) then
                return not arg1:HasToolAncestor(arg2)
            end
        end
    elseif arg2:IsA("BasePart") or arg2:IsA("Decal") then
        i = arg2
        return not arg1:HasToolAncestor(i)
    end
    return false
end
function module_upvr.CachePartsRecursive(arg1, arg2) -- Line 76
    if arg2 then
        if arg1:IsValidPartToModify(arg2) then
            arg1.cachedParts[arg2] = true
            arg1.transparencyDirty = true
        end
        for _, v_2 in pairs(arg2:GetChildren()) do
            arg1:CachePartsRecursive(v_2)
        end
    end
end
function module_upvr.TeardownTransparency(arg1) -- Line 88
    for i_3, _ in pairs(arg1.cachedParts) do
        i_3.LocalTransparencyModifier = 0
    end
    arg1.cachedParts = {}
    arg1.transparencyDirty = true
    arg1.lastTransparency = nil
    if arg1.descendantAddedConn then
        arg1.descendantAddedConn:disconnect()
        arg1.descendantAddedConn = nil
    end
    if arg1.descendantRemovingConn then
        arg1.descendantRemovingConn:disconnect()
        arg1.descendantRemovingConn = nil
    end
    for i_4, v_4 in pairs(arg1.toolDescendantAddedConns) do
        v_4:Disconnect()
        arg1.toolDescendantAddedConns[i_4] = nil
    end
    for i_5, v_5 in pairs(arg1.toolDescendantRemovingConns) do
        v_5:Disconnect()
        arg1.toolDescendantRemovingConns[i_5] = nil
    end
end
function module_upvr.SetupTransparency(arg1, arg2) -- Line 114
    arg1:TeardownTransparency()
    if arg1.descendantAddedConn then
        arg1.descendantAddedConn:disconnect()
    end
    arg1.descendantAddedConn = arg2.DescendantAdded:Connect(function(arg1_2) -- Line 118
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: arg2 (readonly)
        ]]
        if arg1:IsValidPartToModify(arg1_2) then
            arg1.cachedParts[arg1_2] = true
            arg1.transparencyDirty = true
        elseif arg1_2:IsA("Tool") then
            if arg1.toolDescendantAddedConns[arg1_2] then
                arg1.toolDescendantAddedConns[arg1_2]:Disconnect()
            end
            arg1.toolDescendantAddedConns[arg1_2] = arg1_2.DescendantAdded:Connect(function(arg1_3) -- Line 126
                --[[ Upvalues[1]:
                    [1]: arg1 (copied, readonly)
                ]]
                arg1.cachedParts[arg1_3] = nil
                if arg1_3:IsA("BasePart") or arg1_3:IsA("Decal") then
                    arg1_3.LocalTransparencyModifier = 0
                end
            end)
            if arg1.toolDescendantRemovingConns[arg1_2] then
                arg1.toolDescendantRemovingConns[arg1_2]:disconnect()
            end
            arg1.toolDescendantRemovingConns[arg1_2] = arg1_2.DescendantRemoving:Connect(function(arg1_4) -- Line 134
                --[[ Upvalues[2]:
                    [1]: arg2 (copied, readonly)
                    [2]: arg1 (copied, readonly)
                ]]
                wait()
                if arg2 and arg1_4 and arg1_4:IsDescendantOf(arg2) and arg1:IsValidPartToModify(arg1_4) then
                    arg1.cachedParts[arg1_4] = true
                    arg1.transparencyDirty = true
                end
            end)
        end
    end)
    if arg1.descendantRemovingConn then
        arg1.descendantRemovingConn:disconnect()
    end
    arg1.descendantRemovingConn = arg2.DescendantRemoving:connect(function(arg1_5) -- Line 146
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        if arg1.cachedParts[arg1_5] then
            arg1.cachedParts[arg1_5] = nil
            arg1_5.LocalTransparencyModifier = 0
        end
    end)
    arg1:CachePartsRecursive(arg2)
end
function module_upvr.Enable(arg1, arg2) -- Line 157
    if arg1.enabled ~= arg2 then
        arg1.enabled = arg2
    end
end
function module_upvr.SetSubject(arg1, arg2) -- Line 163
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    if arg2 and arg2:IsA("Humanoid") then
        local var35
    end
    if arg2 and arg2:IsA("VehicleSeat") and arg2.Occupant then
        var35 = arg2.Occupant.Parent
        local var36 = var35
    end
    if var36 then
        arg1:SetupTransparency(var36)
    else
        arg1:TeardownTransparency()
    end
end
local module_upvr_2 = require(script.Parent:WaitForChild("CameraUtils"))
local VRService_upvr = game:GetService("VRService")
function module_upvr.Update(arg1, arg2) -- Line 178
    --[[ Upvalues[2]:
        [1]: module_upvr_2 (readonly)
        [2]: VRService_upvr (readonly)
    ]]
    local CurrentCamera_2 = workspace.CurrentCamera
    if CurrentCamera_2 then
        local var56
        if arg1.enabled then
            var56 = CurrentCamera_2.Focus.p - CurrentCamera_2.CoordinateFrame.p
            local magnitude_2 = var56.magnitude
            local function INLINED_2() -- Internal function, doesn't exist in bytecode
                var56 = 1 - (magnitude_2 - 0.5) / 1.5
                return var56
            end
            if magnitude_2 >= 2 or not INLINED_2() then
                var56 = 0
            end
            if var56 < 0.5 then
                var56 = 0
            end
            if arg1.lastTransparency and var56 < 1 and arg1.lastTransparency < 0.95 then
                local var58 = 2.8 * arg2
                var56 = arg1.lastTransparency + math.clamp(var56 - arg1.lastTransparency, -var58, var58)
            else
                arg1.transparencyDirty = true
            end
            var56 = math.clamp(module_upvr_2.Round(var56, 2), 0, 1)
            if arg1.transparencyDirty or arg1.lastTransparency ~= var56 then
                for i_6, _ in pairs(arg1.cachedParts) do
                    if VRService_upvr.VREnabled and VRService_upvr.AvatarGestures then
                        if i_6.Parent:IsA("Accessory") and ({
                            [Enum.AccessoryType.Hat] = true;
                            [Enum.AccessoryType.Hair] = true;
                            [Enum.AccessoryType.Face] = true;
                            [Enum.AccessoryType.Eyebrow] = true;
                            [Enum.AccessoryType.Eyelash] = true;
                        })[i_6.Parent.AccessoryType] or i_6.Name == "Head" then
                            i_6.LocalTransparencyModifier = var56
                        else
                            i_6.LocalTransparencyModifier = 0
                        end
                    else
                        i_6.LocalTransparencyModifier = var56
                    end
                end
                arg1.transparencyDirty = false
                arg1.lastTransparency = var56
            end
        end
    end
end
return module_upvr
ModuleScript LegacyCamera LegacyCamera
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:25
-- Luau version 6, Types version 3
-- Time taken: 0.002329 seconds

local module_upvr = require(script.Parent:WaitForChild("BaseCamera"))
local setmetatable_result1_2_upvr = setmetatable({}, module_upvr)
setmetatable_result1_2_upvr.__index = setmetatable_result1_2_upvr
function setmetatable_result1_2_upvr.new() -- Line 21
    --[[ Upvalues[2]:
        [1]: module_upvr (readonly)
        [2]: setmetatable_result1_2_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable(module_upvr.new(), setmetatable_result1_2_upvr)
    setmetatable_result1.cameraType = Enum.CameraType.Fixed
    setmetatable_result1.lastUpdate = tick()
    setmetatable_result1.lastDistanceToSubject = nil
    return setmetatable_result1
end
function setmetatable_result1_2_upvr.GetModuleName(arg1) -- Line 31
    return "LegacyCamera"
end
function setmetatable_result1_2_upvr.SetCameraToSubjectDistance(arg1, arg2) -- Line 36
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    return module_upvr.SetCameraToSubjectDistance(arg1, arg2)
end
local Players_upvr = game:GetService("Players")
local module_upvr_2 = require(script.Parent:WaitForChild("CameraInput"))
function setmetatable_result1_2_upvr.Update(arg1, arg2) -- Line 40
    --[[ Upvalues[2]:
        [1]: Players_upvr (readonly)
        [2]: module_upvr_2 (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [3] 3. Error Block 2 start (CF ANALYSIS FAILED)
    do
        return nil, nil
    end
    -- KONSTANTERROR: [3] 3. Error Block 2 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [6] 6. Error Block 3 start (CF ANALYSIS FAILED)
    local CurrentCamera = workspace.CurrentCamera
    -- KONSTANTERROR: [6] 6. Error Block 3 end (CF ANALYSIS FAILED)
end
return setmetatable_result1_2_upvr
ModuleScript VRBaseCamera VRBaseCamera
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:26
-- Luau version 6, Types version 3
-- Time taken: 0.019149 seconds

local pcall_result1, pcall_result2 = pcall(function() -- Line 17
    return UserSettings():IsUserFeatureEnabled("UserVRVehicleCamera2")
end)
local VRService_upvr = game:GetService("VRService")
local Lighting_upvr = game:GetService("Lighting")
local UserGameSettings_upvr = UserSettings():GetService("UserGameSettings")
local module_upvr_3 = require(script.Parent:WaitForChild("CameraInput"))
local module_upvr_2 = require(script.Parent:WaitForChild("BaseCamera"))
local setmetatable_result1_2_upvr = setmetatable({}, module_upvr_2)
setmetatable_result1_2_upvr.__index = setmetatable_result1_2_upvr
function setmetatable_result1_2_upvr.new() -- Line 41
    --[[ Upvalues[2]:
        [1]: module_upvr_2 (readonly)
        [2]: setmetatable_result1_2_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable(module_upvr_2.new(), setmetatable_result1_2_upvr)
    setmetatable_result1.gamepadZoomLevels = {0, 7}
    setmetatable_result1.headScale = 1
    setmetatable_result1:SetCameraToSubjectDistance(7)
    setmetatable_result1.VRFadeResetTimer = 0
    setmetatable_result1.VREdgeBlurTimer = 0
    setmetatable_result1.gamepadResetConnection = nil
    setmetatable_result1.needsReset = true
    setmetatable_result1.recentered = false
    setmetatable_result1:Reset()
    return setmetatable_result1
end
function setmetatable_result1_2_upvr.Reset(arg1) -- Line 67
    arg1.stepRotateTimeout = 0
end
function setmetatable_result1_2_upvr.GetModuleName(arg1) -- Line 71
    return "VRBaseCamera"
end
function setmetatable_result1_2_upvr.GamepadZoomPress(arg1) -- Line 75
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    module_upvr_2.GamepadZoomPress(arg1)
    arg1:GamepadReset()
    arg1:ResetZoom()
end
function setmetatable_result1_2_upvr.GamepadReset(arg1) -- Line 83
    arg1.stepRotateTimeout = 0
    arg1.needsReset = true
end
local module_upvr = require(script.Parent:WaitForChild("ZoomController"))
function setmetatable_result1_2_upvr.ResetZoom(arg1) -- Line 88
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    module_upvr.SetZoomParameters(arg1.currentSubjectDistance, 0)
    module_upvr.ReleaseSpring()
end
local var13_upvw = pcall_result1 and pcall_result2
local LocalPlayer_upvr = game:GetService("Players").LocalPlayer
function setmetatable_result1_2_upvr.OnEnabledChanged(arg1) -- Line 93
    --[[ Upvalues[6]:
        [1]: module_upvr_2 (readonly)
        [2]: module_upvr_3 (readonly)
        [3]: VRService_upvr (readonly)
        [4]: var13_upvw (read and write)
        [5]: LocalPlayer_upvr (readonly)
        [6]: Lighting_upvr (readonly)
    ]]
    module_upvr_2.OnEnabledChanged(arg1)
    if arg1.enabled then
        arg1.gamepadResetConnection = module_upvr_3.gamepadReset:Connect(function() -- Line 97
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            arg1:GamepadReset()
        end)
        arg1.thirdPersonOptionChanged = VRService_upvr:GetPropertyChangedSignal("ThirdPersonFollowCamEnabled"):Connect(function() -- Line 102
            --[[ Upvalues[2]:
                [1]: var13_upvw (copied, read and write)
                [2]: arg1 (readonly)
            ]]
            if var13_upvw then
                arg1:Reset()
            elseif not arg1:IsInFirstPerson() then
                arg1:Reset()
            end
        end)
        arg1.vrRecentered = VRService_upvr.UserCFrameChanged:Connect(function(arg1_2, arg2) -- Line 113
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            if arg1_2 == Enum.UserCFrame.Floor then
                arg1.recentered = true
            end
        end)
    else
        if arg1.inFirstPerson then
            arg1:GamepadZoomPress()
        end
        if arg1.thirdPersonOptionChanged then
            arg1.thirdPersonOptionChanged:Disconnect()
            arg1.thirdPersonOptionChanged = nil
        end
        if arg1.vrRecentered then
            arg1.vrRecentered:Disconnect()
            arg1.vrRecentered = nil
        end
        if arg1.cameraHeadScaleChangedConn then
            arg1.cameraHeadScaleChangedConn:Disconnect()
            arg1.cameraHeadScaleChangedConn = nil
        end
        if arg1.gamepadResetConnection then
            arg1.gamepadResetConnection:Disconnect()
            arg1.gamepadResetConnection = nil
        end
        arg1.VREdgeBlurTimer = 0
        arg1:UpdateEdgeBlur(LocalPlayer_upvr, 1)
        local VRFade = Lighting_upvr:FindFirstChild("VRFade")
        if VRFade then
            VRFade.Brightness = 0
        end
    end
end
function setmetatable_result1_2_upvr.OnCurrentCameraChanged(arg1) -- Line 155
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    module_upvr_2.OnCurrentCameraChanged(arg1)
    if arg1.cameraHeadScaleChangedConn then
        arg1.cameraHeadScaleChangedConn:Disconnect()
        arg1.cameraHeadScaleChangedConn = nil
    end
    local CurrentCamera = workspace.CurrentCamera
    if CurrentCamera then
        arg1.cameraHeadScaleChangedConn = CurrentCamera:GetPropertyChangedSignal("HeadScale"):Connect(function() -- Line 167
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            arg1:OnHeadScaleChanged()
        end)
        arg1:OnHeadScaleChanged()
    end
end
function setmetatable_result1_2_upvr.OnHeadScaleChanged(arg1) -- Line 172
    local HeadScale = workspace.CurrentCamera.HeadScale
    for i, v in arg1.gamepadZoomLevels do
        arg1.gamepadZoomLevels[i] = v * HeadScale / arg1.headScale
    end
    arg1:SetCameraToSubjectDistance(arg1:GetCameraToSubjectDistance() * HeadScale / arg1.headScale)
    arg1.headScale = HeadScale
end
function setmetatable_result1_2_upvr.GetVRFocus(arg1, arg2, arg3) -- Line 188
    arg1.cameraTranslationConstraints = Vector3.new(arg1.cameraTranslationConstraints.x, math.min(1, arg1.cameraTranslationConstraints.y + arg3), arg1.cameraTranslationConstraints.z)
    return CFrame.new(Vector3.new(arg2.x, (arg1.lastCameraFocus or arg2).y, arg2.z):Lerp(arg2 + Vector3.new(0, arg1:GetCameraHeight(), 0), arg1.cameraTranslationConstraints.y))
end
function setmetatable_result1_2_upvr.StartFadeFromBlack(arg1) -- Line 204
    --[[ Upvalues[2]:
        [1]: UserGameSettings_upvr (readonly)
        [2]: Lighting_upvr (readonly)
    ]]
    if UserGameSettings_upvr.VignetteEnabled == false then
    else
        if not Lighting_upvr:FindFirstChild("VRFade") then
            local ColorCorrectionEffect = Instance.new("ColorCorrectionEffect")
            ColorCorrectionEffect.Name = "VRFade"
            ColorCorrectionEffect.Parent = Lighting_upvr
        end
        ColorCorrectionEffect.Brightness = -1
        arg1.VRFadeResetTimer = 0.1
    end
end
function setmetatable_result1_2_upvr.UpdateFadeFromBlack(arg1, arg2) -- Line 219
    --[[ Upvalues[1]:
        [1]: Lighting_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    local VRFade_2 = Lighting_upvr:FindFirstChild("VRFade")
    local VRFadeResetTimer = arg1.VRFadeResetTimer
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [32] 23. Error Block 4 start (CF ANALYSIS FAILED)
    VRFadeResetTimer.Brightness = math.min(VRFadeResetTimer.Brightness + arg2 * 10, 0)
    do
        return
    end
    -- KONSTANTERROR: [32] 23. Error Block 4 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [45] 32. Error Block 8 start (CF ANALYSIS FAILED)
    if VRFade_2 then
        VRFade_2.Brightness = 0
    end
    -- KONSTANTERROR: [45] 32. Error Block 8 end (CF ANALYSIS FAILED)
end
local RunService_upvr = game:GetService("RunService")
function setmetatable_result1_2_upvr.StartVREdgeBlur(arg1, arg2) -- Line 235
    --[[ Upvalues[3]:
        [1]: UserGameSettings_upvr (readonly)
        [2]: RunService_upvr (readonly)
        [3]: VRService_upvr (readonly)
    ]]
    if UserGameSettings_upvr.VignetteEnabled == false then
    else
        if not workspace.CurrentCamera:FindFirstChild("VRBlurPart") then
            local Part_upvw = Instance.new("Part")
            Part_upvw.Name = "VRBlurPart"
            Part_upvw.Parent = workspace.CurrentCamera
            Part_upvw.CanTouch = false
            Part_upvw.CanCollide = false
            Part_upvw.CanQuery = false
            Part_upvw.Anchored = true
            Part_upvw.Size = Vector3.new(0.43999, 0.46999, 1)
            Part_upvw.Transparency = 1
            Part_upvw.CastShadow = false
            RunService_upvr.RenderStepped:Connect(function(arg1_3) -- Line 255
                --[[ Upvalues[2]:
                    [1]: VRService_upvr (copied, readonly)
                    [2]: Part_upvw (read and write)
                ]]
                local any_GetUserCFrame_result1 = VRService_upvr:GetUserCFrame(Enum.UserCFrame.Head)
                local var33 = (workspace.CurrentCamera.CFrame) * (CFrame.new(any_GetUserCFrame_result1.p * workspace.CurrentCamera.HeadScale) * (any_GetUserCFrame_result1 - any_GetUserCFrame_result1.p))
                Part_upvw.CFrame = var33 * CFrame.Angles(0, math.pi, 0) + (var33.LookVector) * (1.05 * workspace.CurrentCamera.HeadScale)
                Part_upvw.Size = Vector3.new(0.43999, 0.46999, 1) * workspace.CurrentCamera.HeadScale
            end)
        end
        local VRBlurScreen = arg2.PlayerGui:FindFirstChild("VRBlurScreen")
        local var35
        if VRBlurScreen then
            var35 = VRBlurScreen:FindFirstChild("VRBlur")
            local var36
        end
        if not var35 then
            if not var36 then
                local SurfaceGui = Instance.new("SurfaceGui")
                if not SurfaceGui then
                    SurfaceGui = Instance.new("ScreenGui")
                end
                var36 = SurfaceGui
            end
            var36.Name = "VRBlurScreen"
            var36.Parent = arg2.PlayerGui
            var36.Adornee = Part_upvw
            local ImageLabel = Instance.new("ImageLabel")
            ImageLabel.Name = "VRBlur"
            ImageLabel.Parent = var36
            ImageLabel.Image = "rbxasset://textures/ui/VR/edgeBlur.png"
            ImageLabel.AnchorPoint = Vector2.new(0.5, 0.5)
            ImageLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
            ImageLabel.Size = UDim2.fromScale(workspace.CurrentCamera.ViewportSize.X * 2.3 / 512, workspace.CurrentCamera.ViewportSize.Y * 2.3 / 512)
            ImageLabel.BackgroundTransparency = 1
            ImageLabel.Active = true
            ImageLabel.ScaleType = Enum.ScaleType.Stretch
        end
        ImageLabel.Visible = true
        ImageLabel.ImageTransparency = 0
        arg1.VREdgeBlurTimer = 0.14
    end
end
function setmetatable_result1_2_upvr.UpdateEdgeBlur(arg1, arg2, arg3) -- Line 304
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    local VRBlurScreen_2 = arg2.PlayerGui:FindFirstChild("VRBlurScreen")
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [8] 7. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [8] 7. Error Block 2 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [13] 11. Error Block 3 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [13] 11. Error Block 3 end (CF ANALYSIS FAILED)
end
function setmetatable_result1_2_upvr.GetCameraHeight(arg1) -- Line 329
    if not arg1.inFirstPerson then
        return 0.25881904510252074 * arg1.currentSubjectDistance
    end
    return 0
end
function setmetatable_result1_2_upvr.GetSubjectCFrame(arg1) -- Line 336
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local CurrentCamera_3 = workspace.CurrentCamera
    local var41 = CurrentCamera_3
    if var41 then
        var41 = CurrentCamera_3.CameraSubject
    end
    if not var41 then
        return module_upvr_2.GetSubjectCFrame(arg1)
    end
    local var42
    if var42 then
        if var41:GetState() ~= Enum.HumanoidStateType.Dead then
            var42 = false
        else
            var42 = true
        end
        if var42 and var41 == arg1.lastSubject then
            local lastSubjectCFrame = arg1.lastSubjectCFrame
        end
    end
    if lastSubjectCFrame then
        arg1.lastSubjectCFrame = lastSubjectCFrame
    end
    return lastSubjectCFrame
end
function setmetatable_result1_2_upvr.GetSubjectPosition(arg1) -- Line 362
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    -- KONSTANTERROR: [0] 1. Error Block 26 start (CF ANALYSIS FAILED)
    local CurrentCamera_2 = game.Workspace.CurrentCamera
    local var45 = CurrentCamera_2
    if var45 then
        var45 = CurrentCamera_2.CameraSubject
    end
    if var45 then
        local var46
        if var46 then
            if var45:GetState() ~= Enum.HumanoidStateType.Dead then
                var46 = false
            else
                var46 = true
            end
            if var46 and var45 == arg1.lastSubject then
                local lastSubjectPosition = arg1.lastSubjectPosition
                -- KONSTANTWARNING: GOTO [57] #41
            end
        else
            var46 = var45:IsA("VehicleSeat")
            if var46 then
                var46 = var45.CFrame.p
                -- KONSTANTWARNING: GOTO [57] #41
            end
        end
    else
        var46 = nil
        return var46
    end
    -- KONSTANTERROR: [0] 1. Error Block 26 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [57] 41. Error Block 16 start (CF ANALYSIS FAILED)
    arg1.lastSubjectPosition = var46 + var45.CFrame:vectorToWorldSpace(Vector3.new(0, 4, 0))
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    do
        return var46 + var45.CFrame:vectorToWorldSpace(Vector3.new(0, 4, 0))
    end
    -- KONSTANTERROR: [57] 41. Error Block 16 end (CF ANALYSIS FAILED)
end
local any_getUserFlag_result1_upvr = require(script.Parent.Parent:WaitForChild("CommonUtils"):WaitForChild("FlagUtil")).getUserFlag("UserCameraInputDt")
function setmetatable_result1_2_upvr.getRotation(arg1, arg2) -- Line 391
    --[[ Upvalues[3]:
        [1]: module_upvr_3 (readonly)
        [2]: UserGameSettings_upvr (readonly)
        [3]: any_getUserFlag_result1_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    local any_getRotation_result1 = module_upvr_3.getRotation(arg2)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [10] 9. Error Block 18 start (CF ANALYSIS FAILED)
    if any_getUserFlag_result1_upvr then
        return any_getRotation_result1.X
    end
    do
        return any_getRotation_result1.X * 40 * arg2
    end
    -- KONSTANTERROR: [10] 9. Error Block 18 end (CF ANALYSIS FAILED)
end
return setmetatable_result1_2_upvr
ModuleScript CameraUtils CameraUtils
KONSTANTERROR: After: K:0: attempt to index nil with 'debug_name'
K
K
K
K
K
K
K
ModuleScript ClassicCamera ClassicCamera
KONSTANTERROR: After: Corrupted bytecode. If the `luau_load` is able to load this bytecode, then this is a bug
K
K
K
K
K
K
K
ModuleScript VRVehicleCamera VRVehicleCamera
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:30
-- Luau version 6, Types version 3
-- Time taken: 0.000841 seconds

-- Global Warnings[1]:
---- 1. KONSTANTWARNING: A SETGLOBAL instruction specified an invalid constant.

-- KONSTANTERROR: Failed to generate AST for unnamed function:
assertion failed!
Traceback:
K
K
K
K
K
K
K
K
K
K
K
ModuleScript BaseOcclusion BaseOcclusion
KONSTANTERROR: After: K:0: attempt to index nil with 'debug_name'
K
K
K
K
K
K
K
ModuleScript Invisicam Invisicam
KONSTANTERROR: After: K:0: attempt to index nil with 'debug_name'
K
K
K
K
K
K
K
ModuleScript VRCamera VRCamera
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:33
-- Luau version 6, Types version 3
-- Time taken: 0.023525 seconds

local Players_upvr = game:GetService("Players")
local VRService_upvr = game:GetService("VRService")
local module_upvr = require(script.Parent:WaitForChild("VRBaseCamera"))
local setmetatable_result1_upvr = setmetatable({}, module_upvr)
setmetatable_result1_upvr.__index = setmetatable_result1_upvr
function setmetatable_result1_upvr.new() -- Line 28
    --[[ Upvalues[3]:
        [1]: module_upvr (readonly)
        [2]: setmetatable_result1_upvr (readonly)
        [3]: Players_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable(module_upvr.new(), setmetatable_result1_upvr)
    setmetatable_result1.lastUpdate = tick()
    setmetatable_result1.focusOffset = CFrame.new()
    setmetatable_result1:Reset()
    setmetatable_result1.controlModule = require(Players_upvr.LocalPlayer:WaitForChild("PlayerScripts").PlayerModule:WaitForChild("ControlModule"))
    setmetatable_result1.savedAutoRotate = true
    return setmetatable_result1
end
function setmetatable_result1_upvr.Reset(arg1) -- Line 41
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    arg1.needsReset = true
    arg1.needsBlackout = true
    arg1.motionDetTime = 0
    arg1.blackOutTimer = 0
    arg1.lastCameraResetPosition = nil
    module_upvr.Reset(arg1)
end
function setmetatable_result1_upvr.Update(arg1, arg2) -- Line 50
    --[[ Upvalues[2]:
        [1]: Players_upvr (readonly)
        [2]: VRService_upvr (readonly)
    ]]
    local LocalPlayer = Players_upvr.LocalPlayer
    if arg1.lastUpdate == nil or 1 < arg2 then
        arg1.lastCameraTransform = nil
    end
    arg1:UpdateFadeFromBlack(arg2)
    arg1:UpdateEdgeBlur(LocalPlayer, arg2)
    local any_GetSubjectPosition_result1 = arg1:GetSubjectPosition()
    if arg1.needsBlackout then
        arg1:StartFadeFromBlack()
        arg1.blackOutTimer += math.clamp(arg2, 0.0001, 0.1)
        if 0.1 < arg1.blackOutTimer and game:IsLoaded() then
            arg1.needsBlackout = false
            arg1.needsReset = true
            local var23
        end
    end
    if any_GetSubjectPosition_result1 and LocalPlayer and workspace.CurrentCamera then
        local any_GetVRFocus_result1_3 = arg1:GetVRFocus(any_GetSubjectPosition_result1, arg2)
        if arg1:IsInFirstPerson() then
            if VRService_upvr.AvatarGestures then
                local any_UpdateImmersionCamera_result1_2, any_UpdateImmersionCamera_result2 = arg1:UpdateImmersionCamera(arg2, var23, any_GetVRFocus_result1_3, arg1.lastSubjectPosition, any_GetSubjectPosition_result1)
                var23 = any_UpdateImmersionCamera_result1_2
                any_GetVRFocus_result1_3 = any_UpdateImmersionCamera_result2
                local var27 = any_GetVRFocus_result1_3
            else
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                local any_UpdateFirstPersonTransform_result1, any_UpdateFirstPersonTransform_result2 = arg1:UpdateFirstPersonTransform(arg2, var23, var27, arg1.lastSubjectPosition, any_GetSubjectPosition_result1)
                var23 = any_UpdateFirstPersonTransform_result1
                var27 = any_UpdateFirstPersonTransform_result2
            end
        elseif VRService_upvr.ThirdPersonFollowCamEnabled then
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            local any_UpdateThirdPersonFollowTransform_result1_2, any_UpdateThirdPersonFollowTransform_result2 = arg1:UpdateThirdPersonFollowTransform(arg2, var23, var27, arg1.lastSubjectPosition, any_GetSubjectPosition_result1)
            var23 = any_UpdateThirdPersonFollowTransform_result1_2
            var27 = any_UpdateThirdPersonFollowTransform_result2
        else
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            local any_UpdateThirdPersonComfortTransform_result1_2, any_UpdateThirdPersonComfortTransform_result2_2 = arg1:UpdateThirdPersonComfortTransform(arg2, var23, var27, arg1.lastSubjectPosition, any_GetSubjectPosition_result1)
            var23 = any_UpdateThirdPersonComfortTransform_result1_2
            var27 = any_UpdateThirdPersonComfortTransform_result2_2
        end
        arg1.lastCameraTransform = var23
        arg1.lastCameraFocus = var27
    end
    arg1.lastUpdate = tick()
    return var23, var27
end
function setmetatable_result1_upvr.GetAvatarFeetWorldYValue(arg1) -- Line 112
    local CameraSubject = workspace.CurrentCamera.CameraSubject
    if not CameraSubject then
        return nil
    end
    if CameraSubject:IsA("Humanoid") and CameraSubject.RootPart then
        local RootPart = CameraSubject.RootPart
        return RootPart.Position.Y - RootPart.Size.Y / 2 - CameraSubject.HipHeight
    end
    return nil
end
function setmetatable_result1_upvr.UpdateFirstPersonTransform(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 127
    --[[ Upvalues[1]:
        [1]: Players_upvr (readonly)
    ]]
    if arg1.needsReset then
        arg1:StartFadeFromBlack()
        arg1.needsReset = false
    end
    if 0.01 < (arg5 - arg6).magnitude then
        arg1:StartVREdgeBlur(Players_upvr.LocalPlayer)
    end
    local p = arg4.p
    local any_GetCameraLookVector_result1 = arg1:GetCameraLookVector()
    return CFrame.new(p - 0.5 * arg1:CalculateNewLookVectorFromArg(Vector3.new(any_GetCameraLookVector_result1.X, 0, any_GetCameraLookVector_result1.Z).Unit, Vector2.new(arg1:getRotation(arg2), 0)), p), arg4
end
function setmetatable_result1_upvr.UpdateImmersionCamera(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 153
    --[[ Upvalues[2]:
        [1]: Players_upvr (readonly)
        [2]: VRService_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 51 start (CF ANALYSIS FAILED)
    local any_GetSubjectCFrame_result1 = arg1:GetSubjectCFrame()
    local CurrentCamera_2 = workspace.CurrentCamera
    local Character = Players_upvr.LocalPlayer.Character
    local any_GetHumanoid_result1_4 = arg1:GetHumanoid()
    local var42
    if not any_GetHumanoid_result1_4 then
        return CurrentCamera_2.CFrame, CurrentCamera_2.Focus
    end
    local HumanoidRootPart_2 = Character:FindFirstChild("HumanoidRootPart")
    if not HumanoidRootPart_2 then
        return CurrentCamera_2.CFrame, CurrentCamera_2.Focus
    end
    arg1.characterOrientation = HumanoidRootPart_2:FindFirstChild("CharacterAlignOrientation")
    if not arg1.characterOrientation then
        local RootAttachment = HumanoidRootPart_2:FindFirstChild("RootAttachment")
        if not RootAttachment then return end
        arg1.characterOrientation = Instance.new("AlignOrientation")
        arg1.characterOrientation.Name = "CharacterAlignOrientation"
        arg1.characterOrientation.Mode = Enum.OrientationAlignmentMode.OneAttachment
        arg1.characterOrientation.Attachment0 = RootAttachment
        arg1.characterOrientation.RigidityEnabled = true
        arg1.characterOrientation.Parent = HumanoidRootPart_2
    end
    if arg1.characterOrientation.Enabled == false then
        arg1.characterOrientation.Enabled = true
    end
    if arg1.needsReset then
        arg1.needsReset = false
        arg1.savedAutoRotate = any_GetHumanoid_result1_4.AutoRotate
        any_GetHumanoid_result1_4.AutoRotate = false
        if arg1.NoRecenter then
            arg1.NoRecenter = false
            VRService_upvr:RecenterUserHeadCFrame()
        end
        arg1:StartFadeFromBlack()
        var42 = any_GetSubjectCFrame_result1
        -- KONSTANTWARNING: GOTO [341] #221
    end
    if any_GetHumanoid_result1_4.Sit then
        var42 = any_GetSubjectCFrame_result1
        if 0.01 < (var42.Position - CurrentCamera_2.CFrame.Position).Magnitude then
            arg1:StartVREdgeBlur(Players_upvr.LocalPlayer)
            -- KONSTANTWARNING: GOTO [341] #221
        end
    else
        arg1.characterOrientation.CFrame = CurrentCamera_2.CFrame * arg1.controlModule:GetEstimatedVRTorsoFrame()
        if 0 < arg1.controlModule.inputMoveVector.Magnitude then
            arg1.motionDetTime = 0.1
        end
        if 0 < arg1.controlModule.inputMoveVector.Magnitude or 0 < arg1.motionDetTime then
            arg1.motionDetTime -= arg2
            arg1:StartVREdgeBlur(Players_upvr.LocalPlayer)
            local any_GetUserCFrame_result1 = VRService_upvr:GetUserCFrame(Enum.UserCFrame.Head)
            local HumanoidRootPart = Character.HumanoidRootPart
            local LookVector = HumanoidRootPart.CFrame.LookVector
            local var48 = arg6 - (CurrentCamera_2.CFrame * (any_GetUserCFrame_result1.Rotation + any_GetUserCFrame_result1.Position * CurrentCamera_2.HeadScale) * CFrame.new(0, -0.7 * HumanoidRootPart.Size.Y / 2, 0) - Vector3.new(LookVector.X, 0, LookVector.Z).Unit * HumanoidRootPart.Size.Y * 0.125).Position + CurrentCamera_2.CFrame.Position
            var42 = CurrentCamera_2.CFrame.Rotation + Vector3.new(var48.X, arg6.Y, var48.Z)
        else
            var42 = CurrentCamera_2.CFrame.Rotation + Vector3.new(CurrentCamera_2.CFrame.Position.X, arg6.Y, CurrentCamera_2.CFrame.Position.Z)
        end
        local any_getRotation_result1_2 = arg1:getRotation(arg2)
        if 0 < math.abs(any_getRotation_result1_2) then
            local any_GetUserCFrame_result1_2 = VRService_upvr:GetUserCFrame(Enum.UserCFrame.Head)
            local var51 = any_GetUserCFrame_result1_2.Rotation + any_GetUserCFrame_result1_2.Position * CurrentCamera_2.HeadScale
            local var52 = var42 * var51
            var42 = CFrame.new(var52.Position) * CFrame.Angles(0, -math.rad(any_getRotation_result1_2 * 90), 0) * var52.Rotation * var51:Inverse()
        end
    end
    -- KONSTANTERROR: [0] 1. Error Block 51 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [341] 221. Error Block 30 start (CF ANALYSIS FAILED)
    do
        return var42, var42 * CFrame.new(0, 0, -0.5)
    end
    -- KONSTANTERROR: [341] 221. Error Block 30 end (CF ANALYSIS FAILED)
end
function setmetatable_result1_upvr.UpdateThirdPersonComfortTransform(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 265
    --[[ Upvalues[2]:
        [1]: Players_upvr (readonly)
        [2]: VRService_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local var62
    if var62 < 0.5 then
        var62 = 0.5
    end
    if arg5 ~= nil then
        local var63
        if arg1.lastCameraFocus ~= nil then
            var63 = true
            if 0.01 >= (arg5 - arg6).magnitude then
                if 0.01 >= arg1.controlModule:GetMoveVector().magnitude then
                    var63 = false
                else
                    var63 = true
                end
            end
            if var63 then
                arg1.motionDetTime = 0.1
            end
            arg1.motionDetTime -= arg2
            if 0 < arg1.motionDetTime then
                local var64
            end
            if true and not arg1.needsReset then
                var64 = arg1.lastCameraFocus
                arg1.VRCameraFocusFrozen = true
                return arg3, var64
            end
            local var65 = true
            if arg1.lastCameraResetPosition ~= nil then
                if 1 >= (arg6 - arg1.lastCameraResetPosition).Magnitude then
                    var65 = false
                else
                    var65 = true
                end
            end
            if 0 < math.abs(arg1:getRotation(arg2)) then
            end
            local var67
            if arg1.VRCameraFocusFrozen and var65 or arg1.needsReset then
                VRService_upvr:RecenterUserHeadCFrame()
                arg1.VRCameraFocusFrozen = false
                arg1.needsReset = false
                arg1.lastCameraResetPosition = arg6
                arg1:ResetZoom()
                arg1:StartFadeFromBlack()
                local any_GetHumanoid_result1_2 = arg1:GetHumanoid()
                local function INLINED_2() -- Internal function, doesn't exist in bytecode
                    var67 = any_GetHumanoid_result1_2.Torso.CFrame.lookVector
                    return var67
                end
                if not any_GetHumanoid_result1_2.Torso or not INLINED_2() then
                    var67 = Vector3.new(1, 0, 0)
                end
                local var69 = var64.Position - Vector3.new(var67.X, 0, var67.Z) * var62
            end
        end
    end
    return CFrame.new(var69, Vector3.new(var64.Position.X, var69.Y, var64.Position.Z)), var64
end
function setmetatable_result1_upvr.UpdateThirdPersonFollowTransform(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 332
    --[[ Upvalues[2]:
        [1]: VRService_upvr (readonly)
        [2]: Players_upvr (readonly)
    ]]
    local CurrentCamera = workspace.CurrentCamera
    local any_GetCameraToSubjectDistance_result1 = arg1:GetCameraToSubjectDistance()
    local any_GetVRFocus_result1_2 = arg1:GetVRFocus(arg6, arg2)
    local var73
    if arg1.needsReset then
        arg1.needsReset = false
        VRService_upvr:RecenterUserHeadCFrame()
        arg1:ResetZoom()
        arg1:StartFadeFromBlack()
    end
    if arg1.recentered then
        local any_GetSubjectCFrame_result1_2 = arg1:GetSubjectCFrame()
        if not any_GetSubjectCFrame_result1_2 then
            return CurrentCamera.CFrame, CurrentCamera.Focus
        end
        var73 = any_GetVRFocus_result1_2 * any_GetSubjectCFrame_result1_2.Rotation * CFrame.new(0, 0, any_GetCameraToSubjectDistance_result1)
        arg1.focusOffset = any_GetVRFocus_result1_2:ToObjectSpace(var73)
        arg1.recentered = false
        return var73, any_GetVRFocus_result1_2
    end
    local any_ToWorldSpace_result1 = any_GetVRFocus_result1_2:ToWorldSpace(arg1.focusOffset)
    local controlModule = arg1.controlModule
    if 0.01 < (arg5 - arg6).magnitude or 0 < controlModule:GetMoveVector().magnitude then
        local any_GetEstimatedVRTorsoFrame_result1 = controlModule:GetEstimatedVRTorsoFrame()
        local var78 = CurrentCamera.CFrame * (any_GetEstimatedVRTorsoFrame_result1.Rotation + any_GetEstimatedVRTorsoFrame_result1.Position * CurrentCamera.HeadScale)
        local LookVector_2 = var78.LookVector
        var73 = any_ToWorldSpace_result1:Lerp(CFrame.new((CurrentCamera.CFrame.Position) + (any_GetVRFocus_result1_2.Position - Vector3.new(LookVector_2.X, 0, LookVector_2.Z).Unit * any_GetCameraToSubjectDistance_result1) - var78.Position) * any_ToWorldSpace_result1.Rotation, 0.01)
    else
        var73 = any_ToWorldSpace_result1
    end
    local any_getRotation_result1_3 = arg1:getRotation(arg2)
    if 0 < math.abs(any_getRotation_result1_3) then
        var73 = any_GetVRFocus_result1_2 * CFrame.Angles(0, -any_getRotation_result1_3, 0) * any_GetVRFocus_result1_2:ToObjectSpace(var73)
    end
    arg1.focusOffset = any_GetVRFocus_result1_2:ToObjectSpace(var73)
    local var81 = var73 * CFrame.new(0, 0, -any_GetCameraToSubjectDistance_result1)
    if 0.01 < (var81.Position - CurrentCamera.Focus.Position).Magnitude then
        arg1:StartVREdgeBlur(Players_upvr.LocalPlayer)
    end
    return var73, var81
end
function setmetatable_result1_upvr.LeaveFirstPerson(arg1) -- Line 410
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    module_upvr.LeaveFirstPerson(arg1)
    arg1.needsReset = true
    if arg1.VRBlur then
        arg1.VRBlur.Visible = false
    end
    if arg1.characterOrientation then
        arg1.characterOrientation.Enabled = false
    end
    local any_GetHumanoid_result1_3 = arg1:GetHumanoid()
    if any_GetHumanoid_result1_3 then
        any_GetHumanoid_result1_3.AutoRotate = arg1.savedAutoRotate
    end
end
return setmetatable_result1_upvr
ModuleScript CameraInput CameraInput
KONSTANTERROR: After: K:0: attempt to index nil with 'debug_name'
K
K
K
K
K
K
K
ModuleScript BaseCamera BaseCamera
KONSTANTERROR: After: K:0: attempt to index nil with 'debug_name'
K
K
K
K
K
K
K
ModuleScript CameraUI CameraUI
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:38
-- Luau version 6, Types version 3
-- Time taken: 0.001271 seconds

local var1_upvw = false
local module_upvr = {}
function module_upvr.setCameraModeToastEnabled(arg1) -- Line 10
    --[[ Upvalues[2]:
        [1]: var1_upvw (read and write)
        [2]: module_upvr (readonly)
    ]]
    if not arg1 and not var1_upvw then
    else
        if not var1_upvw then
            var1_upvw = true
        end
        if not arg1 then
            module_upvr.setCameraModeToastOpen(false)
        end
    end
end
local StarterGui_upvr = game:GetService("StarterGui")
function module_upvr.setCameraModeToastOpen(arg1) -- Line 24
    --[[ Upvalues[2]:
        [1]: var1_upvw (read and write)
        [2]: StarterGui_upvr (readonly)
    ]]
    assert(var1_upvw)
    if arg1 then
        StarterGui_upvr:SetCore("SendNotification", {
            Title = "Camera Control Enabled";
            Text = "Right click to toggle";
            Duration = 3;
        })
    end
end
return module_upvr
ModuleScript VehicleCamera VehicleCamera
KONSTANTERROR: After: Unknown constant type 128
K
K
K
K
K
K
K
ModuleScript VehicleCameraCore VehicleCameraCore
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:40
-- Luau version 6, Types version 3
-- Time taken: 0.008655 seconds

local CameraUtils = require(script.Parent.Parent.CameraUtils)
local VehicleCameraConfig_upvr = require(script.Parent.VehicleCameraConfig)
local sanitizeAngle_upvr = CameraUtils.sanitizeAngle
local function _(arg1) -- Line 10, Named "getYaw"
    --[[ Upvalues[1]:
        [1]: sanitizeAngle_upvr (readonly)
    ]]
    local _, any_toEulerAnglesYXZ_result2 = arg1:toEulerAnglesYXZ()
    return sanitizeAngle_upvr(any_toEulerAnglesYXZ_result2)
end
local function _(arg1) -- Line 16, Named "getPitch"
    --[[ Upvalues[1]:
        [1]: sanitizeAngle_upvr (readonly)
    ]]
    return sanitizeAngle_upvr(arg1:toEulerAnglesYXZ())
end
local function _(arg1, arg2, arg3, arg4, arg5) -- Line 22, Named "stepSpringAxis"
    --[[ Upvalues[1]:
        [1]: sanitizeAngle_upvr (readonly)
    ]]
    local sanitizeAngle_upvr_result1 = sanitizeAngle_upvr(arg4 - arg3)
    local exponentiated = math.exp(-arg2 * arg1)
    return sanitizeAngle_upvr((sanitizeAngle_upvr_result1 * (1 + arg2 * arg1) + arg5 * arg1) * exponentiated + arg3), (arg5 * (1 - arg2 * arg1) - (sanitizeAngle_upvr_result1) * (arg2 * arg2 * arg1)) * exponentiated
end
local tbl_upvr_2 = {}
tbl_upvr_2.__index = tbl_upvr_2
local function new(arg1, arg2, arg3) -- Line 36
    --[[ Upvalues[1]:
        [1]: tbl_upvr_2 (readonly)
    ]]
    local module = {}
    module.fRising = arg1
    module.fFalling = arg2
    module.g = arg3
    module.p = arg3
    module.v = arg3 * 0
    return setmetatable(module, tbl_upvr_2)
end
tbl_upvr_2.new = new
local function step(arg1, arg2) -- Line 46
    local g = arg1.g
    local v = arg1.v
    local var12
    local function INLINED() -- Internal function, doesn't exist in bytecode
        var12 = arg1.fRising
        return var12
    end
    if 0 >= v or not INLINED() then
        var12 = arg1.fFalling
    end
    local var13 = (-math.pi*2) * var12
    local var14 = arg1.p - g
    var12 = math.exp(-var13 * arg2)
    local var15 = (var14 * (1 + var13 * arg2) + v * arg2) * var12 + g
    arg1.p = var15
    arg1.v = (v * (1 - var13 * arg2) - (var14) * (var13 * var13 * arg2)) * var12
    return var15
end
tbl_upvr_2.step = step
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
local function new(arg1) -- Line 72
    --[[ Upvalues[4]:
        [1]: sanitizeAngle_upvr (readonly)
        [2]: tbl_upvr_2 (readonly)
        [3]: VehicleCameraConfig_upvr (readonly)
        [4]: tbl_upvr (readonly)
    ]]
    local var17
    if typeof(arg1) ~= "CFrame" then
        var17 = false
    else
        var17 = true
    end
    assert(var17)
    var17 = {}
    local any_toEulerAnglesYXZ_result1_2, any_toEulerAnglesYXZ_result2_2 = arg1:toEulerAnglesYXZ()
    var17.yawG = sanitizeAngle_upvr(any_toEulerAnglesYXZ_result2_2)
    local _, any_toEulerAnglesYXZ_result2_4 = arg1:toEulerAnglesYXZ()
    var17.yawP = sanitizeAngle_upvr(any_toEulerAnglesYXZ_result2_4)
    var17.yawV = 0
    var17.pitchG = sanitizeAngle_upvr(arg1:toEulerAnglesYXZ())
    var17.pitchP = sanitizeAngle_upvr(arg1:toEulerAnglesYXZ())
    var17.pitchV = 0
    var17.fSpringYaw = tbl_upvr_2.new(VehicleCameraConfig_upvr.yawReponseDampingRising, VehicleCameraConfig_upvr.yawResponseDampingFalling, 0)
    var17.fSpringPitch = tbl_upvr_2.new(VehicleCameraConfig_upvr.pitchReponseDampingRising, VehicleCameraConfig_upvr.pitchResponseDampingFalling, 0)
    return setmetatable(var17, tbl_upvr)
end
tbl_upvr.new = new
function tbl_upvr.setGoal(arg1, arg2) -- Line 99
    --[[ Upvalues[1]:
        [1]: sanitizeAngle_upvr (readonly)
    ]]
    local var22
    if typeof(arg2) ~= "CFrame" then
        var22 = false
    else
        var22 = true
    end
    assert(var22)
    var22 = arg2:toEulerAnglesYXZ()
    local any_toEulerAnglesYXZ_result1, any_toEulerAnglesYXZ_result2_3 = arg2:toEulerAnglesYXZ()
    arg1.yawG = sanitizeAngle_upvr(any_toEulerAnglesYXZ_result2_3)
    any_toEulerAnglesYXZ_result1 = arg2:toEulerAnglesYXZ()
    arg1.pitchG = sanitizeAngle_upvr(any_toEulerAnglesYXZ_result1)
end
function tbl_upvr.getCFrame(arg1) -- Line 106
    return CFrame.fromEulerAnglesYXZ(arg1.pitchP, arg1.yawP, 0)
end
local mapClamp_upvr = CameraUtils.mapClamp
local map_upvr = CameraUtils.map
local function step(arg1, arg2, arg3, arg4, arg5) -- Line 110
    --[[ Upvalues[4]:
        [1]: mapClamp_upvr (readonly)
        [2]: map_upvr (readonly)
        [3]: VehicleCameraConfig_upvr (readonly)
        [4]: sanitizeAngle_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 26 start (CF ANALYSIS FAILED)
    local var27
    if typeof(arg2) ~= "number" then
        var27 = false
    else
        var27 = true
    end
    assert(var27)
    if typeof(arg4) ~= "number" then
        var27 = false
        -- KONSTANTWARNING: GOTO [22] #18
    end
    -- KONSTANTERROR: [0] 1. Error Block 26 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [21] 17. Error Block 29 start (CF ANALYSIS FAILED)
    var27 = true
    assert(var27)
    if typeof(arg3) ~= "number" then
        var27 = false
        -- KONSTANTWARNING: GOTO [35] #28
    end
    -- KONSTANTERROR: [21] 17. Error Block 29 end (CF ANALYSIS FAILED)
end
tbl_upvr.step = step
local module_2_upvr = {}
module_2_upvr.__index = module_2_upvr
function module_2_upvr.new(arg1) -- Line 167
    --[[ Upvalues[2]:
        [1]: tbl_upvr (readonly)
        [2]: module_2_upvr (readonly)
    ]]
    return setmetatable({
        vrs = tbl_upvr.new(arg1);
    }, module_2_upvr)
end
function module_2_upvr.step(arg1, arg2, arg3, arg4, arg5) -- Line 173
    return arg1.vrs:step(arg2, arg3, arg4, arg5)
end
function module_2_upvr.setTransform(arg1, arg2) -- Line 177
    arg1.vrs:setGoal(arg2)
end
return module_2_upvr
ModuleScript VehicleCameraConfig VehicleCameraConfig
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:41
-- Luau version 6, Types version 3
-- Time taken: 0.000685 seconds

return {
    pitchStiffness = 0.5;
    yawStiffness = 2.5;
    autocorrectDelay = 1;
    autocorrectMinCarSpeed = 16;
    autocorrectMaxCarSpeed = 32;
    autocorrectResponse = 0.5;
    cutoffMinAngularVelYaw = 60;
    cutoffMaxAngularVelYaw = 180;
    cutoffMinAngularVelPitch = 15;
    cutoffMaxAngularVelPitch = 60;
    pitchBaseAngle = 18;
    pitchDeadzoneAngle = 12;
    firstPersonResponseMul = 10;
    yawReponseDampingRising = 1;
    yawResponseDampingFalling = 3;
    pitchReponseDampingRising = 1;
    pitchResponseDampingFalling = 3;
    verticalCenterOffset = 0.33;
}
ModuleScript Poppercam Poppercam
KONSTANTERROR: After: K:0: attempt to index nil with 'debug_name'
K
K
K
K
K
K
K
ModuleScript MouseLockController MouseLockController
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:43
-- Luau version 6, Types version 3
-- Time taken: 0.008177 seconds

local Players_upvr = game:GetService("Players")
local ContextActionService_upvr = game:GetService("ContextActionService")
local UserInputService_upvr = game:GetService("UserInputService")
local GameSettings_upvr = UserSettings().GameSettings
local module_upvr_2 = require(script.Parent:WaitForChild("CameraUtils"))
local module_upvr = {}
module_upvr.__index = module_upvr
function module_upvr.new() -- Line 33
    --[[ Upvalues[4]:
        [1]: module_upvr (readonly)
        [2]: GameSettings_upvr (readonly)
        [3]: Players_upvr (readonly)
        [4]: UserInputService_upvr (readonly)
    ]]
    local setmetatable_result1_upvr = setmetatable({}, module_upvr)
    setmetatable_result1_upvr.isMouseLocked = false
    setmetatable_result1_upvr.savedMouseCursor = nil
    setmetatable_result1_upvr.boundKeys = {Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift}
    setmetatable_result1_upvr.mouseLockToggledEvent = Instance.new("BindableEvent")
    local BoundKeys = script:FindFirstChild("BoundKeys")
    if not BoundKeys or not BoundKeys:IsA("StringValue") then
        if BoundKeys then
            BoundKeys:Destroy()
        end
        local StringValue = Instance.new("StringValue")
        assert(StringValue, "")
        StringValue.Name = "BoundKeys"
        StringValue.Value = "LeftShift,RightShift"
        StringValue.Parent = script
    end
    if StringValue then
        StringValue.Changed:Connect(function(arg1) -- Line 58
            --[[ Upvalues[1]:
                [1]: setmetatable_result1_upvr (readonly)
            ]]
            setmetatable_result1_upvr:OnBoundKeysObjectChanged(arg1)
        end)
        setmetatable_result1_upvr:OnBoundKeysObjectChanged(StringValue.Value)
    end
    GameSettings_upvr.Changed:Connect(function(arg1) -- Line 65
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        if arg1 == "ControlMode" or arg1 == "ComputerMovementMode" then
            setmetatable_result1_upvr:UpdateMouseLockAvailability()
        end
    end)
    Players_upvr.LocalPlayer:GetPropertyChangedSignal("DevEnableMouseLock"):Connect(function() -- Line 72
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:UpdateMouseLockAvailability()
    end)
    Players_upvr.LocalPlayer:GetPropertyChangedSignal("DevComputerMovementMode"):Connect(function() -- Line 77
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:UpdateMouseLockAvailability()
    end)
    UserInputService_upvr:GetPropertyChangedSignal("PreferredInput"):Connect(function() -- Line 81
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        setmetatable_result1_upvr:UpdateMouseLockAvailability()
    end)
    setmetatable_result1_upvr:UpdateMouseLockAvailability()
    return setmetatable_result1_upvr
end
function module_upvr.GetIsMouseLocked(arg1) -- Line 90
    return arg1.isMouseLocked
end
function module_upvr.GetBindableToggleEvent(arg1) -- Line 94
    return arg1.mouseLockToggledEvent.Event
end
function module_upvr.GetMouseLockOffset(arg1) -- Line 98
    return Vector3.new(1.75, 0, 0)
end
function module_upvr.UpdateMouseLockAvailability(arg1) -- Line 102
    --[[ Upvalues[3]:
        [1]: Players_upvr (readonly)
        [2]: GameSettings_upvr (readonly)
        [3]: UserInputService_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 36 start (CF ANALYSIS FAILED)
    if Players_upvr.LocalPlayer.DevComputerMovementMode ~= Enum.DevComputerMovementMode.Scriptable then
    else
    end
    if GameSettings_upvr.ControlMode ~= Enum.ControlMode.MouseLockSwitch then
        -- KONSTANTWARNING: GOTO [25] #17
    end
    -- KONSTANTERROR: [0] 1. Error Block 36 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [24] 16. Error Block 39 start (CF ANALYSIS FAILED)
    if GameSettings_upvr.ComputerMovementMode ~= Enum.ComputerMovementMode.ClickToMove then
        -- KONSTANTWARNING: GOTO [34] #23
    end
    -- KONSTANTERROR: [24] 16. Error Block 39 end (CF ANALYSIS FAILED)
end
function module_upvr.OnBoundKeysObjectChanged(arg1, arg2) -- Line 115
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    arg1.boundKeys = {}
    local _, _, _ = string.gmatch(arg2, "[^%s,]+")
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [10] 8. Error Block 2 start (CF ANALYSIS FAILED)
    local _, pairs_result2, _ = pairs(Enum.KeyCode:GetEnumItems())
    -- KONSTANTERROR: [10] 8. Error Block 2 end (CF ANALYSIS FAILED)
end
function module_upvr.OnMouseLockToggled(arg1) -- Line 130
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    arg1.isMouseLocked = not arg1.isMouseLocked
    if arg1.isMouseLocked then
        local CursorImage = script:FindFirstChild("CursorImage")
        if CursorImage and CursorImage:IsA("StringValue") and CursorImage.Value then
            module_upvr_2.setMouseIconOverride(CursorImage.Value)
        else
            if CursorImage then
                CursorImage:Destroy()
            end
            local StringValue_2 = Instance.new("StringValue")
            assert(StringValue_2, "")
            StringValue_2.Name = "CursorImage"
            StringValue_2.Value = "rbxasset://textures/MouseLockedCursor.png"
            StringValue_2.Parent = script
            module_upvr_2.setMouseIconOverride("rbxasset://textures/MouseLockedCursor.png")
        end
    else
        module_upvr_2.restoreMouseIcon()
    end
    arg1.mouseLockToggledEvent:Fire()
end
function module_upvr.DoMouseLockSwitch(arg1, arg2, arg3, arg4) -- Line 155
    if arg3 == Enum.UserInputState.Begin then
        arg1:OnMouseLockToggled()
        return Enum.ContextActionResult.Sink
    end
    return Enum.ContextActionResult.Pass
end
local Value_upvr = Enum.ContextActionPriority.Medium.Value
function module_upvr.BindContextActions(arg1) -- Line 163
    --[[ Upvalues[2]:
        [1]: ContextActionService_upvr (readonly)
        [2]: Value_upvr (readonly)
    ]]
    ContextActionService_upvr:BindActionAtPriority("MouseLockSwitchAction", function(arg1_2, arg2, arg3) -- Line 164
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        return arg1:DoMouseLockSwitch(arg1_2, arg2, arg3)
    end, false, Value_upvr, unpack(arg1.boundKeys))
end
function module_upvr.UnbindContextActions(arg1) -- Line 169
    --[[ Upvalues[1]:
        [1]: ContextActionService_upvr (readonly)
    ]]
    ContextActionService_upvr:UnbindAction("MouseLockSwitchAction")
end
function module_upvr.IsMouseLocked(arg1) -- Line 173
    local enabled = arg1.enabled
    if enabled then
        enabled = arg1.isMouseLocked
    end
    return enabled
end
local any_getUserFlag_result1_upvr = require(script.Parent.Parent:WaitForChild("CommonUtils"):WaitForChild("FlagUtil")).getUserFlag("UserFixStuckShiftLock")
function module_upvr.EnableMouseLock(arg1, arg2) -- Line 177
    --[[ Upvalues[2]:
        [1]: module_upvr_2 (readonly)
        [2]: any_getUserFlag_result1_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [22] 16. Error Block 5 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [22] 16. Error Block 5 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [34] 24. Error Block 12 start (CF ANALYSIS FAILED)
    if arg1.isMouseLocked then
        arg1.mouseLockToggledEvent:Fire()
    end
    arg1.isMouseLocked = false
    -- KONSTANTERROR: [34] 24. Error Block 12 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [45] 31. Error Block 10 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [45] 31. Error Block 10 end (CF ANALYSIS FAILED)
end
return module_upvr
ModuleScript FlagUtil FlagUtil
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:45
-- Luau version 6, Types version 3
-- Time taken: 0.000928 seconds

return {
    getUserFlag = function(arg1) -- Line 11, Named "getUserFlag"
        local pcall_result1, pcall_result2 = pcall(function() -- Line 12
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            return UserSettings():IsUserFeatureEnabled(arg1)
        end)
        return pcall_result1 and pcall_result2
    end;
}
ModuleScript ConnectionUtil.spec ConnectionUtil.spec
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:46
-- Luau version 6, Types version 3
-- Time taken: 0.004232 seconds

local CorePackages = game:GetService("CorePackages")
local JestGlobals = require(CorePackages.Packages.Dev.JestGlobals)
local it_upvr = JestGlobals.it
local ConnectionUtil_upvr = require(script.Parent.ConnectionUtil)
local expect_upvr = JestGlobals.expect
local Signal_upvr = require(CorePackages.Workspace.Packages.AppCommonLib).Signal
JestGlobals.describe("ConnectionUtil", function() -- Line 13
    --[[ Upvalues[4]:
        [1]: it_upvr (readonly)
        [2]: ConnectionUtil_upvr (readonly)
        [3]: expect_upvr (readonly)
        [4]: Signal_upvr (readonly)
    ]]
    it_upvr("should instantiate", function() -- Line 14
        --[[ Upvalues[2]:
            [1]: ConnectionUtil_upvr (copied, readonly)
            [2]: expect_upvr (copied, readonly)
        ]]
        expect_upvr(ConnectionUtil_upvr.new()).never.toBeNil()
    end)
    it_upvr("should track a connection", function() -- Line 20
        --[[ Upvalues[3]:
            [1]: ConnectionUtil_upvr (copied, readonly)
            [2]: Signal_upvr (copied, readonly)
            [3]: expect_upvr (copied, readonly)
        ]]
        local any_new_result1_2 = Signal_upvr.new()
        local var11_upvw = ""
        ConnectionUtil_upvr.new():trackConnection("Signal", any_new_result1_2:Connect(function(arg1) -- Line 27
            --[[ Upvalues[1]:
                [1]: var11_upvw (read and write)
            ]]
            var11_upvw = arg1
        end))
        any_new_result1_2:fire("Testing")
        expect_upvr(var11_upvw).toBe("Testing")
    end)
    it_upvr("should disconnect from signal", function() -- Line 36
        --[[ Upvalues[3]:
            [1]: ConnectionUtil_upvr (copied, readonly)
            [2]: Signal_upvr (copied, readonly)
            [3]: expect_upvr (copied, readonly)
        ]]
        local any_new_result1_5 = ConnectionUtil_upvr.new()
        local any_new_result1_6 = Signal_upvr.new()
        local var16_upvw = ""
        any_new_result1_5:trackConnection("Signal", any_new_result1_6:Connect(function(arg1) -- Line 43
            --[[ Upvalues[1]:
                [1]: var16_upvw (read and write)
            ]]
            var16_upvw = arg1
        end))
        any_new_result1_5:disconnect("Signal")
        any_new_result1_6:fire("Testing")
        expect_upvr(var16_upvw).toBe("")
    end)
    it_upvr("should disconnect from all", function() -- Line 53
        --[[ Upvalues[3]:
            [1]: ConnectionUtil_upvr (copied, readonly)
            [2]: Signal_upvr (copied, readonly)
            [3]: expect_upvr (copied, readonly)
        ]]
        local any_new_result1_3 = ConnectionUtil_upvr.new()
        local any_new_result1_4 = Signal_upvr.new()
        local var21_upvw = ""
        local var22_upvw = ""
        local var23_upvw = ""
        any_new_result1_3:trackConnection("Signal", any_new_result1_4:Connect(function(arg1) -- Line 65
            --[[ Upvalues[1]:
                [1]: var21_upvw (read and write)
            ]]
            var21_upvw = arg1
        end))
        any_new_result1_3:trackConnection("Signal1", Signal_upvr.new():Connect(function(arg1) -- Line 71
            --[[ Upvalues[1]:
                [1]: var22_upvw (read and write)
            ]]
            var22_upvw = arg1
        end))
        any_new_result1_3:trackConnection("Signal2", Signal_upvr.new():Connect(function(arg1) -- Line 77
            --[[ Upvalues[1]:
                [1]: var23_upvw (read and write)
            ]]
            var23_upvw = arg1
        end))
        any_new_result1_3:disconnectAll()
        any_new_result1_4:fire("TestingPrimary")
        any_new_result1_4:fire("TestingSecondary")
        any_new_result1_4:fire("TestingTertiary")
        expect_upvr(var21_upvw).toBe("")
        expect_upvr(var22_upvw).toBe("")
        expect_upvr(var23_upvw).toBe("")
    end)
    it_upvr("should call manual disconnect", function() -- Line 92
        --[[ Upvalues[2]:
            [1]: ConnectionUtil_upvr (copied, readonly)
            [2]: expect_upvr (copied, readonly)
        ]]
        local any_new_result1 = ConnectionUtil_upvr.new()
        local var29_upvw = ""
        any_new_result1:trackBoundFunction("Manual", function() -- Line 96
            --[[ Upvalues[1]:
                [1]: var29_upvw (read and write)
            ]]
            var29_upvw = "Disconnected"
        end)
        any_new_result1:disconnect("Manual")
        expect_upvr(var29_upvw).toBe("Disconnected")
    end)
end)
ModuleScript CameraWrapper.spec CameraWrapper.spec
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:47
-- Luau version 6, Types version 3
-- Time taken: 0.001842 seconds

local CorePackages = game:GetService("CorePackages")
local JestGlobals = require(CorePackages.Packages.Dev.JestGlobals)
local it_upvr = JestGlobals.it
local CameraWrapper_upvr = require(script.Parent.CameraWrapper)
local expect_upvr = JestGlobals.expect
local waitForEvents_upvr = require(CorePackages.Workspace.Packages.TestUtils).DeferredLuaHelpers.waitForEvents
JestGlobals.describe("CameraWrapper", function() -- Line 12
    --[[ Upvalues[4]:
        [1]: it_upvr (readonly)
        [2]: CameraWrapper_upvr (readonly)
        [3]: expect_upvr (readonly)
        [4]: waitForEvents_upvr (readonly)
    ]]
    it_upvr("should instantiate", function() -- Line 13
        --[[ Upvalues[2]:
            [1]: CameraWrapper_upvr (copied, readonly)
            [2]: expect_upvr (copied, readonly)
        ]]
        expect_upvr(CameraWrapper_upvr.new()).never.toBeNil()
    end)
    it_upvr("should return updated camera", function() -- Line 19
        --[[ Upvalues[3]:
            [1]: CameraWrapper_upvr (copied, readonly)
            [2]: expect_upvr (copied, readonly)
            [3]: waitForEvents_upvr (copied, readonly)
        ]]
        local any_new_result1 = CameraWrapper_upvr.new()
        any_new_result1:Enable()
        local Camera = Instance.new("Camera")
        Camera.Parent = game.Workspace
        expect_upvr(any_new_result1:getCamera()).toBe(game.Workspace.CurrentCamera)
        expect_upvr(any_new_result1:getCamera()).never.toBe(Camera)
        game.Workspace.CurrentCamera = Camera
        waitForEvents_upvr()
        expect_upvr(any_new_result1:getCamera()).toBe(game.Workspace.CurrentCamera)
        expect_upvr(any_new_result1:getCamera()).toBe(Camera)
    end)
end)
ModuleScript CameraWrapper CameraWrapper
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:49
-- Luau version 6, Types version 3
-- Time taken: 0.002878 seconds

local module_upvr = {}
module_upvr.__index = module_upvr
local ConnectionUtil_upvr = require(script.Parent.ConnectionUtil)
function module_upvr.new() -- Line 39
    --[[ Upvalues[2]:
        [1]: ConnectionUtil_upvr (readonly)
        [2]: module_upvr (readonly)
    ]]
    return setmetatable({
        _camera = game.Workspace.CurrentCamera;
        _callbacks = {};
        _connectionUtil = ConnectionUtil_upvr.new();
        _enabled = false;
    }, module_upvr)
end
function module_upvr._connectCallbacks(arg1) -- Line 52
    arg1._camera = game.Workspace.CurrentCamera
    if not arg1._camera then
    else
        for var4, var5 in arg1._callbacks do
            arg1._connectionUtil:trackConnection(var4, arg1._camera:GetPropertyChangedSignal(var4):Connect(var5))
            var5()
        end
    end
end
function module_upvr.Enable(arg1) -- Line 65
    if arg1._enabled then
    else
        arg1._enabled = true
        arg1._cameraChangedConnection = game.Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function() -- Line 72
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            arg1:_connectCallbacks()
        end)
        arg1:_connectCallbacks()
    end
end
function module_upvr.Disable(arg1) -- Line 79
    if not arg1._enabled then
    else
        arg1._enabled = false
        if arg1._cameraChangedConnection then
            arg1._cameraChangedConnection:Disconnect()
            arg1._cameraChangedConnection = nil
        end
        arg1._connectionUtil:disconnectAll()
    end
end
function module_upvr.Connect(arg1, arg2, arg3) -- Line 94
    arg1._callbacks[arg2] = arg3
    if not arg1._camera then
    else
        arg1._connectionUtil:trackConnection(arg2, arg1._camera:GetPropertyChangedSignal(arg2):Connect(arg3))
    end
end
function module_upvr.Disconnect(arg1, arg2) -- Line 104
    arg1._connectionUtil:disconnect(arg2)
    arg1._callbacks[arg2] = nil
end
function module_upvr.getCamera(arg1) -- Line 110
    return arg1._camera
end
return module_upvr
ModuleScript ConnectionUtil ConnectionUtil
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:50
-- Luau version 6, Types version 3
-- Time taken: 0.001920 seconds

local module_upvr = {}
module_upvr.__index = module_upvr
function module_upvr.new() -- Line 25
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, module_upvr)
    setmetatable_result1._connections = {}
    return setmetatable_result1
end
function module_upvr.trackConnection(arg1, arg2, arg3) -- Line 33
    if arg1._connections[arg2] then
        arg1._connections[arg2]()
    end
    arg1._connections[arg2] = function() -- Line 38
        --[[ Upvalues[1]:
            [1]: arg3 (readonly)
        ]]
        arg3:Disconnect()
    end
end
function module_upvr.trackBoundFunction(arg1, arg2, arg3) -- Line 41
    if arg1._connections[arg2] then
        arg1._connections[arg2]()
    end
    arg1._connections[arg2] = arg3
end
function module_upvr.disconnect(arg1, arg2) -- Line 48
    if arg1._connections[arg2] then
        arg1._connections[arg2]()
        arg1._connections[arg2] = nil
    end
end
function module_upvr.disconnectAll(arg1) -- Line 55
    for _, v in pairs(arg1._connections) do
        v()
    end
    arg1._connections = {}
end
return module_upvr
ModuleScript CharacterUtil CharacterUtil
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:51
-- Luau version 6, Types version 3
-- Time taken: 0.004794 seconds

local Players_upvr = game:GetService("Players")
local module_upvr = {
    LOCAL_PLAYER = "LOCAL_PLAYER";
    ON_LOCAL_PLAYER = "ON_LOCAL_PLAYER";
    CHARACTER_ADDED = "CHARACTER_ADDED";
    ON_CHARACTER = "ON_CHARACTER";
    CHARACTER_CHILD_ADDED = "CHARACTER_CHILD_ADDED";
}
local module_upvr_2 = {
    _connectionUtil = require(script.Parent:WaitForChild("ConnectionUtil")).new();
    _boundEvents = {};
    getLocalPlayer = function() -- Line 53, Named "getLocalPlayer"
        --[[ Upvalues[1]:
            [1]: Players_upvr (readonly)
        ]]
        return Players_upvr.LocalPlayer
    end;
}
function module_upvr_2.onLocalPlayer(arg1) -- Line 57
    --[[ Upvalues[3]:
        [1]: module_upvr_2 (readonly)
        [2]: module_upvr (readonly)
        [3]: Players_upvr (readonly)
    ]]
    local any_getLocalPlayer_result1 = module_upvr_2.getLocalPlayer()
    if any_getLocalPlayer_result1 then
        arg1(any_getLocalPlayer_result1)
    end
    module_upvr_2._connectionUtil:trackConnection(module_upvr.LOCAL_PLAYER, Players_upvr:GetPropertyChangedSignal("LocalPlayer"):Connect(function() -- Line 66
        --[[ Upvalues[2]:
            [1]: module_upvr_2 (copied, readonly)
            [2]: module_upvr (copied, readonly)
        ]]
        local any_getLocalPlayer_result1_2 = module_upvr_2.getLocalPlayer()
        assert(any_getLocalPlayer_result1_2)
        module_upvr_2._getOrCreateBoundEvent(module_upvr.LOCAL_PLAYER):Fire(any_getLocalPlayer_result1_2)
    end))
    return module_upvr_2._getOrCreateBoundEvent(module_upvr.LOCAL_PLAYER).Event:Connect(arg1)
end
function module_upvr_2.getCharacter() -- Line 77
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    local any_getLocalPlayer_result1_3 = module_upvr_2.getLocalPlayer()
    if not any_getLocalPlayer_result1_3 then
        return nil
    end
    return any_getLocalPlayer_result1_3.Character
end
function module_upvr_2.onCharacter(arg1) -- Line 85
    --[[ Upvalues[2]:
        [1]: module_upvr_2 (readonly)
        [2]: module_upvr (readonly)
    ]]
    module_upvr_2._connectionUtil:trackConnection(module_upvr.ON_LOCAL_PLAYER, module_upvr_2.onLocalPlayer(function(arg1_2) -- Line 89
        --[[ Upvalues[3]:
            [1]: module_upvr_2 (copied, readonly)
            [2]: arg1 (readonly)
            [3]: module_upvr (copied, readonly)
        ]]
        local any_getCharacter_result1 = module_upvr_2.getCharacter()
        if any_getCharacter_result1 then
            arg1(any_getCharacter_result1)
        end
        module_upvr_2._connectionUtil:trackConnection(module_upvr.CHARACTER_ADDED, arg1_2.CharacterAdded:Connect(function(arg1_3) -- Line 98
            --[[ Upvalues[2]:
                [1]: module_upvr_2 (copied, readonly)
                [2]: module_upvr (copied, readonly)
            ]]
            assert(arg1_3)
            module_upvr_2._getOrCreateBoundEvent(module_upvr.CHARACTER_ADDED):Fire(arg1_3)
        end))
    end))
    return module_upvr_2._getOrCreateBoundEvent(module_upvr.CHARACTER_ADDED).Event:Connect(arg1)
end
function module_upvr_2.getChild(arg1, arg2) -- Line 110
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    local any_getCharacter_result1_2 = module_upvr_2.getCharacter()
    if not any_getCharacter_result1_2 then
        return nil
    end
    local SOME = any_getCharacter_result1_2:FindFirstChild(arg1)
    if SOME and SOME:IsA(arg2) then
        return SOME
    end
    return nil
end
function module_upvr_2.onChild(arg1, arg2, arg3) -- Line 122
    --[[ Upvalues[2]:
        [1]: module_upvr_2 (readonly)
        [2]: module_upvr (readonly)
    ]]
    module_upvr_2._connectionUtil:trackConnection(module_upvr.ON_CHARACTER, module_upvr_2.onCharacter(function(arg1_4) -- Line 126
        --[[ Upvalues[5]:
            [1]: module_upvr_2 (copied, readonly)
            [2]: arg1 (readonly)
            [3]: arg2 (readonly)
            [4]: arg3 (readonly)
            [5]: module_upvr (copied, readonly)
        ]]
        local any_getChild_result1 = module_upvr_2.getChild(arg1, arg2)
        if any_getChild_result1 then
            arg3(any_getChild_result1)
        end
        module_upvr_2._connectionUtil:trackConnection(module_upvr.CHARACTER_CHILD_ADDED, arg1_4.ChildAdded:Connect(function(arg1_5) -- Line 135
            --[[ Upvalues[4]:
                [1]: arg1 (copied, readonly)
                [2]: arg2 (copied, readonly)
                [3]: module_upvr_2 (copied, readonly)
                [4]: module_upvr (copied, readonly)
            ]]
            if arg1_5.Name == arg1 and arg1_5:IsA(arg2) then
                module_upvr_2._getOrCreateBoundEvent(module_upvr.CHARACTER_CHILD_ADDED..arg1..arg2):Fire(arg1_5)
            end
        end))
    end))
    return module_upvr_2._getOrCreateBoundEvent(module_upvr.CHARACTER_CHILD_ADDED..arg1..arg2).Event:Connect(arg3)
end
function module_upvr_2._getOrCreateBoundEvent(arg1) -- Line 149
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    if not module_upvr_2._boundEvents[arg1] then
        module_upvr_2._boundEvents[arg1] = Instance.new("BindableEvent")
    end
    return module_upvr_2._boundEvents[arg1]
end
return module_upvr_2
LocalScript RbxCharacterSounds RbxCharacterSounds
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:52
-- Luau version 6, Types version 3
-- Time taken: 0.009400 seconds

local Players_upvr = game:GetService("Players")
local function _(arg1) -- Line 12, Named "loadFlag"
    local pcall_result1_3, pcall_result2_3 = pcall(function() -- Line 13
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        return UserSettings():IsUserFeatureEnabled(arg1)
    end)
    return pcall_result1_3 and pcall_result2_3
end
local var13_upvr = "UserSoundsUseRelativeVelocity2"
local pcall_result1, pcall_result2_2 = pcall(function() -- Line 13
    --[[ Upvalues[1]:
        [1]: var13_upvr (readonly)
    ]]
    return UserSettings():IsUserFeatureEnabled(var13_upvr)
end)
local var18_upvr = "UserNewCharacterSoundsApi3"
function var13_upvr() -- Line 13
    --[[ Upvalues[1]:
        [1]: var18_upvr (readonly)
    ]]
    return UserSettings():IsUserFeatureEnabled(var18_upvr)
end
local pcall_result1_2, pcall_result2 = pcall(var13_upvr)
local var17_upvr = pcall_result1_2 and pcall_result2
pcall_result2 = pcall
local var19_upvr = "UserFixCharSoundsEmitters"
function var18_upvr() -- Line 13
    --[[ Upvalues[1]:
        [1]: var19_upvr (readonly)
    ]]
    return UserSettings():IsUserFeatureEnabled(var19_upvr)
end
pcall_result2 = pcall_result2(var18_upvr)
local pcall_result2_result1, var16_result2 = pcall_result2(var18_upvr)
pcall_result2_result1 = {}
local var22_upvr = pcall_result2_result1
var16_result2 = {}
local var23 = var16_result2
var19_upvr = "rbxasset://sounds/action_footsteps_plastic.mp3"
var23.SoundId = var19_upvr
var19_upvr = true
var23.Looped = var19_upvr
var22_upvr.Climbing = var23
var23 = {}
local var24 = var23
var19_upvr = "rbxasset://sounds/uuhhh.mp3"
var24.SoundId = var19_upvr
var22_upvr.Died = var24
var24 = {}
local var25 = var24
var19_upvr = "rbxasset://sounds/action_falling.ogg"
var25.SoundId = var19_upvr
var19_upvr = true
var25.Looped = var19_upvr
var22_upvr.FreeFalling = var25
var25 = {}
local var26 = var25
var19_upvr = "rbxasset://sounds/action_get_up.mp3"
var26.SoundId = var19_upvr
var22_upvr.GettingUp = var26
var26 = {}
local var27 = var26
var19_upvr = "rbxasset://sounds/action_jump.mp3"
var27.SoundId = var19_upvr
var22_upvr.Jumping = var27
var27 = {}
local var28 = var27
var19_upvr = "rbxasset://sounds/action_jump_land.mp3"
var28.SoundId = var19_upvr
var22_upvr.Landing = var28
var28 = {}
local var29 = var28
var19_upvr = "rbxasset://sounds/action_footsteps_plastic.mp3"
var29.SoundId = var19_upvr
var19_upvr = true
var29.Looped = var19_upvr
var19_upvr = 1.85
var29.Pitch = var19_upvr
var22_upvr.Running = var29
var29 = {}
local var30 = var29
var19_upvr = "rbxasset://sounds/impact_water.mp3"
var30.SoundId = var19_upvr
var22_upvr.Splash = var30
var30 = {}
local var31 = var30
var19_upvr = "rbxasset://sounds/action_swim.mp3"
var31.SoundId = var19_upvr
var19_upvr = true
var31.Looped = var19_upvr
var19_upvr = 1.6
var31.Pitch = var19_upvr
var22_upvr.Swimming = var31
var31 = {}
local var32_upvr = var31
var19_upvr = {}
local var33 = var19_upvr
var33.AssetId = "rbxasset://sounds/action_footsteps_plastic.mp3"
var33.Looping = true
var32_upvr.Climbing = var33
var33 = {}
local var34 = var33
var34.AssetId = "rbxasset://sounds/uuhhh.mp3"
var32_upvr.Died = var34
var34 = {}
local var35 = var34
var35.AssetId = "rbxasset://sounds/action_falling.ogg"
var35.Looping = true
var32_upvr.FreeFalling = var35
var35 = {}
local var36 = var35
var36.AssetId = "rbxasset://sounds/action_get_up.mp3"
var32_upvr.GettingUp = var36
var36 = {}
local var37 = var36
var37.AssetId = "rbxasset://sounds/action_jump.mp3"
var32_upvr.Jumping = var37
var37 = {}
local var38 = var37
var38.AssetId = "rbxasset://sounds/action_jump_land.mp3"
var32_upvr.Landing = var38
var38 = {}
local var39 = var38
var39.AssetId = "rbxasset://sounds/action_footsteps_plastic.mp3"
var39.Looping = true
var39.PlaybackSpeed = 1.85
var32_upvr.Running = var39
var39 = {}
local var40 = var39
var40.AssetId = "rbxasset://sounds/impact_water.mp3"
var32_upvr.Splash = var40
var40 = {}
local map = var40
map.AssetId = "rbxasset://sounds/action_swim.mp3"
map.Looping = true
map.PlaybackSpeed = 1.6
var32_upvr.Swimming = map
function map(arg1, arg2, arg3, arg4, arg5) -- Line 96
    return (arg1 - arg2) * (arg5 - arg4) / (arg3 - arg2) + arg4
end
local function getRelativeVelocity_upvr(arg1, arg2) -- Line 100, Named "getRelativeVelocity"
    if not arg1 then
        return arg2
    end
    local var42
    local function INLINED() -- Internal function, doesn't exist in bytecode
        var42 = arg1.GroundSensor
        return var42
    end
    if var42 and (not arg1.ActiveController:IsA("GroundController") or not INLINED()) then
        var42 = arg1.ActiveController:IsA("ClimbController")
        if var42 then
            var42 = arg1.ClimbSensor
        end
    end
    if var42 and var42.SensedPart then
        return arg2 - var42.SensedPart:GetVelocityAtPosition(arg1.RootPart.Position)
    end
    return arg2
end
local function _(arg1, arg2) -- Line 117, Named "playSound"
    --[[ Upvalues[1]:
        [1]: var17_upvr (readonly)
    ]]
    if not arg2 then
        arg1.TimePosition = 0
    end
    if var17_upvr and arg1:IsA("AudioPlayer") then
        arg1:Play()
    else
        arg1.Playing = true
    end
end
local function _(arg1) -- Line 128, Named "stopSound"
    --[[ Upvalues[1]:
        [1]: var17_upvr (readonly)
    ]]
    if var17_upvr and arg1:IsA("AudioPlayer") then
        arg1:Stop()
    else
        arg1.Playing = false
    end
end
local function _(arg1, arg2) -- Line 136, Named "playSoundIf"
    --[[ Upvalues[1]:
        [1]: var17_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [2] 3. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [2] 3. Error Block 2 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [19] 16. Error Block 8 start (CF ANALYSIS FAILED)
    arg1:Play()
    do
        return
    end
    -- KONSTANTERROR: [19] 16. Error Block 8 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [23] 19. Error Block 9 start (CF ANALYSIS FAILED)
    arg1.Playing = arg2
    -- KONSTANTERROR: [23] 19. Error Block 9 end (CF ANALYSIS FAILED)
end
local function _(arg1, arg2) -- Line 148, Named "setSoundLooped"
    --[[ Upvalues[1]:
        [1]: var17_upvr (readonly)
    ]]
    if var17_upvr and arg1:IsA("AudioPlayer") then
        arg1.Looping = arg2
    else
        arg1.Looped = arg2
    end
end
local function _(arg1) -- Line 156, Named "shallowCopy"
    local module = {}
    for i, v in pairs(arg1) do
        module[i] = v
    end
    return module
end
local var51_upvr = pcall_result1 and pcall_result2_2
local SoundService_upvr = game:GetService("SoundService")
local var53_upvr = pcall_result2_result1 and var16_result2
local RunService_upvr = game:GetService("RunService")
local any_new_result1_upvr = require(script:WaitForChild("AtomicBinding")).new({
    humanoid = "Humanoid";
    rootPart = "HumanoidRootPart";
}, function(arg1) -- Line 164, Named "initializeSoundSystem"
    --[[ Upvalues[9]:
        [1]: var51_upvr (readonly)
        [2]: var17_upvr (readonly)
        [3]: SoundService_upvr (readonly)
        [4]: var53_upvr (readonly)
        [5]: Players_upvr (readonly)
        [6]: var32_upvr (readonly)
        [7]: var22_upvr (readonly)
        [8]: getRelativeVelocity_upvr (readonly)
        [9]: RunService_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [8] 7. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [8] 7. Error Block 2 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [15] 12. Error Block 3 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [15] 12. Error Block 3 end (CF ANALYSIS FAILED)
end)
local tbl_upvr = {}
local function characterAdded_upvr(arg1) -- Line 410, Named "characterAdded"
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr (readonly)
    ]]
    any_new_result1_upvr:bindRoot(arg1)
end
local function characterRemoving_upvr(arg1) -- Line 414, Named "characterRemoving"
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr (readonly)
    ]]
    any_new_result1_upvr:unbindRoot(arg1)
end
local function playerAdded(arg1) -- Line 418
    --[[ Upvalues[4]:
        [1]: tbl_upvr (readonly)
        [2]: any_new_result1_upvr (readonly)
        [3]: characterAdded_upvr (readonly)
        [4]: characterRemoving_upvr (readonly)
    ]]
    local var58 = tbl_upvr[arg1]
    if not var58 then
        var58 = {}
        tbl_upvr[arg1] = var58
    end
    if arg1.Character then
        any_new_result1_upvr:bindRoot(arg1.Character)
    end
    table.insert(var58, arg1.CharacterAdded:Connect(characterAdded_upvr))
    table.insert(var58, arg1.CharacterRemoving:Connect(characterRemoving_upvr))
end
for _, v_3 in ipairs(Players_upvr:GetPlayers()) do
    task.spawn(playerAdded, v_3)
end
Players_upvr.PlayerAdded:Connect(playerAdded)
Players_upvr.PlayerRemoving:Connect(function(arg1) -- Line 432, Named "playerRemoving"
    --[[ Upvalues[2]:
        [1]: tbl_upvr (readonly)
        [2]: any_new_result1_upvr (readonly)
    ]]
    local var61 = tbl_upvr[arg1]
    if var61 then
        for _, v_2 in ipairs(var61) do
            v_2:Disconnect()
        end
        tbl_upvr[arg1] = nil
    end
    if arg1.Character then
        any_new_result1_upvr:unbindRoot(arg1.Character)
    end
end)
ModuleScript AtomicBinding AtomicBinding
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:53
-- Luau version 6, Types version 3
-- Time taken: 0.010839 seconds

local function parsePath_upvr(arg1) -- Line 4, Named "parsePath"
    local string_split_result1 = string.split(arg1, '/')
    for i = #string_split_result1, 1, -1 do
        if string_split_result1[i] == "" then
            table.remove(string_split_result1, i)
        end
    end
    return string_split_result1
end
local function _(arg1, arg2) -- Line 14, Named "isManifestResolved"
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    -- KONSTANTERROR: [0] 1. Error Block 15 start (CF ANALYSIS FAILED)
    local var7 = 0
    for _ in pairs(arg1) do
        var7 += 1
    end
    if var7 > arg2 then
        -- KONSTANTWARNING: GOTO [13] #11
    end
    -- KONSTANTERROR: [0] 1. Error Block 15 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [12] 10. Error Block 18 start (CF ANALYSIS FAILED)
    assert(true, var7)
    if var7 ~= arg2 then
    else
    end
    do
        return true
    end
    -- KONSTANTERROR: [12] 10. Error Block 18 end (CF ANALYSIS FAILED)
end
local function unbindNodeDescend_upvr(arg1, arg2) -- Line 24, Named "unbindNodeDescend"
    --[[ Upvalues[1]:
        [1]: unbindNodeDescend_upvr (readonly)
    ]]
    if arg1.instance == nil then
    else
        arg1.instance = nil
        local connections = arg1.connections
        if connections then
            for _, v_7 in ipairs(connections) do
                v_7:Disconnect()
            end
            table.clear(connections)
        end
        if arg2 and arg1.alias then
            arg2[arg1.alias] = nil
        end
        local children = arg1.children
        if children then
            for _, v_8 in pairs(children) do
                unbindNodeDescend_upvr(v_8, arg2)
            end
        end
    end
end
local module_upvr = {}
module_upvr.__index = module_upvr
function module_upvr.new(arg1, arg2) -- Line 54
    --[[ Upvalues[2]:
        [1]: parsePath_upvr (readonly)
        [2]: module_upvr (readonly)
    ]]
    local tbl = {}
    local var29 = 1
    for i_3, v in pairs(arg1) do
        tbl[i_3] = parsePath_upvr(v)
        var29 += 1
    end
    local module = {}
    module._boundFn = arg2
    module._parsedManifest = tbl
    module._manifestSizeTarget = var29
    module._dtorMap = {}
    module._connections = {}
    module._rootInstToRootNode = {}
    module._rootInstToManifest = {}
    return setmetatable(module, module_upvr)
end
function module_upvr._startBoundFn(arg1, arg2, arg3) -- Line 80
    local _dtorMap = arg1._dtorMap
    local var35 = _dtorMap[arg2]
    if var35 then
        var35()
        _dtorMap[arg2] = nil
    end
    local any__boundFn_result1 = arg1._boundFn(arg3)
    if any__boundFn_result1 then
        _dtorMap[arg2] = any__boundFn_result1
    end
end
function module_upvr._stopBoundFn(arg1, arg2) -- Line 96
    local _dtorMap_2 = arg1._dtorMap
    local var38 = _dtorMap_2[arg2]
    if var38 then
        var38()
        _dtorMap_2[arg2] = nil
    end
end
function module_upvr.bindRoot(arg1, arg2) -- Line 106
    --[[ Upvalues[1]:
        [1]: unbindNodeDescend_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    debug.profilebegin("AtomicBinding:BindRoot")
    local _parsedManifest = arg1._parsedManifest
    local _rootInstToManifest_2 = arg1._rootInstToManifest
    local var57
    if _rootInstToManifest_2[arg2] ~= nil then
        var57 = false
    else
        var57 = true
    end
    assert(var57)
    local tbl_upvr = {}
    _rootInstToManifest_2[arg2] = tbl_upvr
    var57 = debug.profilebegin
    var57("BuildTree")
    var57 = {}
    var57.alias = "root"
    var57.instance = arg2
    if next(_parsedManifest) then
        var57.children = {}
        var57.connections = {}
    end
    arg1._rootInstToRootNode[arg2] = var57
    for i_4, v_2 in pairs(_parsedManifest) do
        local var62 = var57
        for i_5, v_3 in ipairs(v_2) do
            local var66
            if i_5 ~= #v_2 then
                var66 = false
            else
                var66 = true
            end
            if not var62.children[v_3] then
                local tbl_2 = {}
                local var68
            end
            if var66 then
                var68 = tbl_2.alias
                if var68 ~= nil then
                    var68 = error
                    var68("Multiple aliases assigned to one instance")
                end
                tbl_2.alias = i_4
            else
                var68 = tbl_2.children
                if not var68 then
                    var68 = {}
                end
                tbl_2.children = var68
                var68 = tbl_2.connections
                if not var68 then
                    var68 = {}
                end
                tbl_2.connections = var68
            end
            var62.children[v_3] = tbl_2
        end
    end
    debug.profileend()
    local _manifestSizeTarget_upvr = arg1._manifestSizeTarget
    local function processNode_upvr(arg1_2) -- Line 160, Named "processNode"
        --[[ Upvalues[6]:
            [1]: tbl_upvr (readonly)
            [2]: processNode_upvr (readonly)
            [3]: arg1 (readonly)
            [4]: arg2 (readonly)
            [5]: unbindNodeDescend_upvr (copied, readonly)
            [6]: _manifestSizeTarget_upvr (readonly)
        ]]
        -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
        local alias = arg1_2.alias
        -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [12] 9. Error Block 2 start (CF ANALYSIS FAILED)
        tbl_upvr[alias] = assert(arg1_2.instance)
        -- KONSTANTERROR: [12] 9. Error Block 2 end (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [14] 11. Error Block 3 start (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [14] 11. Error Block 3 end (CF ANALYSIS FAILED)
    end
    debug.profilebegin("ResolveTree")
    processNode_upvr(var57)
    debug.profileend()
    debug.profileend()
end
function module_upvr.unbindRoot(arg1, arg2) -- Line 236
    --[[ Upvalues[1]:
        [1]: unbindNodeDescend_upvr (readonly)
    ]]
    local _rootInstToRootNode = arg1._rootInstToRootNode
    local _rootInstToManifest = arg1._rootInstToManifest
    arg1:_stopBoundFn(arg2)
    local var73 = _rootInstToRootNode[arg2]
    if var73 then
        unbindNodeDescend_upvr(var73, assert(_rootInstToManifest[arg2]))
        _rootInstToRootNode[arg2] = nil
    end
    _rootInstToManifest[arg2] = nil
end
function module_upvr.destroy(arg1) -- Line 252
    --[[ Upvalues[1]:
        [1]: unbindNodeDescend_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    debug.profilebegin("AtomicBinding:destroy")
    for _, v_4 in pairs(arg1._dtorMap) do
        v_4:destroy()
    end
    table.clear(arg1._dtorMap)
    for _, v_5 in ipairs(arg1._connections) do
        v_5:Disconnect()
    end
    table.clear(arg1._connections)
    for i_8, v_6 in pairs(arg1._rootInstToRootNode) do
        unbindNodeDescend_upvr(v_6, assert(arg1._rootInstToManifest[i_8]))
        local _
    end
    table.clear(arg1._rootInstToManifest)
    table.clear(arg1._rootInstToRootNode)
    debug.profileend()
end
return module_upvr
LocalScript ChatScript ChatScript
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:55
-- Luau version 6, Types version 3
-- Time taken: 0.011718 seconds

local module_upvr = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"))
local StarterGui_upvr = game:GetService("StarterGui")
function SetCoreGuiChatConnections(arg1) -- Line 107
    --[[ Upvalues[1]:
        [1]: StarterGui_upvr (readonly)
    ]]
    local const_number = 0
    while const_number < 10 do
        local pcall_result1, pcall_result2 = pcall(function() -- Line 111
            --[[ Upvalues[2]:
                [1]: StarterGui_upvr (copied, readonly)
                [2]: arg1 (readonly)
            ]]
            StarterGui_upvr:SetCore("CoreGuiChatConnections", arg1)
        end)
        if pcall_result1 then break end
        if not pcall_result1 and const_number + 1 == 10 then
            error("Error calling SetCore CoreGuiChatConnections: "..pcall_result2)
        end
        wait()
    end
end
function checkBothChatTypesDisabled() -- Line 122
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    if module_upvr.BubbleChatEnabled ~= nil and module_upvr.ClassicChatEnabled ~= nil then
        local BubbleChatEnabled = module_upvr.BubbleChatEnabled
        if not BubbleChatEnabled then
            BubbleChatEnabled = module_upvr.ClassicChatEnabled
        end
        return not BubbleChatEnabled
    end
    return false
end
if not game:GetService("GuiService"):IsTenFootInterface() then
    if not checkBothChatTypesDisabled() then
        (function() -- Line 16, Named "DoEverything"
            --[[ Upvalues[1]:
                [1]: module_upvr (readonly)
            ]]
            local module_upvr_2 = require(script:WaitForChild("ChatMain"))
            local tbl_upvr = {
                ChatWindow = {};
                SetCore = {};
                GetCore = {};
            }
            tbl_upvr.ChatWindow.ChatTypes = {}
            tbl_upvr.ChatWindow.ChatTypes.BubbleChatEnabled = module_upvr.BubbleChatEnabled
            tbl_upvr.ChatWindow.ChatTypes.ClassicChatEnabled = module_upvr.ClassicChatEnabled
            local function _(arg1) -- Line 29, Named "ConnectEvent"
                --[[ Upvalues[2]:
                    [1]: tbl_upvr (readonly)
                    [2]: module_upvr_2 (readonly)
                ]]
                local BindableEvent = Instance.new("BindableEvent")
                BindableEvent.Name = arg1
                tbl_upvr.ChatWindow[arg1] = BindableEvent
                BindableEvent.Event:connect(function(...) -- Line 34
                    --[[ Upvalues[2]:
                        [1]: module_upvr_2 (copied, readonly)
                        [2]: arg1 (readonly)
                    ]]
                    module_upvr_2[arg1](module_upvr_2, ...)
                end)
            end
            local function _(arg1) -- Line 37, Named "ConnectFunction"
                --[[ Upvalues[2]:
                    [1]: tbl_upvr (readonly)
                    [2]: module_upvr_2 (readonly)
                ]]
                local BindableFunction_4 = Instance.new("BindableFunction")
                BindableFunction_4.Name = arg1
                tbl_upvr.ChatWindow[arg1] = BindableFunction_4
                function BindableFunction_4.OnInvoke(...) -- Line 42
                    --[[ Upvalues[2]:
                        [1]: module_upvr_2 (copied, readonly)
                        [2]: arg1 (readonly)
                    ]]
                    return module_upvr_2[arg1](module_upvr_2, ...)
                end
            end
            local function _(arg1) -- Line 45, Named "ReverseConnectEvent"
                --[[ Upvalues[2]:
                    [1]: tbl_upvr (readonly)
                    [2]: module_upvr_2 (readonly)
                ]]
                local BindableEvent_9_upvr = Instance.new("BindableEvent")
                BindableEvent_9_upvr.Name = arg1
                tbl_upvr.ChatWindow[arg1] = BindableEvent_9_upvr
                module_upvr_2[arg1]:connect(function(...) -- Line 50
                    --[[ Upvalues[1]:
                        [1]: BindableEvent_9_upvr (readonly)
                    ]]
                    BindableEvent_9_upvr:Fire(...)
                end)
            end
            local function _(arg1) -- Line 53, Named "ConnectSignal"
                --[[ Upvalues[2]:
                    [1]: tbl_upvr (readonly)
                    [2]: module_upvr_2 (readonly)
                ]]
                local BindableEvent_2 = Instance.new("BindableEvent")
                BindableEvent_2.Name = arg1
                tbl_upvr.ChatWindow[arg1] = BindableEvent_2
                BindableEvent_2.Event:connect(function(...) -- Line 58
                    --[[ Upvalues[2]:
                        [1]: module_upvr_2 (copied, readonly)
                        [2]: arg1 (readonly)
                    ]]
                    module_upvr_2[arg1]:fire(...)
                end)
            end
            local function _(arg1) -- Line 61, Named "ConnectSetCore"
                --[[ Upvalues[2]:
                    [1]: tbl_upvr (readonly)
                    [2]: module_upvr_2 (readonly)
                ]]
                local BindableEvent_8 = Instance.new("BindableEvent")
                BindableEvent_8.Name = arg1
                tbl_upvr.SetCore[arg1] = BindableEvent_8
                BindableEvent_8.Event:connect(function(...) -- Line 66
                    --[[ Upvalues[2]:
                        [1]: module_upvr_2 (copied, readonly)
                        [2]: arg1 (readonly)
                    ]]
                    module_upvr_2[arg1.."Event"]:fire(...)
                end)
            end
            local function _(arg1) -- Line 69, Named "ConnectGetCore"
                --[[ Upvalues[2]:
                    [1]: tbl_upvr (readonly)
                    [2]: module_upvr_2 (readonly)
                ]]
                local BindableFunction_3 = Instance.new("BindableFunction")
                BindableFunction_3.Name = arg1
                tbl_upvr.GetCore[arg1] = BindableFunction_3
                function BindableFunction_3.OnInvoke(...) -- Line 74
                    --[[ Upvalues[2]:
                        [1]: module_upvr_2 (copied, readonly)
                        [2]: arg1 (readonly)
                    ]]
                    return module_upvr_2['f'..arg1](...)
                end
            end
            local BindableEvent_7 = Instance.new("BindableEvent")
            BindableEvent_7.Name = "ToggleVisibility"
            tbl_upvr.ChatWindow.ToggleVisibility = BindableEvent_7
            local var18_upvr = "ToggleVisibility"
            BindableEvent_7.Event:connect(function(...) -- Line 34
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr](module_upvr_2, ...)
            end)
            local BindableEvent_5 = Instance.new("BindableEvent")
            BindableEvent_5.Name = "SetVisible"
            tbl_upvr.ChatWindow.SetVisible = BindableEvent_5
            var18_upvr = "SetVisible"
            BindableEvent_5.Event:connect(function(...) -- Line 34
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr](module_upvr_2, ...)
            end)
            local BindableEvent_6 = Instance.new("BindableEvent")
            BindableEvent_6.Name = "FocusChatBar"
            tbl_upvr.ChatWindow.FocusChatBar = BindableEvent_6
            var18_upvr = "FocusChatBar"
            BindableEvent_6.Event:connect(function(...) -- Line 34
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr](module_upvr_2, ...)
            end)
            local BindableEvent_4 = Instance.new("BindableEvent")
            BindableEvent_4.Name = "EnterWhisperState"
            tbl_upvr.ChatWindow.EnterWhisperState = BindableEvent_4
            var18_upvr = "EnterWhisperState"
            BindableEvent_4.Event:connect(function(...) -- Line 34
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr](module_upvr_2, ...)
            end)
            local BindableFunction_2 = Instance.new("BindableFunction")
            BindableFunction_2.Name = "GetVisibility"
            tbl_upvr.ChatWindow.GetVisibility = BindableFunction_2
            local var27_upvr = "GetVisibility"
            function BindableFunction_2.OnInvoke(...) -- Line 42
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var27_upvr (readonly)
                ]]
                return module_upvr_2[var27_upvr](module_upvr_2, ...)
            end
            local BindableFunction = Instance.new("BindableFunction")
            BindableFunction.Name = "GetMessageCount"
            tbl_upvr.ChatWindow.GetMessageCount = BindableFunction
            var27_upvr = "GetMessageCount"
            function BindableFunction.OnInvoke(...) -- Line 42
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var27_upvr (readonly)
                ]]
                return module_upvr_2[var27_upvr](module_upvr_2, ...)
            end
            local BindableEvent_10 = Instance.new("BindableEvent")
            BindableEvent_10.Name = "TopbarEnabledChanged"
            tbl_upvr.ChatWindow.TopbarEnabledChanged = BindableEvent_10
            var18_upvr = "TopbarEnabledChanged"
            BindableEvent_10.Event:connect(function(...) -- Line 34
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr](module_upvr_2, ...)
            end)
            local BindableFunction_5 = Instance.new("BindableFunction")
            BindableFunction_5.Name = "IsFocused"
            tbl_upvr.ChatWindow.IsFocused = BindableFunction_5
            var27_upvr = "IsFocused"
            function BindableFunction_5.OnInvoke(...) -- Line 42
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var27_upvr (readonly)
                ]]
                return module_upvr_2[var27_upvr](module_upvr_2, ...)
            end
            local BindableEvent_3_upvr = Instance.new("BindableEvent")
            BindableEvent_3_upvr.Name = "ChatBarFocusChanged"
            tbl_upvr.ChatWindow.ChatBarFocusChanged = BindableEvent_3_upvr
            module_upvr_2.ChatBarFocusChanged:connect(function(...) -- Line 50
                --[[ Upvalues[1]:
                    [1]: BindableEvent_3_upvr (readonly)
                ]]
                BindableEvent_3_upvr:Fire(...)
            end)
            BindableEvent_3_upvr = Instance.new("BindableEvent")
            local var36_upvr = BindableEvent_3_upvr
            var36_upvr.Name = "VisibilityStateChanged"
            tbl_upvr.ChatWindow.VisibilityStateChanged = var36_upvr
            module_upvr_2.VisibilityStateChanged:connect(function(...) -- Line 50
                --[[ Upvalues[1]:
                    [1]: var36_upvr (readonly)
                ]]
                var36_upvr:Fire(...)
            end)
            var36_upvr = Instance.new("BindableEvent")
            local var38_upvr = var36_upvr
            var38_upvr.Name = "MessagesChanged"
            tbl_upvr.ChatWindow.MessagesChanged = var38_upvr
            module_upvr_2.MessagesChanged:connect(function(...) -- Line 50
                --[[ Upvalues[1]:
                    [1]: var38_upvr (readonly)
                ]]
                var38_upvr:Fire(...)
            end)
            var38_upvr = Instance.new("BindableEvent")
            local var40_upvr = var38_upvr
            var40_upvr.Name = "MessagePosted"
            tbl_upvr.ChatWindow.MessagePosted = var40_upvr
            module_upvr_2.MessagePosted:connect(function(...) -- Line 50
                --[[ Upvalues[1]:
                    [1]: var40_upvr (readonly)
                ]]
                var40_upvr:Fire(...)
            end)
            var40_upvr = Instance.new("BindableEvent")
            local var42 = var40_upvr
            var42.Name = "CoreGuiEnabled"
            tbl_upvr.ChatWindow.CoreGuiEnabled = var42
            var18_upvr = "CoreGuiEnabled"
            var42.Event:connect(function(...) -- Line 58
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr]:fire(...)
            end)
            var42 = Instance.new("BindableEvent")
            local var44 = var42
            var44.Name = "ChatMakeSystemMessage"
            tbl_upvr.SetCore.ChatMakeSystemMessage = var44
            var18_upvr = "ChatMakeSystemMessage"
            var44.Event:connect(function(...) -- Line 66
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr.."Event"]:fire(...)
            end)
            var44 = Instance.new("BindableEvent")
            local var46 = var44
            var46.Name = "ChatWindowPosition"
            tbl_upvr.SetCore.ChatWindowPosition = var46
            var18_upvr = "ChatWindowPosition"
            var46.Event:connect(function(...) -- Line 66
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr.."Event"]:fire(...)
            end)
            var46 = Instance.new("BindableEvent")
            local var48 = var46
            var48.Name = "ChatWindowSize"
            tbl_upvr.SetCore.ChatWindowSize = var48
            var18_upvr = "ChatWindowSize"
            var48.Event:connect(function(...) -- Line 66
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr.."Event"]:fire(...)
            end)
            var48 = Instance.new("BindableFunction")
            local var50 = var48
            var50.Name = "ChatWindowPosition"
            tbl_upvr.GetCore.ChatWindowPosition = var50
            var27_upvr = "ChatWindowPosition"
            function var50.OnInvoke(...) -- Line 74
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var27_upvr (readonly)
                ]]
                return module_upvr_2['f'..var27_upvr](...)
            end
            var50 = Instance.new("BindableFunction")
            local var52 = var50
            var52.Name = "ChatWindowSize"
            tbl_upvr.GetCore.ChatWindowSize = var52
            var27_upvr = "ChatWindowSize"
            function var52.OnInvoke(...) -- Line 74
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var27_upvr (readonly)
                ]]
                return module_upvr_2['f'..var27_upvr](...)
            end
            var52 = Instance.new("BindableEvent")
            local var54 = var52
            var54.Name = "ChatBarDisabled"
            tbl_upvr.SetCore.ChatBarDisabled = var54
            var18_upvr = "ChatBarDisabled"
            var54.Event:connect(function(...) -- Line 66
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr.."Event"]:fire(...)
            end)
            var54 = Instance.new("BindableFunction")
            local var56 = var54
            var56.Name = "ChatBarDisabled"
            tbl_upvr.GetCore.ChatBarDisabled = var56
            var27_upvr = "ChatBarDisabled"
            function var56.OnInvoke(...) -- Line 74
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var27_upvr (readonly)
                ]]
                return module_upvr_2['f'..var27_upvr](...)
            end
            var56 = Instance.new("BindableEvent")
            local var58 = var56
            var58.Name = "SpecialKeyPressed"
            tbl_upvr.ChatWindow.SpecialKeyPressed = var58
            var18_upvr = "SpecialKeyPressed"
            var58.Event:connect(function(...) -- Line 34
                --[[ Upvalues[2]:
                    [1]: module_upvr_2 (readonly)
                    [2]: var18_upvr (readonly)
                ]]
                module_upvr_2[var18_upvr](module_upvr_2, ...)
            end)
            var58 = SetCoreGuiChatConnections
            var58(tbl_upvr)
        end)()
    else
        local tbl = {
            ChatWindow = {};
        }
        tbl.ChatWindow.ChatTypes = {}
        tbl.ChatWindow.ChatTypes.BubbleChatEnabled = false
        tbl.ChatWindow.ChatTypes.ClassicChatEnabled = false
        SetCoreGuiChatConnections(tbl)
    end
end
game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents").GetInitDataRequest:InvokeServer()
ModuleScript ChatMain ChatMain
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:56
-- Luau version 6, Types version 3
-- Time taken: 0.115669 seconds

-- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
local module_6_upvr = {
    Visible = nil;
    IsCoreGuiEnabled = nil;
    TopbarEnabled = nil;
    VisibilityStateChanged = nil;
}
local var239 = false
local pcall_result1_2, pcall_result2_6 = pcall(function() -- Line 22
    return UserSettings():IsUserFeatureEnabled("UserHandleFriendJoinNotifierOnClient")
end)
local var243
if pcall_result1_2 then
    var239 = pcall_result2_6
end
local pcall_result1_3, pcall_result2_9 = pcall(function() -- Line 32
    return UserSettings():IsUserFeatureEnabled("UserIsChatTranslationEnabled2")
end)
local var247_upvw = pcall_result1_3 and pcall_result2_9
local pcall_result1_6, pcall_result2 = pcall(function() -- Line 39
    return UserSettings():IsUserFeatureEnabled("UserAddBetterConsoleCheckForLegacyChat")
end)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Chat_upvr = game:GetService("Chat")
local StarterGui_upvr_2 = game:GetService("StarterGui")
local DefaultChatSystemChatEvents_upvr = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local DefaultChatSystemChatEvents_2 = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local ClientChatModules = Chat_upvr:WaitForChild("ClientChatModules")
local module_7_upvr = require(ClientChatModules:WaitForChild("ChatConstants"))
local module_4_upvr = require(ClientChatModules:WaitForChild("ChatSettings"))
local var259_upvw
pcall(function() -- Line 63
    --[[ Upvalues[1]:
        [1]: var259_upvw (read and write)
    ]]
    var259_upvw = require(game:GetService("Chat").ClientChatModules.ChatLocalization)
end)
if var259_upvw == nil then
    var259_upvw = {}
    function var259_upvw.Get(arg1, arg2, arg3) -- Line 64
        return arg3
    end
end
if var247_upvw then
    local ChatTranslationEnabled_upvw = script:FindFirstChild("ChatTranslationEnabled")
    if ChatTranslationEnabled_upvw == nil then
        local var263_upvw
        var263_upvw = script.ChildAdded:Connect(function(arg1) -- Line 71
            --[[ Upvalues[2]:
                [1]: ChatTranslationEnabled_upvw (read and write)
                [2]: var263_upvw (read and write)
            ]]
            if arg1.Name == "ChatTranslationEnabled" then
                ChatTranslationEnabled_upvw = arg1
                var263_upvw:Disconnect()
            end
        end)
    end
end
local var264_upvw = 10
local tbl_8_upvr = {
    OnNewMessage = "RemoteEvent";
    OnMessageDoneFiltering = "RemoteEvent";
    OnNewSystemMessage = "RemoteEvent";
    OnChannelJoined = "RemoteEvent";
    OnChannelLeft = "RemoteEvent";
    OnMuted = "RemoteEvent";
    OnUnmuted = "RemoteEvent";
    OnMainChannelSet = "RemoteEvent";
    SayMessageRequest = "RemoteEvent";
    GetInitDataRequest = "RemoteFunction";
}
local tbl_19_upvr = {}
local BindableEvent_upvr_5 = Instance.new("BindableEvent")
function TryRemoveChildWithVerifyingIsCorrectType(arg1) -- Line 104
    --[[ Upvalues[3]:
        [1]: tbl_8_upvr (readonly)
        [2]: tbl_19_upvr (readonly)
        [3]: var264_upvw (read and write)
    ]]
    if tbl_8_upvr[arg1.Name] then
        if arg1:IsA(tbl_8_upvr[arg1.Name]) then
            tbl_8_upvr[arg1.Name] = nil
            tbl_19_upvr[arg1.Name] = arg1
            var264_upvw -= 1
        end
    end
end
for _, v in pairs(DefaultChatSystemChatEvents_2:GetChildren()) do
    TryRemoveChildWithVerifyingIsCorrectType(v)
end
if 0 < var264_upvw then
    BindableEvent_upvr_5.Event:wait()
    DefaultChatSystemChatEvents_2.ChildAdded:connect(function(arg1) -- Line 117
        --[[ Upvalues[2]:
            [1]: var264_upvw (read and write)
            [2]: BindableEvent_upvr_5 (readonly)
        ]]
        TryRemoveChildWithVerifyingIsCorrectType(arg1)
        if var264_upvw < 1 then
            BindableEvent_upvr_5:Fire()
        end
    end):disconnect()
    BindableEvent_upvr_5:Destroy()
end
local var272 = tbl_19_upvr
local UserInputService_upvr_2 = game:GetService("UserInputService")
local RunService_upvr = game:GetService("RunService")
local Players_upvr_2 = game:GetService("Players")
while not Players_upvr_2.LocalPlayer do
    Players_upvr_2.ChildAdded:wait()
end
local var276_upvw = true
if module_4_upvr.ScreenGuiDisplayOrder ~= nil then
end
local ScreenGui_upvr_2 = Instance.new("ScreenGui")
ScreenGui_upvr_2.Name = "Chat"
ScreenGui_upvr_2.ResetOnSpawn = false
ScreenGui_upvr_2.DisplayOrder = module_4_upvr.ScreenGuiDisplayOrder
ScreenGui_upvr_2.Parent = Players_upvr_2.LocalPlayer:WaitForChild("PlayerGui")
if pcall_result1_6 and pcall_result2 and game:GetService("GuiService"):IsTenFootInterface() then
    ScreenGui_upvr_2.Enabled = false
end
local var278_upvw = false
local script_upvr = script
local module_9_upvr = require(script_upvr:WaitForChild("MessageLogDisplay"))
local any_new_result1_upvr_8 = require(script_upvr:WaitForChild("ChatWindow")).new()
local any_new_result1_upvr_7 = require(script_upvr:WaitForChild("ChannelsBar")).new()
local any_new_result1_upvr = module_9_upvr.new()
local any_new_result1_upvr_9 = require(script_upvr:WaitForChild("CommandProcessor")).new()
local any_new_result1_upvr_2 = require(script_upvr:WaitForChild("ChatBar")).new(any_new_result1_upvr_9, any_new_result1_upvr_8)
any_new_result1_upvr_8:CreateGuiObjects(ScreenGui_upvr_2)
any_new_result1_upvr_8:RegisterChatBar(any_new_result1_upvr_2)
any_new_result1_upvr_8:RegisterChannelsBar(any_new_result1_upvr_7)
any_new_result1_upvr_8:RegisterMessageLogDisplay(any_new_result1_upvr)
require(ClientChatModules:WaitForChild("MessageCreatorModules"):WaitForChild("Util")):RegisterChatWindow(any_new_result1_upvr_8)
local module_11_upvr = require(script_upvr:WaitForChild("MessageSender"))
module_11_upvr:RegisterSayMessageFunction(var272.SayMessageRequest)
if UserInputService_upvr_2.TouchEnabled then
    any_new_result1_upvr_2:SetTextLabelText(var259_upvw:Get("GameChat_ChatMain_ChatBarTextTouch", "Tap here to chat"))
else
    any_new_result1_upvr_2:SetTextLabelText(var259_upvw:Get("GameChat_ChatMain_ChatBarText", "To chat click here or press \"/\" key"))
end
spawn(function() -- Line 204
    --[[ Upvalues[3]:
        [1]: script_upvr (readonly)
        [2]: module_4_upvr (readonly)
        [3]: any_new_result1_upvr_8 (readonly)
    ]]
    while true do
        local any_DeltaTimeToTimescale_result1_2 = require(script_upvr:WaitForChild("CurveUtil")):DeltaTimeToTimescale(tick() - tick())
        if any_DeltaTimeToTimescale_result1_2 ~= 0 then
            any_new_result1_upvr_8:Update(any_DeltaTimeToTimescale_result1_2)
        end
        wait(1 / (module_4_upvr.ChatAnimationFPS or 20))
    end
end)
function CheckIfPointIsInSquare(arg1, arg2, arg3) -- Line 230
    local var290 = false
    if arg2.X <= arg1.X then
        var290 = false
        if arg1.X <= arg3.X then
            var290 = false
            if arg2.Y <= arg1.Y then
                if arg1.Y > arg3.Y then
                    var290 = false
                else
                    var290 = true
                end
            end
        end
    end
    return var290
end
local var291_upvw = false
local var292_upvw = false
local var293_upvw = 0
local var294_upvw = 0
local BindableEvent_upvr_7 = Instance.new("BindableEvent")
local BindableEvent_upvr_8 = Instance.new("BindableEvent")
local BindableEvent_upvr_3 = Instance.new("BindableEvent")
function DoBackgroundFadeIn(arg1) -- Line 244
    --[[ Upvalues[7]:
        [1]: var294_upvw (read and write)
        [2]: var291_upvw (read and write)
        [3]: BindableEvent_upvr_7 (readonly)
        [4]: any_new_result1_upvr_8 (readonly)
        [5]: module_4_upvr (readonly)
        [6]: any_new_result1_upvr (readonly)
        [7]: module_9_upvr (readonly)
    ]]
    var294_upvw = tick()
    var291_upvw = false
    BindableEvent_upvr_7:Fire()
    local var298 = arg1
    if not var298 then
        var298 = module_4_upvr.ChatDefaultFadeDuration
    end
    any_new_result1_upvr_8:FadeInBackground(var298)
    if any_new_result1_upvr_8:GetCurrentChannel() then
        local Scroller = any_new_result1_upvr.Scroller
        Scroller.ScrollingEnabled = true
        Scroller.ScrollBarThickness = module_9_upvr.ScrollBarThickness
    end
end
function DoBackgroundFadeOut(arg1) -- Line 259
    --[[ Upvalues[6]:
        [1]: var294_upvw (read and write)
        [2]: var291_upvw (read and write)
        [3]: BindableEvent_upvr_7 (readonly)
        [4]: any_new_result1_upvr_8 (readonly)
        [5]: module_4_upvr (readonly)
        [6]: any_new_result1_upvr (readonly)
    ]]
    var294_upvw = tick()
    var291_upvw = true
    BindableEvent_upvr_7:Fire()
    local var300 = arg1
    if not var300 then
        var300 = module_4_upvr.ChatDefaultFadeDuration
    end
    any_new_result1_upvr_8:FadeOutBackground(var300)
    if any_new_result1_upvr_8:GetCurrentChannel() then
        local Scroller_3 = any_new_result1_upvr.Scroller
        Scroller_3.ScrollingEnabled = false
        Scroller_3.ScrollBarThickness = 0
    end
end
function DoTextFadeIn(arg1) -- Line 274
    --[[ Upvalues[5]:
        [1]: var293_upvw (read and write)
        [2]: var292_upvw (read and write)
        [3]: BindableEvent_upvr_7 (readonly)
        [4]: any_new_result1_upvr_8 (readonly)
        [5]: module_4_upvr (readonly)
    ]]
    var293_upvw = tick()
    var292_upvw = false
    BindableEvent_upvr_7:Fire()
    local var302 = arg1
    if not var302 then
        var302 = module_4_upvr.ChatDefaultFadeDuration
    end
    any_new_result1_upvr_8:FadeInText(var302 * 0)
end
function DoTextFadeOut(arg1) -- Line 281
    --[[ Upvalues[5]:
        [1]: var293_upvw (read and write)
        [2]: var292_upvw (read and write)
        [3]: BindableEvent_upvr_7 (readonly)
        [4]: any_new_result1_upvr_8 (readonly)
        [5]: module_4_upvr (readonly)
    ]]
    var293_upvw = tick()
    var292_upvw = true
    BindableEvent_upvr_7:Fire()
    local var303 = arg1
    if not var303 then
        var303 = module_4_upvr.ChatDefaultFadeDuration
    end
    any_new_result1_upvr_8:FadeOutText(var303)
end
function DoFadeInFromNewInformation() -- Line 288
    --[[ Upvalues[1]:
        [1]: module_4_upvr (readonly)
    ]]
    DoTextFadeIn()
    if module_4_upvr.ChatShouldFadeInFromNewInformation then
        DoBackgroundFadeIn()
    end
end
function InstantFadeIn() -- Line 295
    DoBackgroundFadeIn(0)
    DoTextFadeIn(0)
end
function InstantFadeOut() -- Line 300
    DoBackgroundFadeOut(0)
    DoTextFadeOut(0)
end
local var304_upvw
function UpdateFadingForMouseState(arg1) -- Line 306
    --[[ Upvalues[3]:
        [1]: var304_upvw (read and write)
        [2]: BindableEvent_upvr_8 (readonly)
        [3]: any_new_result1_upvr_2 (readonly)
    ]]
    var304_upvw = arg1
    BindableEvent_upvr_8:Fire()
    if any_new_result1_upvr_2:IsFocused() then
    else
        if arg1 then
            DoBackgroundFadeIn()
            DoTextFadeIn()
            return
        end
        DoBackgroundFadeIn()
    end
end
spawn(function() -- Line 322
    --[[ Upvalues[11]:
        [1]: RunService_upvr (readonly)
        [2]: var304_upvw (read and write)
        [3]: any_new_result1_upvr_2 (readonly)
        [4]: BindableEvent_upvr_8 (readonly)
        [5]: BindableEvent_upvr_3 (readonly)
        [6]: var291_upvw (read and write)
        [7]: var294_upvw (read and write)
        [8]: module_4_upvr (readonly)
        [9]: var292_upvw (read and write)
        [10]: var293_upvw (read and write)
        [11]: BindableEvent_upvr_7 (readonly)
    ]]
    -- KONSTANTERROR: [71] 54. Error Block 21 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [71] 54. Error Block 21 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 30 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 30 end (CF ANALYSIS FAILED)
end)
function getClassicChatEnabled() -- Line 355
    --[[ Upvalues[2]:
        [1]: module_4_upvr (readonly)
        [2]: Players_upvr_2 (readonly)
    ]]
    if module_4_upvr.ClassicChatEnabled ~= nil then
        return module_4_upvr.ClassicChatEnabled
    end
    return Players_upvr_2.ClassicChat
end
function getBubbleChatEnabled() -- Line 362
    --[[ Upvalues[2]:
        [1]: module_4_upvr (readonly)
        [2]: Players_upvr_2 (readonly)
    ]]
    if module_4_upvr.BubbleChatEnabled ~= nil then
        return module_4_upvr.BubbleChatEnabled
    end
    return Players_upvr_2.BubbleChat
end
function bubbleChatOnly() -- Line 369
    local var306 = not getClassicChatEnabled()
    if var306 then
        var306 = getBubbleChatEnabled()
    end
    return var306
end
function UpdateMousePosition(arg1) -- Line 373
    --[[ Upvalues[4]:
        [1]: module_6_upvr (readonly)
        [2]: module_4_upvr (readonly)
        [3]: any_new_result1_upvr_8 (readonly)
        [4]: var304_upvw (read and write)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [4] 4. Error Block 15 start (CF ANALYSIS FAILED)
    if not module_6_upvr.IsCoreGuiEnabled or not module_6_upvr.TopbarEnabled and not module_4_upvr.ChatOnWithTopBarOff then
        -- KONSTANTERROR: [16] 13. Error Block 5 start (CF ANALYSIS FAILED)
        do
            return
        end
        -- KONSTANTERROR: [16] 13. Error Block 5 end (CF ANALYSIS FAILED)
    end
    if bubbleChatOnly() then
    else
        local AbsolutePosition_3 = any_new_result1_upvr_8.GuiObject.AbsolutePosition
        local CheckIfPointIsInSquare_result1 = CheckIfPointIsInSquare(arg1, AbsolutePosition_3, AbsolutePosition_3 + any_new_result1_upvr_8.GuiObject.AbsoluteSize)
        if CheckIfPointIsInSquare_result1 ~= var304_upvw then
            UpdateFadingForMouseState(CheckIfPointIsInSquare_result1)
        end
        -- KONSTANTERROR: [4] 4. Error Block 15 end (CF ANALYSIS FAILED)
    end
end
UserInputService_upvr_2.InputChanged:connect(function(arg1, arg2) -- Line 390
    if arg1.UserInputType == Enum.UserInputType.MouseMovement then
        UpdateMousePosition(Vector2.new(arg1.Position.X, arg1.Position.Y))
    end
end)
UserInputService_upvr_2.TouchTap:connect(function(arg1, arg2) -- Line 397
    UpdateMousePosition(arg1[1])
end)
UserInputService_upvr_2.TouchMoved:connect(function(arg1, arg2) -- Line 401
    UpdateMousePosition(Vector2.new(arg1.Position.X, arg1.Position.Y))
end)
UserInputService_upvr_2.Changed:connect(function(arg1) -- Line 406
    --[[ Upvalues[3]:
        [1]: UserInputService_upvr_2 (readonly)
        [2]: any_new_result1_upvr_8 (readonly)
        [3]: ScreenGui_upvr_2 (readonly)
    ]]
    if arg1 == "MouseBehavior" and UserInputService_upvr_2.MouseBehavior == Enum.MouseBehavior.LockCenter then
        local AbsolutePosition_2 = any_new_result1_upvr_8.GuiObject.AbsolutePosition
        if CheckIfPointIsInSquare(ScreenGui_upvr_2.AbsoluteSize / 2, AbsolutePosition_2, AbsolutePosition_2 + any_new_result1_upvr_8.GuiObject.AbsoluteSize) then
            UserInputService_upvr_2.MouseBehavior = Enum.MouseBehavior.Default
        end
    end
end)
UpdateFadingForMouseState(true)
UpdateFadingForMouseState(false)
local tbl_6 = {
    Signal = function() -- Line 431, Named "Signal"
        local module = {}
        local BindableEvent_upvr_4 = Instance.new("BindableEvent")
        local var317_upvw
        local var318_upvw
        function module.fire(arg1, ...) -- Line 439
            --[[ Upvalues[3]:
                [1]: var317_upvw (read and write)
                [2]: var318_upvw (read and write)
                [3]: BindableEvent_upvr_4 (readonly)
            ]]
            var317_upvw = {...}
            var318_upvw = select('#', ...)
            BindableEvent_upvr_4:Fire()
        end
        function module.connect(arg1, arg2) -- Line 445
            --[[ Upvalues[3]:
                [1]: BindableEvent_upvr_4 (readonly)
                [2]: var317_upvw (read and write)
                [3]: var318_upvw (read and write)
            ]]
            if not arg2 then
                error("connect(nil)", 2)
            end
            return BindableEvent_upvr_4.Event:connect(function() -- Line 447
                --[[ Upvalues[3]:
                    [1]: arg2 (readonly)
                    [2]: var317_upvw (copied, read and write)
                    [3]: var318_upvw (copied, read and write)
                ]]
                arg2(unpack(var317_upvw, 1, var318_upvw))
            end)
        end
        function module.wait(arg1) -- Line 452
            --[[ Upvalues[3]:
                [1]: BindableEvent_upvr_4 (readonly)
                [2]: var317_upvw (read and write)
                [3]: var318_upvw (read and write)
            ]]
            BindableEvent_upvr_4.Event:wait()
            assert(var317_upvw, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs.")
            return unpack(var317_upvw, 1, var318_upvw)
        end
        return module
    end;
}
function SetVisibility(arg1) -- Line 463
    --[[ Upvalues[2]:
        [1]: any_new_result1_upvr_8 (readonly)
        [2]: module_6_upvr (readonly)
    ]]
    any_new_result1_upvr_8:SetVisible(arg1)
    module_6_upvr.VisibilityStateChanged:fire(arg1)
    module_6_upvr.Visible = arg1
    if module_6_upvr.IsCoreGuiEnabled then
        if arg1 then
            InstantFadeIn()
            return
        end
        InstantFadeOut()
    end
end
module_6_upvr.TopbarEnabled = true
module_6_upvr.MessageCount = 0
module_6_upvr.Visible = true
module_6_upvr.IsCoreGuiEnabled = true
function module_6_upvr.ToggleVisibility(arg1) -- Line 485
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_8 (readonly)
    ]]
    SetVisibility(not any_new_result1_upvr_8:GetVisible())
end
function module_6_upvr.SetVisible(arg1, arg2) -- Line 489
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_8 (readonly)
    ]]
    if any_new_result1_upvr_8:GetVisible() ~= arg2 then
        SetVisibility(arg2)
    end
end
function module_6_upvr.FocusChatBar(arg1) -- Line 495
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_2 (readonly)
    ]]
    any_new_result1_upvr_2:CaptureFocus()
end
function module_6_upvr.EnterWhisperState(arg1, arg2) -- Line 499
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_2 (readonly)
    ]]
    any_new_result1_upvr_2:EnterWhisperState(arg2)
end
function module_6_upvr.GetVisibility(arg1) -- Line 503
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_8 (readonly)
    ]]
    return any_new_result1_upvr_8:GetVisible()
end
function module_6_upvr.GetMessageCount(arg1) -- Line 507
    return arg1.MessageCount
end
function module_6_upvr.TopbarEnabledChanged(arg1, arg2) -- Line 511
    arg1.TopbarEnabled = arg2
    arg1.CoreGuiEnabled:fire(game:GetService("StarterGui"):GetCoreGuiEnabled(Enum.CoreGuiType.Chat))
end
function module_6_upvr.IsFocused(arg1, arg2) -- Line 516
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_2 (readonly)
    ]]
    return any_new_result1_upvr_2:IsFocused()
end
module_6_upvr.ChatBarFocusChanged = tbl_6.Signal()
module_6_upvr.VisibilityStateChanged = tbl_6.Signal()
module_6_upvr.MessagesChanged = tbl_6.Signal()
module_6_upvr.MessagePosted = tbl_6.Signal()
module_6_upvr.CoreGuiEnabled = tbl_6.Signal()
module_6_upvr.ChatMakeSystemMessageEvent = tbl_6.Signal()
module_6_upvr.ChatWindowPositionEvent = tbl_6.Signal()
module_6_upvr.ChatWindowSizeEvent = tbl_6.Signal()
module_6_upvr.ChatBarDisabledEvent = tbl_6.Signal()
function module_6_upvr.fChatWindowPosition(arg1) -- Line 534
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_8 (readonly)
    ]]
    return any_new_result1_upvr_8.GuiObject.Position
end
function module_6_upvr.fChatWindowSize(arg1) -- Line 538
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_8 (readonly)
    ]]
    return any_new_result1_upvr_8.GuiObject.Size
end
function module_6_upvr.fChatBarDisabled(arg1) -- Line 542
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_2 (readonly)
    ]]
    return not any_new_result1_upvr_2:GetEnabled()
end
local DoChatBarFocus_upvw
function module_6_upvr.SpecialKeyPressed(arg1, arg2, arg3) -- Line 546
    --[[ Upvalues[2]:
        [1]: var276_upvw (read and write)
        [2]: DoChatBarFocus_upvw (read and write)
    ]]
    if arg2 == Enum.SpecialKey.ChatHotkey then
        if var276_upvw then
            DoChatBarFocus_upvw()
        end
    end
end
module_6_upvr.CoreGuiEnabled:connect(function(arg1) -- Line 555
    --[[ Upvalues[4]:
        [1]: module_6_upvr (readonly)
        [2]: module_4_upvr (readonly)
        [3]: any_new_result1_upvr_8 (readonly)
        [4]: any_new_result1_upvr_2 (readonly)
    ]]
    module_6_upvr.IsCoreGuiEnabled = arg1
    local var323 = arg1
    if var323 then
        var323 = module_6_upvr.TopbarEnabled
        if not var323 then
            var323 = module_4_upvr.ChatOnWithTopBarOff
        end
    end
    local var324 = var323
    any_new_result1_upvr_8:SetCoreGuiEnabled(var324)
    if not var324 then
        any_new_result1_upvr_2:ReleaseFocus()
        InstantFadeOut()
    else
        InstantFadeIn()
    end
end)
function trimTrailingSpaces(arg1) -- Line 570
    -- KONSTANTERROR: [12] 11. Error Block 5 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [12] 11. Error Block 5 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 13 start (CF ANALYSIS FAILED)
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [12.2]
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [12.4294115400]
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [12.1]
    if nil < nil then
        -- KONSTANTERROR: Expression was reused, decompilation is incorrect
        if nil then
            -- KONSTANTWARNING: GOTO [1] #2
        end
        -- KONSTANTWARNING: GOTO [14] #13
    end
    -- KONSTANTERROR: [0] 1. Error Block 13 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [14] 13. Error Block 9 start (CF ANALYSIS FAILED)
    do
        return arg1:sub(1, nil)
    end
    -- KONSTANTERROR: [14] 13. Error Block 9 end (CF ANALYSIS FAILED)
end
module_6_upvr.ChatMakeSystemMessageEvent:connect(function(arg1) -- Line 583
    --[[ Upvalues[6]:
        [1]: var278_upvw (read and write)
        [2]: module_4_upvr (readonly)
        [3]: any_new_result1_upvr_8 (readonly)
        [4]: module_7_upvr (readonly)
        [5]: any_new_result1_upvr_7 (readonly)
        [6]: module_6_upvr (readonly)
    ]]
    if arg1.Text then
        if type(arg1.Text) == "string" then
            while not var278_upvw do
                wait()
            end
            local GeneralChannelName_2 = module_4_upvr.GeneralChannelName
            local any_GetChannel_result1_9 = any_new_result1_upvr_8:GetChannel(GeneralChannelName_2)
            if any_GetChannel_result1_9 then
                local tbl_12 = {
                    ID = -1;
                    FromSpeaker = nil;
                    SpeakerUserId = 0;
                    OriginalChannel = GeneralChannelName_2;
                    IsFiltered = true;
                    MessageLength = string.len(arg1.Text);
                    MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(arg1.Text));
                    Message = trimTrailingSpaces(arg1.Text);
                    MessageType = module_7_upvr.MessageTypeSetCore;
                    Time = os.time();
                }
                tbl_12.ExtraData = arg1
                any_GetChannel_result1_9:AddMessageToChannel(tbl_12)
                any_new_result1_upvr_7:UpdateMessagePostedInChannel(GeneralChannelName_2)
                module_6_upvr.MessageCount += 1
                module_6_upvr.MessagesChanged:fire(module_6_upvr.MessageCount)
            end
        end
    end
end)
module_6_upvr.ChatBarDisabledEvent:connect(function(arg1) -- Line 613
    --[[ Upvalues[2]:
        [1]: var276_upvw (read and write)
        [2]: any_new_result1_upvr_2 (readonly)
    ]]
    if var276_upvw then
        any_new_result1_upvr_2:SetEnabled(not arg1)
        if arg1 then
            any_new_result1_upvr_2:ReleaseFocus()
        end
    end
end)
module_6_upvr.ChatWindowSizeEvent:connect(function(arg1) -- Line 622
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_8 (readonly)
    ]]
    any_new_result1_upvr_8.GuiObject.Size = arg1
end)
module_6_upvr.ChatWindowPositionEvent:connect(function(arg1) -- Line 626
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_8 (readonly)
    ]]
    any_new_result1_upvr_8.GuiObject.Position = arg1
end)
function DoChatBarFocus_upvw() -- Line 634, Named "DoChatBarFocus"
    --[[ Upvalues[3]:
        [1]: any_new_result1_upvr_8 (readonly)
        [2]: any_new_result1_upvr_2 (readonly)
        [3]: module_6_upvr (readonly)
    ]]
    if not any_new_result1_upvr_8:GetCoreGuiEnabled() then
    else
        if not any_new_result1_upvr_2:GetEnabled() then return end
        if not any_new_result1_upvr_2:IsFocused() and any_new_result1_upvr_2:GetVisible() then
            module_6_upvr:SetVisible(true)
            InstantFadeIn()
            any_new_result1_upvr_2:CaptureFocus()
            module_6_upvr.ChatBarFocusChanged:fire(true)
        end
    end
end
BindableEvent_upvr_3.Event:connect(function(arg1) -- Line 646
    --[[ Upvalues[1]:
        [1]: module_6_upvr (readonly)
    ]]
    module_6_upvr.ChatBarFocusChanged:fire(arg1)
end)
function DoSwitchCurrentChannel(arg1) -- Line 650
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_8 (readonly)
    ]]
    if any_new_result1_upvr_8:GetChannel(arg1) then
        any_new_result1_upvr_8:SwitchCurrentChannel(arg1)
    end
end
function SendMessageToSelfInTargetChannel(arg1, arg2, arg3) -- Line 656
    --[[ Upvalues[2]:
        [1]: any_new_result1_upvr_8 (readonly)
        [2]: module_7_upvr (readonly)
    ]]
    local any_GetChannel_result1_4 = any_new_result1_upvr_8:GetChannel(arg2)
    if any_GetChannel_result1_4 then
        local tbl = {
            ID = -1;
            FromSpeaker = nil;
            SpeakerUserId = 0;
        }
        tbl.OriginalChannel = arg2
        tbl.IsFiltered = true
        tbl.MessageLength = string.len(arg1)
        tbl.MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(arg1))
        tbl.Message = trimTrailingSpaces(arg1)
        tbl.MessageType = module_7_upvr.MessageTypeSystem
        tbl.Time = os.time()
        tbl.ExtraData = arg3
        any_GetChannel_result1_4:AddMessageToChannel(tbl)
    end
end
function chatBarFocused() -- Line 677
    --[[ Upvalues[3]:
        [1]: var304_upvw (read and write)
        [2]: var292_upvw (read and write)
        [3]: BindableEvent_upvr_3 (readonly)
    ]]
    if not var304_upvw then
        DoBackgroundFadeIn()
        if var292_upvw then
            DoTextFadeIn()
        end
    end
    BindableEvent_upvr_3:Fire(true)
end
function chatBarFocusLost(arg1, arg2) -- Line 689
    --[[ Upvalues[7]:
        [1]: BindableEvent_upvr_3 (readonly)
        [2]: any_new_result1_upvr_2 (readonly)
        [3]: module_6_upvr (readonly)
        [4]: any_new_result1_upvr_9 (readonly)
        [5]: any_new_result1_upvr_8 (readonly)
        [6]: module_4_upvr (readonly)
        [7]: module_11_upvr (readonly)
    ]]
    DoBackgroundFadeIn()
    BindableEvent_upvr_3:Fire(false)
    local var337
    if arg1 then
        var337 = any_new_result1_upvr_2:GetTextBox().Text
        if any_new_result1_upvr_2:IsInCustomState() then
            local any_GetCustomMessage_result1 = any_new_result1_upvr_2:GetCustomMessage()
            if any_GetCustomMessage_result1 then
                var337 = any_GetCustomMessage_result1
            end
            any_new_result1_upvr_2:ResetCustomState()
            if any_new_result1_upvr_2:CustomStateProcessCompletedMessage(var337) then return end
        end
        any_new_result1_upvr_2:GetTextBox().Text = ""
        if var337 ~= "" then
            module_6_upvr.MessagePosted:fire(var337)
            if not any_new_result1_upvr_9:ProcessCompletedChatMessage(var337, any_new_result1_upvr_8) then
                if module_4_upvr.DisallowedWhiteSpace then
                    for i_2 = 1, #module_4_upvr.DisallowedWhiteSpace do
                        if module_4_upvr.DisallowedWhiteSpace[i_2] == '\t' then
                        else
                        end
                    end
                end
                local any_GetTargetMessageChannel_result1_2 = any_new_result1_upvr_8:GetTargetMessageChannel()
                if any_GetTargetMessageChannel_result1_2 then
                    module_11_upvr:SendMessage(string.gsub(string.gsub(string.gsub(string.gsub(var337, module_4_upvr.DisallowedWhiteSpace[i_2], ' '), module_4_upvr.DisallowedWhiteSpace[i_2], ""), '\n', ""), "[ ]+", ' '), any_GetTargetMessageChannel_result1_2)
                    return
                end
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                module_11_upvr:SendMessage(string.gsub(string.gsub(string.gsub(string.gsub(var337, module_4_upvr.DisallowedWhiteSpace[i_2], ' '), module_4_upvr.DisallowedWhiteSpace[i_2], ""), '\n', ""), "[ ]+", ' '), nil)
            end
        end
    end
end
local tbl_upvw = {}
function setupChatBarConnections() -- Line 740
    --[[ Upvalues[2]:
        [1]: tbl_upvw (read and write)
        [2]: any_new_result1_upvr_2 (readonly)
    ]]
    for i_3 = 1, #tbl_upvw do
        tbl_upvw[i_3]:Disconnect()
    end
    tbl_upvw = {}
    table.insert(tbl_upvw, any_new_result1_upvr_2:GetTextBox().FocusLost:connect(chatBarFocusLost))
    table.insert(tbl_upvw, any_new_result1_upvr_2:GetTextBox().Focused:connect(chatBarFocused))
end
setupChatBarConnections()
any_new_result1_upvr_2.GuiObjectsChanged:connect(setupChatBarConnections)
function getEchoMessagesInGeneral() -- Line 756
    --[[ Upvalues[1]:
        [1]: module_4_upvr (readonly)
    ]]
    if module_4_upvr.EchoMessagesInGeneralChannel == nil then
        return true
    end
    return module_4_upvr.EchoMessagesInGeneralChannel
end
local LocalPlayer_upvw_2 = Players_upvr_2.LocalPlayer
var272.OnMessageDoneFiltering.OnClientEvent:connect(function(arg1) -- Line 763
    --[[ Upvalues[3]:
        [1]: module_4_upvr (readonly)
        [2]: LocalPlayer_upvw_2 (read and write)
        [3]: any_new_result1_upvr_8 (readonly)
    ]]
    if not module_4_upvr.ShowUserOwnFilteredMessage then
        if arg1.FromSpeaker == LocalPlayer_upvw_2.Name then return end
    end
    local OriginalChannel_2 = arg1.OriginalChannel
    local any_GetChannel_result1_8 = any_new_result1_upvr_8:GetChannel(OriginalChannel_2)
    if any_GetChannel_result1_8 then
        any_GetChannel_result1_8:UpdateMessageFiltered(arg1)
    end
    if getEchoMessagesInGeneral() and module_4_upvr.GeneralChannelName and OriginalChannel_2 ~= module_4_upvr.GeneralChannelName and any_new_result1_upvr_8:GetChannel(module_4_upvr.GeneralChannelName) then
        any_new_result1_upvr_8:GetChannel(module_4_upvr.GeneralChannelName):UpdateMessageFiltered(arg1)
    end
end)
var272.OnNewMessage.OnClientEvent:connect(function(arg1, arg2) -- Line 784
    --[[ Upvalues[5]:
        [1]: any_new_result1_upvr_8 (readonly)
        [2]: LocalPlayer_upvw_2 (read and write)
        [3]: any_new_result1_upvr_7 (readonly)
        [4]: module_4_upvr (readonly)
        [5]: module_6_upvr (readonly)
    ]]
    local any_GetChannel_result1_6 = any_new_result1_upvr_8:GetChannel(arg2)
    if any_GetChannel_result1_6 then
        any_GetChannel_result1_6:AddMessageToChannel(arg1)
        if arg1.FromSpeaker ~= LocalPlayer_upvw_2.Name then
            any_new_result1_upvr_7:UpdateMessagePostedInChannel(arg2)
        end
        if getEchoMessagesInGeneral() and module_4_upvr.GeneralChannelName and arg2 ~= module_4_upvr.GeneralChannelName and any_new_result1_upvr_8:GetChannel(module_4_upvr.GeneralChannelName) then
            any_new_result1_upvr_8:GetChannel(module_4_upvr.GeneralChannelName):AddMessageToChannel(arg1)
        end
        module_6_upvr.MessageCount += 1
        module_6_upvr.MessagesChanged:fire(module_6_upvr.MessageCount)
        DoFadeInFromNewInformation()
    end
end)
var272.OnNewSystemMessage.OnClientEvent:connect(function(arg1, arg2) -- Line 807
    --[[ Upvalues[4]:
        [1]: any_new_result1_upvr_8 (readonly)
        [2]: any_new_result1_upvr_7 (readonly)
        [3]: module_6_upvr (readonly)
        [4]: module_4_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    local var349 = arg2 or "System"
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [56] 42. Error Block 6 start (CF ANALYSIS FAILED)
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [57.3]
    nil:AddMessageToChannel(arg1)
    do
        return
    end
    -- KONSTANTERROR: [56] 42. Error Block 6 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [61] 46. Error Block 7 start (CF ANALYSIS FAILED)
    warn(string.format("Just received system message for channel I'm not in [%s]", var349))
    -- KONSTANTERROR: [61] 46. Error Block 7 end (CF ANALYSIS FAILED)
end)
function HandleChannelJoined(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 833
    --[[ Upvalues[8]:
        [1]: any_new_result1_upvr_8 (readonly)
        [2]: module_4_upvr (readonly)
        [3]: var278_upvw (read and write)
        [4]: any_new_result1_upvr_2 (readonly)
        [5]: module_7_upvr (readonly)
        [6]: var259_upvw (read and write)
        [7]: var247_upvw (read and write)
        [8]: ChatTranslationEnabled_upvw (read and write)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    if any_new_result1_upvr_8:GetChannel(arg1) then
        any_new_result1_upvr_8:RemoveChannel(arg1)
    end
    if arg1 == module_4_upvr.GeneralChannelName then
        var278_upvw = true
    end
    if arg4 then
        any_new_result1_upvr_2:SetChannelNameColor(arg1, arg4)
    end
    local any_AddChannel_result1_3 = any_new_result1_upvr_8:AddChannel(arg1)
    if any_AddChannel_result1_3 then
        if arg1 == module_4_upvr.GeneralChannelName then
            DoSwitchCurrentChannel(arg1)
            local var355
        end
        if arg3 then
            var355 = 1
            if module_4_upvr.MessageHistoryLengthPerChannel < #arg3 then
                var355 = #arg3 - module_4_upvr.MessageHistoryLengthPerChannel
            end
            for i_4 = var355, #arg3 do
                any_AddChannel_result1_3:AddMessageToChannel(arg3[i_4])
                local var356
            end
            if getEchoMessagesInGeneral() and arg5 and module_4_upvr.GeneralChannelName and arg1 ~= module_4_upvr.GeneralChannelName then
                i_4 = module_4_upvr.GeneralChannelName
                local any_GetChannel_result1_5 = any_new_result1_upvr_8:GetChannel(i_4)
                if any_GetChannel_result1_5 then
                    any_GetChannel_result1_5:AddMessagesToChannelByTimeStamp(arg3, var355)
                end
            end
        end
        if arg2 ~= "" then
            ({}).ID = -1
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).FromSpeaker = nil
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).SpeakerUserId = 0
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).OriginalChannel = arg1
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).IsFiltered = true
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).MessageLength = string.len(arg2)
            i_4 = arg2
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(i_4))
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).Message = trimTrailingSpaces(arg2)
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).MessageType = module_7_upvr.MessageTypeWelcome
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).Time = os.time()
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            ;({}).ExtraData = nil
            i_4 = {}
            var356:AddMessageToChannel(i_4)
            if getEchoMessagesInGeneral() and arg6 and not module_4_upvr.ShowChannelsBar and arg1 ~= module_4_upvr.GeneralChannelName then
                i_4 = module_4_upvr.GeneralChannelName
                local any_GetChannel_result1_2 = any_new_result1_upvr_8:GetChannel(i_4)
                if any_GetChannel_result1_2 then
                    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                    any_GetChannel_result1_2:AddMessageToChannel({})
                end
            end
        end
        if var247_upvw and var259_upvw:Get("GameChat_ChatMain_ChatTranslationOnboarding", "Text chat will be translated into your language. Tap the symbol in front of the message to see the original. You can turn off translations in the Settings menu.") ~= "" and arg1 == module_4_upvr.GeneralChannelName and ChatTranslationEnabled_upvw ~= nil and ChatTranslationEnabled_upvw.Value then
            local tbl_17 = {
                ID = -2;
                FromSpeaker = nil;
                SpeakerUserId = 0;
            }
            tbl_17.OriginalChannel = arg1
            tbl_17.IsFiltered = true
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            tbl_17.MessageLength = string.len(var259_upvw:Get("GameChat_ChatMain_ChatTranslationOnboarding", "Text chat will be translated into your language. Tap the symbol in front of the message to see the original. You can turn off translations in the Settings menu."))
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            tbl_17.MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(var259_upvw:Get("GameChat_ChatMain_ChatTranslationOnboarding", "Text chat will be translated into your language. Tap the symbol in front of the message to see the original. You can turn off translations in the Settings menu.")))
            -- KONSTANTERROR: Expression was reused, decompilation is incorrect
            tbl_17.Message = trimTrailingSpaces(var259_upvw:Get("GameChat_ChatMain_ChatTranslationOnboarding", "Text chat will be translated into your language. Tap the symbol in front of the message to see the original. You can turn off translations in the Settings menu."))
            tbl_17.MessageType = module_7_upvr.MessageTypeWelcome
            tbl_17.Time = os.time()
            tbl_17.ExtraData = nil
            var356:AddMessageToChannel(tbl_17)
        end
        DoFadeInFromNewInformation()
    end
end
var272.OnChannelJoined.OnClientEvent:connect(function(arg1, arg2, arg3, arg4) -- Line 925
    HandleChannelJoined(arg1, arg2, arg3, arg4, false, true)
end)
var272.OnChannelLeft.OnClientEvent:connect(function(arg1) -- Line 929
    --[[ Upvalues[1]:
        [1]: any_new_result1_upvr_8 (readonly)
    ]]
    any_new_result1_upvr_8:RemoveChannel(arg1)
    DoFadeInFromNewInformation()
end)
var272.OnMuted.OnClientEvent:connect(function(arg1) -- Line 935
end)
var272.OnUnmuted.OnClientEvent:connect(function(arg1) -- Line 941
end)
var272.OnMainChannelSet.OnClientEvent:connect(function(arg1) -- Line 945
    DoSwitchCurrentChannel(arg1)
end)
coroutine.wrap(function() -- Line 949
    --[[ Upvalues[2]:
        [1]: DefaultChatSystemChatEvents_upvr (readonly)
        [2]: any_new_result1_upvr_2 (readonly)
    ]]
    local ChannelNameColorUpdated_2 = DefaultChatSystemChatEvents_upvr:WaitForChild("ChannelNameColorUpdated", 5)
    if ChannelNameColorUpdated_2 then
        ChannelNameColorUpdated_2.OnClientEvent:connect(function(arg1, arg2) -- Line 953
            --[[ Upvalues[1]:
                [1]: any_new_result1_upvr_2 (copied, readonly)
            ]]
            any_new_result1_upvr_2:SetChannelNameColor(arg1, arg2)
        end)
    end
end)()
local var368_upvw
local var369_upvw
local var370_upvw
local var371_upvw
pcall(function() -- Line 969
    --[[ Upvalues[5]:
        [1]: var368_upvw (read and write)
        [2]: StarterGui_upvr_2 (readonly)
        [3]: var369_upvw (read and write)
        [4]: var370_upvw (read and write)
        [5]: var371_upvw (read and write)
    ]]
    var368_upvw = StarterGui_upvr_2:GetCore("PlayerBlockedEvent")
    var369_upvw = StarterGui_upvr_2:GetCore("PlayerMutedEvent")
    var370_upvw = StarterGui_upvr_2:GetCore("PlayerUnblockedEvent")
    var371_upvw = StarterGui_upvr_2:GetCore("PlayerUnmutedEvent")
end)
function SendSystemMessageToSelf(arg1) -- Line 976
    --[[ Upvalues[2]:
        [1]: any_new_result1_upvr_8 (readonly)
        [2]: module_7_upvr (readonly)
    ]]
    local any_GetCurrentChannel_result1_2 = any_new_result1_upvr_8:GetCurrentChannel()
    if any_GetCurrentChannel_result1_2 then
        any_GetCurrentChannel_result1_2:AddMessageToChannel({
            ID = -1;
            FromSpeaker = nil;
            SpeakerUserId = 0;
            OriginalChannel = any_GetCurrentChannel_result1_2.Name;
            IsFiltered = true;
            MessageLength = string.len(arg1);
            MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(arg1));
            Message = trimTrailingSpaces(arg1);
            MessageType = module_7_upvr.MessageTypeSystem;
            Time = os.time();
            ExtraData = nil;
        })
    end
end
function MutePlayer(arg1) -- Line 998
    --[[ Upvalues[1]:
        [1]: DefaultChatSystemChatEvents_upvr (readonly)
    ]]
    local MutePlayerRequest_2 = DefaultChatSystemChatEvents_upvr:FindFirstChild("MutePlayerRequest")
    if MutePlayerRequest_2 then
        return MutePlayerRequest_2:InvokeServer(arg1.Name)
    end
    return false
end
if var368_upvw then
    var368_upvw.Event:connect(function(arg1) -- Line 1007
        --[[ Upvalues[2]:
            [1]: module_4_upvr (readonly)
            [2]: var259_upvw (read and write)
        ]]
        if MutePlayer(arg1) then
            local var377
            if module_4_upvr.PlayerDisplayNamesEnabled then
                var377 = arg1.DisplayName
            else
                var377 = arg1.Name
            end
            SendSystemMessageToSelf(var259_upvw:Get("GameChat_ChatMain_SpeakerHasBeenBlocked", string.format("Speaker '%s' has been blocked.", var377), {
                RBX_NAME = var377;
            }))
        end
    end)
    local var379
end
if var239 then
    local function _() -- Line 1029, Named "ShowFriendJoinNotification"
        --[[ Upvalues[1]:
            [1]: module_4_upvr (readonly)
        ]]
        if module_4_upvr.ShowFriendJoinNotification ~= nil then
            return module_4_upvr.ShowFriendJoinNotification
        end
        return false
    end
    if module_4_upvr.ShowFriendJoinNotification ~= nil then
        var379 = module_4_upvr.ShowFriendJoinNotification
    else
        var379 = false
    end
    if var379 then
        var379 = Players_upvr_2.PlayerAdded
        var379 = var379:Connect
        var379(function(arg1) -- Line 1037
            --[[ Upvalues[3]:
                [1]: LocalPlayer_upvw_2 (read and write)
                [2]: module_4_upvr (readonly)
                [3]: var259_upvw (read and write)
            ]]
            local pcall_result1_4, pcall_result2_3 = pcall(function() -- Line 1038
                --[[ Upvalues[2]:
                    [1]: arg1 (readonly)
                    [2]: LocalPlayer_upvw_2 (copied, read and write)
                ]]
                return arg1:IsFriendsWith(LocalPlayer_upvw_2.UserId)
            end)
            if pcall_result1_4 and pcall_result2_3 then
                local Name = arg1.Name
                if module_4_upvr.PlayerDisplayNamesEnabled then
                    Name = arg1.DisplayName
                end
                SendSystemMessageToSelf(var259_upvw:FormatMessageToSend("GameChat_FriendChatNotifier_JoinMessage", string.format("Your friend %s has joined the game.", Name), "RBX_NAME", Name))
            end
        end)
    end
end
if var369_upvw then
    var369_upvw.Event:connect(function(arg1) -- Line 1060
        --[[ Upvalues[2]:
            [1]: module_4_upvr (readonly)
            [2]: var259_upvw (read and write)
        ]]
        if MutePlayer(arg1) then
            local var386
            if module_4_upvr.PlayerDisplayNamesEnabled then
                var386 = arg1.DisplayName
            else
                var386 = arg1.Name
            end
            SendSystemMessageToSelf(var259_upvw:Get("GameChat_ChatMain_SpeakerHasBeenMuted", string.format("Speaker '%s' has been muted.", var386), {
                RBX_NAME = var386;
            }))
        end
    end)
end
function UnmutePlayer(arg1) -- Line 1081
    --[[ Upvalues[1]:
        [1]: DefaultChatSystemChatEvents_upvr (readonly)
    ]]
    local UnMutePlayerRequest_2 = DefaultChatSystemChatEvents_upvr:FindFirstChild("UnMutePlayerRequest")
    if UnMutePlayerRequest_2 then
        return UnMutePlayerRequest_2:InvokeServer(arg1.Name)
    end
    return false
end
if var370_upvw then
    var370_upvw.Event:connect(function(arg1) -- Line 1090
        --[[ Upvalues[2]:
            [1]: module_4_upvr (readonly)
            [2]: var259_upvw (read and write)
        ]]
        if UnmutePlayer(arg1) then
            local var390
            if module_4_upvr.PlayerDisplayNamesEnabled then
                var390 = arg1.DisplayName
            else
                var390 = arg1.Name
            end
            SendSystemMessageToSelf(var259_upvw:Get("GameChat_ChatMain_SpeakerHasBeenUnBlocked", string.format("Speaker '%s' has been unblocked.", var390), {
                RBX_NAME = var390;
            }))
        end
    end)
end
if var371_upvw then
    var371_upvw.Event:connect(function(arg1) -- Line 1112
        --[[ Upvalues[2]:
            [1]: module_4_upvr (readonly)
            [2]: var259_upvw (read and write)
        ]]
        if UnmutePlayer(arg1) then
            local var393
            if module_4_upvr.PlayerDisplayNamesEnabled then
                var393 = arg1.DisplayName
            else
                var393 = arg1.Name
            end
            SendSystemMessageToSelf(var259_upvw:Get("GameChat_ChatMain_SpeakerHasBeenUnMuted", string.format("Speaker '%s' has been unmuted.", var393), {
                RBX_NAME = var393;
            }))
        end
    end)
end
spawn(function() -- Line 1135
    --[[ Upvalues[3]:
        [1]: LocalPlayer_upvw_2 (read and write)
        [2]: StarterGui_upvr_2 (readonly)
        [3]: DefaultChatSystemChatEvents_upvr (readonly)
    ]]
    if 0 < LocalPlayer_upvw_2.UserId then
        pcall(function() -- Line 1138
            --[[ Upvalues[2]:
                [1]: StarterGui_upvr_2 (copied, readonly)
                [2]: DefaultChatSystemChatEvents_upvr (copied, readonly)
            ]]
            local any_GetCore_result1_3 = StarterGui_upvr_2:GetCore("GetBlockedUserIds")
            if 0 < #any_GetCore_result1_3 then
                local SetBlockedUserIdsRequest = DefaultChatSystemChatEvents_upvr:FindFirstChild("SetBlockedUserIdsRequest")
                if SetBlockedUserIdsRequest then
                    SetBlockedUserIdsRequest:FireServer(any_GetCore_result1_3)
                end
            end
        end)
    end
end)
spawn(function() -- Line 1150
    --[[ Upvalues[4]:
        [1]: Chat_upvr (readonly)
        [2]: LocalPlayer_upvw_2 (read and write)
        [3]: var276_upvw (read and write)
        [4]: RunService_upvr (readonly)
    ]]
    local pcall_result1, pcall_result2_2 = pcall(function() -- Line 1151
        --[[ Upvalues[2]:
            [1]: Chat_upvr (copied, readonly)
            [2]: LocalPlayer_upvw_2 (copied, read and write)
        ]]
        return Chat_upvr:CanUserChatAsync(LocalPlayer_upvw_2.UserId)
    end)
    if pcall_result1 then
        var276_upvw = RunService_upvr:IsStudio() or pcall_result2_2
    end
end)
local any_InvokeServer_result1 = var272.GetInitDataRequest:InvokeServer()
for _, v_2 in pairs(any_InvokeServer_result1.Channels) do
    if v_2[1] == module_4_upvr.GeneralChannelName then
        HandleChannelJoined(v_2[1], v_2[2], v_2[3], v_2[4], true, false)
    end
end
for _, v_3 in pairs(any_InvokeServer_result1.Channels) do
    if v_3[1] ~= module_4_upvr.GeneralChannelName then
        HandleChannelJoined(v_3[1], v_3[2], v_3[3], v_3[4], true, false)
    end
end
return module_6_upvr
ModuleScript ChannelsBar ChannelsBar
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:58
-- Luau version 6, Types version 3
-- Time taken: 0.014967 seconds

local module = {}
local Parent = script.Parent
local module_upvr_2 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"))
local module_upvr = require(Parent:WaitForChild("CurveUtil"))
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
local module_upvr_4 = require(Parent:WaitForChild("MessageSender"))
function tbl_upvr.CreateGuiObjects(arg1, arg2) -- Line 23
    --[[ Upvalues[2]:
        [1]: module_upvr_2 (readonly)
        [2]: module_upvr_4 (readonly)
    ]]
    local Frame_6 = Instance.new("Frame")
    Frame_6.Selectable = false
    Frame_6.Size = UDim2.new(1, 0, 1, 0)
    Frame_6.BackgroundTransparency = 1
    Frame_6.Parent = arg2
    local Frame_5 = Instance.new("Frame")
    Frame_5.Selectable = false
    Frame_5.Name = "ScrollingBase"
    Frame_5.BackgroundTransparency = 1
    Frame_5.ClipsDescendants = true
    Frame_5.Size = UDim2.new(1, 0, 1, 0)
    Frame_5.Position = UDim2.new(0, 0, 0, 0)
    Frame_5.Parent = Frame_6
    local Frame_3 = Instance.new("Frame")
    Frame_3.Selectable = false
    Frame_3.Name = "ScrollerSizer"
    Frame_3.BackgroundTransparency = 1
    Frame_3.Size = UDim2.new(1, 0, 1, 0)
    Frame_3.Position = UDim2.new(0, 0, 0, 0)
    Frame_3.Parent = Frame_5
    local Frame = Instance.new("Frame")
    Frame.Selectable = false
    Frame.Name = "ScrollerFrame"
    Frame.BackgroundTransparency = 1
    Frame.Size = UDim2.new(1, 0, 1, 0)
    Frame.Position = UDim2.new(0, 0, 0, 0)
    Frame.Parent = Frame_3
    local Frame_7 = Instance.new("Frame")
    Frame_7.Selectable = false
    Frame_7.Size = UDim2.new(1, 0, 1, 0)
    Frame_7.Position = UDim2.new(0, 0, 0, 0)
    Frame_7.ClipsDescendants = true
    Frame_7.BackgroundTransparency = 1
    Frame_7.Parent = Frame_6
    local Frame_4_upvr = Instance.new("Frame")
    Frame_4_upvr.Selectable = false
    Frame_4_upvr.Name = "LeaveConfirmationFrame"
    Frame_4_upvr.Size = UDim2.new(1, 0, 1, 0)
    Frame_4_upvr.Position = UDim2.new(0, 0, 1, 0)
    Frame_4_upvr.BackgroundTransparency = 0.6
    Frame_4_upvr.BorderSizePixel = 0
    Frame_4_upvr.BackgroundColor3 = Color3.new(0, 0, 0)
    Frame_4_upvr.Parent = Frame_7
    local TextButton = Instance.new("TextButton")
    TextButton.Selectable = false
    TextButton.Size = UDim2.new(1, 0, 1, 0)
    TextButton.BackgroundTransparency = 1
    TextButton.Text = ""
    TextButton.Parent = Frame_4_upvr
    local TextButton_2 = Instance.new("TextButton")
    TextButton_2.Selectable = false
    TextButton_2.Size = UDim2.new(0.25, 0, 1, 0)
    TextButton_2.BackgroundTransparency = 1
    TextButton_2.Font = module_upvr_2.DefaultFont
    TextButton_2.TextSize = 18
    TextButton_2.TextStrokeTransparency = 0.75
    TextButton_2.Position = UDim2.new(0, 0, 0, 0)
    TextButton_2.TextColor3 = Color3.new(0, 1, 0)
    TextButton_2.Text = "Confirm"
    TextButton_2.Parent = Frame_4_upvr
    local clone = TextButton_2:Clone()
    clone.Parent = Frame_4_upvr
    clone.Position = UDim2.new(0.75, 0, 0, 0)
    clone.TextColor3 = Color3.new(1, 0, 0)
    clone.Text = "Cancel"
    local TextLabel = Instance.new("TextLabel")
    TextLabel.Selectable = false
    TextLabel.Size = UDim2.new(0.5, 0, 1, 0)
    TextLabel.Position = UDim2.new(0.25, 0, 0, 0)
    TextLabel.BackgroundTransparency = 1
    TextLabel.TextColor3 = Color3.new(1, 1, 1)
    TextLabel.TextStrokeTransparency = 0.75
    TextLabel.Text = "Leave channel <XX>?"
    TextLabel.Font = module_upvr_2.DefaultFont
    TextLabel.TextSize = 18
    TextLabel.Parent = Frame_4_upvr
    local StringValue_upvr = Instance.new("StringValue")
    StringValue_upvr.Name = "LeaveTarget"
    StringValue_upvr.Parent = Frame_4_upvr
    local Position_upvr = Frame_4_upvr.Position
    TextButton_2.MouseButton1Click:connect(function() -- Line 115
        --[[ Upvalues[4]:
            [1]: module_upvr_4 (copied, readonly)
            [2]: StringValue_upvr (readonly)
            [3]: Frame_4_upvr (readonly)
            [4]: Position_upvr (readonly)
        ]]
        module_upvr_4:SendMessage(string.format("/leave %s", StringValue_upvr.Value), nil)
        Frame_4_upvr:TweenPosition(Position_upvr, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true)
    end)
    clone.MouseButton1Click:connect(function() -- Line 119
        --[[ Upvalues[2]:
            [1]: Frame_4_upvr (readonly)
            [2]: Position_upvr (readonly)
        ]]
        Frame_4_upvr:TweenPosition(Position_upvr, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true)
    end)
    local ImageButton = Instance.new("ImageButton", Frame_6)
    ImageButton.Selectable = module_upvr_2.GamepadNavigationEnabled
    ImageButton.Name = "PageLeftButton"
    ImageButton.SizeConstraint = Enum.SizeConstraint.RelativeYY
    ImageButton.Size = UDim2.new(0.7, 0, 0.7, 0)
    ImageButton.BackgroundTransparency = 1
    ImageButton.Position = UDim2.new(0, 4, 0.15000000000000002, 0)
    ImageButton.Visible = false
    ImageButton.Image = "rbxassetid://471630199"
    local ImageLabel = Instance.new("ImageLabel", ImageButton)
    ImageLabel.Name = "ArrowLabel"
    ImageLabel.BackgroundTransparency = 1
    ImageLabel.Size = UDim2.new(0.4, 0, 0.4, 0)
    ImageLabel.Image = "rbxassetid://471630112"
    local Frame_2 = Instance.new("Frame", Frame_6)
    Frame_2.Selectable = false
    Frame_2.BackgroundTransparency = 1
    Frame_2.Name = "PositionalHelper"
    Frame_2.Size = ImageButton.Size
    Frame_2.SizeConstraint = ImageButton.SizeConstraint
    Frame_2.Position = UDim2.new(1, 0, 0.15000000000000002, 0)
    local clone_2 = ImageButton:Clone()
    clone_2.Parent = Frame_2
    clone_2.Name = "PageRightButton"
    clone_2.Size = UDim2.new(1, 0, 1, 0)
    clone_2.SizeConstraint = Enum.SizeConstraint.RelativeXY
    clone_2.Position = UDim2.new(-1, -4, 0, 0)
    local udim2 = UDim2.new(0.05, 0, 0, 0)
    clone_2.ArrowLabel.Position = UDim2.new(0.3, 0, 0.3, 0) + udim2
    ImageButton.ArrowLabel.Position = UDim2.new(0.3, 0, 0.3, 0) - udim2
    ImageButton.ArrowLabel.Rotation = 180
    arg1.GuiObject = Frame_6
    arg1.GuiObjects.BaseFrame = Frame_6
    arg1.GuiObjects.ScrollerSizer = Frame_3
    arg1.GuiObjects.ScrollerFrame = Frame
    arg1.GuiObjects.PageLeftButton = ImageButton
    arg1.GuiObjects.PageRightButton = clone_2
    arg1.GuiObjects.LeaveConfirmationFrame = Frame_4_upvr
    arg1.GuiObjects.LeaveConfirmationNotice = TextLabel
    arg1.GuiObjects.PageLeftButtonArrow = ImageButton.ArrowLabel
    arg1.GuiObjects.PageRightButtonArrow = clone_2.ArrowLabel
    arg1:AnimGuiObjects()
    ImageButton.MouseButton1Click:connect(function() -- Line 187
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:ScrollChannelsFrame(-1)
    end)
    clone_2.MouseButton1Click:connect(function() -- Line 188
        --[[ Upvalues[1]:
            [1]: arg1 (readonly)
        ]]
        arg1:ScrollChannelsFrame(1)
    end)
    arg1:ScrollChannelsFrame(0)
end
function tbl_upvr.UpdateMessagePostedInChannel(arg1, arg2) -- Line 194
    local any_GetChannelTab_result1 = arg1:GetChannelTab(arg2)
    if any_GetChannelTab_result1 then
        any_GetChannelTab_result1:UpdateMessagePostedInChannel()
    else
        warn("ChannelsTab '"..arg2.."' does not exist!")
    end
end
local module_upvr_3 = require(Parent:WaitForChild("ChannelsTab"))
function tbl_upvr.AddChannelTab(arg1, arg2) -- Line 203
    --[[ Upvalues[2]:
        [1]: module_upvr_3 (readonly)
        [2]: module_upvr_2 (readonly)
    ]]
    if arg1:GetChannelTab(arg2) then
        error("Channel tab '"..arg2.."'already exists!")
    end
    local any_new_result1_upvr = module_upvr_3.new(arg2)
    any_new_result1_upvr.GuiObject.Parent = arg1.GuiObjects.ScrollerFrame
    arg1.ChannelTabs[arg2:lower()] = any_new_result1_upvr
    arg1.NumTabs += 1
    arg1:OrganizeChannelTabs()
    if module_upvr_2.RightClickToLeaveChannelEnabled then
        any_new_result1_upvr.NameTag.MouseButton2Click:connect(function() -- Line 216
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: any_new_result1_upvr (readonly)
            ]]
            arg1.LeaveConfirmationNotice.Text = string.format("Leave channel %s?", any_new_result1_upvr.ChannelName)
            arg1.LeaveConfirmationFrame.LeaveTarget.Value = any_new_result1_upvr.ChannelName
            arg1.LeaveConfirmationFrame:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.2, true)
        end)
    end
    return any_new_result1_upvr
end
function tbl_upvr.RemoveChannelTab(arg1, arg2) -- Line 226
    if not arg1:GetChannelTab(arg2) then
        error("Channel tab '"..arg2.."'does not exist!")
    end
    local any_lower_result1 = arg2:lower()
    arg1.ChannelTabs[any_lower_result1]:Destroy()
    arg1.ChannelTabs[any_lower_result1] = nil
    arg1.NumTabs -= 1
    arg1:OrganizeChannelTabs()
end
function tbl_upvr.GetChannelTab(arg1, arg2) -- Line 239
    return arg1.ChannelTabs[arg2:lower()]
end
function tbl_upvr.OrganizeChannelTabs(arg1) -- Line 243
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    local tbl = {}
    table.insert(tbl, arg1:GetChannelTab(module_upvr_2.GeneralChannelName))
    table.insert(tbl, arg1:GetChannelTab("System"))
    for _, v in pairs(arg1.ChannelTabs) do
        if v.ChannelName ~= module_upvr_2.GeneralChannelName and v.ChannelName ~= "System" then
            table.insert(tbl, v)
        end
    end
    for i_2, v_2 in pairs(tbl) do
        v_2.GuiObject.Position = UDim2.new(i_2 - 1, 0, 0, 0)
    end
    arg1.GuiObjects.ScrollerSizer.Size = UDim2.new(1 / math.max(1, math.min(module_upvr_2.ChannelsBarFullTabSize, arg1.NumTabs)), 0, 1, 0)
    arg1:ScrollChannelsFrame(0)
end
function tbl_upvr.ResizeChannelTabText(arg1, arg2) -- Line 265
    for _, v_3 in pairs(arg1.ChannelTabs) do
        v_3:SetTextSize(arg2)
    end
end
function tbl_upvr.ScrollChannelsFrame(arg1, arg2) -- Line 271
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    local var49
    if arg1.ScrollChannelsFrameLock then
    else
        arg1.ScrollChannelsFrameLock = true
        local ChannelsBarFullTabSize = module_upvr_2.ChannelsBarFullTabSize
        local var51 = arg1.CurPageNum + arg2
        if var51 < 0 then
            var51 = 0
        elseif 0 < var51 and arg1.NumTabs < var51 + ChannelsBarFullTabSize then
            var51 = arg1.NumTabs - ChannelsBarFullTabSize
        end
        arg1.CurPageNum = var51
        var49 = arg1.CurPageNum
        var49 = 0
        var49 = arg1.GuiObjects
        if 0 >= arg1.CurPageNum then
            var49 = false
        else
            var49 = true
        end
        var49.PageLeftButton.Visible = var49
        if arg1.CurPageNum + ChannelsBarFullTabSize >= arg1.NumTabs then
        else
        end
        arg1.GuiObjects.PageRightButton.Visible = true
        if arg2 == 0 then
            arg1.ScrollChannelsFrameLock = false
            return
        end
        arg1:WaitUntilParentedCorrectly()
        arg1.GuiObjects.ScrollerFrame:TweenPosition(UDim2.new(-var49, var49, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.15, true, function() -- Line 297, Named "UnlockFunc"
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            arg1.ScrollChannelsFrameLock = false
        end)
    end
end
function tbl_upvr.FadeOutBackground(arg1, arg2) -- Line 306
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    for _, v_4 in pairs(arg1.ChannelTabs) do
        v_4:FadeOutBackground(arg2)
    end
    arg1.AnimParams.Background_TargetTransparency = 1
    arg1.AnimParams.Background_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.FadeInBackground(arg1, arg2) -- Line 315
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    for _, v_5 in pairs(arg1.ChannelTabs) do
        v_5:FadeInBackground(arg2)
    end
    arg1.AnimParams.Background_TargetTransparency = 0.6
    arg1.AnimParams.Background_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.FadeOutText(arg1, arg2) -- Line 324
    for _, v_6 in pairs(arg1.ChannelTabs) do
        v_6:FadeOutText(arg2)
    end
end
function tbl_upvr.FadeInText(arg1, arg2) -- Line 330
    for _, v_7 in pairs(arg1.ChannelTabs) do
        v_7:FadeInText(arg2)
    end
end
function tbl_upvr.AnimGuiObjects(arg1) -- Line 336
    arg1.GuiObjects.PageLeftButton.ImageTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.GuiObjects.PageRightButton.ImageTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.GuiObjects.PageLeftButtonArrow.ImageTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.GuiObjects.PageRightButtonArrow.ImageTransparency = arg1.AnimParams.Background_CurrentTransparency
end
function tbl_upvr.InitializeAnimParams(arg1) -- Line 343
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    arg1.AnimParams.Background_TargetTransparency = 0.6
    arg1.AnimParams.Background_CurrentTransparency = 0.6
    arg1.AnimParams.Background_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(0)
end
function tbl_upvr.Update(arg1, arg2) -- Line 349
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    for _, v_8 in pairs(arg1.ChannelTabs) do
        v_8:Update(arg2)
    end
    arg1.AnimParams.Background_CurrentTransparency = module_upvr:Expt(arg1.AnimParams.Background_CurrentTransparency, arg1.AnimParams.Background_TargetTransparency, arg1.AnimParams.Background_NormalizedExptValue, arg2)
    arg1:AnimGuiObjects()
end
function tbl_upvr.WaitUntilParentedCorrectly(arg1) -- Line 365
    while not arg1.GuiObject:IsDescendantOf(game:GetService("Players").LocalPlayer) do
        arg1.GuiObject.AncestryChanged:wait()
    end
end
function module.new() -- Line 374
    --[[ Upvalues[2]:
        [1]: tbl_upvr (readonly)
        [2]: module_upvr_2 (readonly)
    ]]
    local setmetatable_result1_upvr = setmetatable({}, tbl_upvr)
    setmetatable_result1_upvr.GuiObject = nil
    setmetatable_result1_upvr.GuiObjects = {}
    setmetatable_result1_upvr.ChannelTabs = {}
    setmetatable_result1_upvr.NumTabs = 0
    setmetatable_result1_upvr.CurPageNum = 0
    setmetatable_result1_upvr.ScrollChannelsFrameLock = false
    setmetatable_result1_upvr.AnimParams = {}
    setmetatable_result1_upvr:InitializeAnimParams()
    module_upvr_2.SettingsChanged:connect(function(arg1, arg2) -- Line 390
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        if arg1 == "ChatChannelsTabTextSize" then
            setmetatable_result1_upvr:ResizeChannelTabText(arg2)
        end
    end)
    return setmetatable_result1_upvr
end
return module
ModuleScript ChatBar ChatBar
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:03:59
-- Luau version 6, Types version 3
-- Time taken: 0.025638 seconds

local module = {}
local Players = game:GetService("Players")
local TextService_upvr = game:GetService("TextService")
local var4_upvw
while not var4_upvw do
    Players.PlayerAdded:wait()
    var4_upvw = Players.LocalPlayer
end
local Chat_upvr = game:GetService("Chat")
local ClientChatModules = Chat_upvr:WaitForChild("ClientChatModules")
local module_3_upvr = require(ClientChatModules:WaitForChild("ChatSettings"))
local module_2_upvr = require(script.Parent:WaitForChild("CurveUtil"))
local var10_upvw
pcall(function() -- Line 34
    --[[ Upvalues[1]:
        [1]: var10_upvw (read and write)
    ]]
    var10_upvw = require(game:GetService("Chat").ClientChatModules.ChatLocalization)
end)
if var10_upvw == nil then
    var10_upvw = {}
    function var10_upvw.Get(arg1, arg2, arg3) -- Line 35
        return arg3
    end
end
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
function tbl_upvr.CreateGuiObjects(arg1, arg2) -- Line 42
    --[[ Upvalues[1]:
        [1]: module_3_upvr (readonly)
    ]]
    arg1.ChatBarParentFrame = arg2
    local Frame = Instance.new("Frame")
    Frame.Selectable = false
    Frame.Size = UDim2.new(1, 0, 1, 0)
    Frame.BackgroundTransparency = 0.6
    Frame.BorderSizePixel = 0
    Frame.BackgroundColor3 = module_3_upvr.ChatBarBackGroundColor
    Frame.Parent = arg2
    local Frame_2 = Instance.new("Frame")
    Frame_2.Selectable = false
    Frame_2.Name = "BoxFrame"
    Frame_2.BackgroundTransparency = 0.6
    Frame_2.BorderSizePixel = 0
    Frame_2.BackgroundColor3 = module_3_upvr.ChatBarBoxColor
    Frame_2.Size = UDim2.new(1, -14, 1, -14)
    Frame_2.Position = UDim2.new(0, 7, 0, 7)
    Frame_2.Parent = Frame
    local Frame_3 = Instance.new("Frame")
    Frame_3.BackgroundTransparency = 1
    Frame_3.Size = UDim2.new(1, -10, 1, -10)
    Frame_3.Position = UDim2.new(0, 5, 0, 5)
    Frame_3.Parent = Frame_2
    local TextBox_2 = Instance.new("TextBox")
    TextBox_2.Selectable = module_3_upvr.GamepadNavigationEnabled
    TextBox_2.Name = "ChatBar"
    TextBox_2.BackgroundTransparency = 1
    TextBox_2.Size = UDim2.new(1, 0, 1, 0)
    TextBox_2.Position = UDim2.new(0, 0, 0, 0)
    TextBox_2.TextSize = module_3_upvr.ChatBarTextSize
    TextBox_2.Font = module_3_upvr.ChatBarFont
    TextBox_2.TextColor3 = module_3_upvr.ChatBarTextColor
    TextBox_2.TextTransparency = 0.4
    TextBox_2.TextStrokeTransparency = 1
    TextBox_2.ClearTextOnFocus = false
    TextBox_2.TextXAlignment = Enum.TextXAlignment.Left
    TextBox_2.TextYAlignment = Enum.TextYAlignment.Top
    TextBox_2.TextWrapped = true
    TextBox_2.Text = ""
    TextBox_2.Parent = Frame_3
    local TextButton = Instance.new("TextButton")
    TextButton.Selectable = false
    TextButton.Name = "MessageMode"
    TextButton.BackgroundTransparency = 1
    TextButton.Position = UDim2.new(0, 0, 0, 0)
    TextButton.TextSize = module_3_upvr.ChatBarTextSize
    TextButton.Font = module_3_upvr.ChatBarFont
    TextButton.TextXAlignment = Enum.TextXAlignment.Left
    TextButton.TextWrapped = true
    TextButton.Text = ""
    TextButton.Size = UDim2.new(0, 0, 0, 0)
    TextButton.TextYAlignment = Enum.TextYAlignment.Center
    TextButton.TextColor3 = arg1:GetDefaultChannelNameColor()
    TextButton.Visible = true
    TextButton.Parent = Frame_3
    local TextLabel = Instance.new("TextLabel")
    TextLabel.Selectable = false
    TextLabel.TextWrapped = true
    TextLabel.BackgroundTransparency = 1
    TextLabel.Size = TextBox_2.Size
    TextLabel.Position = TextBox_2.Position
    TextLabel.TextSize = TextBox_2.TextSize
    TextLabel.Font = TextBox_2.Font
    TextLabel.TextColor3 = TextBox_2.TextColor3
    TextLabel.TextTransparency = TextBox_2.TextTransparency
    TextLabel.TextStrokeTransparency = TextBox_2.TextStrokeTransparency
    TextLabel.TextXAlignment = TextBox_2.TextXAlignment
    TextLabel.TextYAlignment = TextBox_2.TextYAlignment
    TextLabel.Text = "..."
    TextLabel.Parent = Frame_3
    arg1.GuiObject = Frame
    arg1.TextBox = TextBox_2
    arg1.TextLabel = TextLabel
    arg1.GuiObjects.BaseFrame = Frame
    arg1.GuiObjects.TextBoxFrame = Frame_2
    arg1.GuiObjects.TextBox = TextBox_2
    arg1.GuiObjects.TextLabel = TextLabel
    arg1.GuiObjects.MessageModeTextButton = TextButton
    arg1:AnimGuiObjects()
    arg1:SetUpTextBoxEvents(TextBox_2, TextLabel, TextButton)
    if arg1.UserHasChatOff then
        arg1:DoLockChatBar()
    end
    arg1.eGuiObjectsChanged:Fire()
end
function tbl_upvr.DoLockChatBar(arg1) -- Line 141
    --[[ Upvalues[2]:
        [1]: var4_upvw (read and write)
        [2]: var10_upvw (read and write)
    ]]
    if arg1.TextLabel then
        if 0 < var4_upvw.UserId then
            arg1.TextLabel.Text = var10_upvw:Get("GameChat_ChatMessageValidator_SettingsError", "To chat in game, turn on chat in your Privacy Settings.")
        else
            arg1.TextLabel.Text = var10_upvw:Get("GameChat_SwallowGuestChat_Message", "Sign up to chat in game.")
        end
        arg1:CalculateSize()
    end
    if arg1.TextBox then
        arg1.TextBox.Active = false
        arg1.TextBox.Focused:connect(function() -- Line 158
            --[[ Upvalues[1]:
                [1]: arg1 (readonly)
            ]]
            arg1.TextBox:ReleaseFocus()
        end)
    end
end
local UserInputService_upvr = game:GetService("UserInputService")
function tbl_upvr.SetUpTextBoxEvents(arg1, arg2, arg3, arg4) -- Line 164
    --[[ Upvalues[2]:
        [1]: UserInputService_upvr (readonly)
        [2]: module_3_upvr (readonly)
    ]]
    for i, v in pairs(arg1.TextBoxConnections) do
        v:disconnect()
        arg1.TextBoxConnections[i] = nil
    end
    arg1.TextBoxConnections.UserInputBegan = UserInputService_upvr.InputBegan:connect(function(arg1_2, arg2_2) -- Line 172
        --[[ Upvalues[3]:
            [1]: arg1 (readonly)
            [2]: arg2 (readonly)
            [3]: module_3_upvr (copied, readonly)
        ]]
        if arg1_2.KeyCode == Enum.KeyCode.Backspace and arg1:IsFocused() and arg2.Text == "" then
            arg1:SetChannelTarget(module_3_upvr.GeneralChannelName)
        end
    end)
    arg1.TextBoxConnections.TextBoxChanged = arg2.Changed:connect(function(arg1_3) -- Line 180
        --[[ Upvalues[3]:
            [1]: arg1 (readonly)
            [2]: arg2 (readonly)
            [3]: module_3_upvr (copied, readonly)
        ]]
        -- KONSTANTERROR: [0] 1. Error Block 18 start (CF ANALYSIS FAILED)
        if arg1_3 == "AbsoluteSize" then
            arg1:CalculateSize()
            return
        end
        if arg1_3 ~= "Text" then return end
        arg1:CalculateSize()
        if module_3_upvr.MaximumMessageLength < utf8.len(utf8.nfcnormalize(arg2.Text)) then
            arg2.Text = arg1.PreviousText
        else
            arg1.PreviousText = arg2.Text
        end
        local InCustomState = arg1.InCustomState
        -- KONSTANTERROR: [0] 1. Error Block 18 end (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [59] 42. Error Block 11 start (CF ANALYSIS FAILED)
        arg1.InCustomState = true
        arg1.CustomState = InCustomState
        do
            return
        end
        -- KONSTANTERROR: [59] 42. Error Block 11 end (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [67] 48. Error Block 12 start (CF ANALYSIS FAILED)
        arg1.CustomState:TextUpdated()
        -- KONSTANTERROR: [67] 48. Error Block 12 end (CF ANALYSIS FAILED)
    end)
    local function _(arg1_4) -- Line 209, Named "UpdateOnFocusStatusChanged"
        --[[ Upvalues[2]:
            [1]: arg2 (readonly)
            [2]: arg3 (readonly)
        ]]
        if arg1_4 or arg2.Text ~= "" then
            arg3.Visible = false
        else
            arg3.Visible = true
        end
    end
    arg1.TextBoxConnections.MessageModeClick = arg4.MouseButton1Click:connect(function() -- Line 217
        --[[ Upvalues[3]:
            [1]: arg4 (readonly)
            [2]: arg1 (readonly)
            [3]: module_3_upvr (copied, readonly)
        ]]
        if arg4.Text ~= "" then
            arg1:SetChannelTarget(module_3_upvr.GeneralChannelName)
        end
    end)
    arg1.TextBoxConnections.TextBoxFocused = arg2.Focused:connect(function() -- Line 223
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: arg3 (readonly)
        ]]
        if not arg1.UserHasChatOff then
            arg1:CalculateSize()
            arg3.Visible = false
        end
    end)
    arg1.TextBoxConnections.TextBoxFocusLost = arg2.FocusLost:connect(function(arg1_5, arg2_3) -- Line 230
        --[[ Upvalues[3]:
            [1]: arg1 (readonly)
            [2]: arg2 (readonly)
            [3]: arg3 (readonly)
        ]]
        arg1:CalculateSize()
        if arg2_3 and arg2_3.KeyCode == Enum.KeyCode.Escape then
            arg2.Text = ""
        end
        if arg2.Text ~= "" then
            arg3.Visible = false
        else
            arg3.Visible = true
        end
    end)
end
function tbl_upvr.GetTextBox(arg1) -- Line 239
    return arg1.TextBox
end
function tbl_upvr.GetMessageModeTextButton(arg1) -- Line 243
    return arg1.GuiObjects.MessageModeTextButton
end
function tbl_upvr.GetMessageModeTextLabel(arg1) -- Line 249
    return arg1:GetMessageModeTextButton()
end
function tbl_upvr.IsFocused(arg1) -- Line 253
    if arg1.UserHasChatOff then
        return false
    end
    return arg1:GetTextBox():IsFocused()
end
function tbl_upvr.GetVisible(arg1) -- Line 261
    return arg1.GuiObject.Visible
end
function tbl_upvr.CaptureFocus(arg1) -- Line 265
    if not arg1.UserHasChatOff then
        arg1:GetTextBox():CaptureFocus()
    end
end
function tbl_upvr.ReleaseFocus(arg1, arg2) -- Line 271
    arg1:GetTextBox():ReleaseFocus(arg2)
end
function tbl_upvr.ResetText(arg1) -- Line 275
    arg1:GetTextBox().Text = ""
end
function tbl_upvr.SetText(arg1, arg2) -- Line 279
    arg1:GetTextBox().Text = arg2
end
function tbl_upvr.GetEnabled(arg1) -- Line 283
    return arg1.GuiObject.Visible
end
function tbl_upvr.SetEnabled(arg1, arg2) -- Line 287
    if arg1.UserHasChatOff then
        arg1.GuiObject.Visible = true
    else
        arg1.GuiObject.Visible = arg2
    end
end
function tbl_upvr.SetTextLabelText(arg1, arg2) -- Line 297
    if not arg1.UserHasChatOff then
        arg1.TextLabel.Text = arg2
    end
end
function tbl_upvr.SetTextBoxText(arg1, arg2) -- Line 303
    arg1.TextBox.Text = arg2
end
function tbl_upvr.GetTextBoxText(arg1) -- Line 307
    return arg1.TextBox.Text
end
function tbl_upvr.ResetSize(arg1) -- Line 311
    arg1.TargetYSize = 0
    arg1:TweenToTargetYSize()
end
local function _(arg1) -- Line 316, Named "measureSize"
    --[[ Upvalues[1]:
        [1]: TextService_upvr (readonly)
    ]]
    return TextService_upvr:GetTextSize(arg1.Text, arg1.TextSize, arg1.Font, Vector2.new(arg1.AbsoluteSize.X, 10000))
end
function tbl_upvr.CalculateSize(arg1) -- Line 325
    --[[ Upvalues[1]:
        [1]: TextService_upvr (readonly)
    ]]
    if arg1.CalculatingSizeLock then
    else
        arg1.CalculatingSizeLock = true
        local var32
        local var33
        if arg1:IsFocused() or arg1.TextBox.Text ~= "" then
            var32 = arg1.TextBox.TextSize
            local TextBox = arg1.TextBox
            var33 = TextService_upvr:GetTextSize(TextBox.Text, TextBox.TextSize, TextBox.Font, Vector2.new(TextBox.AbsoluteSize.X, 10000)).Y
        else
            var32 = arg1.TextLabel.TextSize
            local TextLabel_3 = arg1.TextLabel
            var33 = TextService_upvr:GetTextSize(TextLabel_3.Text, TextLabel_3.TextSize, TextLabel_3.Font, Vector2.new(TextLabel_3.AbsoluteSize.X, 10000)).Y
        end
        local var36 = var33 - var32
        if arg1.TargetYSize ~= var36 then
            arg1.TargetYSize = var36
            arg1:TweenToTargetYSize()
        end
        arg1.CalculatingSizeLock = false
    end
end
function tbl_upvr.TweenToTargetYSize(arg1) -- Line 351
    local udim2_upvr = UDim2.new(1, 0, 1, arg1.TargetYSize)
    arg1.GuiObject.Size = udim2_upvr
    arg1.GuiObject.Size = arg1.GuiObject.Size
    local minimum_upvr = math.min(1, (math.abs(arg1.GuiObject.AbsoluteSize.Y - arg1.GuiObject.AbsoluteSize.Y)) * (1 / arg1.TweenPixelsPerSecond))
    if not pcall(function() -- Line 363
        --[[ Upvalues[3]:
            [1]: arg1 (readonly)
            [2]: udim2_upvr (readonly)
            [3]: minimum_upvr (readonly)
        ]]
        arg1.GuiObject:TweenSize(udim2_upvr, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, minimum_upvr, true)
    end) then
        arg1.GuiObject.Size = udim2_upvr
    end
end
function tbl_upvr.SetTextSize(arg1, arg2) -- Line 369
    if not arg1:IsInCustomState() then
        if arg1.TextBox then
            arg1.TextBox.TextSize = arg2
        end
        if arg1.TextLabel then
            arg1.TextLabel.TextSize = arg2
        end
    end
end
function tbl_upvr.GetDefaultChannelNameColor(arg1) -- Line 380
    --[[ Upvalues[1]:
        [1]: module_3_upvr (readonly)
    ]]
    if module_3_upvr.DefaultChannelNameColor then
        return module_3_upvr.DefaultChannelNameColor
    end
    return Color3.fromRGB(35, 76, 142)
end
function tbl_upvr.SetChannelTarget(arg1, arg2) -- Line 387
    --[[ Upvalues[2]:
        [1]: module_3_upvr (readonly)
        [2]: var10_upvw (read and write)
    ]]
    local MessageModeTextButton = arg1.GuiObjects.MessageModeTextButton
    local TextBox_3 = arg1.TextBox
    local TextLabel_2 = arg1.TextLabel
    arg1.TargetChannel = arg2
    if not arg1:IsInCustomState() then
        if arg2 ~= module_3_upvr.GeneralChannelName then
            MessageModeTextButton.Size = UDim2.new(0, 1000, 1, 0)
            local var43 = arg2
            if var10_upvw.tryLocalize then
                var43 = var10_upvw:tryLocalize(arg2)
            end
            MessageModeTextButton.Text = string.format("[%s] ", var43)
            local any_GetChannelNameColor_result1 = arg1:GetChannelNameColor(arg2)
            if any_GetChannelNameColor_result1 then
                MessageModeTextButton.TextColor3 = any_GetChannelNameColor_result1
            else
                MessageModeTextButton.TextColor3 = arg1:GetDefaultChannelNameColor()
            end
            local X = MessageModeTextButton.TextBounds.X
            MessageModeTextButton.Size = UDim2.new(0, X, 1, 0)
            TextBox_3.Size = UDim2.new(1, -X, 1, 0)
            TextBox_3.Position = UDim2.new(0, X, 0, 0)
            TextLabel_2.Size = UDim2.new(1, -X, 1, 0)
            TextLabel_2.Position = UDim2.new(0, X, 0, 0)
            return
        end
        MessageModeTextButton.Text = ""
        MessageModeTextButton.Size = UDim2.new(0, 0, 0, 0)
        TextBox_3.Size = UDim2.new(1, 0, 1, 0)
        TextBox_3.Position = UDim2.new(0, 0, 0, 0)
        TextLabel_2.Size = UDim2.new(1, 0, 1, 0)
        TextLabel_2.Position = UDim2.new(0, 0, 0, 0)
    end
end
function tbl_upvr.IsInCustomState(arg1) -- Line 427
    return arg1.InCustomState
end
function tbl_upvr.ResetCustomState(arg1) -- Line 431
    --[[ Upvalues[1]:
        [1]: var10_upvw (read and write)
    ]]
    if arg1.InCustomState then
        arg1.CustomState:Destroy()
        arg1.CustomState = nil
        arg1.InCustomState = false
        arg1.ChatBarParentFrame:ClearAllChildren()
        arg1:CreateGuiObjects(arg1.ChatBarParentFrame)
        arg1:SetTextLabelText(var10_upvw:Get("GameChat_ChatMain_ChatBarText", "To chat click here or press \"/\" key"))
    end
end
local module_upvr = require(ClientChatModules:WaitForChild("CommandModules"):WaitForChild("Whisper"))
function tbl_upvr.EnterWhisperState(arg1, arg2) -- Line 448
    --[[ Upvalues[2]:
        [1]: module_upvr (readonly)
        [2]: module_3_upvr (readonly)
    ]]
    arg1:ResetCustomState()
    if module_upvr.CustomStateCreator then
        arg1.CustomState = module_upvr.CustomStateCreator(arg2, arg1.ChatWindow, arg1, module_3_upvr)
        arg1.InCustomState = true
    else
        local var47
        if module_3_upvr.PlayerDisplayNamesEnabled then
            var47 = arg2.DisplayName
        else
            var47 = arg2.Name
        end
        arg1:SetText("/w "..var47)
    end
    arg1:CaptureFocus()
end
function tbl_upvr.GetCustomMessage(arg1) -- Line 472
    if arg1.InCustomState then
        return arg1.CustomState:GetMessage()
    end
    return nil
end
function tbl_upvr.CustomStateProcessCompletedMessage(arg1, arg2) -- Line 479
    if arg1.InCustomState then
        return arg1.CustomState:ProcessCompletedMessage()
    end
    return false
end
function tbl_upvr.FadeOutBackground(arg1, arg2) -- Line 486
    --[[ Upvalues[1]:
        [1]: module_2_upvr (readonly)
    ]]
    arg1.AnimParams.Background_TargetTransparency = 1
    arg1.AnimParams.Background_NormalizedExptValue = module_2_upvr:NormalizedDefaultExptValueInSeconds(arg2)
    arg1:FadeOutText(arg2)
end
function tbl_upvr.FadeInBackground(arg1, arg2) -- Line 492
    --[[ Upvalues[1]:
        [1]: module_2_upvr (readonly)
    ]]
    arg1.AnimParams.Background_TargetTransparency = 0.6
    arg1.AnimParams.Background_NormalizedExptValue = module_2_upvr:NormalizedDefaultExptValueInSeconds(arg2)
    arg1:FadeInText(arg2)
end
function tbl_upvr.FadeOutText(arg1, arg2) -- Line 498
    --[[ Upvalues[1]:
        [1]: module_2_upvr (readonly)
    ]]
    arg1.AnimParams.Text_TargetTransparency = 1
    arg1.AnimParams.Text_NormalizedExptValue = module_2_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.FadeInText(arg1, arg2) -- Line 503
    --[[ Upvalues[1]:
        [1]: module_2_upvr (readonly)
    ]]
    arg1.AnimParams.Text_TargetTransparency = 0.4
    arg1.AnimParams.Text_NormalizedExptValue = module_2_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.AnimGuiObjects(arg1) -- Line 508
    arg1.GuiObject.BackgroundTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.GuiObjects.TextBoxFrame.BackgroundTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.GuiObjects.TextLabel.TextTransparency = arg1.AnimParams.Text_CurrentTransparency
    arg1.GuiObjects.TextBox.TextTransparency = arg1.AnimParams.Text_CurrentTransparency
    arg1.GuiObjects.MessageModeTextButton.TextTransparency = arg1.AnimParams.Text_CurrentTransparency
end
function tbl_upvr.InitializeAnimParams(arg1) -- Line 517
    arg1.AnimParams.Text_TargetTransparency = 0.4
    arg1.AnimParams.Text_CurrentTransparency = 0.4
    arg1.AnimParams.Text_NormalizedExptValue = 1
    arg1.AnimParams.Background_TargetTransparency = 0.6
    arg1.AnimParams.Background_CurrentTransparency = 0.6
    arg1.AnimParams.Background_NormalizedExptValue = 1
end
function tbl_upvr.Update(arg1, arg2) -- Line 527
    --[[ Upvalues[1]:
        [1]: module_2_upvr (readonly)
    ]]
    arg1.AnimParams.Text_CurrentTransparency = module_2_upvr:Expt(arg1.AnimParams.Text_CurrentTransparency, arg1.AnimParams.Text_TargetTransparency, arg1.AnimParams.Text_NormalizedExptValue, arg2)
    arg1.AnimParams.Background_CurrentTransparency = module_2_upvr:Expt(arg1.AnimParams.Background_CurrentTransparency, arg1.AnimParams.Background_TargetTransparency, arg1.AnimParams.Background_NormalizedExptValue, arg2)
    arg1:AnimGuiObjects()
end
function tbl_upvr.SetChannelNameColor(arg1, arg2, arg3) -- Line 544
    arg1.ChannelNameColors[arg2] = arg3
    if arg1.GuiObjects.MessageModeTextButton.Text == arg2 then
        arg1.GuiObjects.MessageModeTextButton.TextColor3 = arg3
    end
end
function tbl_upvr.GetChannelNameColor(arg1, arg2) -- Line 551
    return arg1.ChannelNameColors[arg2]
end
local RunService_upvr = game:GetService("RunService")
function module.new(arg1, arg2) -- Line 558
    --[[ Upvalues[5]:
        [1]: tbl_upvr (readonly)
        [2]: module_3_upvr (readonly)
        [3]: Chat_upvr (readonly)
        [4]: var4_upvw (read and write)
        [5]: RunService_upvr (readonly)
    ]]
    local setmetatable_result1_upvr = setmetatable({}, tbl_upvr)
    setmetatable_result1_upvr.GuiObject = nil
    setmetatable_result1_upvr.ChatBarParentFrame = nil
    setmetatable_result1_upvr.TextBox = nil
    setmetatable_result1_upvr.TextLabel = nil
    setmetatable_result1_upvr.GuiObjects = {}
    setmetatable_result1_upvr.eGuiObjectsChanged = Instance.new("BindableEvent")
    setmetatable_result1_upvr.GuiObjectsChanged = setmetatable_result1_upvr.eGuiObjectsChanged.Event
    setmetatable_result1_upvr.TextBoxConnections = {}
    setmetatable_result1_upvr.PreviousText = ""
    setmetatable_result1_upvr.InCustomState = false
    setmetatable_result1_upvr.CustomState = nil
    setmetatable_result1_upvr.TargetChannel = nil
    setmetatable_result1_upvr.CommandProcessor = arg1
    setmetatable_result1_upvr.ChatWindow = arg2
    setmetatable_result1_upvr.TweenPixelsPerSecond = 500
    setmetatable_result1_upvr.TargetYSize = 0
    setmetatable_result1_upvr.AnimParams = {}
    setmetatable_result1_upvr.CalculatingSizeLock = false
    setmetatable_result1_upvr.ChannelNameColors = {}
    setmetatable_result1_upvr.UserHasChatOff = false
    setmetatable_result1_upvr:InitializeAnimParams()
    module_3_upvr.SettingsChanged:connect(function(arg1_6, arg2_4) -- Line 590
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        if arg1_6 == "ChatBarTextSize" then
            setmetatable_result1_upvr:SetTextSize(arg2_4)
        end
    end)
    coroutine.wrap(function() -- Line 596
        --[[ Upvalues[4]:
            [1]: Chat_upvr (copied, readonly)
            [2]: var4_upvw (copied, read and write)
            [3]: RunService_upvr (copied, readonly)
            [4]: setmetatable_result1_upvr (readonly)
        ]]
        local pcall_result1, pcall_result2 = pcall(function() -- Line 597
            --[[ Upvalues[2]:
                [1]: Chat_upvr (copied, readonly)
                [2]: var4_upvw (copied, read and write)
            ]]
            return Chat_upvr:CanUserChatAsync(var4_upvw.UserId)
        end)
        local var55 = pcall_result1
        if var55 then
            var55 = RunService_upvr:IsStudio() or pcall_result2
        end
        if var55 == false then
            setmetatable_result1_upvr.UserHasChatOff = true
            setmetatable_result1_upvr:DoLockChatBar()
        end
    end)()
    return setmetatable_result1_upvr
end
return module
ModuleScript ChatChannel ChatChannel
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:00
-- Luau version 6, Types version 3
-- Time taken: 0.011709 seconds

local pcall_result1, pcall_result2_4 = pcall(function() -- Line 7
    return UserSettings():IsUserFeatureEnabled("UserFlagRemoveMessageFromMessageLog")
end)
local pcall_result1_3, pcall_result2_3 = pcall(function() -- Line 15
    return UserSettings():IsUserFeatureEnabled("UserIsChatTranslationEnabled2")
end)
local var28_upvw = pcall_result1_3 and pcall_result2_3
local module = {}
local Parent_2 = script.Parent
local module_upvr_2 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"))
local var32_upvw
if var28_upvw then
    var32_upvw = Parent_2:FindFirstChild("ChatTranslationEnabled")
    if var32_upvw == nil then
        local var34_upvw
        var34_upvw = Parent_2.ChildAdded:Connect(function(arg1) -- Line 35
            --[[ Upvalues[2]:
                [1]: var32_upvw (read and write)
                [2]: var34_upvw (read and write)
            ]]
            if arg1.Name == "ChatTranslationEnabled" then
                var32_upvw = arg1
                var34_upvw:Disconnect()
            end
        end)
    end
end
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
function tbl_upvr.Destroy(arg1) -- Line 50
    arg1.Destroyed = true
end
function tbl_upvr.SetActive(arg1, arg2) -- Line 54
    if arg2 == arg1.Active then
    else
        if arg2 == false then
            arg1.MessageLogDisplay:Clear()
        else
            arg1.MessageLogDisplay:SetCurrentChannelName(arg1.Name)
            for i_4 = 1, #arg1.MessageLog do
                arg1.MessageLogDisplay:AddMessage(arg1.MessageLog[i_4])
            end
        end
        arg1.Active = arg2
    end
end
local var37_upvw = pcall_result1 and pcall_result2_4
function tbl_upvr.UpdateMessageFiltered(arg1, arg2) -- Line 69
    --[[ Upvalues[3]:
        [1]: var28_upvw (read and write)
        [2]: var32_upvw (read and write)
        [3]: var37_upvw (read and write)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [16] 12. Error Block 21 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [16] 12. Error Block 21 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [4] 4. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [17.2950158]
    -- KONSTANTERROR: [4] 4. Error Block 2 end (CF ANALYSIS FAILED)
end
function tbl_upvr.AddMessageToChannel(arg1, arg2) -- Line 105
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    table.insert(arg1.MessageLog, arg2)
    if arg1.Active then
        arg1.MessageLogDisplay:AddMessage(arg2)
    end
    if module_upvr_2.MessageHistoryLengthPerChannel < #arg1.MessageLog then
        arg1:RemoveLastMessageFromChannel()
    end
end
function tbl_upvr.InternalAddMessageAtTimeStamp(arg1, arg2) -- Line 115
    for i = 1, #arg1.MessageLog do
        if arg2.Time < arg1.MessageLog[i].Time then
            table.insert(arg1.MessageLog, i, arg2)
            return
        end
    end
    table.insert(arg1.MessageLog, arg2)
end
function tbl_upvr.AddMessagesToChannelByTimeStamp(arg1, arg2, arg3) -- Line 125
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    for i_2 = arg3, #arg2 do
        arg1:InternalAddMessageAtTimeStamp(arg2[i_2])
    end
    while true do
        i_2 = module_upvr_2
        if i_2.MessageHistoryLengthPerChannel >= #arg1.MessageLog then break end
        i_2 = 1
        table.remove(arg1.MessageLog, i_2)
    end
    if arg1.Active then
        arg1.MessageLogDisplay:Clear()
        i_2 = 1
        for i_3 = i_2, #arg1.MessageLog do
            arg1.MessageLogDisplay:AddMessage(arg1.MessageLog[i_3])
        end
    end
end
function tbl_upvr.AddMessageToChannelByTimeStamp(arg1, arg2) -- Line 140
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    if 1 <= #arg1.MessageLog then
        if arg2.Time < arg1.MessageLog[1].Time then
        else
            if arg1.MessageLog[#arg1.MessageLog].Time <= arg2.Time then
                arg1:AddMessageToChannel(arg2)
                return
            end
            for i_5 = 1, #arg1.MessageLog do
                if arg2.Time < arg1.MessageLog[i_5].Time then
                    table.insert(arg1.MessageLog, i_5, arg2)
                    if module_upvr_2.MessageHistoryLengthPerChannel < #arg1.MessageLog then
                        arg1:RemoveLastMessageFromChannel()
                    end
                    if arg1.Active then
                        arg1.MessageLogDisplay:AddMessageAtIndex(arg2, i_5)
                    end
                    return
                end
            end
        end
    end
    arg1:AddMessageToChannel(arg2)
end
function tbl_upvr.RemoveLastMessageFromChannel(arg1) -- Line 170
    table.remove(arg1.MessageLog, 1)
    if arg1.Active then
        arg1.MessageLogDisplay:RemoveLastMessage()
    end
end
function tbl_upvr.ClearMessageLog(arg1) -- Line 178
    arg1.MessageLog = {}
    if arg1.Active then
        arg1.MessageLogDisplay:Clear()
    end
end
function tbl_upvr.RegisterChannelTab(arg1, arg2) -- Line 186
    arg1.ChannelTab = arg2
end
function module.new(arg1, arg2) -- Line 193
    --[[ Upvalues[1]:
        [1]: tbl_upvr (readonly)
    ]]
    local setmetatable_result1_2 = setmetatable({}, tbl_upvr)
    setmetatable_result1_2.Destroyed = false
    setmetatable_result1_2.Active = false
    setmetatable_result1_2.MessageLog = {}
    setmetatable_result1_2.MessageLogDisplay = arg2
    setmetatable_result1_2.ChannelTab = nil
    setmetatable_result1_2.Name = arg1
    return setmetatable_result1_2
end
return module
ModuleScript MessageLogDisplay MessageLogDisplay
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:02
-- Luau version 6, Types version 3
-- Time taken: 0.014452 seconds

local pcall_result1_2, pcall_result2 = pcall(function() -- Line 7
    return UserSettings():IsUserFeatureEnabled("UserRemoveMessageOnTextFilterFailures")
end)
local pcall_result1, pcall_result2_2 = pcall(function() -- Line 15
    return UserSettings():IsUserFeatureEnabled("UserIsChatTranslationEnabled2")
end)
local var7_upvw = pcall_result1 and pcall_result2_2
local module_upvr_3 = {
    ScrollBarThickness = 4;
}
local Parent = script.Parent
local module_upvr = require(Parent:WaitForChild("CurveUtil"))
local any_new_result1_upvr = require(Parent:WaitForChild("MessageLabelCreator")).new()
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
local module_upvr_2 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"))
local function CreateGuiObjects_upvr() -- Line 42, Named "CreateGuiObjects"
    --[[ Upvalues[2]:
        [1]: module_upvr_2 (readonly)
        [2]: module_upvr_3 (readonly)
    ]]
    local Frame = Instance.new("Frame")
    Frame.Selectable = false
    Frame.Size = UDim2.new(1, 0, 1, 0)
    Frame.BackgroundTransparency = 1
    local ScrollingFrame = Instance.new("ScrollingFrame")
    ScrollingFrame.Selectable = module_upvr_2.GamepadNavigationEnabled
    ScrollingFrame.Name = "Scroller"
    ScrollingFrame.BackgroundTransparency = 1
    ScrollingFrame.BorderSizePixel = 0
    ScrollingFrame.Position = UDim2.new(0, 0, 0, 3)
    ScrollingFrame.Size = UDim2.new(1, -4, 1, -6)
    ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
    ScrollingFrame.ScrollBarThickness = module_upvr_3.ScrollBarThickness
    ScrollingFrame.Active = true
    ScrollingFrame.Parent = Frame
    local UIListLayout = Instance.new("UIListLayout")
    UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
    UIListLayout.Parent = ScrollingFrame
    return Frame, ScrollingFrame, UIListLayout
end
function tbl_upvr.Destroy(arg1) -- Line 67
    arg1.GuiObject:Destroy()
    arg1.Destroyed = true
end
function tbl_upvr.SetActive(arg1, arg2) -- Line 72
    arg1.GuiObject.Visible = arg2
end
local var17_upvw = pcall_result1_2 and pcall_result2
function tbl_upvr.UpdateMessageFiltered(arg1, arg2) -- Line 76
    --[[ Upvalues[1]:
        [1]: var17_upvw (read and write)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [16] 12. Error Block 16 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [16] 12. Error Block 16 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [4] 4. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [17.1966606]
    -- KONSTANTERROR: [4] 4. Error Block 2 end (CF ANALYSIS FAILED)
end
function tbl_upvr.RefreshMessagePlacement(arg1, arg2) -- Line 107
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [16] 12. Error Block 12 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [16] 12. Error Block 12 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [4] 4. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [17.328206]
    -- KONSTANTERROR: [4] 4. Error Block 2 end (CF ANALYSIS FAILED)
end
function tbl_upvr.AddMessage(arg1, arg2) -- Line 129
    --[[ Upvalues[2]:
        [1]: var7_upvw (read and write)
        [2]: any_new_result1_upvr (readonly)
    ]]
    arg1:WaitUntilParentedCorrectly()
    local var18
    if var7_upvw then
        var18 = any_new_result1_upvr:CreateMessageLabel_Chat(arg2, arg1.CurrentChannelName, function() -- Line 134
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            arg1:RefreshMessagePlacement(arg2)
        end)
    else
        var18 = any_new_result1_upvr:CreateMessageLabel(arg2, arg1.CurrentChannelName)
    end
    if var18 == nil then
    else
        table.insert(arg1.MessageObjectLog, var18)
        arg1:PositionMessageLabelInWindow(var18, #arg1.MessageObjectLog)
    end
end
function tbl_upvr.RemoveMessageAtIndex(arg1, arg2) -- Line 151
    arg1:WaitUntilParentedCorrectly()
    local var20 = arg1.MessageObjectLog[arg2]
    if var20 then
        var20:Destroy()
        table.remove(arg1.MessageObjectLog, arg2)
    end
end
function tbl_upvr.AddMessageAtIndex(arg1, arg2, arg3) -- Line 162
    --[[ Upvalues[2]:
        [1]: var7_upvw (read and write)
        [2]: any_new_result1_upvr (readonly)
    ]]
    local var21
    if var7_upvw then
        var21 = any_new_result1_upvr:CreateMessageLabel_Chat(arg2, arg1.CurrentChannelName, function() -- Line 165
            --[[ Upvalues[2]:
                [1]: arg1 (readonly)
                [2]: arg2 (readonly)
            ]]
            arg1:RefreshMessagePlacement(arg2)
        end)
    else
        var21 = any_new_result1_upvr:CreateMessageLabel(arg2, arg1.CurrentChannelName)
    end
    if var21 == nil then
    else
        table.insert(arg1.MessageObjectLog, arg3, var21)
        arg1:PositionMessageLabelInWindow(var21, arg3)
    end
end
function tbl_upvr.RemoveLastMessage(arg1) -- Line 183
    arg1:WaitUntilParentedCorrectly()
    arg1.MessageObjectLog[1]:Destroy()
    table.remove(arg1.MessageObjectLog, 1)
end
function tbl_upvr.IsScrolledDown(arg1) -- Line 192
    local Offset = arg1.Scroller.CanvasSize.Y.Offset
    local Y = arg1.Scroller.AbsoluteWindowSize.Y
    local var25 = true
    if Offset >= Y then
        if Offset - arg1.Scroller.CanvasPosition.Y > Y + 5 then
            var25 = false
        else
            var25 = true
        end
    end
    return var25
end
function tbl_upvr.UpdateMessageTextHeight(arg1, arg2) -- Line 201
    for i = 1, 10 do
        if arg2.BaseMessage.TextFits then break end
        arg2.BaseFrame.Size = UDim2.new(1, 0, 0, arg2.GetHeightFunction(arg1.Scroller.AbsoluteSize.X - i))
    end
end
function tbl_upvr.PositionMessageLabelInWindow(arg1, arg2, arg3) -- Line 213
    arg1:WaitUntilParentedCorrectly()
    local BaseFrame = arg2.BaseFrame
    local var28 = 1
    if arg1.MessageObjectLog[arg3 - 1] then
        if arg3 == #arg1.MessageObjectLog then
            var28 = arg1.MessageObjectLog[arg3 - 1].BaseFrame.LayoutOrder + 1
        else
            var28 = arg1.MessageObjectLog[arg3 - 1].BaseFrame.LayoutOrder
        end
    end
    BaseFrame.LayoutOrder = var28
    BaseFrame.Size = UDim2.new(1, 0, 0, arg2.GetHeightFunction(arg1.Scroller.AbsoluteSize.X))
    BaseFrame.Parent = arg1.Scroller
    if arg2.BaseMessage then
        arg1:UpdateMessageTextHeight(arg2)
    end
    if arg1:IsScrolledDown() then
        arg1.Scroller.CanvasPosition = Vector2.new(0, math.max(0, arg1.Scroller.CanvasSize.Y.Offset - arg1.Scroller.AbsoluteSize.Y))
    end
end
function tbl_upvr.ReorderAllMessages(arg1) -- Line 243
    arg1:WaitUntilParentedCorrectly()
    if arg1.GuiObject.AbsoluteSize.Y < 1 then
    else
        for _, v_2 in pairs(arg1.MessageObjectLog) do
            arg1:UpdateMessageTextHeight(v_2)
        end
        if not arg1:IsScrolledDown() then
            arg1.Scroller.CanvasPosition = arg1.Scroller.CanvasPosition
            return
        end
        arg1.Scroller.CanvasPosition = Vector2.new(0, math.max(0, arg1.Scroller.CanvasSize.Y.Offset - arg1.Scroller.AbsoluteSize.Y))
    end
end
function tbl_upvr.Clear(arg1) -- Line 265
    for _, v in pairs(arg1.MessageObjectLog) do
        v:Destroy()
    end
    arg1.MessageObjectLog = {}
end
function tbl_upvr.SetCurrentChannelName(arg1, arg2) -- Line 272
    arg1.CurrentChannelName = arg2
end
function tbl_upvr.FadeOutBackground(arg1, arg2) -- Line 276
end
function tbl_upvr.FadeInBackground(arg1, arg2) -- Line 280
end
function tbl_upvr.FadeOutText(arg1, arg2) -- Line 284
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    for i_3 = 1, #arg1.MessageObjectLog do
        if arg1.MessageObjectLog[i_3].FadeOutFunction then
            arg1.MessageObjectLog[i_3].FadeOutFunction(arg2, module_upvr)
        end
    end
end
function tbl_upvr.FadeInText(arg1, arg2) -- Line 292
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    for i_4 = 1, #arg1.MessageObjectLog do
        if arg1.MessageObjectLog[i_4].FadeInFunction then
            arg1.MessageObjectLog[i_4].FadeInFunction(arg2, module_upvr)
        end
    end
end
function tbl_upvr.Update(arg1, arg2) -- Line 300
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    for i_5 = 1, #arg1.MessageObjectLog do
        if arg1.MessageObjectLog[i_5].UpdateAnimFunction then
            arg1.MessageObjectLog[i_5].UpdateAnimFunction(arg2, module_upvr)
        end
    end
end
function tbl_upvr.WaitUntilParentedCorrectly(arg1) -- Line 309
    while not arg1.GuiObject:IsDescendantOf(game:GetService("Players").LocalPlayer) do
        arg1.GuiObject.AncestryChanged:wait()
    end
end
function module_upvr_3.new() -- Line 318
    --[[ Upvalues[2]:
        [1]: tbl_upvr (readonly)
        [2]: CreateGuiObjects_upvr (readonly)
    ]]
    local setmetatable_result1_upvr = setmetatable({}, tbl_upvr)
    setmetatable_result1_upvr.Destroyed = false
    local CreateGuiObjects_upvr_result1, CreateGuiObjects_upvr_result2, CreateGuiObjects_upvr_result3 = CreateGuiObjects_upvr()
    setmetatable_result1_upvr.GuiObject = CreateGuiObjects_upvr_result1
    setmetatable_result1_upvr.Scroller = CreateGuiObjects_upvr_result2
    setmetatable_result1_upvr.Layout = CreateGuiObjects_upvr_result3
    setmetatable_result1_upvr.MessageObjectLog = {}
    setmetatable_result1_upvr.Name = "MessageLogDisplay"
    setmetatable_result1_upvr.GuiObject.Name = "Frame_"..setmetatable_result1_upvr.Name
    setmetatable_result1_upvr.CurrentChannelName = ""
    setmetatable_result1_upvr.GuiObject:GetPropertyChangedSignal("AbsoluteSize"):Connect(function() -- Line 334
        --[[ Upvalues[1]:
            [1]: setmetatable_result1_upvr (readonly)
        ]]
        spawn(function() -- Line 335
            --[[ Upvalues[1]:
                [1]: setmetatable_result1_upvr (copied, readonly)
            ]]
            setmetatable_result1_upvr:ReorderAllMessages()
        end)
    end)
    local var48_upvw = true
    setmetatable_result1_upvr.Layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() -- Line 340
        --[[ Upvalues[2]:
            [1]: setmetatable_result1_upvr (readonly)
            [2]: var48_upvw (read and write)
        ]]
        local AbsoluteContentSize = setmetatable_result1_upvr.Layout.AbsoluteContentSize
        setmetatable_result1_upvr.Scroller.CanvasSize = UDim2.new(0, 0, 0, AbsoluteContentSize.Y)
        if var48_upvw then
            setmetatable_result1_upvr.Scroller.CanvasPosition = Vector2.new(0, AbsoluteContentSize.Y - setmetatable_result1_upvr.Scroller.AbsoluteWindowSize.Y)
        end
    end)
    setmetatable_result1_upvr.Scroller:GetPropertyChangedSignal("CanvasPosition"):Connect(function() -- Line 349
        --[[ Upvalues[2]:
            [1]: var48_upvw (read and write)
            [2]: setmetatable_result1_upvr (readonly)
        ]]
        var48_upvw = setmetatable_result1_upvr:IsScrolledDown()
    end)
    return setmetatable_result1_upvr
end
return module_upvr_3
ModuleScript ChatWindow ChatWindow
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:03
-- Luau version 6, Types version 3
-- Time taken: 0.037163 seconds

local module = {}
local Players_upvr = game:GetService("Players")
local Chat_upvr = game:GetService("Chat")
local Parent = script.Parent
local module_upvr = require(Chat_upvr:WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"))
local module_3_upvr = require(Parent:WaitForChild("CurveUtil"))
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
function getClassicChatEnabled() -- Line 34
    --[[ Upvalues[2]:
        [1]: module_upvr (readonly)
        [2]: Players_upvr (readonly)
    ]]
    if module_upvr.ClassicChatEnabled ~= nil then
        return module_upvr.ClassicChatEnabled
    end
    return Players_upvr.ClassicChat
end
function getBubbleChatEnabled() -- Line 41
    --[[ Upvalues[2]:
        [1]: module_upvr (readonly)
        [2]: Players_upvr (readonly)
    ]]
    if module_upvr.BubbleChatEnabled ~= nil then
        return module_upvr.BubbleChatEnabled
    end
    return Players_upvr.BubbleChat
end
function bubbleChatOnly() -- Line 48
    local var8 = not getClassicChatEnabled()
    if var8 then
        var8 = getBubbleChatEnabled()
    end
    return var8
end
function mergeProps(arg1, arg2) -- Line 53
    if not arg1 or not arg2 then
    else
        for i_2, v_2 in pairs(arg1) do
            if arg2[i_2] ~= nil then
                arg2[i_2] = v_2
            end
        end
    end
end
local PlayerGui_upvr = Players_upvr.LocalPlayer:WaitForChild("PlayerGui")
function tbl_upvr.CreateGuiObjects(arg1, arg2) -- Line 62
    --[[ Upvalues[3]:
        [1]: Chat_upvr (readonly)
        [2]: module_upvr (readonly)
        [3]: PlayerGui_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local var15_upvw
    pcall(function() -- Line 64
        --[[ Upvalues[2]:
            [1]: var15_upvw (read and write)
            [2]: Chat_upvr (copied, readonly)
        ]]
        var15_upvw = Chat_upvr:InvokeChatCallback(Enum.ChatCallbackType.OnCreatingChatWindow, nil)
    end)
    mergeProps(var15_upvw, module_upvr)
    local Frame_upvr_3 = Instance.new("Frame")
    Frame_upvr_3.BackgroundTransparency = 1
    Frame_upvr_3.Active = module_upvr.WindowDraggable
    Frame_upvr_3.Parent = arg2
    Frame_upvr_3.AutoLocalize = false
    local Frame_upvr = Instance.new("Frame")
    Frame_upvr.Selectable = false
    Frame_upvr.Name = "ChatBarParentFrame"
    Frame_upvr.BackgroundTransparency = 1
    Frame_upvr.Parent = Frame_upvr_3
    local Frame_upvr_2 = Instance.new("Frame")
    Frame_upvr_2.Selectable = false
    Frame_upvr_2.Name = "ChannelsBarParentFrame"
    Frame_upvr_2.BackgroundTransparency = 1
    Frame_upvr_2.Position = UDim2.new(0, 0, 0, 0)
    Frame_upvr_2.Parent = Frame_upvr_3
    local Frame_upvr_4 = Instance.new("Frame")
    Frame_upvr_4.Selectable = false
    Frame_upvr_4.Name = "ChatChannelParentFrame"
    Frame_upvr_4.BackgroundTransparency = 1
    Frame_upvr_4.BackgroundColor3 = module_upvr.BackGroundColor
    Frame_upvr_4.BackgroundTransparency = 0.6
    Frame_upvr_4.BorderSizePixel = 0
    Frame_upvr_4.Parent = Frame_upvr_3
    local ImageButton_upvr = Instance.new("ImageButton")
    ImageButton_upvr.Selectable = false
    ImageButton_upvr.Image = ""
    ImageButton_upvr.BackgroundTransparency = 0.6
    ImageButton_upvr.BorderSizePixel = 0
    ImageButton_upvr.Visible = false
    ImageButton_upvr.BackgroundColor3 = module_upvr.BackGroundColor
    ImageButton_upvr.Active = true
    local var22_upvw
    if bubbleChatOnly() then
        var22_upvw = ImageButton_upvr.AbsoluteSize
        var22_upvw = 0
        ImageButton_upvr.Position = UDim2.new(1, -var22_upvw.X, 0, var22_upvw)
    else
        var22_upvw = ImageButton_upvr.AbsoluteSize
        var22_upvw = -ImageButton_upvr.AbsoluteSize.Y
        ImageButton_upvr.Position = UDim2.new(1, -var22_upvw.X, 1, var22_upvw)
    end
    ImageButton_upvr.Parent = Frame_upvr_3
    local ImageLabel = Instance.new("ImageLabel")
    ImageLabel.Selectable = false
    var22_upvw = 0.8
    ImageLabel.Size = UDim2.new(0.8, 0, var22_upvw, 0)
    var22_upvw = 0.2
    ImageLabel.Position = UDim2.new(0.2, 0, var22_upvw, 0)
    ImageLabel.BackgroundTransparency = 1
    ImageLabel.Image = "rbxassetid://261880743"
    ImageLabel.Parent = ImageButton_upvr
    local function _() -- Line 122, Named "GetScreenGuiParent"
        --[[ Upvalues[1]:
            [1]: Frame_upvr_3 (readonly)
        ]]
        local var24
        while var24 and not var24:IsA("ScreenGui") do
            var24 = var24.Parent
        end
        return var24
    end
    var22_upvw = Frame_upvr_3
    while var22_upvw and not var22_upvw:IsA("ScreenGui") do
        var22_upvw = var22_upvw.Parent
    end
    local var25 = var22_upvw
    var22_upvw = var25.AbsoluteSize.X
    if var22_upvw <= 640 then
        local _ = 1
    else
        var22_upvw = var25.AbsoluteSize.X
        if var22_upvw <= 1024 then
        end
    end
    var22_upvw = false
    local function doCheckSizeBounds_upvr() -- Line 145, Named "doCheckSizeBounds"
        --[[ Upvalues[6]:
            [1]: var22_upvw (read and write)
            [2]: Frame_upvr_3 (readonly)
            [3]: PlayerGui_upvr (copied, readonly)
            [4]: module_upvr (copied, readonly)
            [5]: Frame_upvr_2 (readonly)
            [6]: Frame_upvr (readonly)
        ]]
        local var27
        if var22_upvw then
        else
            var22_upvw = true
            if not Frame_upvr_3:IsDescendantOf(PlayerGui_upvr) then return end
            var27 = Frame_upvr_3
            while var27 and not var27:IsA("ScreenGui") do
                var27 = var27.Parent
            end
            local var28 = var27
            var27 = module_upvr.MinimumWindowSize
            local MaximumWindowSize = module_upvr.MaximumWindowSize
            local var30 = var27.X.Scale * var28.AbsoluteSize.X + var27.X.Offset
            local maximum = math.max(var27.Y.Scale * var28.AbsoluteSize.Y + var27.Y.Offset, Frame_upvr_2.AbsoluteSize.Y + Frame_upvr.AbsoluteSize.Y)
            local var32 = MaximumWindowSize.X.Scale * var28.AbsoluteSize.X + MaximumWindowSize.X.Offset
            local var33 = MaximumWindowSize.Y.Scale * var28.AbsoluteSize.Y + MaximumWindowSize.Y.Offset
            local X = Frame_upvr_3.AbsoluteSize.X
            local Y = Frame_upvr_3.AbsoluteSize.Y
            if X < var30 then
                Frame_upvr_3.Size += UDim2.new(0, var30 - X, 0, 0)
            elseif var32 < X then
                Frame_upvr_3.Size += UDim2.new(0, var32 - X, 0, 0)
            end
            if Y < maximum then
                Frame_upvr_3.Size += UDim2.new(0, 0, 0, maximum - Y)
            elseif var33 < Y then
                Frame_upvr_3.Size += UDim2.new(0, 0, 0, var33 - Y)
            end
            Frame_upvr_3.Size = UDim2.new(Frame_upvr_3.AbsoluteSize.X / var28.AbsoluteSize.X, 0, Frame_upvr_3.AbsoluteSize.Y / var28.AbsoluteSize.Y, 0)
            var22_upvw = false
        end
    end
    Frame_upvr_3.Changed:connect(function(arg1_2) -- Line 196
        --[[ Upvalues[1]:
            [1]: doCheckSizeBounds_upvr (readonly)
        ]]
        if arg1_2 == "AbsoluteSize" then
            doCheckSizeBounds_upvr()
        end
    end)
    ImageButton_upvr.DragBegin:connect(function(arg1_3) -- Line 202
        --[[ Upvalues[1]:
            [1]: Frame_upvr_3 (readonly)
        ]]
        Frame_upvr_3.Draggable = false
    end)
    local function UpdatePositionFromDrag_upvr(arg1_4) -- Line 206, Named "UpdatePositionFromDrag"
        --[[ Upvalues[3]:
            [1]: module_upvr (copied, readonly)
            [2]: Frame_upvr_3 (readonly)
            [3]: ImageButton_upvr (readonly)
        ]]
        if module_upvr.WindowDraggable == false and module_upvr.WindowResizable == false then
        else
            local var38 = arg1_4 - Frame_upvr_3.AbsolutePosition + ImageButton_upvr.AbsoluteSize
            Frame_upvr_3.Size = UDim2.new(0, var38.X, 0, var38.Y)
            if bubbleChatOnly() then
                ImageButton_upvr.Position = UDim2.new(1, -ImageButton_upvr.AbsoluteSize.X, 0, 0)
                return
            end
            ImageButton_upvr.Position = UDim2.new(1, -ImageButton_upvr.AbsoluteSize.X, 1, -ImageButton_upvr.AbsoluteSize.Y)
        end
    end
    ImageButton_upvr.DragStopped:connect(function(arg1_5, arg2_2) -- Line 219
        --[[ Upvalues[2]:
            [1]: Frame_upvr_3 (readonly)
            [2]: module_upvr (copied, readonly)
        ]]
        Frame_upvr_3.Draggable = module_upvr.WindowDraggable
    end)
    local var41_upvw = false
    ImageButton_upvr.Changed:connect(function(arg1_6) -- Line 225
        --[[ Upvalues[4]:
            [1]: Frame_upvr_3 (readonly)
            [2]: var41_upvw (read and write)
            [3]: UpdatePositionFromDrag_upvr (readonly)
            [4]: ImageButton_upvr (readonly)
        ]]
        if arg1_6 == "AbsolutePosition" and not Frame_upvr_3.Draggable then
            if var41_upvw then return end
            var41_upvw = true
            UpdatePositionFromDrag_upvr(ImageButton_upvr.AbsolutePosition)
            var41_upvw = false
        end
    end)
    local const_number_upvw = 2
    local function _(arg1_7) -- Line 236, Named "CalculateChannelsBarPixelSize"
        --[[ Upvalues[2]:
            [1]: const_number_upvw (read and write)
            [2]: module_upvr (copied, readonly)
        ]]
        -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
        local var43
        if var43 == 1 then
            var43 = arg1_7
            if not var43 then
                var43 = module_upvr.ChatChannelsTabTextSizePhone
            end
        elseif not var43 then
        end
        return math.max(32, module_upvr.ChatChannelsTabTextSize + 8) + 2
    end
    local function _(arg1_8) -- Line 249, Named "CalculateChatBarPixelSize"
        --[[ Upvalues[2]:
            [1]: const_number_upvw (read and write)
            [2]: module_upvr (copied, readonly)
        ]]
        -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
        local var45
        if var45 == 1 then
            var45 = arg1_8
            if not var45 then
                var45 = module_upvr.ChatBarTextSizePhone
            end
        elseif not var45 then
        end
        return module_upvr.ChatBarTextSize + 14 + 10
    end
    local var47
    if bubbleChatOnly() then
        var47 = 0
        Frame_upvr.Position = UDim2.new(var47, 0, 0, 0)
        Frame_upvr_2.Visible = false
        Frame_upvr_2.Active = false
        Frame_upvr_4.Visible = false
        Frame_upvr_4.Active = false
        var47 = 0
        local var48 = Frame_upvr_3
        repeat
        until not var48 and var48:IsA("ScreenGui")
        if const_number_upvw == 1 then
            var47 = module_upvr.DefaultWindowSizePhone.X.Offset
        elseif const_number_upvw == 2 then
            var47 = module_upvr.DefaultWindowSizeTablet.X.Offset
        else
            var47 = module_upvr.DefaultWindowSizeDesktop.X.Offset
        end
        local var49
        if const_number_upvw == 1 then
            var49 = nil
            if not var49 then
                var49 = module_upvr.ChatBarTextSizePhone
            end
        elseif not var49 then
        end
        Frame_upvr_3.Size = UDim2.new(module_upvr.DefaultWindowSizeDesktop.X.Scale, var47, 0, module_upvr.ChatBarTextSize + 14 + 10)
        Frame_upvr_3.Position = module_upvr.DefaultWindowPosition
    else
        var47 = Frame_upvr_3
        while var47 and not var47:IsA("ScreenGui") do
            var47 = var47.Parent
        end
        if const_number_upvw == 1 then
            var47 = module_upvr.DefaultWindowSizePhone
            Frame_upvr_3.Size = var47
        elseif const_number_upvw == 2 then
            var47 = module_upvr.DefaultWindowSizeTablet
            Frame_upvr_3.Size = var47
        else
            var47 = module_upvr.DefaultWindowSizeDesktop
            Frame_upvr_3.Size = var47
        end
        var47 = module_upvr.DefaultWindowPosition
        Frame_upvr_3.Position = var47
    end
    if const_number_upvw == 1 then
        var47 = module_upvr.ChatWindowTextSizePhone
        module_upvr.ChatWindowTextSize = var47
        var47 = module_upvr.ChatChannelsTabTextSizePhone
        module_upvr.ChatChannelsTabTextSize = var47
        var47 = module_upvr.ChatBarTextSizePhone
        module_upvr.ChatBarTextSize = var47
    end
    local function _(arg1_9) -- Line 318, Named "UpdateDraggable"
        --[[ Upvalues[1]:
            [1]: Frame_upvr_3 (readonly)
        ]]
        Frame_upvr_3.Active = arg1_9
        Frame_upvr_3.Draggable = arg1_9
    end
    local function UpdateResizable_upvr(arg1_10) -- Line 323, Named "UpdateResizable"
        --[[ Upvalues[2]:
            [1]: ImageButton_upvr (readonly)
            [2]: Frame_upvr (readonly)
        ]]
        -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
        ImageButton_upvr.Visible = arg1_10
        ImageButton_upvr.Draggable = arg1_10
        local Offset = Frame_upvr.Size.Y.Offset
        -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [29] 22. Error Block 3 start (CF ANALYSIS FAILED)
        Frame_upvr.Position = UDim2.new(0, 0, 1, -Offset)
        do
            return
        end
        -- KONSTANTERROR: [29] 22. Error Block 3 end (CF ANALYSIS FAILED)
        -- KONSTANTERROR: [40] 31. Error Block 7 start (CF ANALYSIS FAILED)
        Frame_upvr.Size = UDim2.new(1, 0, 0, Offset)
        if not bubbleChatOnly() then
            Frame_upvr.Position = UDim2.new(0, 0, 1, -Offset)
        end
        -- KONSTANTERROR: [40] 31. Error Block 7 end (CF ANALYSIS FAILED)
    end
    local function UpdateChatChannelParentFrameSize_upvr() -- Line 342, Named "UpdateChatChannelParentFrameSize"
        --[[ Upvalues[3]:
            [1]: const_number_upvw (read and write)
            [2]: module_upvr (copied, readonly)
            [3]: Frame_upvr_4 (readonly)
        ]]
        local var52
        local var53
        if var53 == 1 then
            var53 = var52
            if not var53 then
                var53 = module_upvr.ChatChannelsTabTextSizePhone
            end
            var52 = var53
        else
            if not var52 then
            end
            var52 = module_upvr.ChatChannelsTabTextSize
        end
        local var54 = math.max(32, var52 + 8) + 2
        local var55
        local var56
        if var56 == 1 then
            var56 = var55
            if not var56 then
                var56 = module_upvr.ChatBarTextSizePhone
            end
            var55 = var56
        else
            if not var55 then
            end
            var55 = module_upvr.ChatBarTextSize
        end
        local var57 = var55 + 14 + 10
        if module_upvr.ShowChannelsBar then
            Frame_upvr_4.Size = UDim2.new(1, 0, 1, -(var54 + var57 + 2 + 2))
            Frame_upvr_4.Position = UDim2.new(0, 0, 0, var54 + 2)
        else
            Frame_upvr_4.Size = UDim2.new(1, 0, 1, -(var57 + 2 + 2))
            Frame_upvr_4.Position = UDim2.new(0, 0, 0, 2)
        end
    end
    local function _(arg1_11) -- Line 357, Named "UpdateChatChannelsTabTextSize"
        --[[ Upvalues[4]:
            [1]: const_number_upvw (read and write)
            [2]: module_upvr (copied, readonly)
            [3]: Frame_upvr_2 (readonly)
            [4]: UpdateChatChannelParentFrameSize_upvr (readonly)
        ]]
        local var58 = arg1_11
        local var59
        if var59 == 1 then
            var59 = var58
            if not var59 then
                var59 = module_upvr.ChatChannelsTabTextSizePhone
            end
            var58 = var59
        else
            if not var58 then
            end
            var58 = module_upvr.ChatChannelsTabTextSize
        end
        Frame_upvr_2.Size = UDim2.new(1, 0, 0, math.max(32, var58 + 8) + 2)
        UpdateChatChannelParentFrameSize_upvr()
    end
    local function UpdateChatBarTextSize_upvr(arg1_12) -- Line 364, Named "UpdateChatBarTextSize"
        --[[ Upvalues[6]:
            [1]: const_number_upvw (read and write)
            [2]: module_upvr (copied, readonly)
            [3]: Frame_upvr (readonly)
            [4]: ImageButton_upvr (readonly)
            [5]: UpdateChatChannelParentFrameSize_upvr (readonly)
            [6]: UpdateResizable_upvr (readonly)
        ]]
        local var60 = arg1_12
        local var61
        if var61 == 1 then
            var61 = var60
            if not var61 then
                var61 = module_upvr.ChatBarTextSizePhone
            end
            var60 = var61
        else
            if not var60 then
            end
            var60 = module_upvr.ChatBarTextSize
        end
        local var62 = var60 + 14 + 10
        Frame_upvr.Size = UDim2.new(1, 0, 0, var62)
        if not bubbleChatOnly() then
            Frame_upvr.Position = UDim2.new(0, 0, 1, -var62)
        end
        ImageButton_upvr.Size = UDim2.new(0, var62, 0, var62)
        ImageButton_upvr.Position = UDim2.new(1, -var62, 1, -var62)
        UpdateChatChannelParentFrameSize_upvr()
        UpdateResizable_upvr(module_upvr.WindowResizable)
    end
    local function _(arg1_13) -- Line 379, Named "UpdateShowChannelsBar"
        --[[ Upvalues[2]:
            [1]: Frame_upvr_2 (readonly)
            [2]: UpdateChatChannelParentFrameSize_upvr (readonly)
        ]]
        Frame_upvr_2.Visible = arg1_13
        UpdateChatChannelParentFrameSize_upvr()
    end
    local var63
    if const_number_upvw == 1 then
        var63 = module_upvr.ChatChannelsTabTextSize
        if not var63 then
            var63 = module_upvr.ChatChannelsTabTextSizePhone
        end
    elseif not var63 then
    end
    Frame_upvr_2.Size = UDim2.new(1, 0, 0, math.max(32, module_upvr.ChatChannelsTabTextSize + 8) + 2)
    UpdateChatChannelParentFrameSize_upvr()
    UpdateChatBarTextSize_upvr(module_upvr.ChatBarTextSize)
    local WindowDraggable = module_upvr.WindowDraggable
    Frame_upvr_3.Active = WindowDraggable
    Frame_upvr_3.Draggable = WindowDraggable
    UpdateResizable_upvr(module_upvr.WindowResizable)
    Frame_upvr_2.Visible = module_upvr.ShowChannelsBar
    UpdateChatChannelParentFrameSize_upvr()
    module_upvr.SettingsChanged:connect(function(arg1_14, arg2_3) -- Line 390
        --[[ Upvalues[7]:
            [1]: Frame_upvr_3 (readonly)
            [2]: UpdateResizable_upvr (readonly)
            [3]: const_number_upvw (read and write)
            [4]: module_upvr (copied, readonly)
            [5]: Frame_upvr_2 (readonly)
            [6]: UpdateChatChannelParentFrameSize_upvr (readonly)
            [7]: UpdateChatBarTextSize_upvr (readonly)
        ]]
        if arg1_14 == "WindowDraggable" then
            Frame_upvr_3.Active = arg2_3
            Frame_upvr_3.Draggable = arg2_3
        else
            if arg1_14 == "WindowResizable" then
                UpdateResizable_upvr(arg2_3)
                return
            end
            if arg1_14 == "ChatChannelsTabTextSize" then
                local var67 = arg2_3
                local var68
                if var68 == 1 then
                    var68 = var67
                    if not var68 then
                        var68 = module_upvr.ChatChannelsTabTextSizePhone
                    end
                    var67 = var68
                else
                    if not var67 then
                    end
                    var67 = module_upvr.ChatChannelsTabTextSize
                end
                Frame_upvr_2.Size = UDim2.new(1, 0, 0, math.max(32, var67 + 8) + 2)
                UpdateChatChannelParentFrameSize_upvr()
                return
            end
            if arg1_14 == "ChatBarTextSize" then
                UpdateChatBarTextSize_upvr(arg2_3)
                return
            end
            if arg1_14 == "ShowChannelsBar" then
                Frame_upvr_2.Visible = arg2_3
                UpdateChatChannelParentFrameSize_upvr()
            end
        end
    end)
    arg1.GuiObject = Frame_upvr_3
    arg1.GuiObjects.BaseFrame = Frame_upvr_3
    arg1.GuiObjects.ChatBarParentFrame = Frame_upvr
    arg1.GuiObjects.ChannelsBarParentFrame = Frame_upvr_2
    arg1.GuiObjects.ChatChannelParentFrame = Frame_upvr_4
    arg1.GuiObjects.ChatResizerFrame = ImageButton_upvr
    arg1.GuiObjects.ResizeIcon = ImageLabel
    arg1:AnimGuiObjects()
end
function tbl_upvr.GetChatBar(arg1) -- Line 420
    return arg1.ChatBar
end
function tbl_upvr.RegisterChatBar(arg1, arg2) -- Line 424
    arg1.ChatBar = arg2
    arg1.ChatBar:CreateGuiObjects(arg1.GuiObjects.ChatBarParentFrame)
end
function tbl_upvr.RegisterChannelsBar(arg1, arg2) -- Line 429
    arg1.ChannelsBar = arg2
    arg1.ChannelsBar:CreateGuiObjects(arg1.GuiObjects.ChannelsBarParentFrame)
end
function tbl_upvr.RegisterMessageLogDisplay(arg1, arg2) -- Line 434
    arg1.MessageLogDisplay = arg2
    arg1.MessageLogDisplay.GuiObject.Parent = arg1.GuiObjects.ChatChannelParentFrame
end
local module_2_upvr = require(Parent:WaitForChild("ChatChannel"))
function tbl_upvr.AddChannel(arg1, arg2) -- Line 439
    --[[ Upvalues[1]:
        [1]: module_2_upvr (readonly)
    ]]
    if arg1:GetChannel(arg2) then
        error("Channel '"..arg2.."' already exists!")
        return
    end
    local any_new_result1 = module_2_upvr.new(arg2, arg1.MessageLogDisplay)
    arg1.Channels[arg2:lower()] = any_new_result1
    any_new_result1:SetActive(false)
    local any_AddChannelTab_result1 = arg1.ChannelsBar:AddChannelTab(arg2)
    any_AddChannelTab_result1.NameTag.MouseButton1Click:connect(function() -- Line 451
        --[[ Upvalues[2]:
            [1]: arg1 (readonly)
            [2]: arg2 (readonly)
        ]]
        arg1:SwitchCurrentChannel(arg2)
    end)
    any_new_result1:RegisterChannelTab(any_AddChannelTab_result1)
    return any_new_result1
end
function tbl_upvr.GetFirstChannel(arg1) -- Line 460
    for _, v in pairs(arg1.Channels) do
        return v
    end
    return nil
end
function tbl_upvr.RemoveChannel(arg1, arg2) -- Line 469
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [5] 5. Error Block 2 start (CF ANALYSIS FAILED)
    error("Channel '"..arg2.."' does not exist!")
    -- KONSTANTERROR: [5] 5. Error Block 2 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [12] 11. Error Block 3 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [12] 11. Error Block 3 end (CF ANALYSIS FAILED)
end
function tbl_upvr.GetChannel(arg1, arg2) -- Line 511
    if not arg2 or not arg1.Channels[arg2:lower()] then
    end
    return nil
end
function tbl_upvr.GetTargetMessageChannel(arg1) -- Line 515
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    if not module_upvr.ShowChannelsBar then
        return arg1.ChatBar.TargetChannel
    end
    local any_GetCurrentChannel_result1 = arg1:GetCurrentChannel()
    local var79 = any_GetCurrentChannel_result1
    if var79 then
        var79 = any_GetCurrentChannel_result1.Name
    end
    return var79
end
function tbl_upvr.GetCurrentChannel(arg1) -- Line 524
    return arg1.CurrentChannel
end
function tbl_upvr.SwitchCurrentChannel(arg1, arg2) -- Line 528
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    local var80
    if not module_upvr.ShowChannelsBar then
        local any_GetChannel_result1 = arg1:GetChannel(var80)
        if any_GetChannel_result1 then
            arg1.ChatBar:SetChannelTarget(any_GetChannel_result1.Name)
        end
        var80 = module_upvr.GeneralChannelName
    end
    local any_GetCurrentChannel_result1_2 = arg1:GetCurrentChannel()
    local any_GetChannel_result1_2 = arg1:GetChannel(var80)
    if any_GetChannel_result1_2 == nil then
        error(string.format("Channel '%s' does not exist.", var80))
    end
    if any_GetChannel_result1_2 ~= any_GetCurrentChannel_result1_2 then
        if any_GetCurrentChannel_result1_2 then
            any_GetCurrentChannel_result1_2:SetActive(false)
            arg1.ChannelsBar:GetChannelTab(any_GetCurrentChannel_result1_2.Name):SetActive(false)
        end
        if any_GetChannel_result1_2 then
            any_GetChannel_result1_2:SetActive(true)
            arg1.ChannelsBar:GetChannelTab(any_GetChannel_result1_2.Name):SetActive(true)
        end
        arg1.CurrentChannel = any_GetChannel_result1_2
    end
end
function tbl_upvr.UpdateFrameVisibility(arg1) -- Line 562
    local Visible = arg1.Visible
    if Visible then
        Visible = arg1.CoreGuiEnabled
    end
    arg1.GuiObject.Visible = Visible
end
function tbl_upvr.GetVisible(arg1) -- Line 566
    return arg1.Visible
end
function tbl_upvr.SetVisible(arg1, arg2) -- Line 570
    arg1.Visible = arg2
    arg1:UpdateFrameVisibility()
end
function tbl_upvr.GetCoreGuiEnabled(arg1) -- Line 575
    return arg1.CoreGuiEnabled
end
function tbl_upvr.SetCoreGuiEnabled(arg1, arg2) -- Line 579
    arg1.CoreGuiEnabled = arg2
    arg1:UpdateFrameVisibility()
end
function tbl_upvr.EnableResizable(arg1) -- Line 584
    arg1.GuiObjects.ChatResizerFrame.Active = true
end
function tbl_upvr.DisableResizable(arg1) -- Line 588
    arg1.GuiObjects.ChatResizerFrame.Active = false
end
function tbl_upvr.FadeOutBackground(arg1, arg2) -- Line 592
    --[[ Upvalues[1]:
        [1]: module_3_upvr (readonly)
    ]]
    arg1.ChannelsBar:FadeOutBackground(arg2)
    arg1.MessageLogDisplay:FadeOutBackground(arg2)
    arg1.ChatBar:FadeOutBackground(arg2)
    arg1.AnimParams.Background_TargetTransparency = 1
    arg1.AnimParams.Background_NormalizedExptValue = module_3_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.FadeInBackground(arg1, arg2) -- Line 601
    --[[ Upvalues[1]:
        [1]: module_3_upvr (readonly)
    ]]
    arg1.ChannelsBar:FadeInBackground(arg2)
    arg1.MessageLogDisplay:FadeInBackground(arg2)
    arg1.ChatBar:FadeInBackground(arg2)
    arg1.AnimParams.Background_TargetTransparency = 0.6
    arg1.AnimParams.Background_NormalizedExptValue = module_3_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.FadeOutText(arg1, arg2) -- Line 610
    arg1.MessageLogDisplay:FadeOutText(arg2)
    arg1.ChannelsBar:FadeOutText(arg2)
end
function tbl_upvr.FadeInText(arg1, arg2) -- Line 615
    arg1.MessageLogDisplay:FadeInText(arg2)
    arg1.ChannelsBar:FadeInText(arg2)
end
function tbl_upvr.AnimGuiObjects(arg1) -- Line 620
    arg1.GuiObjects.ChatChannelParentFrame.BackgroundTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.GuiObjects.ChatResizerFrame.BackgroundTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.GuiObjects.ResizeIcon.ImageTransparency = arg1.AnimParams.Background_CurrentTransparency
end
function tbl_upvr.InitializeAnimParams(arg1) -- Line 626
    --[[ Upvalues[1]:
        [1]: module_3_upvr (readonly)
    ]]
    arg1.AnimParams.Background_TargetTransparency = 0.6
    arg1.AnimParams.Background_CurrentTransparency = 0.6
    arg1.AnimParams.Background_NormalizedExptValue = module_3_upvr:NormalizedDefaultExptValueInSeconds(0)
end
function tbl_upvr.Update(arg1, arg2) -- Line 632
    --[[ Upvalues[1]:
        [1]: module_3_upvr (readonly)
    ]]
    arg1.ChatBar:Update(arg2)
    arg1.ChannelsBar:Update(arg2)
    arg1.MessageLogDisplay:Update(arg2)
    arg1.AnimParams.Background_CurrentTransparency = module_3_upvr:Expt(arg1.AnimParams.Background_CurrentTransparency, arg1.AnimParams.Background_TargetTransparency, arg1.AnimParams.Background_NormalizedExptValue, arg2)
    arg1:AnimGuiObjects()
end
function module.new() -- Line 650
    --[[ Upvalues[1]:
        [1]: tbl_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, tbl_upvr)
    setmetatable_result1.GuiObject = nil
    setmetatable_result1.GuiObjects = {}
    setmetatable_result1.ChatBar = nil
    setmetatable_result1.ChannelsBar = nil
    setmetatable_result1.MessageLogDisplay = nil
    setmetatable_result1.Channels = {}
    setmetatable_result1.CurrentChannel = nil
    setmetatable_result1.Visible = true
    setmetatable_result1.CoreGuiEnabled = true
    setmetatable_result1.AnimParams = {}
    setmetatable_result1:InitializeAnimParams()
    return setmetatable_result1
end
return module
ModuleScript MessageLabelCreator MessageLabelCreator
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:04
-- Luau version 6, Types version 3
-- Time taken: 0.005358 seconds

local module = {}
local Chat_upvr = game:GetService("Chat")
local MessageCreatorModules_upvr = Chat_upvr:WaitForChild("ClientChatModules"):WaitForChild("MessageCreatorModules")
local module_3_upvr = require(MessageCreatorModules_upvr:WaitForChild("Util"))
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
function mergeProps(arg1, arg2) -- Line 26
    if not arg1 then
    else
        for i_3, v in pairs(arg1) do
            arg2[i_3] = v
        end
    end
end
function ReturnToObjectPoolRecursive(arg1, arg2) -- Line 33
    local children_2 = arg1:GetChildren()
    for i = 1, #children_2 do
        ReturnToObjectPoolRecursive(children_2[i], arg2)
    end
    arg1.Parent = nil
    arg2:ReturnInstance(arg1)
end
function GetMessageCreators() -- Line 42
    --[[ Upvalues[2]:
        [1]: MessageCreatorModules_upvr (readonly)
        [2]: module_3_upvr (readonly)
    ]]
    local children = MessageCreatorModules_upvr:GetChildren()
    for i_2 = 1, #children do
        if children[i_2]:IsA("ModuleScript") and children[i_2].Name ~= "Util" then
            local any = require(children[i_2])
            ;({})[any[module_3_upvr.KEY_MESSAGE_TYPE]] = any[module_3_upvr.KEY_CREATOR_FUNCTION]
        end
    end
    -- KONSTANTERROR: Expression was reused, decompilation is incorrect
    return {}
end
function tbl_upvr.WrapIntoMessageObject(arg1, arg2, arg3) -- Line 56
    --[[ Upvalues[1]:
        [1]: module_3_upvr (readonly)
    ]]
    local var19
    if module_3_upvr.KEY_BASE_MESSAGE then
        var19 = arg3[module_3_upvr.KEY_BASE_MESSAGE]
    end
    local module_4 = {
        ID = arg2.ID;
        BaseFrame = arg3[module_3_upvr.KEY_BASE_FRAME];
        BaseMessage = var19;
    }
    local var22 = arg3[module_3_upvr.KEY_UPDATE_TEXT_FUNC]
    if not var22 then
        function var22() -- Line 73
            warn("NO MESSAGE RESIZE FUNCTION")
        end
    end
    module_4.UpdateTextFunction = var22
    module_4.GetHeightFunction = arg3[module_3_upvr.KEY_GET_HEIGHT]
    module_4.FadeInFunction = arg3[module_3_upvr.KEY_FADE_IN]
    module_4.FadeOutFunction = arg3[module_3_upvr.KEY_FADE_OUT]
    module_4.UpdateAnimFunction = arg3[module_3_upvr.KEY_UPDATE_ANIMATION]
    module_4.ObjectPool = arg1.ObjectPool
    module_4.Destroyed = false
    function module_4.Destroy(arg1_2) -- Line 81
        ReturnToObjectPoolRecursive(arg1_2.BaseFrame, arg1_2.ObjectPool)
        arg1_2.Destroyed = true
    end
    return module_4
end
function tbl_upvr.CreateMessageLabel_Chat(arg1, arg2, arg3, arg4) -- Line 89
    --[[ Upvalues[1]:
        [1]: Chat_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    arg2.Channel = arg3
    local var23_upvw
    pcall(function() -- Line 92
        --[[ Upvalues[3]:
            [1]: var23_upvw (read and write)
            [2]: Chat_upvr (copied, readonly)
            [3]: arg2 (readonly)
        ]]
        var23_upvw = Chat_upvr:InvokeChatCallback(Enum.ChatCallbackType.OnClientFormattingMessage, arg2)
    end)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [13] 11. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [13] 11. Error Block 2 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [15] 12. Error Block 3 start (CF ANALYSIS FAILED)
    arg2.ExtraData = {}
    mergeProps(var23_upvw, arg2.ExtraData)
    -- KONSTANTERROR: [15] 12. Error Block 3 end (CF ANALYSIS FAILED)
end
function tbl_upvr.CreateMessageLabel(arg1, arg2, arg3) -- Line 114
    --[[ Upvalues[1]:
        [1]: Chat_upvr (readonly)
    ]]
    -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
    arg2.Channel = arg3
    local var25_upvw
    pcall(function() -- Line 118
        --[[ Upvalues[3]:
            [1]: var25_upvw (read and write)
            [2]: Chat_upvr (copied, readonly)
            [3]: arg2 (readonly)
        ]]
        var25_upvw = Chat_upvr:InvokeChatCallback(Enum.ChatCallbackType.OnClientFormattingMessage, arg2)
    end)
    -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [13] 11. Error Block 2 start (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [13] 11. Error Block 2 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [15] 12. Error Block 3 start (CF ANALYSIS FAILED)
    arg2.ExtraData = {}
    mergeProps(var25_upvw, arg2.ExtraData)
    -- KONSTANTERROR: [15] 12. Error Block 3 end (CF ANALYSIS FAILED)
end
local module_2_upvr = require(script.Parent:WaitForChild("ObjectPool"))
function module.new() -- Line 143
    --[[ Upvalues[3]:
        [1]: tbl_upvr (readonly)
        [2]: module_2_upvr (readonly)
        [3]: module_3_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, tbl_upvr)
    setmetatable_result1.ObjectPool = module_2_upvr.new(50)
    setmetatable_result1.MessageCreators = GetMessageCreators()
    setmetatable_result1.DefaultCreatorType = module_3_upvr.DEFAULT_MESSAGE_CREATOR
    module_3_upvr:RegisterObjectPool(setmetatable_result1.ObjectPool)
    return setmetatable_result1
end
function module.GetStringTextBounds(arg1, arg2, arg3, arg4, arg5) -- Line 155
    --[[ Upvalues[1]:
        [1]: module_3_upvr (readonly)
    ]]
    return module_3_upvr:GetStringTextBounds(arg2, arg3, arg4, arg5)
end
return module
ModuleScript CommandProcessor CommandProcessor
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:06
-- Luau version 6, Types version 3
-- Time taken: 0.002696 seconds

local module = {}
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
local ClientChatModules = game:GetService("Chat"):WaitForChild("ClientChatModules")
local CommandModules_upvr = ClientChatModules:WaitForChild("CommandModules")
local module_2_upvr = require(ClientChatModules:WaitForChild("ChatSettings"))
local module_3_upvr = require(CommandModules_upvr:WaitForChild("Util"))
function tbl_upvr.SetupCommandProcessors(arg1) -- Line 19
    --[[ Upvalues[2]:
        [1]: CommandModules_upvr (readonly)
        [2]: module_3_upvr (readonly)
    ]]
    local children = CommandModules_upvr:GetChildren()
    for i = 1, #children do
        if children[i]:IsA("ModuleScript") and children[i].Name ~= "Util" then
            local any = require(children[i])
            local var10 = any[module_3_upvr.KEY_COMMAND_PROCESSOR_TYPE]
            if var10 == module_3_upvr.IN_PROGRESS_MESSAGE_PROCESSOR then
                table.insert(arg1.InProgressMessageProcessors, any[module_3_upvr.KEY_PROCESSOR_FUNCTION])
            elseif var10 == module_3_upvr.COMPLETED_MESSAGE_PROCESSOR then
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                table.insert(arg1.CompletedMessageProcessors, any[module_3_upvr.KEY_PROCESSOR_FUNCTION])
            end
        end
    end
end
function tbl_upvr.ProcessCompletedChatMessage(arg1, arg2, arg3) -- Line 37
    --[[ Upvalues[1]:
        [1]: module_2_upvr (readonly)
    ]]
    for i_2 = 1, #arg1.CompletedMessageProcessors do
        if arg1.CompletedMessageProcessors[i_2](arg2, arg3, module_2_upvr) then
            return true
        end
    end
    return false
end
function tbl_upvr.ProcessInProgressChatMessage(arg1, arg2, arg3, arg4) -- Line 47
    --[[ Upvalues[1]:
        [1]: module_2_upvr (readonly)
    ]]
    for i_3 = 1, #arg1.InProgressMessageProcessors do
        local any_any_result1 = arg1.InProgressMessageProcessors[i_3](arg2, arg3, arg4, module_2_upvr)
        if any_any_result1 then
            return any_any_result1
        end
    end
    return nil
end
function module.new() -- Line 60
    --[[ Upvalues[1]:
        [1]: tbl_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, tbl_upvr)
    setmetatable_result1.CompletedMessageProcessors = {}
    setmetatable_result1.InProgressMessageProcessors = {}
    setmetatable_result1:SetupCommandProcessors()
    return setmetatable_result1
end
return module
ModuleScript ChannelsTab ChannelsTab
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:07
-- Luau version 6, Types version 3
-- Time taken: 0.010022 seconds

local module = {}
local module_upvr_2 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"))
local module_upvr = require(script.Parent:WaitForChild("CurveUtil"))
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
local function CreateGuiObjects_upvr() -- Line 20, Named "CreateGuiObjects"
    --[[ Upvalues[1]:
        [1]: module_upvr_2 (readonly)
    ]]
    local Frame_3 = Instance.new("Frame")
    Frame_3.Selectable = false
    Frame_3.Size = UDim2.new(1, 0, 1, 0)
    Frame_3.BackgroundTransparency = 1
    local Frame = Instance.new("Frame")
    Frame.Selectable = false
    Frame.Name = "BackgroundFrame"
    Frame.Size = UDim2.new(1, -2, 1, -2)
    Frame.Position = UDim2.new(0, 1, 0, 1)
    Frame.BackgroundTransparency = 1
    Frame.Parent = Frame_3
    local Frame_5 = Instance.new("Frame")
    Frame_5.Selectable = false
    Frame_5.Name = "UnselectedFrame"
    Frame_5.Size = UDim2.new(1, 0, 1, 0)
    Frame_5.Position = UDim2.new(0, 0, 0, 0)
    Frame_5.BorderSizePixel = 0
    Frame_5.BackgroundColor3 = module_upvr_2.ChannelsTabUnselectedColor
    Frame_5.BackgroundTransparency = 0.6
    Frame_5.Parent = Frame
    local Frame_4 = Instance.new("Frame")
    Frame_4.Selectable = false
    Frame_4.Name = "SelectedFrame"
    Frame_4.Size = UDim2.new(1, 0, 1, 0)
    Frame_4.Position = UDim2.new(0, 0, 0, 0)
    Frame_4.BorderSizePixel = 0
    Frame_4.BackgroundColor3 = module_upvr_2.ChannelsTabSelectedColor
    Frame_4.BackgroundTransparency = 1
    Frame_4.Parent = Frame
    local ImageLabel_3 = Instance.new("ImageLabel")
    ImageLabel_3.Selectable = false
    ImageLabel_3.Name = "BackgroundImage"
    ImageLabel_3.BackgroundTransparency = 1
    ImageLabel_3.BorderSizePixel = 0
    ImageLabel_3.Size = UDim2.new(1, 0, 1, 0)
    ImageLabel_3.Position = UDim2.new(0, 0, 0, 0)
    ImageLabel_3.ScaleType = Enum.ScaleType.Slice
    ImageLabel_3.Parent = Frame_4
    ImageLabel_3.BackgroundTransparency = -0.4
    ImageLabel_3.BackgroundColor3 = Color3.fromRGB(93.6, 100.8, 115.19999999999999)
    local ImageLabel = Instance.new("ImageLabel")
    ImageLabel.Selectable = false
    ImageLabel.Size = UDim2.new(0.5, -2, 0, 4)
    ImageLabel.BackgroundTransparency = 1
    ImageLabel.ScaleType = Enum.ScaleType.Slice
    ImageLabel.SliceCenter = Rect.new(3, 3, 32, 21)
    ImageLabel.Parent = Frame_4
    local clone = ImageLabel:Clone()
    clone.Parent = Frame_4
    ImageLabel.Position = UDim2.new(0, 2, 1, -4)
    clone.Position = UDim2.new(0.5, 0, 1, -4)
    ImageLabel.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarLeft.png"
    clone.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarRight.png"
    ImageLabel.Name = "BlueBarLeft"
    clone.Name = "BlueBarRight"
    local TextButton = Instance.new("TextButton")
    TextButton.Selectable = module_upvr_2.GamepadNavigationEnabled
    TextButton.Size = UDim2.new(1, 0, 1, 0)
    TextButton.Position = UDim2.new(0, 0, 0, 0)
    TextButton.BackgroundTransparency = 1
    TextButton.Font = module_upvr_2.DefaultFont
    TextButton.TextSize = module_upvr_2.ChatChannelsTabTextSize
    TextButton.TextColor3 = Color3.new(1, 1, 1)
    TextButton.TextStrokeTransparency = 0.75
    TextButton.Parent = Frame
    local clone_2 = TextButton:Clone()
    local clone_3 = TextButton:Clone()
    clone_2.Parent = Frame_5
    clone_3.Parent = Frame_4
    clone_2.Font = Enum.Font.SourceSans
    clone_2.Active = false
    clone_3.Active = false
    local Frame_2 = Instance.new("Frame")
    Frame_2.Selectable = false
    Frame_2.Size = UDim2.new(0, 18, 0, 18)
    Frame_2.Position = UDim2.new(0.8, -9, 0.5, -9)
    Frame_2.BackgroundTransparency = 1
    Frame_2.Parent = Frame
    local ImageLabel_2 = Instance.new("ImageLabel")
    ImageLabel_2.Selectable = false
    ImageLabel_2.Size = UDim2.new(1, 0, 1, 0)
    ImageLabel_2.BackgroundTransparency = 1
    ImageLabel_2.Image = "rbxasset://textures/ui/Chat/MessageCounter.png"
    ImageLabel_2.Visible = false
    ImageLabel_2.Parent = Frame_2
    local TextLabel = Instance.new("TextLabel")
    TextLabel.Selectable = false
    TextLabel.BackgroundTransparency = 1
    TextLabel.Size = UDim2.new(0, 13, 0, 9)
    TextLabel.Position = UDim2.new(0.5, -7, 0.5, -7)
    TextLabel.Font = module_upvr_2.DefaultFont
    TextLabel.TextSize = 14
    TextLabel.TextColor3 = Color3.new(1, 1, 1)
    TextLabel.Text = ""
    TextLabel.Parent = ImageLabel_2
    return Frame_3, TextButton, clone_2, clone_3, ImageLabel_2, Frame_5, Frame_4
end
function tbl_upvr.Destroy(arg1) -- Line 140
    arg1.GuiObject:Destroy()
end
function tbl_upvr.UpdateMessagePostedInChannel(arg1, arg2) -- Line 144
    local var18
    if arg1.Active and arg2 ~= true then
    else
        local var19 = arg1.UnreadMessageCount + 1
        arg1.UnreadMessageCount = var19
        local NewMessageIcon = arg1.NewMessageIcon
        NewMessageIcon.Visible = true
        local function INLINED() -- Internal function, doesn't exist in bytecode
            var18 = tostring(var19)
            return var18
        end
        if var19 >= 100 or not INLINED() then
            var18 = '!'
        end
        NewMessageIcon.TextLabel.Text = var18
        var18 = 0
        var18 = NewMessageIcon.Position
        NewMessageIcon.Position = UDim2.new(0, 0, -0.15, 0)
        NewMessageIcon:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.15, true)
    end
end
function tbl_upvr.SetActive(arg1, arg2) -- Line 167
    arg1.Active = arg2
    arg1.UnselectedFrame.Visible = not arg2
    arg1.SelectedFrame.Visible = arg2
    if arg2 then
        arg1.UnreadMessageCount = 0
        arg1.NewMessageIcon.Visible = false
        arg1.NameTag.Font = Enum.Font.SourceSansBold
    else
        arg1.NameTag.Font = Enum.Font.SourceSans
    end
end
function tbl_upvr.SetTextSize(arg1, arg2) -- Line 183
    arg1.NameTag.TextSize = arg2
end
function tbl_upvr.FadeOutBackground(arg1, arg2) -- Line 187
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    arg1.AnimParams.Background_TargetTransparency = 1
    arg1.AnimParams.Background_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.FadeInBackground(arg1, arg2) -- Line 192
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    arg1.AnimParams.Background_TargetTransparency = 0.6
    arg1.AnimParams.Background_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.FadeOutText(arg1, arg2) -- Line 197
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    arg1.AnimParams.Text_TargetTransparency = 1
    arg1.AnimParams.Text_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(arg2)
    arg1.AnimParams.TextStroke_TargetTransparency = 1
    arg1.AnimParams.TextStroke_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.FadeInText(arg1, arg2) -- Line 204
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    arg1.AnimParams.Text_TargetTransparency = 0
    arg1.AnimParams.Text_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(arg2)
    arg1.AnimParams.TextStroke_TargetTransparency = 0.75
    arg1.AnimParams.TextStroke_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(arg2)
end
function tbl_upvr.AnimGuiObjects(arg1) -- Line 211
    arg1.UnselectedFrame.BackgroundTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.SelectedFrame.BackgroundImage.BackgroundTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.SelectedFrame.BlueBarLeft.ImageTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.SelectedFrame.BlueBarRight.ImageTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.NameTagNonSelect.TextTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.NameTagNonSelect.TextStrokeTransparency = arg1.AnimParams.Background_CurrentTransparency
    arg1.NameTag.TextTransparency = arg1.AnimParams.Text_CurrentTransparency
    arg1.NewMessageIcon.ImageTransparency = arg1.AnimParams.Text_CurrentTransparency
    arg1.WhiteTextNewMessageNotification.TextTransparency = arg1.AnimParams.Text_CurrentTransparency
    arg1.NameTagSelect.TextTransparency = arg1.AnimParams.Text_CurrentTransparency
    arg1.NameTag.TextStrokeTransparency = arg1.AnimParams.TextStroke_CurrentTransparency
    arg1.WhiteTextNewMessageNotification.TextStrokeTransparency = arg1.AnimParams.TextStroke_CurrentTransparency
    arg1.NameTagSelect.TextStrokeTransparency = arg1.AnimParams.TextStroke_CurrentTransparency
end
function tbl_upvr.InitializeAnimParams(arg1) -- Line 229
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    arg1.AnimParams.Text_TargetTransparency = 0
    arg1.AnimParams.Text_CurrentTransparency = 0
    arg1.AnimParams.Text_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(0)
    arg1.AnimParams.TextStroke_TargetTransparency = 0.75
    arg1.AnimParams.TextStroke_CurrentTransparency = 0.75
    arg1.AnimParams.TextStroke_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(0)
    arg1.AnimParams.Background_TargetTransparency = 0.6
    arg1.AnimParams.Background_CurrentTransparency = 0.6
    arg1.AnimParams.Background_NormalizedExptValue = module_upvr:NormalizedDefaultExptValueInSeconds(0)
end
function tbl_upvr.Update(arg1, arg2) -- Line 243
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    arg1.AnimParams.Background_CurrentTransparency = module_upvr:Expt(arg1.AnimParams.Background_CurrentTransparency, arg1.AnimParams.Background_TargetTransparency, arg1.AnimParams.Background_NormalizedExptValue, arg2)
    arg1.AnimParams.Text_CurrentTransparency = module_upvr:Expt(arg1.AnimParams.Text_CurrentTransparency, arg1.AnimParams.Text_TargetTransparency, arg1.AnimParams.Text_NormalizedExptValue, arg2)
    arg1.AnimParams.TextStroke_CurrentTransparency = module_upvr:Expt(arg1.AnimParams.TextStroke_CurrentTransparency, arg1.AnimParams.TextStroke_TargetTransparency, arg1.AnimParams.TextStroke_NormalizedExptValue, arg2)
    arg1:AnimGuiObjects()
end
function module.new(arg1) -- Line 269
    --[[ Upvalues[3]:
        [1]: tbl_upvr (readonly)
        [2]: CreateGuiObjects_upvr (readonly)
        [3]: module_upvr_2 (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, tbl_upvr)
    local CreateGuiObjects_upvr_result1, CreateGuiObjects_upvr_result2, CreateGuiObjects_upvr_result3, CreateGuiObjects_upvr_result4, CreateGuiObjects_upvr_result5, CreateGuiObjects_upvr_result6, CreateGuiObjects_upvr_result7 = CreateGuiObjects_upvr()
    setmetatable_result1.GuiObject = CreateGuiObjects_upvr_result1
    setmetatable_result1.NameTag = CreateGuiObjects_upvr_result2
    setmetatable_result1.NameTagNonSelect = CreateGuiObjects_upvr_result3
    setmetatable_result1.NameTagSelect = CreateGuiObjects_upvr_result4
    setmetatable_result1.NewMessageIcon = CreateGuiObjects_upvr_result5
    setmetatable_result1.UnselectedFrame = CreateGuiObjects_upvr_result6
    setmetatable_result1.SelectedFrame = CreateGuiObjects_upvr_result7
    setmetatable_result1.BlueBarLeft = CreateGuiObjects_upvr_result7.BlueBarLeft
    setmetatable_result1.BlueBarRight = CreateGuiObjects_upvr_result7.BlueBarRight
    setmetatable_result1.BackgroundImage = CreateGuiObjects_upvr_result7.BackgroundImage
    setmetatable_result1.WhiteTextNewMessageNotification = setmetatable_result1.NewMessageIcon.TextLabel
    setmetatable_result1.ChannelName = arg1
    setmetatable_result1.UnreadMessageCount = 0
    setmetatable_result1.Active = false
    setmetatable_result1.GuiObject.Name = "Frame_"..setmetatable_result1.ChannelName
    local var29
    if module_upvr_2.MaxChannelNameLength < string.len(arg1) then
        var29 = string.sub(var29, 1, module_upvr_2.MaxChannelNameLength - 3).."..."
    end
    setmetatable_result1.NameTag.Text = ""
    setmetatable_result1.NameTagNonSelect.Text = var29
    setmetatable_result1.NameTagSelect.Text = var29
    setmetatable_result1.AnimParams = {}
    setmetatable_result1:InitializeAnimParams()
    setmetatable_result1:AnimGuiObjects()
    setmetatable_result1:SetActive(false)
    return setmetatable_result1
end
return module
ModuleScript ObjectPool ObjectPool
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:08
-- Luau version 6, Types version 3
-- Time taken: 0.002247 seconds

local module = {}
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
function tbl_upvr.GetInstance(arg1, arg2) -- Line 14
    if arg1.InstancePoolsByClass[arg2] == nil then
        arg1.InstancePoolsByClass[arg2] = {}
    end
    local len = #arg1.InstancePoolsByClass[arg2]
    if 0 < len then
        table.remove(arg1.InstancePoolsByClass[arg2])
        return arg1.InstancePoolsByClass[arg2][len]
    end
    return Instance.new(arg2)
end
function tbl_upvr.ReturnInstance(arg1, arg2) -- Line 27
    if arg1.InstancePoolsByClass[arg2.ClassName] == nil then
        arg1.InstancePoolsByClass[arg2.ClassName] = {}
    end
    if #arg1.InstancePoolsByClass[arg2.ClassName] < arg1.PoolSizePerType then
        table.insert(arg1.InstancePoolsByClass[arg2.ClassName], arg2)
    else
        arg2:Destroy()
    end
end
function module.new(arg1) -- Line 41
    --[[ Upvalues[1]:
        [1]: tbl_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, tbl_upvr)
    setmetatable_result1.InstancePoolsByClass = {}
    setmetatable_result1.Name = "ObjectPool"
    setmetatable_result1.PoolSizePerType = arg1
    return setmetatable_result1
end
return module
ModuleScript MessageSender MessageSender
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:09
-- Luau version 6, Types version 3
-- Time taken: 0.001182 seconds

local module = {}
local tbl_upvr = {}
tbl_upvr.__index = tbl_upvr
function tbl_upvr.SendMessage(arg1, arg2, arg3) -- Line 15
    arg1.SayMessageRequest:FireServer(arg2, arg3)
end
function tbl_upvr.RegisterSayMessageFunction(arg1, arg2) -- Line 19
    arg1.SayMessageRequest = arg2
end
function module.new() -- Line 26
    --[[ Upvalues[1]:
        [1]: tbl_upvr (readonly)
    ]]
    local setmetatable_result1 = setmetatable({}, tbl_upvr)
    setmetatable_result1.SayMessageRequest = nil
    return setmetatable_result1
end
return module.new()
ModuleScript CurveUtil CurveUtil
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:11
-- Luau version 6, Types version 3
-- Time taken: 0.003105 seconds

local module_upvr = {}
function module_upvr.Expt(arg1, arg2, arg3, arg4, arg5) -- Line 5
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    if math.abs(arg3 - arg2) < 0.01 then
        return arg3
    end
    return arg2 + (arg3 - arg2) * module_upvr:Expty(arg2, arg3, arg4, arg5)
end
function module_upvr.Expty(arg1, arg2, arg3, arg4, arg5) -- Line 17
    return 1 - math.exp(-(-math.log(1 - arg4)) * arg5)
end
function module_upvr.Sign(arg1, arg2) -- Line 24
    if 0 < arg2 then
        return 1
    end
    if arg2 < 0 then
        return -1
    end
    return 0
end
function module_upvr.BezierValForT(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 34
    return (1 - arg6) * (1 - arg6) * (1 - arg6) * arg2 + 3 * arg6 * (1 - arg6) * (1 - arg6) * arg3 + 3 * arg6 * arg6 * (1 - arg6) * arg4 + arg6 * arg6 * arg6 * arg5
end
module_upvr._BezierPt2ForT = {
    x = 0;
    y = 0;
}
function module_upvr.BezierPt2ForT(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) -- Line 43
    --[[ Upvalues[1]:
        [1]: module_upvr (readonly)
    ]]
    module_upvr._BezierPt2ForT.x = module_upvr:BezierValForT(arg2, arg4, arg6, arg8, arg10)
    module_upvr._BezierPt2ForT.y = module_upvr:BezierValForT(arg3, arg5, arg7, arg9, arg10)
    return module_upvr._BezierPt2ForT
end
function module_upvr.YForPointOf2PtLine(arg1, arg2, arg3, arg4) -- Line 55
    local var3 = (arg2.y - arg3.y) / (arg2.x - arg3.x)
    return (var3 * arg4) + (arg2.y - var3 * arg2.x)
end
function module_upvr.DeltaTimeToTimescale(arg1, arg2) -- Line 63
    return arg2 / (1/60)
end
function module_upvr.SecondsToTick(arg1, arg2) -- Line 67
    return (1/60) / arg2
end
function module_upvr.ExptValueInSeconds(arg1, arg2, arg3, arg4) -- Line 71
    return 1 - math.pow(arg2 / arg3, (1) / (60 * arg4))
end
function module_upvr.NormalizedDefaultExptValueInSeconds(arg1, arg2) -- Line 75
    return arg1:ExptValueInSeconds(0.01, 1, arg2)
end
return module_upvr
LocalScript BubbleChat BubbleChat
-- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/brNTY8nX8t)
-- Decompiled on 2026-02-10 03:04:12
-- Luau version 6, Types version 3
-- Time taken: 0.046904 seconds

local Players_upvr = game:GetService("Players")
local Chat_upvr = game:GetService("Chat")
local var3_upvw
while var3_upvw == nil do
    Players_upvr.ChildAdded:wait()
    var3_upvw = Players_upvr.LocalPlayer
end
local pcall_result1_3, pcall_result2_4 = pcall(function() -- Line 24
    return UserSettings():IsUserFeatureEnabled("UserShouldLocalizeGameChatBubble")
end)
local pcall_result1_2, pcall_result2 = pcall(function() -- Line 30
    return UserSettings():IsUserFeatureEnabled("UserFixBubbleChatText")
end)
local var10_upvw = pcall_result1_2 and pcall_result2
local pcall_result1_4, pcall_result2_3 = pcall(function() -- Line 37
    return UserSettings():IsUserFeatureEnabled("UserRoactBubbleChatBeta")
end)
local var14_upvw = pcall_result1_4 and pcall_result2_3
local pcall_result1, pcall_result2_2 = pcall(function() -- Line 44
    return UserSettings():IsUserFeatureEnabled("UserPreventOldBubbleChatOverlap")
end)
local var18_upvw = pcall_result1 and pcall_result2_2
local function _(arg1) -- Line 50, Named "getMessageLength"
    return utf8.len(utf8.nfcnormalize(arg1))
end
local SourceSans_upvr = Enum.Font.SourceSans
local tbl_3_upvr = {
    WHITE = "dub";
    BLUE = "blu";
    GREEN = "gre";
    RED = "red";
}
local ScreenGui_upvr = Instance.new("ScreenGui")
ScreenGui_upvr.Name = "BubbleChat"
ScreenGui_upvr.ResetOnSpawn = false
ScreenGui_upvr.Parent = var3_upvw:WaitForChild("PlayerGui")
local function _(arg1, arg2, arg3) -- Line 93, Named "lerpLength"
    return arg2 + (arg3 - arg2) * math.min(utf8.len(utf8.nfcnormalize(arg1)) / 75, 1)
end
local function createFifo_upvr() -- Line 97, Named "createFifo"
    local module_upvr = {
        data = {};
    }
    local BindableEvent_upvr = Instance.new("BindableEvent")
    module_upvr.Emptied = BindableEvent_upvr.Event
    local function Size(arg1) -- Line 104
        --[[ Upvalues[1]:
            [1]: module_upvr (readonly)
        ]]
        return #module_upvr.data
    end
    module_upvr.Size = Size
    function module_upvr.Empty(arg1) -- Line 108
        --[[ Upvalues[1]:
            [1]: module_upvr (readonly)
        ]]
        local var24
        if module_upvr:Size() > 0 then
            var24 = false
        else
            var24 = true
        end
        return var24
    end
    function module_upvr.PopFront(arg1) -- Line 112
        --[[ Upvalues[2]:
            [1]: module_upvr (readonly)
            [2]: BindableEvent_upvr (readonly)
        ]]
        table.remove(module_upvr.data, 1)
        if module_upvr:Empty() then
            BindableEvent_upvr:Fire()
        end
    end
    function module_upvr.Front(arg1) -- Line 117
        --[[ Upvalues[1]:
            [1]: module_upvr (readonly)
        ]]
        return module_upvr.data[1]
    end
    local function Get(arg1, arg2) -- Line 121
        --[[ Upvalues[1]:
            [1]: module_upvr (readonly)
        ]]
        return module_upvr.data[arg2]
    end
    module_upvr.Get = Get
    function module_upvr.PushBack(arg1, arg2) -- Line 125
        --[[ Upvalues[1]:
            [1]: module_upvr (readonly)
        ]]
        table.insert(module_upvr.data, arg2)
    end
    local function GetData(arg1) -- Line 129
        --[[ Upvalues[1]:
            [1]: module_upvr (readonly)
        ]]
        return module_upvr.data
    end
    module_upvr.GetData = GetData
    return module_upvr
end
local function _() -- Line 136, Named "createCharacterChats"
    --[[ Upvalues[1]:
        [1]: createFifo_upvr (readonly)
    ]]
    return {
        Fifo = createFifo_upvr();
        BillboardGui = nil;
    }
end
local function createChatLine_upvr(arg1, arg2, arg3) -- Line 184, Named "createChatLine"
    local module_3 = {
        ComputeBubbleLifetime = function(arg1_2, arg2_2, arg3_2) -- Line 187, Named "ComputeBubbleLifetime"
            if arg3_2 then
                return 8 + 7 * math.min(utf8.len(utf8.nfcnormalize(arg2_2)) / 75, 1)
            end
            return 12 + 8 * math.min(utf8.len(utf8.nfcnormalize(arg2_2)) / 75, 1)
        end;
        Origin = nil;
        RenderBubble = nil;
    }
    module_3.Message = arg1
    module_3.BubbleDieDelay = module_3:ComputeBubbleLifetime(arg1, arg3)
    module_3.BubbleColor = arg2
    module_3.IsLocalPlayer = arg3
    return module_3
end
local function _(arg1, arg2, arg3) -- Line 205, Named "createPlayerChatLine"
    --[[ Upvalues[2]:
        [1]: createChatLine_upvr (readonly)
        [2]: tbl_3_upvr (readonly)
    ]]
    local createChatLine_upvr_result1_2 = createChatLine_upvr(arg2, tbl_3_upvr.WHITE, arg3)
    if arg1 then
        createChatLine_upvr_result1_2.User = arg1.Name
        createChatLine_upvr_result1_2.Origin = arg1.Character
    end
    return createChatLine_upvr_result1_2
end
local function _(arg1, arg2, arg3, arg4) -- Line 216, Named "createGameChatLine"
    --[[ Upvalues[1]:
        [1]: createChatLine_upvr (readonly)
    ]]
    local createChatLine_result1 = createChatLine_upvr(arg2, arg4, arg3)
    createChatLine_result1.Origin = arg1
    return createChatLine_result1
end
function createChatBubbleMain(arg1, arg2) -- Line 223
    local ImageLabel_2 = Instance.new("ImageLabel")
    ImageLabel_2.Name = "ChatBubble"
    ImageLabel_2.ScaleType = Enum.ScaleType.Slice
    ImageLabel_2.SliceCenter = arg2
    ImageLabel_2.Image = "rbxasset://textures/"..tostring(arg1)..".png"
    ImageLabel_2.BackgroundTransparency = 1
    ImageLabel_2.BorderSizePixel = 0
    ImageLabel_2.Size = UDim2.new(1, 0, 1, 0)
    ImageLabel_2.Position = UDim2.new(0, 0, 0, 0)
    return ImageLabel_2
end
function createChatBubbleTail(arg1, arg2) -- Line 237
    local ImageLabel = Instance.new("ImageLabel")
    ImageLabel.Name = "ChatBubbleTail"
    ImageLabel.Image = "rbxasset://textures/ui/dialog_tail.png"
    ImageLabel.BackgroundTransparency = 1
    ImageLabel.BorderSizePixel = 0
    ImageLabel.Position = arg1
    ImageLabel.Size = arg2
    return ImageLabel
end
function createChatBubbleWithTail(arg1, arg2, arg3, arg4) -- Line 249
    local createChatBubbleMain_result1_2 = createChatBubbleMain(arg1, arg4)
    createChatBubbleTail(arg2, arg3).Parent = createChatBubbleMain_result1_2
    return createChatBubbleMain_result1_2
end
function createScaledChatBubbleWithTail(arg1, arg2, arg3, arg4) -- Line 258
    local createChatBubbleMain_result1 = createChatBubbleMain(arg1, arg4)
    local Frame = Instance.new("Frame")
    Frame.Name = "ChatBubbleTailFrame"
    Frame.BackgroundTransparency = 1
    Frame.SizeConstraint = Enum.SizeConstraint.RelativeXX
    Frame.Position = UDim2.new(0.5, 0, 1, 0)
    Frame.Size = UDim2.new(arg2, 0, arg2, 0)
    Frame.Parent = createChatBubbleMain_result1
    createChatBubbleTail(arg3, UDim2.new(1, 0, 0.5, 0)).Parent = Frame
    return createChatBubbleMain_result1
end
function createChatImposter(arg1, arg2, arg3) -- Line 275
    local ImageLabel_4 = Instance.new("ImageLabel")
    ImageLabel_4.Name = "DialogPlaceholder"
    ImageLabel_4.Image = "rbxasset://textures/"..tostring(arg1)..".png"
    ImageLabel_4.BackgroundTransparency = 1
    ImageLabel_4.BorderSizePixel = 0
    ImageLabel_4.Position = UDim2.new(0, 0, -1.25, 0)
    ImageLabel_4.Size = UDim2.new(1, 0, 1, 0)
    local ImageLabel_3 = Instance.new("ImageLabel")
    ImageLabel_3.Name = "DotDotDot"
    ImageLabel_3.Image = "rbxasset://textures/"..tostring(arg2)..".png"
    ImageLabel_3.BackgroundTransparency = 1
    ImageLabel_3.BorderSizePixel = 0
    ImageLabel_3.Position = UDim2.new(0.001, 0, arg3, 0)
    ImageLabel_3.Size = UDim2.new(1, 0, 0.7, 0)
    ImageLabel_3.Parent = ImageLabel_4
    return ImageLabel_4
end
local tbl_2_upvr = {
    ChatBubble = {};
    ChatBubbleWithTail = {};
    ScalingChatBubbleWithTail = {};
    CharacterSortedMsg = (function() -- Line 145, Named "createMap"
        --[[ Upvalues[1]:
            [1]: createFifo_upvr (readonly)
        ]]
        local module_2_upvr = {
            data = {};
        }
        local var27_upvw = 0
        function module_2_upvr.Size(arg1) -- Line 150
            --[[ Upvalues[1]:
                [1]: var27_upvw (read and write)
            ]]
            return var27_upvw
        end
        function module_2_upvr.Erase(arg1, arg2) -- Line 154
            --[[ Upvalues[2]:
                [1]: module_2_upvr (readonly)
                [2]: var27_upvw (read and write)
            ]]
            if module_2_upvr.data[arg2] then
                var27_upvw -= 1
            end
            module_2_upvr.data[arg2] = nil
        end
        function module_2_upvr.Set(arg1, arg2, arg3) -- Line 159
            --[[ Upvalues[2]:
                [1]: module_2_upvr (readonly)
                [2]: var27_upvw (read and write)
            ]]
            module_2_upvr.data[arg2] = arg3
            if arg3 then
                var27_upvw += 1
            end
        end
        function module_2_upvr.Get(arg1, arg2) -- Line 164
            --[[ Upvalues[2]:
                [1]: module_2_upvr (readonly)
                [2]: createFifo_upvr (copied, readonly)
            ]]
            if not arg2 then return end
            if not module_2_upvr.data[arg2] then
                module_2_upvr.data[arg2] = {
                    Fifo = createFifo_upvr();
                    BillboardGui = nil;
                }
                local var30_upvw
                var30_upvw = module_2_upvr.data[arg2].Fifo.Emptied:connect(function() -- Line 169
                    --[[ Upvalues[3]:
                        [1]: var30_upvw (read and write)
                        [2]: module_2_upvr (copied, readonly)
                        [3]: arg2 (readonly)
                    ]]
                    var30_upvw:disconnect()
                    module_2_upvr:Erase(arg2)
                end)
            end
            return module_2_upvr.data[arg2]
        end
        function module_2_upvr.GetData(arg1) -- Line 177
            --[[ Upvalues[1]:
                [1]: module_2_upvr (readonly)
            ]]
            return module_2_upvr.data
        end
        return module_2_upvr
    end)();
}
local function initChatBubbleType(arg1, arg2, arg3, arg4, arg5) -- Line 304
    --[[ Upvalues[1]:
        [1]: tbl_2_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    tbl_2_upvr.ChatBubble[arg1] = createChatBubbleMain(arg2, arg5)
    local var42
    if arg4 then
        var42 = -1
    else
        var42 = 0
    end
    var42 = 0
    tbl_2_upvr.ChatBubbleWithTail[arg1] = createChatBubbleWithTail(arg2, UDim2.new(0.5, -14, 1, var42), UDim2.new(0, 30, var42, 14), arg5)
    var42 = 0
    if arg4 then
    else
    end
    tbl_2_upvr.ScalingChatBubbleWithTail[arg1] = createScaledChatBubbleWithTail(arg2, 0.5, UDim2.new(-0.5, 0, var42, 0), arg5)
end
initChatBubbleType(tbl_3_upvr.WHITE, "ui/dialog_white", "ui/chatBubble_white_notify_bkg", false, Rect.new(5, 5, 15, 15))
initChatBubbleType(tbl_3_upvr.BLUE, "ui/dialog_blue", "ui/chatBubble_blue_notify_bkg", true, Rect.new(7, 7, 33, 33))
initChatBubbleType(tbl_3_upvr.RED, "ui/dialog_red", "ui/chatBubble_red_notify_bkg", true, Rect.new(7, 7, 33, 33))
initChatBubbleType(tbl_3_upvr.GREEN, "ui/dialog_green", "ui/chatBubble_green_notify_bkg", true, Rect.new(7, 7, 33, 33))
local var43_upvr = 128 - utf8.len(utf8.nfcnormalize("...")) - 1
function tbl_2_upvr.SanitizeChatLine(arg1, arg2) -- Line 315
    --[[ Upvalues[1]:
        [1]: var43_upvr (readonly)
    ]]
    if var43_upvr < utf8.len(utf8.nfcnormalize(arg2)) then
        return string.sub(arg2, 1, utf8.offset(arg2, var43_upvr + utf8.len(utf8.nfcnormalize("...")) + 1) - 1)
    end
    return arg2
end
local function createBillboardInstance_upvr(arg1) -- Line 324, Named "createBillboardInstance"
    --[[ Upvalues[3]:
        [1]: ScreenGui_upvr (readonly)
        [2]: tbl_2_upvr (readonly)
        [3]: tbl_3_upvr (readonly)
    ]]
    local BillboardGui_upvr = Instance.new("BillboardGui")
    BillboardGui_upvr.Adornee = arg1
    BillboardGui_upvr.Size = UDim2.new(0, 400, 0, 250)
    BillboardGui_upvr.StudsOffset = Vector3.new(0, 1.5, 2)
    BillboardGui_upvr.Parent = ScreenGui_upvr
    local Frame_2_upvr = Instance.new("Frame")
    Frame_2_upvr.Name = "BillboardFrame"
    Frame_2_upvr.Size = UDim2.new(1, 0, 1, 0)
    Frame_2_upvr.Position = UDim2.new(0, 0, -0.5, 0)
    Frame_2_upvr.BackgroundTransparency = 1
    Frame_2_upvr.Parent = BillboardGui_upvr
    local var47_upvw
    var47_upvw = Frame_2_upvr.ChildRemoved:connect(function() -- Line 339
        --[[ Upvalues[3]:
            [1]: Frame_2_upvr (readonly)
            [2]: var47_upvw (read and write)
            [3]: BillboardGui_upvr (readonly)
        ]]
        if #Frame_2_upvr:GetChildren() <= 1 then
            var47_upvw:disconnect()
            BillboardGui_upvr:Destroy()
        end
    end)
    tbl_2_upvr:CreateSmallTalkBubble(tbl_3_upvr.WHITE).Parent = Frame_2_upvr
    return BillboardGui_upvr
end
function tbl_2_upvr.CreateBillboardGuiHelper(arg1, arg2, arg3) -- Line 351
    --[[ Upvalues[2]:
        [1]: tbl_2_upvr (readonly)
        [2]: createBillboardInstance_upvr (readonly)
    ]]
    if arg2 and not tbl_2_upvr.CharacterSortedMsg:Get(arg2).BillboardGui then
        if not arg3 and arg2:IsA("BasePart") then
            tbl_2_upvr.CharacterSortedMsg:Get(arg2).BillboardGui = createBillboardInstance_upvr(arg2)
            return
        end
        if arg2:IsA("Model") then
            local Head = arg2:FindFirstChild("Head")
            if Head and Head:IsA("BasePart") then
                tbl_2_upvr.CharacterSortedMsg:Get(arg2).BillboardGui = createBillboardInstance_upvr(Head)
            end
        end
    end
end
local function _(arg1) -- Line 373, Named "distanceToBubbleOrigin"
    if not arg1 then
        return 100000
    end
    return (arg1.Position - game.Workspace.CurrentCamera.CoordinateFrame.Position).magnitude
end
local function _(arg1) -- Line 379, Named "isPartOfLocalPlayer"
    --[[ Upvalues[1]:
        [1]: Players_upvr (readonly)
    ]]
    if arg1 and Players_upvr.LocalPlayer.Character then
        return arg1:IsDescendantOf(Players_upvr.LocalPlayer.Character)
    end
end
function tbl_2_upvr.SetBillboardLODNear(arg1, arg2) -- Line 385
    --[[ Upvalues[1]:
        [1]: Players_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    -- KONSTANTERROR: [0] 1. Error Block 24 start (CF ANALYSIS FAILED)
    local Adornee = arg2.Adornee
    local var55
    if Adornee and Players_upvr.LocalPlayer.Character then
        var55 = Adornee:IsDescendantOf(Players_upvr.LocalPlayer.Character)
    else
        var55 = nil
    end
    arg2.Size = UDim2.new(0, 400, 0, 250)
    if var55 then
        -- KONSTANTWARNING: GOTO [34] #27
    end
    -- KONSTANTERROR: [0] 1. Error Block 24 end (CF ANALYSIS FAILED)
    -- KONSTANTERROR: [33] 26. Error Block 26 start (CF ANALYSIS FAILED)
    if var55 then
    else
    end
    arg2.StudsOffset = Vector3.new(0, 2.5, 0.1)
    arg2.Enabled = true
    local children_2 = arg2.BillboardFrame:GetChildren()
    for i = 1, #children_2 do
        children_2[i].Visible = true
        local _
    end
    arg2.BillboardFrame.SmallTalkBubble.Visible = false
    -- KONSTANTERROR: [33] 26. Error Block 26 end (CF ANALYSIS FAILED)
end
function tbl_2_upvr.SetBillboardLODDistant(arg1, arg2) -- Line 397
    --[[ Upvalues[1]:
        [1]: Players_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local Adornee_2 = arg2.Adornee
    local var63
    if Adornee_2 and Players_upvr.LocalPlayer.Character then
        var63 = Adornee_2:IsDescendantOf(Players_upvr.LocalPlayer.Character)
    else
        var63 = nil
    end
    arg2.Size = UDim2.new(4, 0, 3, 0)
    if var63 then
    else
    end
    arg2.StudsOffset = Vector3.new(0, 3, 0.1)
    arg2.Enabled = true
    local children = arg2.BillboardFrame:GetChildren()
    for i_2 = 1, #children do
        children[i_2].Visible = false
        local _
    end
    arg2.BillboardFrame.SmallTalkBubble.Visible = true
end
function tbl_2_upvr.SetBillboardLODVeryFar(arg1, arg2) -- Line 409
    arg2.Enabled = false
end
function tbl_2_upvr.SetBillboardGuiLOD(arg1, arg2, arg3) -- Line 413
    --[[ Upvalues[1]:
        [1]: tbl_2_upvr (readonly)
    ]]
    if not arg3 then
    else
        if arg3:IsA("Model") then
            local Head_2 = arg3:FindFirstChild("Head")
            if not Head_2 then
            else
            end
        end
        local var67 = Head_2
        if not var67 then
            local _ = 100000
        else
        end
        if (var67.Position - game.Workspace.CurrentCamera.CoordinateFrame.Position).magnitude < 65 then
            tbl_2_upvr:SetBillboardLODNear(arg2)
            return
        end
        -- KONSTANTERROR: Expression was reused, decompilation is incorrect (x2)
        if 65 <= (var67.Position - game.Workspace.CurrentCamera.CoordinateFrame.Position).magnitude and (var67.Position - game.Workspace.CurrentCamera.CoordinateFrame.Position).magnitude < 100 then
            tbl_2_upvr:SetBillboardLODDistant(arg2)
            return
        end
        tbl_2_upvr:SetBillboardLODVeryFar(arg2)
    end
end
function tbl_2_upvr.CameraCFrameChanged(arg1) -- Line 433
    --[[ Upvalues[1]:
        [1]: tbl_2_upvr (readonly)
    ]]
    for i_3, v in pairs(tbl_2_upvr.CharacterSortedMsg:GetData()) do
        local BillboardGui_2 = v.BillboardGui
        if BillboardGui_2 then
            tbl_2_upvr:SetBillboardGuiLOD(BillboardGui_2, i_3)
        end
    end
end
local Size24_upvr = Enum.FontSize.Size24
function tbl_2_upvr.CreateBubbleText(arg1, arg2, arg3) -- Line 440
    --[[ Upvalues[3]:
        [1]: var10_upvw (read and write)
        [2]: SourceSans_upvr (readonly)
        [3]: Size24_upvr (readonly)
    ]]
    local TextLabel = Instance.new("TextLabel")
    TextLabel.Name = "BubbleText"
    TextLabel.BackgroundTransparency = 1
    if var10_upvw then
        TextLabel.Size = UDim2.fromScale(1, 1)
    else
        TextLabel.Position = UDim2.new(0, 15, 0, 0)
        TextLabel.Size = UDim2.new(1, -30, 1, 0)
    end
    TextLabel.Font = SourceSans_upvr
    TextLabel.ClipsDescendants = true
    TextLabel.TextWrapped = true
    TextLabel.FontSize = Size24_upvr
    TextLabel.Text = arg2
    TextLabel.Visible = false
    TextLabel.AutoLocalize = arg3
    if var10_upvw then
        local UIPadding = Instance.new("UIPadding")
        UIPadding.PaddingTop = UDim.new(0, 12)
        UIPadding.PaddingRight = UDim.new(0, 12)
        UIPadding.PaddingBottom = UDim.new(0, 12)
        UIPadding.PaddingLeft = UDim.new(0, 12)
        UIPadding.Parent = TextLabel
    end
    return TextLabel
end
function tbl_2_upvr.CreateSmallTalkBubble(arg1, arg2) -- Line 472
    --[[ Upvalues[1]:
        [1]: tbl_2_upvr (readonly)
    ]]
    local clone = tbl_2_upvr.ScalingChatBubbleWithTail[arg2]:Clone()
    clone.Name = "SmallTalkBubble"
    clone.AnchorPoint = Vector2.new(0, 0.5)
    clone.Position = UDim2.new(0, 0, 0.5, 0)
    clone.Visible = false
    local any_CreateBubbleText_result1 = tbl_2_upvr:CreateBubbleText("...")
    any_CreateBubbleText_result1.TextScaled = true
    any_CreateBubbleText_result1.TextWrapped = false
    any_CreateBubbleText_result1.Visible = true
    any_CreateBubbleText_result1.Parent = clone
    return clone
end
function tbl_2_upvr.UpdateChatLinesForOrigin(arg1, arg2, arg3) -- Line 487
    --[[ Upvalues[1]:
        [1]: tbl_2_upvr (readonly)
    ]]
    local Fifo_2 = tbl_2_upvr.CharacterSortedMsg:Get(arg2).Fifo
    local any_GetData_result1 = Fifo_2:GetData()
    if #any_GetData_result1 <= 1 then
    else
        for var80 = #any_GetData_result1 - 1, 1, -1 do
            local RenderBubble = any_GetData_result1[var80].RenderBubble
            if not RenderBubble then return end
            if 1 < Fifo_2:Size() - var80 + 1 then
                local ChatBubbleTail = RenderBubble:FindFirstChild("ChatBubbleTail")
                if ChatBubbleTail then
                    ChatBubbleTail:Destroy()
                end
                local BubbleText_2 = RenderBubble:FindFirstChild("BubbleText")
                if BubbleText_2 then
                    BubbleText_2.TextTransparency = 0.5
                end
            end
            RenderBubble:TweenPosition(UDim2.new(RenderBubble.Position.X.Scale, RenderBubble.Position.X.Offset, 1, arg3 - RenderBubble.Size.Y.Offset - 14), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 0.1, true)
        end
    end
end
function tbl_2_upvr.DestroyBubble(arg1, arg2, arg3) -- Line 513
    if not arg2 then
    else
        if arg2:Empty() then return end
        local RenderBubble_upvw = arg2:Front().RenderBubble
        if not RenderBubble_upvw then
            arg2:PopFront()
            return
        end
        spawn(function() -- Line 523
            --[[ Upvalues[3]:
                [1]: arg2 (readonly)
                [2]: arg3 (readonly)
                [3]: RenderBubble_upvw (read and write)
            ]]
            while arg2:Front().RenderBubble ~= arg3 do
                wait()
            end
            RenderBubble_upvw = arg2:Front().RenderBubble
            local BubbleText = RenderBubble_upvw:FindFirstChild("BubbleText")
            local ChatBubbleTail_2 = RenderBubble_upvw:FindFirstChild("ChatBubbleTail")
            while RenderBubble_upvw and RenderBubble_upvw.ImageTransparency < 1 do
                if RenderBubble_upvw then
                    local var90 = wait() * 1.5
                    RenderBubble_upvw.ImageTransparency += var90
                    if BubbleText then
                        BubbleText.TextTransparency += var90
                    end
                    if ChatBubbleTail_2 then
                        ChatBubbleTail_2.ImageTransparency += var90
                    end
                end
            end
            if RenderBubble_upvw then
                RenderBubble_upvw:Destroy()
                arg2:PopFront()
            end
        end)
    end
end
local TextService_upvr = game:GetService("TextService")
function tbl_2_upvr.CreateChatLineRender(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 551
    --[[ Upvalues[4]:
        [1]: tbl_2_upvr (readonly)
        [2]: TextService_upvr (readonly)
        [3]: SourceSans_upvr (readonly)
        [4]: var10_upvw (read and write)
    ]]
    if not arg2 then
    else
        if not tbl_2_upvr.CharacterSortedMsg:Get(arg2).BillboardGui then
            tbl_2_upvr:CreateBillboardGuiHelper(arg2, arg4)
        end
        local BillboardGui = tbl_2_upvr.CharacterSortedMsg:Get(arg2).BillboardGui
        if BillboardGui then
            local clone_upvr = tbl_2_upvr.ChatBubbleWithTail[arg3.BubbleColor]:Clone()
            clone_upvr.Visible = false
            local any_CreateBubbleText_result1_upvr = tbl_2_upvr:CreateBubbleText(arg3.Message, arg6)
            any_CreateBubbleText_result1_upvr.Parent = clone_upvr
            clone_upvr.Parent = BillboardGui.BillboardFrame
            arg3.RenderBubble = clone_upvr
            local any_GetTextSize_result1 = TextService_upvr:GetTextSize(any_CreateBubbleText_result1_upvr.Text, 24, SourceSans_upvr, Vector2.new(400, 250))
            if var10_upvw then
                local ceiled = math.ceil(any_GetTextSize_result1.X + 24)
                local var97 = any_GetTextSize_result1.Y / 24 * 34
                clone_upvr.Size = UDim2.fromOffset(0, 0)
                clone_upvr.Position = UDim2.fromScale(0.5, 1)
                clone_upvr:TweenSizeAndPosition(UDim2.fromOffset(ceiled, var97), UDim2.new(0.5, -ceiled / 2, 1, -var97), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true, function() -- Line 590
                    --[[ Upvalues[1]:
                        [1]: any_CreateBubbleText_result1_upvr (readonly)
                    ]]
                    any_CreateBubbleText_result1_upvr.Visible = true
                end)
                tbl_2_upvr:SetBillboardGuiLOD(BillboardGui, arg3.Origin)
                tbl_2_upvr:UpdateChatLinesForOrigin(arg3.Origin, -var97)
            else
                local maximum = math.max((any_GetTextSize_result1.X + 30) / 400, 0.1)
                clone_upvr.Size = UDim2.new(0, 0, 0, 0)
                clone_upvr.Position = UDim2.new(0.5, 0, 1, 0)
                -- KONSTANTERROR: Expression was reused, decompilation is incorrect
                local var100 = any_GetTextSize_result1.Y / 24 * 34
                clone_upvr:TweenSizeAndPosition(UDim2.new(maximum, 0, 0, var100), UDim2.new((1 - maximum) / 2, 0, 1, -var100), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true, function() -- Line 610
                    --[[ Upvalues[1]:
                        [1]: any_CreateBubbleText_result1_upvr (readonly)
                    ]]
                    any_CreateBubbleText_result1_upvr.Visible = true
                end)
                tbl_2_upvr:SetBillboardGuiLOD(BillboardGui, arg3.Origin)
                tbl_2_upvr:UpdateChatLinesForOrigin(arg3.Origin, -var100)
            end
            delay(arg3.BubbleDieDelay, function() -- Line 617
                --[[ Upvalues[3]:
                    [1]: tbl_2_upvr (copied, readonly)
                    [2]: arg5 (readonly)
                    [3]: clone_upvr (readonly)
                ]]
                tbl_2_upvr:DestroyBubble(arg5, clone_upvr)
            end)
        end
    end
end
function tbl_2_upvr.OnPlayerChatMessage(arg1, arg2, arg3, arg4) -- Line 623
    --[[ Upvalues[4]:
        [1]: tbl_2_upvr (readonly)
        [2]: Players_upvr (readonly)
        [3]: createChatLine_upvr (readonly)
        [4]: tbl_3_upvr (readonly)
    ]]
    if not tbl_2_upvr:BubbleChatEnabled() then
    else
        local LocalPlayer_2 = Players_upvr.LocalPlayer
        local var104 = false
        if LocalPlayer_2 ~= nil then
            if arg2 == LocalPlayer_2 then
                var104 = false
            else
                var104 = true
            end
        end
        local createChatLine_result1_2 = createChatLine_upvr(tbl_2_upvr:SanitizeChatLine(arg3), tbl_3_upvr.WHITE, not var104)
        if arg2 then
            createChatLine_result1_2.User = arg2.Name
            createChatLine_result1_2.Origin = arg2.Character
        end
        local var106 = createChatLine_result1_2
        if arg2 and var106.Origin then
            local Fifo = tbl_2_upvr.CharacterSortedMsg:Get(var106.Origin).Fifo
            Fifo:PushBack(var106)
            tbl_2_upvr:CreateChatLineRender(arg2.Character, var106, true, Fifo, false)
        end
    end
end
local var108_upvr = pcall_result1_3 and pcall_result2_4
function tbl_2_upvr.OnGameChatMessage(arg1, arg2, arg3, arg4) -- Line 642
    --[[ Upvalues[8]:
        [1]: var14_upvw (read and write)
        [2]: var18_upvw (read and write)
        [3]: Chat_upvr (readonly)
        [4]: Players_upvr (readonly)
        [5]: tbl_3_upvr (readonly)
        [6]: tbl_2_upvr (readonly)
        [7]: createChatLine_upvr (readonly)
        [8]: var108_upvr (readonly)
    ]]
    -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
    local var109
    local function INLINED() -- Internal function, doesn't exist in bytecode
        var109 = Chat_upvr
        return var109.BubbleChatEnabled
    end
    if var14_upvw or var18_upvw and INLINED() then
    else
        var109 = Players_upvr
        local LocalPlayer = var109.LocalPlayer
        var109 = false
        if LocalPlayer ~= nil then
            if LocalPlayer.Character == arg2 then
                var109 = false
            else
                var109 = true
            end
        end
        if arg4 == Enum.ChatColor.Blue then
        elseif arg4 == Enum.ChatColor.Green then
        elseif arg4 == Enum.ChatColor.Red then
        end
        local createChatLine_upvr_result1 = createChatLine_upvr(tbl_2_upvr:SanitizeChatLine(arg3), tbl_3_upvr.RED, not var109)
        createChatLine_upvr_result1.Origin = arg2
        local var112 = createChatLine_upvr_result1
        tbl_2_upvr.CharacterSortedMsg:Get(var112.Origin).Fifo:PushBack(var112)
        if var108_upvr then
            tbl_2_upvr:CreateChatLineRender(arg2, var112, false, tbl_2_upvr.CharacterSortedMsg:Get(var112.Origin).Fifo, true)
            return
        end
        tbl_2_upvr:CreateChatLineRender(arg2, var112, false, tbl_2_upvr.CharacterSortedMsg:Get(var112.Origin).Fifo, false)
    end
end
function tbl_2_upvr.BubbleChatEnabled(arg1) -- Line 668
    --[[ Upvalues[4]:
        [1]: var14_upvw (read and write)
        [2]: var18_upvw (read and write)
        [3]: Chat_upvr (readonly)
        [4]: Players_upvr (readonly)
    ]]
    if var14_upvw or var18_upvw and Chat_upvr.BubbleChatEnabled then
        return false
    end
    local ClientChatModules_5 = Chat_upvr:FindFirstChild("ClientChatModules")
    if ClientChatModules_5 then
        local ChatSettings = ClientChatModules_5:FindFirstChild("ChatSettings")
        if ChatSettings then
            local ChatSettings_5 = require(ChatSettings)
            if ChatSettings_5.BubbleChatEnabled ~= nil then
                return ChatSettings_5.BubbleChatEnabled
            end
        end
    end
    return Players_upvr.BubbleChat
end
function tbl_2_upvr.ShowOwnFilteredMessage(arg1) -- Line 685
    --[[ Upvalues[1]:
        [1]: Chat_upvr (readonly)
    ]]
    local ClientChatModules_3 = Chat_upvr:FindFirstChild("ClientChatModules")
    if ClientChatModules_3 then
        local ChatSettings_6 = ClientChatModules_3:FindFirstChild("ChatSettings")
        if ChatSettings_6 then
            return require(ChatSettings_6).ShowUserOwnFilteredMessage
        end
    end
    return false
end
function findPlayer(arg1) -- Line 697
    --[[ Upvalues[1]:
        [1]: Players_upvr (readonly)
    ]]
    for _, v_2 in pairs(Players_upvr:GetPlayers()) do
        if v_2.Name == arg1 then
            return v_2
        end
    end
end
Chat_upvr.Chatted:connect(function(arg1, arg2, arg3) -- Line 705
    --[[ Upvalues[1]:
        [1]: tbl_2_upvr (readonly)
    ]]
    tbl_2_upvr:OnGameChatMessage(arg1, arg2, arg3)
end)
local var128_upvw
if game.Workspace.CurrentCamera then
    var128_upvw = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):Connect(function(arg1) -- Line 709
        --[[ Upvalues[1]:
            [1]: tbl_2_upvr (readonly)
        ]]
        tbl_2_upvr:CameraCFrameChanged()
    end)
end
game.Workspace.Changed:Connect(function(arg1) -- Line 712
    --[[ Upvalues[2]:
        [1]: var128_upvw (read and write)
        [2]: tbl_2_upvr (readonly)
    ]]
    if arg1 == "CurrentCamera" then
        if var128_upvw then
            var128_upvw:disconnect()
        end
        if game.Workspace.CurrentCamera then
            var128_upvw = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):Connect(function(arg1_3) -- Line 716
                --[[ Upvalues[1]:
                    [1]: tbl_2_upvr (copied, readonly)
                ]]
                tbl_2_upvr:CameraCFrameChanged()
            end)
        end
    end
end)
local var132_upvw
function getAllowedMessageTypes() -- Line 724
    --[[ Upvalues[2]:
        [1]: var132_upvw (read and write)
        [2]: Chat_upvr (readonly)
    ]]
    if var132_upvw then
        return var132_upvw
    end
    local ClientChatModules = Chat_upvr:FindFirstChild("ClientChatModules")
    if ClientChatModules then
        local ChatSettings_3 = ClientChatModules:FindFirstChild("ChatSettings")
        if ChatSettings_3 then
            local ChatSettings_3_2 = require(ChatSettings_3)
            if ChatSettings_3_2.BubbleChatMessageTypes then
                var132_upvw = ChatSettings_3_2.BubbleChatMessageTypes
                return var132_upvw
            end
        end
        local ChatConstants = ClientChatModules:FindFirstChild("ChatConstants")
        if ChatConstants then
            local ChatConstants_2 = require(ChatConstants)
            var132_upvw = {ChatConstants_2.MessageTypeDefault, ChatConstants_2.MessageTypeWhisper}
        end
        return var132_upvw
    end
    return {"Message", "Whisper"}
end
function checkAllowedMessageType(arg1) -- Line 748
    local getAllowedMessageTypes_result1 = getAllowedMessageTypes()
    for i_5 = 1, #getAllowedMessageTypes_result1 do
        if getAllowedMessageTypes_result1[i_5] == arg1.MessageType then
            return true
        end
    end
    return false
end
local DefaultChatSystemChatEvents = game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents")
DefaultChatSystemChatEvents:WaitForChild("OnNewMessage").OnClientEvent:connect(function(arg1, arg2) -- Line 762
    --[[ Upvalues[2]:
        [1]: var3_upvw (read and write)
        [2]: tbl_2_upvr (readonly)
    ]]
    if not checkAllowedMessageType(arg1) then
    else
        local findPlayer_result1_2 = findPlayer(arg1.FromSpeaker)
        if not findPlayer_result1_2 then return end
        if not arg1.IsFiltered or arg1.FromSpeaker == var3_upvw.Name then
            if arg1.FromSpeaker ~= var3_upvw.Name or tbl_2_upvr:ShowOwnFilteredMessage() then return end
        end
        tbl_2_upvr:OnPlayerChatMessage(findPlayer_result1_2, arg1.Message, nil)
    end
end)
DefaultChatSystemChatEvents:WaitForChild("OnMessageDoneFiltering").OnClientEvent:connect(function(arg1, arg2) -- Line 781
    --[[ Upvalues[2]:
        [1]: var3_upvw (read and write)
        [2]: tbl_2_upvr (readonly)
    ]]
    if not checkAllowedMessageType(arg1) then
    else
        local findPlayer_result1 = findPlayer(arg1.FromSpeaker)
        if not findPlayer_result1 then return end
        if arg1.FromSpeaker == var3_upvw.Name then
            if not tbl_2_upvr:ShowOwnFilteredMessage() then return end
        end
        tbl_2_upvr:OnPlayerChatMessage(findPlayer_result1, arg1.Message, nil)
    end
end)