You will be given a Luau script (that has been decompiled). You will rename the…
- 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: --decompiled with swift using medal decompiler --MEDAL GITHUB: https://github.com/shrimp-nz/medal --Give them a star!
local v1 = game:GetService("ReplicatedStorage").Assets local v_u_2 = game:GetService("ReplicatedStorage").Events local v3 = game:GetService("ReplicatedStorage").Modules local v4 = game:GetService("RunService") game:GetService("TweenService") game:GetService("ServerStorage"):WaitForChild("Locations", 2) local v_u_5 = script.Parent:WaitForChild("Resources") local v_u_6 = require(v3.Core.Shared) require(v3.Core.Assets) require(v3.Gameplay.VFX) local v_u_7 = require(v3.Core.Matchmaking) local v_u_8 = v_u_7["Difficulty Nomenclature"][v1.Session.Difficulty.Value] local v_u_96 = { ["Attacked"] = false, ["CanAttack"] = true, ["Melee Time"] = 1, ["CanDrag"] = false, ["Dragging"] = false, ["Element"] = { ["Type"] = "Light", ["Color"] = Color3.fromRGB(255, 255, 127) }, ["Drag"] = { ["Delay"] = 0.4, ["LaunchPrep"] = 0.2, ["Launch"] = 0.63, ["Offset"] = CFrame.new(-13.234, 2.024, -14.268), ["Velocity"] = 350, ["Damage"] = 625, ["Cooldown"] = v4:IsStudio() and 5 or 7.5, ["SFX"] = { ["Drag"] = { ["ID"] = 8328359011, ["Pitch"] = 1, ["Volume"] = 0.35 }, ["GauntletPrep"] = { ["ID"] = 7889966529, ["Volume"] = 0.35, ["Pitch"] = 1 }, ["GauntletActivate"] = { ["ID"] = 7889967723, ["Volume"] = 1, ["Pitch"] = 1 }, ["Hit"] = { ["ID"] = 1843115950, ["Volume"] = 0.5, ["Pitch"] = 1.2 } } }, ["Drag Animation"] = { ["ID"] = 10489041996, ["Speed"] = 1, ["Delay"] = 0.05 }, ["Attack"] = function(p_u_9) -- upvalues: (copy) v_u_96, (copy) v_u_6, (copy) v_u_5, (copy) v_u_2, (copy) v_u_8, (copy) v_u_7 local v_u_10 = p_u_9:WaitForChild("Humanoid", 2) local v_u_11 = p_u_9:WaitForChild("TEAM", 2) local v_u_12 = p_u_9.PrimaryPart local v_u_13 = nil p_u_9:FindFirstChildOfClass("Tool") local v_u_14 = false local v_u_15 = p_u_9.Resources.BaseSpeed.Value local v_u_16 = v_u_12.Aim local v_u_17 = p_u_9:FindFirstChild("Stats") if v_u_17 then v_u_17 = require(p_u_9.Stats) end local v_u_18 = RaycastParams.new() local v_u_19 = RaycastParams.new() local v_u_20 = { ["Base"] = Instance.new("Animation"), ["Track"] = nil, ["Core"] = v_u_96["Drag Animation"] } v_u_20.Base.AnimationId = "rbxassetid://" .. v_u_20.Core.ID v_u_20.Base.Parent = script v_u_20.Track = v_u_10:LoadAnimation(v_u_20.Base) local function v_u_25(p21) -- upvalues: (copy) v_u_17 local v22 = true local v23 if p21 then v23 = p21:FindFirstChild("Humanoid") else v23 = p21 end local v24 = p21 and v_u_17.Ranged == true and p21:FindFirstChild("Head") if not v24 then if p21 then v24 = p21.PrimaryPart else v24 = p21 end end if p21 then p21 = p21:FindFirstChild("TEAM") end if v23 and (v24 and p21) then v22 = false end return v22, v23, v24, p21 end local function v_u_50(p26) -- upvalues: (copy) v_u_12, (ref) v_u_6, (copy) p_u_9, (copy) v_u_17, (copy) v_u_11, (copy) v_u_18, (copy) v_u_25 local v27 = v_u_12.CFrame * CFrame.new(0, 1.5, 0).Position local v28 = v_u_6.CreateIgnoreList(p_u_9, false, true) local v29 = {} local v30 = (1 / 0) for _, v31 in pairs(workspace:GetChildren()) do if v31:FindFirstChild("Humanoid") and (v31.Humanoid:GetState() ~= Enum.HumanoidStateType.Dead and (not v31:FindFirstChildOfClass("ForceField") and v31 ~= p_u_9)) then local v32 = v31:FindFirstChild("Humanoid") local v33 = v_u_17.Ranged == true and v31:FindFirstChild("Head") or v31.PrimaryPart local v34 = v31:FindFirstChild("TEAM") if v32 and (v32:GetState() ~= Enum.HumanoidStateType.Dead and (v33 and (v34 and v34.Value ~= v_u_11.Value))) then local v35 = CFrame.new(v27, v33.CFrame.Position).LookVector local v36 = v_u_18 local v37 = v_u_18 local v38 = v_u_18 local v39 = Enum.RaycastFilterType.Exclude v36.FilterDescendantsInstances = v28 v37.FilterType = v39 v38.IgnoreWater = true local v40 = workspace:Raycast(v27, v35 * 2048, v_u_18) local v41 if v40 then v41 = v40.Instance local _ = v40.Position else v41 = nil end if v41 and (v41.Parent and v41:IsDescendantOf(v31)) then table.insert(v29, v31) end end end end local v42 = nil for _, v43 in pairs(v29) do local v44 = v43:FindFirstChild("Humanoid") local v45 = v_u_17.Ranged == true and v43:FindFirstChild("Head") or v43.PrimaryPart local v46 = v43:FindFirstChild("TEAM") if v44 and (v44:GetState() ~= Enum.HumanoidStateType.Dead and (v44.Health > 0 and (v45 and (v46 and (v46.Value ~= v_u_11.Value and (v45.Position - p26).Magnitude < v30))))) then v30 = (v45.Position - p26).magnitude v42 = v43 end end local _, v47, v48, v49 = v_u_25(v42) return v42, v47, v48, v49 end local function v_u_52(p51) -- upvalues: (ref) v_u_5 if p51 then v_u_5.Beam.Attachment1 = p51.PrimaryPart:FindFirstChildOfClass("Attachment") or Instance.new("Attachment", p51.PrimaryPart) v_u_5.Beam.Attachment0.Flare.Enabled = true else v_u_5.Beam.Attachment1 = nil v_u_5.Beam.Attachment0.Flare.Enabled = false end end local function v_u_78(p_u_53) -- upvalues: (ref) v_u_96, (copy) v_u_20, (ref) v_u_6, (copy) p_u_9, (ref) v_u_2, (copy) v_u_12, (copy) v_u_52, (ref) v_u_5, (ref) v_u_8, (ref) v_u_7 local v54 = p_u_53:FindFirstChild("Classification") if not (v54 and v54:FindFirstChild("Structure")) then if p_u_53 and (p_u_53:IsA("Model") and v_u_96.CanDrag == true) then v_u_96.CanDrag = false v_u_96.Dragging = true v_u_96.CanAttack = false local v55 = v_u_20.Core.Speed local v56 = v_u_6.ModifySettingFactor(p_u_9, v55, "Animation Speed") if not v_u_20.Track.IsPlaying then v_u_20.Track:Play(v_u_20.Core.Delay, nil, v56) end v_u_6.CreateSound(v_u_96.Drag.SFX.GauntletPrep, p_u_9.Gauntlet.PrimaryPart) local v57 = v_u_2.Gameplay.VFX local v58 = { ["Object"] = p_u_53.PrimaryPart, ["Info"] = { v_u_96.Drag.LaunchPrep, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, v_u_96.Drag.Delay }, ["Properties"] = { ["CFrame"] = v_u_12.CFrame * v_u_96.Drag.Offset } } v57:FireAllClients("Tween", v58) local v59 = v_u_96.Drag.Delay local v60 = v_u_96.Drag.LaunchPrep local v61 = v_u_96.Drag.Launch local v_u_62 = v_u_96.Drag.Cooldown local v63 = v_u_6.ModifySettingFactor(p_u_9, v59, "Utility Cooldown") local v_u_64 = v_u_6.ModifySettingFactor(p_u_9, v60, "Utility Cooldown") local v_u_65 = v_u_6.ModifySettingFactor(p_u_9, v61, "Utility Cooldown") v_u_6.ModifySettingFactor(p_u_9, 0.35, "Utility Cooldown") v_u_6.ModifySettingFactor(p_u_9, v_u_62, "Utility Cooldown") task.delay(v63, function() -- upvalues: (copy) p_u_53, (ref) v_u_6, (ref) v_u_96, (ref) p_u_9, (ref) v_u_52, (copy) v_u_64, (ref) v_u_12, (copy) v_u_65, (ref) v_u_5, (ref) v_u_8, (ref) v_u_7, (ref) v_u_2, (copy) v_u_62 p_u_53.PrimaryPart.Anchored = true v_u_6.CreateSound(v_u_96.Drag.SFX.GauntletActivate, p_u_9.Gauntlet.PrimaryPart) v_u_6.CreateSound(v_u_96.Drag.SFX.Drag, p_u_53.PrimaryPart) v_u_52(p_u_53) task.wait(v_u_64) v_u_6.CreateSound(v_u_96.Drag.SFX.Hit, p_u_9.Hammer) p_u_53.PrimaryPart.CFrame = v_u_12.CFrame * v_u_96.Drag.Offset task.wait(v_u_65) p_u_53.PrimaryPart.Anchored = false local v66 = v_u_12.CFrame.LookVector v_u_5.Beam.Attachment1 = nil v_u_5.Beam.Attachment0.Flare.Enabled = false local v67 = v_u_96.Drag.Damage * (v_u_8 and v_u_8.DamageMultiplier or 1) * v_u_7["Global Scaling"] local v68 = v_u_6.ModifyEnemyStats({ ["User"] = p_u_9, ["Target"] = p_u_53, ["Damage"] = v67, ["KB"] = nil, ["Element"] = v_u_96.Element, ["StatueMult"] = nil, ["DamageVsClasses"] = nil }) local v69 = v_u_6.ModifySettingFactor(p_u_9, v68, "Damage") if p_u_53.Humanoid.Health > 0 and v69 > 0 then p_u_53.Humanoid:TakeDamage(v69) end local v70 = v_u_2.Gameplay.VFX local v71 = { ["Object"] = p_u_53.PrimaryPart, ["Info"] = { 0.001, Enum.EasingStyle.Linear, Enum.EasingDirection.In } } local v72 = {} local v73 = v66.X * v_u_96.Drag.Velocity local v74 = v66.Z * v_u_96.Drag.Velocity v72.AssemblyLinearVelocity = Vector3.new(v73, 100, v74) v71.Properties = v72 v70:FireAllClients("Tween", v71) local v75 = p_u_53.PrimaryPart local v76 = v66.X * v_u_96.Drag.Velocity local v77 = v66.Z * v_u_96.Drag.Velocity v75.AssemblyLinearVelocity = Vector3.new(v76, 100, v77) task.wait(0.35) v_u_96.CanAttack = true v_u_96.Dragging = false task.wait(v_u_62) v_u_96.CanDrag = true end) end end end local v79 = v_u_96.Drag.Cooldown local v80 = v_u_6.ModifySettingFactor(p_u_9, v79, "Utility Cooldown") task.delay(v80, function() -- upvalues: (ref) v_u_96 v_u_96.CanDrag = true end) coroutine.wrap(function() -- upvalues: (copy) p_u_9, (copy) v_u_10, (copy) v_u_50, (copy) v_u_12, (ref) v_u_96, (ref) v_u_13, (copy) v_u_16, (ref) v_u_14, (copy) v_u_15, (ref) v_u_6, (copy) v_u_19, (copy) v_u_78, (copy) v_u_17, (ref) v_u_5 while p_u_9.Parent and (v_u_10 and v_u_10.Health > 0) do local v81, v82, v83, v84 = v_u_50(v_u_12.CFrame.Position) if v_u_96.Attacked == true and (v_u_13 and v_u_13.PrimaryPart) then v_u_10.WalkSpeed = 0 v_u_16.CFrame = CFrame.new(v_u_12.CFrame.Position, CFrame.new(v_u_13.PrimaryPart.CFrame.X, v_u_12.CFrame.Y, v_u_13.PrimaryPart.CFrame.Z).Position) else v_u_10.WalkSpeed = v_u_96.Dragging == true or (v_u_14 == true or v_u_14 == false and (v_u_10.WalkSpeed <= 0 and v_u_15)) or (v_u_10.WalkSpeed > 0 and (v_u_10.WalkSpeed < v_u_15 and v_u_15) or v_u_10.WalkSpeed) end v_u_10.AutoRotate = v_u_96.Attacked == false v_u_16.MaxTorque = v_u_96.Attacked == true and Vector3.new(400000, 400000, 400000) or Vector3.new(400000, 0, 400000) if v81 and (v82 and (v83 and v84)) then local v85 = v_u_12.CFrame * CFrame.new(0, 1.5, 0).Position local v86 = CFrame.new(v85, v83.CFrame.Position).LookVector local v87 = v_u_6.CreateIgnoreList(p_u_9, false, true) local v88 = v_u_19 local v89 = v_u_19 local v90 = v_u_19 local v91 = Enum.RaycastFilterType.Exclude v88.FilterDescendantsInstances = v87 v89.FilterType = v91 v90.IgnoreWater = true local v92 = workspace:Raycast(v85, v86 * 2048, v_u_19) local v93, v94 if v92 then v93 = v92.Instance v94 = v92.Position else v93 = nil v94 = nil end if v93 and (v93.Parent and v93:IsDescendantOf(v81)) then if v_u_96.CanDrag == true and (not v81:FindFirstChild("Morphed") and v81 ~= workspace.Statue) then v_u_78(v81) end if (v94 - v_u_12.CFrame.Position).Magnitude <= v_u_17["Melee Range"] / 2 then v_u_13 = v81 v_u_14 = true if v_u_96.Attacked == false and v_u_96.CanAttack == true then v_u_96.Attacked = true v_u_5.MakeSlash:Fire() local v95 = v_u_96["Melee Time"] v_u_6.ModifySettingFactor(p_u_9, v95, "Attack Speed") task.delay(v_u_96["Melee Time"], function() -- upvalues: (ref) v_u_96 v_u_96.Attacked = false end) end else v_u_14 = false end else v_u_14 = false end end game:GetService("RunService").Heartbeat:Wait() end end)() end } return v_u_96
- Assistant