Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-mini-2024-07-18· OpenAIAi2 WildChat-4.8M (AI2)

You will be given a Luau script (that has been decompiled). You will rename the…

  1. User

    System: You will be given a Luau script (that has been decompiled). You will rename the variables and functions to sound better, make the script more coherent, and add comments to areas of the script. Return the fixed script without adding ``` as we handle that. If no script has been given, do not produce any output. Do not respond with anything but the script User: -- Decompiler will be improved soon! -- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/wyButjTMhM) -- Decompiled on 2025-02-11 09:52:47 -- Luau version 6, Types version 3 -- Time taken: 0.011764 seconds

    local Assets_upvr = game:GetService("ReplicatedStorage").Assets local Modules = game:GetService("ReplicatedStorage").Modules local Shared_upvr = require(Modules.Core.Shared) local Matchmaking_upvr = require(Modules.Core.Matchmaking) local module_upvr = { ["Damage vs Classes"] = { Organic = 1; Armored = 1; MiniBoss = 5; Boss = 10; Structure = 1; Aerial = 1; Naval = 1; Terrestrial = 1; Calamity = 1; Overseer = 1.25; }; Themes = { Anticipation = { ID = 9266232046; Volume = 1.25; Pitch = 1; };

    	-- : First try: runluau:11745: attempt to index nil with 't'
    

    ; TimeToMove = 10; ["Passive Debuff"] = "Incrypted Fracture"; ["Incrypted Fracture"] = { Damage = 10; Rate = 0.0125; Range = 250; Element = { Type = "???"; Color = Color3.fromRGB(170, 170, 255); }; }; Anticipation = false; Phases = { Enabled = true; Level = 0; Segments = {{ Min = 0.7; Max = 0.9; }, { Min = 0.55; Max = 0.7; }, { Min = 0.385; Max = 0.55; }, { Min = 0; Max = 0.385; }}; }; ["Special Attacks"] = { Enabled = false; Rate = 5; Multiplier = 1; Used = false; Moveset = {}; }; } local function NewSpot_upvr(arg1) -- Line 103, Named "NewSpot" if not arg1 then else local class_BodyPosition = arg1:FindFirstChildOfClass("BodyPosition") if not class_BodyPosition then return end class_BodyPosition.Position = Vector3.new(Random.new():NextNumber(-200, -437), Random.new():NextNumber(50, 60), Random.new():NextNumber(-100, 100)) end end local function UseSpecial_upvr(arg1, arg2, arg3, arg4, arg5, arg6) -- Line 116, Named "UseSpecial" --[[ Upvalues[2]: [1]: Assets_upvr (readonly) [2]: Shared_upvr (readonly) ]] if not arg1 or not arg5 or not arg5.Parent or not arg2 or 0 >= arg2.Health then else if arg1.MinDifficulty and Assets_upvr.Session.Difficulty.Value < arg1.MinDifficulty then return end if arg1.Cue and arg1.Cue.ID then Shared_upvr.CreateSound(arg1.Cue, arg3) end end end function module_upvr.Equip(arg1, arg2) -- Line 128 end local Events_upvr = game:GetService("ReplicatedStorage").Events local VFX_upvr = require(Modules.Gameplay.VFX) local var26_upvr = Matchmaking_upvr["Difficulty Nomenclature"][Assets_upvr.Session.Difficulty.Value] local RunService_upvr = game:GetService("RunService") function module_upvr.Attack(arg1) -- Line 132 --[[ Upvalues[10]: [1]: Events_upvr (readonly) [2]: Assets_upvr (readonly) [3]: Shared_upvr (readonly) [4]: module_upvr (readonly) [5]: VFX_upvr (readonly) [6]: var26_upvr (readonly) [7]: Matchmaking_upvr (readonly) [8]: RunService_upvr (readonly) [9]: NewSpot_upvr (readonly) [10]: UseSpecial_upvr (readonly) ]] local Humanoid_4_upvr = arg1:WaitForChild("Humanoid", 2) local TEAM_2_upvr = arg1:WaitForChild("TEAM", 2) local PrimaryPart_upvr = arg1.PrimaryPart local var35_upvw local Stats_upvr = arg1:FindFirstChild("Stats") if Stats_upvr then Stats_upvr = require(arg1.Stats) end if PrimaryPart_upvr:FindFirstChildOfClass("BodyPosition") then PrimaryPart_upvr:FindFirstChildOfClass("BodyPosition").Position = Vector3.new(-209.17, 64.7340, 0.22800) end local var37_upvw = false if math.abs(Random.new():NextInteger(0, 100)) <= 1 then var37_upvw = true end local clone_upvr = Assets_upvr.Core.Miscellaneous:WaitForChild("Erelphos Runes"):Clone() clone_upvr.Owner.Value = arg1 for _, v in pairs(clone_upvr:GetDescendants()) do if v:IsA("BasePart") then if v.Name == "Out" then v.Transparency = 1 else v.Transparency = 1 end end if v:IsA("Beam") then v.Enabled = false end end clone_upvr.Parent = workspace.JunkHolder local function VerifyThisTarget_upvr(arg1_2) -- Line 180, Named "VerifyThisTarget" --[[ Upvalues[1]: [1]: Stats_upvr (readonly) ]] -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments local var42 if var42 then var42 = arg1_2:FindFirstChild("Humanoid") end if not arg1_2 or Stats_upvr.Ranged ~= true or not arg1_2:FindFirstChild("Head") then if arg1_2 then end end if arg1_2 then local var43 end if var42 and arg1_2.PrimaryPart and arg1_2:FindFirstChild("TEAM") then var43 = false end -- KONSTANTERROR: Expression was reused, decompilation is incorrect (x2) return var43, var42, arg1_2.PrimaryPart, arg1_2:FindFirstChild("TEAM") end local RaycastParams_new_result1_upvr_2 = RaycastParams.new() local function FindClosestTarget_upvr(arg1_3) -- Line 190, Named "FindClosestTarget" --[[ Upvalues[7]: [1]: PrimaryPart_upvr (readonly) [2]: Shared_upvr (copied, readonly) [3]: arg1 (readonly) [4]: Stats_upvr (readonly) [5]: TEAM_2_upvr (readonly) [6]: RaycastParams_new_result1_upvr_2 (readonly) [7]: VerifyThisTarget_upvr (readonly) ]] local var82 = PrimaryPart_upvr.CFrame * CFrame.new(0, 1.5, 0).Position local _, pairs_result2, pairs_result3_5 = pairs(workspace:GetChildren()) local var86 for _, v_2 in var86, pairs_result2, pairs_result3_5 do if v_2:FindFirstChild("Humanoid") and v_2.Humanoid:GetState() ~= Enum.HumanoidStateType.Dead and not v_2:FindFirstChildOfClass("ForceField") then if v_2 ~= arg1 then local Humanoid_3 = v_2:FindFirstChild("Humanoid") local var88 local function INLINED_3() -- Internal function, doesn't exist in bytecode var88 = v_2:FindFirstChild("Head") return var88 end if Stats_upvr.Ranged ~= true or not INLINED_3() then var88 = v_2.PrimaryPart end if Humanoid_3 and Humanoid_3:GetState() ~= Enum.HumanoidStateType.Dead and var88 and v_2:FindFirstChild("TEAM") then -- KONSTANTERROR: Expression was reused, decompilation is incorrect local var89 if v_2:FindFirstChild("TEAM").Value ~= var89 then var89 = nil RaycastParams_new_result1_upvr_2.FilterDescendantsInstances = Shared_upvr.CreateIgnoreList(arg1, false, true) RaycastParams_new_result1_upvr_2.FilterType = Enum.RaycastFilterType.Exclude RaycastParams_new_result1_upvr_2.IgnoreWater = true local workspace_Raycast_result1_2 = workspace:Raycast(var82, CFrame.new(var82, var88.CFrame.Position).LookVector * 2048, RaycastParams_new_result1_upvr_2) if workspace_Raycast_result1_2 then var89 = workspace_Raycast_result1_2.Instance end if var89 and var89.Parent and var89:IsDescendantOf(v_2) then table.insert({}, v_2) end end end end end end var86 = nil -- KONSTANTERROR: Expression was reused, decompilation is incorrect for _, v_3 in pairs({}) do local Humanoid_2 = v_3:FindFirstChild("Humanoid") local var95 local function INLINED_4() -- Internal function, doesn't exist in bytecode var95 = v_3:FindFirstChild("Head") return var95 end if Stats_upvr.Ranged ~= true or not INLINED_4() then var95 = v_3.PrimaryPart end local var96 = var95 var95 = v_3:FindFirstChild("TEAM") if Humanoid_2 then var95 = Humanoid_2:GetState() if var95 ~= Enum.HumanoidStateType.Dead then var95 = Humanoid_2.Health if 0 < var95 and var96 and var95 then -- KONSTANTERROR: Expression was reused, decompilation is incorrect var95 = var95.Value if var95 ~= TEAM_2_upvr.Value then var95 = (var96.Position - arg1_3).Magnitude if var95 < math.huge then var86 = v_3 var95 = var96.Position - arg1_3 end end end end end end local _, VerifyThisTarget_result2, VerifyThisTarget_upvr_result3_2, _ = VerifyThisTarget_upvr(var86) -- KONSTANTERROR: Expression was reused, decompilation is incorrect return var86, VerifyThisTarget_result2, VerifyThisTarget_upvr_result3_2, v_2:FindFirstChild("TEAM") end local RaycastParams_new_result1_upvr = RaycastParams.new() local Aim_upvr = PrimaryPart_upvr.Aim coroutine.wrap(function() -- Line 259 --[[ Upvalues[16]: [1]: arg1 (readonly) [2]: Humanoid_4_upvr (readonly) [3]: module_upvr (copied, readonly) [4]: VFX_upvr (copied, readonly) [5]: PrimaryPart_upvr (readonly) [6]: var37_upvw (read and write) [7]: Events_upvr (copied, readonly) [8]: TEAM_2_upvr (readonly) [9]: Shared_upvr (copied, readonly) [10]: var26_upvr (copied, readonly) [11]: Matchmaking_upvr (copied, readonly) [12]: FindClosestTarget_upvr (readonly) [13]: RaycastParams_new_result1_upvr (readonly) [14]: var35_upvw (read and write) [15]: Aim_upvr (readonly) [16]: RunService_upvr (copied, readonly) ]] -- KONSTANTERROR: [519] 351. Error Block 87 start (CF ANALYSIS FAILED) local FindClosestTarget_upvr_result1, FindClosestTarget_upvr_result2, FindClosestTarget_upvr_result3, FindClosestTarget_upvr_result4 = FindClosestTarget_upvr(PrimaryPart_upvr.CFrame.Position) if FindClosestTarget_upvr_result1 and FindClosestTarget_upvr_result2 and FindClosestTarget_upvr_result3 and FindClosestTarget_upvr_result4 then local var108 = PrimaryPart_upvr.CFrame * CFrame.new(0, 1.5, 0).Position RaycastParams_new_result1_upvr.FilterDescendantsInstances = Shared_upvr.CreateIgnoreList(arg1, false, true) RaycastParams_new_result1_upvr.FilterType = Enum.RaycastFilterType.Exclude RaycastParams_new_result1_upvr.IgnoreWater = true if workspace:Raycast(var108, CFrame.new(var108, FindClosestTarget_upvr_result3.CFrame.Position).LookVector * 2048, RaycastParams_new_result1_upvr) then end var35_upvw = FindClosestTarget_upvr_result1 Aim_upvr.CFrame = CFrame.new(PrimaryPart_upvr.CFrame.Position, var35_upvw.PrimaryPart.Position) end RunService_upvr.Heartbeat:Wait() -- KONSTANTERROR: [519] 351. Error Block 87 end (CF ANALYSIS FAILED) -- KONSTANTERROR: [0] 1. Error Block 84 start (CF ANALYSIS FAILED) -- KONSTANTERROR: [0] 1. Error Block 84 end (CF ANALYSIS FAILED) end)() coroutine.wrap(function() -- Line 473 --[[ Upvalues[10]: [1]: VFX_upvr (copied, readonly) [2]: PrimaryPart_upvr (readonly) [3]: clone_upvr (readonly) [4]: var37_upvw (read and write) [5]: arg1 (readonly) [6]: Shared_upvr (copied, readonly) [7]: Events_upvr (copied, readonly) [8]: Humanoid_4_upvr (readonly) [9]: module_upvr (copied, readonly) [10]: NewSpot_upvr (copied, readonly) ]] task.wait(12) VFX_upvr.CueSpecial(PrimaryPart_upvr, { Range = 150; Color = Color3.fromRGB(255, 255, 255); FadeTime = 1; Transparency = 0; }) for _, v_4 in pairs(clone_upvr:GetDescendants()) do if v_4:IsA("BasePart") then if v_4.Name == "Out" then v_4.Transparency = -5 else v_4.Transparency = 0 end end if v_4:IsA("Beam") then v_4.Enabled = true end end clone_upvr.CoreRune.Decoration.MiddleRing.Transparency = 1 if var37_upvw == true then arg1.Name = "SUPREME KEVINBOP!" if arg1:FindFirstChild("Bloxxercap") then arg1.Bloxxercap.Handle.Transparency = 0 end if arg1:FindFirstChild("Sideswept Bangs Brown") then arg1["Sideswept Bangs Brown"].Handle.Transparency = 0 end arg1.Head:FindFirstChildOfClass("Decal").Transparency = 0 arg1.HumanoidRootPart:FindFirstChildOfClass("Decal").Transparency = 0 Shared_upvr.CreateSound({ ID = 7989088301; Volume = 20; Pitch = 1; }, workspace) local tbl = {} ;({}).ID = 8192674140 -- KONSTANTERROR: Expression was reused, decompilation is incorrect ;({}).Volume = 1 -- KONSTANTERROR: Expression was reused, decompilation is incorrect ;({}).Pitch = 1 -- KONSTANTERROR: Expression was reused, decompilation is incorrect tbl.Music = {} Events_upvr.Core.Master:FireAllClients("PlayMusic", tbl) arg1.Humanoid.HealthChanged:Connect(function() -- Line 533 --[[ Upvalues[2]: [1]: Shared_upvr (copied, readonly) [2]: PrimaryPart_upvr (copied, readonly) ]] Shared_upvr.CreateSound({ ID = 8603227350; Volume = 0.5; Pitch = 1; }, PrimaryPart_upvr) end) end while arg1.Parent and Humanoid_4_upvr and 0 < Humanoid_4_upvr.Health do task.wait(module_upvr.TimeToMove) NewSpot_upvr(PrimaryPart_upvr) end end)() if module_upvr["Special Attacks"].Enabled == true then coroutine.wrap(function() -- Line 553 --[[ Upvalues[8]: [1]: module_upvr (copied, readonly) [2]: UseSpecial_upvr (copied, readonly) [3]: Humanoid_4_upvr (readonly) [4]: PrimaryPart_upvr (readonly) [5]: TEAM_2_upvr (readonly) [6]: arg1 (readonly) [7]: var35_upvw (read and write) [8]: RunService_upvr (copied, readonly) ]] repeat wait(module_upvr["Special Attacks"].Rate * module_upvr["Special Attacks"].Multiplier) if module_upvr["Special Attacks"].Used == false and 0 < #module_upvr["Special Attacks"].Moveset then local var122 = module_upvr["Special Attacks"].Moveset[Random.new():NextInteger(1, #module_upvr["Special Attacks"].Moveset)] module_upvr["Special Attacks"].Used = true UseSpecial_upvr(var122, Humanoid_4_upvr, PrimaryPart_upvr, TEAM_2_upvr, arg1, var35_upvw) wait(var122.Cooldown) module_upvr["Special Attacks"].Used = false end RunService_upvr.Heartbeat:Wait() until not arg1.Parent and (not Humanoid_4_upvr or Humanoid_4_upvr:GetState() == Enum.HumanoidStateType.Dead) end)() end if Humanoid_4_upvr.Health == 0 then task.wait(4) workspace.Enemies:ClearAllChildren() end end return module_upvr Assistant:

  2. Assistant

    local Assets = game:GetService("ReplicatedStorage").Assets local Modules = game:GetService("ReplicatedStorage").Modules local Shared = require(Modules.Core.Shared) local Matchmaking = require(Modules.Core.Matchmaking)

    -- Main module to handle combat and special attacks local CombatModule = { -- Damage values against different classes ["Damage vs Classes"] = { Organic = 1, Armored = 1, MiniBoss = 5, Boss = 10, Structure = 1, Aerial = 1, Naval = 1, Terrestrial = 1, Calamity = 1, Overseer = 1.25, }, Themes = { Anticipation = { ID = 9266232046, Volume = 1.25, Pitch = 1, }, TimeToMove = 10, ["Passive Debuff"] = "Incrypted Fracture", ["Incrypted Fracture"] = { Damage = 10, Rate = 0.0125, Range = 250, Element = { Type = "???", Color = Color3.fromRGB(170, 170, 255), }, }, Anticipation = false, Phases = { Enabled = true, Level = 0, Segments = { { Min = 0.7, Max = 0.9 }, { Min = 0.55, Max = 0.7 }, { Min = 0.385, Max = 0.55 }, { Min = 0, Max = 0.385 }, }, }, ["Special Attacks"] = { Enabled = false, Rate = 5, Multiplier = 1, Used = false, Moveset = {}, }, } }

    -- Function to move a character to a new position local function MoveToNewSpot(character) if not character then return end

    local bodyPosition = character:FindFirstChildOfClass("BodyPosition")
    if not bodyPosition then return end
    
    bodyPosition.Position = Vector3.new(Random.new():NextNumber(-200, -437), Random.new():NextNumber(50, 60), Random.new():NextNumber(-100, 100))
    

    end

    -- Function to use a special attack local function ExecuteSpecialAttack(attack, humanoid, target, team, character, isCritical) if not attack or not team or not team.Parent or not humanoid or humanoid.Health <= 0 then return end

    if attack.MinDifficulty and Assets.Session.Difficulty.Value < attack.MinDifficulty then return end
    if attack.Cue and attack.Cue.ID then
        Shared.CreateSound(attack.Cue, target)
    end
    

    end

    -- Equip function (not implemented yet) function CombatModule.Equip(character, equipment) end

    local Events = game:GetService("ReplicatedStorage").Events local VFX = require(Modules.Gameplay.VFX) local difficultyName = Matchmaking["Difficulty Nomenclature"][Assets.Session.Difficulty.Value] local RunService = game:GetService("RunService")

    -- Main attack function using the provided character function CombatModule.Attack(character) local humanoid = character:WaitForChild("Humanoid", 2) local team = character:WaitForChild("TEAM", 2) local primaryPart = character.PrimaryPart local stats = character:FindFirstChild("Stats")

    if stats then
        stats = require(character.Stats)
    end
    
    if primaryPart:FindFirstChildOfClass("BodyPosition") then
        primaryPart:FindFirstChildOfClass("BodyPosition").Position = Vector3.new(-209.17, 64.7340, 0.22800)
    end
    
    local isCriticalHit = math.abs(Random.new():NextInteger(0, 100)) <= 1
    local runesClone = Assets.Core.Miscellaneous:WaitForChild("Erelphos Runes"):Clone()
    runesClone.Owner.Value = character
    
    -- Set transparency for all parts in the clone
    for _, part in pairs(runesClone:GetDescendants()) do
        if part:IsA("BasePart") then
            part.Transparency = 1
        elseif part:IsA("Beam") then
            part.Enabled = false
        end
    end
    
    runesClone.Parent = workspace.JunkHolder
    
    -- Function to verify if a target is valid
    local function VerifyTarget(target)
        local targetHumanoid = target:FindFirstChild("Humanoid")
        if not target or stats.Ranged ~= true or not target:FindFirstChild("Head") then return end
    
        return targetHumanoid, target.PrimaryPart, target:FindFirstChild("TEAM")
    end
    
    -- Function to find the closest target to the attacker
    local function FindClosestTarget(origin)
        local targetPosition = primaryPart.CFrame * CFrame.new(0, 1.5, 0).Position
        local closestTarget = nil
        local targetHumanoid, targetPart, targetTeam
    
        for _, enemy in pairs(workspace:GetChildren()) do
            local enemyHumanoid = enemy:FindFirstChild("Humanoid")
            if enemyHumanoid and enemyHumanoid:GetState() ~= Enum.HumanoidStateType.Dead and 
               not enemy:FindFirstChildOfClass("ForceField") and enemy ~= character then
    
                -- Check if the enemy can be targeted
                local enemyHead = enemy:FindFirstChild("Head")
                if stats.Ranged ~= true or not enemyHead then
                    enemyHead = enemy.PrimaryPart
                end
    
                if enemyHead and enemy:FindFirstChild("TEAM") then
                    local enemyTeam = enemy:FindFirstChild("TEAM").Value
                    if enemyTeam ~= team.Value then
                        -- Verify if the target is in range and not obscured
                        local raycastParams = RaycastParams.new()
                        raycastParams.FilterDescendantsInstances = Shared.CreateIgnoreList(character, false, true)
                        raycastParams.FilterType = Enum.RaycastFilterType.Exclude
                        raycastParams.IgnoreWater = true
    
                        local raycastResult = workspace:Raycast(targetPosition, (targetPosition - enemyHead.Position).Unit * 2048, raycastParams)
                        if raycastResult and raycastResult.Instance.Parent == enemy then
                            closestTarget = enemy
                            break
                        end
                    end
                end
            end
        end
    
        return VerifyTarget(closestTarget)
    end
    
    local Aim = primaryPart.Aim
    coroutine.wrap(function()
        while true do
            local closestTarget, targetHumanoid, targetPart, targetTeam = FindClosestTarget(primaryPart.Position)
            if closestTarget and targetPart then
                Aim.CFrame = CFrame.new(primaryPart.Position, targetPart.Position)
            end
            RunService.Heartbeat:Wait()
        end
    end)()
    
    coroutine.wrap(function()
        task.wait(12)
        VFX.CueSpecial(primaryPart, {
            Range = 150,
            Color = Color3.fromRGB(255, 255, 255),
            FadeTime = 1,
            Transparency = 0,
        })
    
        for _, part in pairs(runesClone:GetDescendants()) do
            if part:IsA("BasePart") then
                part.Transparency = 0
            elseif part:IsA("Beam") then
                part.Enabled = true
            end
        end
    
        if isCriticalHit then
            character.Name = "SUPREME KEVINBOP!"
            -- Make character features visible
            if character:FindFirstChild("Bloxxercap") then
                character.Bloxxercap.Handle.Transparency = 0
            end
            if character:FindFirstChild("Sideswept Bangs Brown") then
                character["Sideswept Bangs Brown"].Handle.Transparency = 0
            end
            character.Head:FindFirstChildOfClass("Decal").Transparency = 0
            character.HumanoidRootPart:FindFirstChildOfClass("Decal").Transparency = 0
    
            Shared.CreateSound({
                ID = 7989088301,
                Volume = 20,
                Pitch = 1,
            }, workspace)
    
            local musicTable = { ID = 8192674140, Volume = 1, Pitch = 1 }
            Events.Core.Master:FireAllClients("PlayMusic", musicTable)
    
            character.Humanoid.HealthChanged:Connect(function()
                Shared.CreateSound({
                    ID = 8603227350,
                    Volume = 0.5,
                    Pitch = 1,
                }, primaryPart)
            end)
        end
    
        while character.Parent and humanoid and humanoid.Health > 0 do
            task.wait(CombatModule.TimeToMove)
            MoveToNewSpot(primaryPart)
        end
    end)()
    
    -- Handle special attack mechanics
    if CombatModule["Special Attacks"].Enabled then
        coroutine.wrap(function()
            repeat
                wait(CombatModule["Special Attacks"].Rate * CombatModule["Special Attacks"].Multiplier)
                if not CombatModule["Special Attacks"].Used and #CombatModule["Special Attacks"].Moveset > 0 then
                    local specialMove = CombatModule["Special Attacks"].Moveset[Random.new():NextInteger(1, #CombatModule["Special Attacks"].Moveset)]
                    CombatModule["Special Attacks"].Used = true
                    ExecuteSpecialAttack(specialMove, humanoid, primaryPart, team, character, isCriticalHit)
                    wait(specialMove.Cooldown)
                    CombatModule["Special Attacks"].Used = false
                end
                RunService.Heartbeat:Wait()
            until not character.Parent or (not humanoid or humanoid:GetState() == Enum.HumanoidStateType.Dead)
        end)()
    end
    
    -- Clean up if the humanoid is dead
    if humanoid.Health == 0 then
        task.wait(4)
        workspace.Enemies:ClearAllChildren()
    end
    

    end

    return CombatModule