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 v_u_1 = game:GetService("ReplicatedStorage").Assets
local v_u_2 = game:GetService("ReplicatedStorage").Events
local v3 = game:GetService("ReplicatedStorage").Modules
local v_u_4 = game:GetService("RunService")
game:GetService("TweenService")
local v_u_5 = require(v3.Core.Shared)
require(v3.Core.Assets)
local v_u_6 = require(v3.Gameplay.VFX)
require(v3.Gameplay.Storyline)
local v_u_7 = require(v3.Gameplay.Cutscenes)
local v_u_8 = require(v3.Core.Matchmaking)
local v_u_9 = v_u_8["Difficulty Nomenclature"][v_u_1.Session.Difficulty.Value]
local v_u_10 = {
	["Damage vs Classes"] = {
		["Organic"] = 1,
		["Armored"] = 1,
		["MiniBoss"] = 5,
		["Boss"] = 10,
		["Structure"] = 1,
		["Aerial"] = 1,
		["Naval"] = 1,
		["Terrestrial"] = 1,
		["Calamity"] = 1,
		["Overseer"] = 2
	}
}
local v11 = {
	[2] = {
		["ID"] = 9266225945,
		["Volume"] = 1.25,
		["Pitch"] = 1
	},
	[3] = {
		["ID"] = 9266229285,
		["Volume"] = 1.25,
		["Pitch"] = 1
	},
	["Anticipation"] = {
		["ID"] = 9266232046,
		["Volume"] = 1.25,
		["Pitch"] = 1
	},
	[4] = {
		["ID"] = 9266235435,
		["Volume"] = 1,
		["Pitch"] = 1
	}
}
v_u_10.Themes = v11
v_u_10.TimeToMove = 10
v_u_10["Passive Debuff"] = "Incrypted Fracture"
local v12 = {
	["Damage"] = 10,
	["Rate"] = 0.0125,
	["Range"] = 250,
	["Element"] = {
		["Type"] = "???",
		["Color"] = Color3.fromRGB(170, 170, 255)
	}
}
v_u_10["Incrypted Fracture"] = v12
v_u_10.Anticipation = false
local v13 = {
	["Enabled"] = true,
	["Level"] = 0
}
local v14 = {
	{
		["Min"] = 0.7,
		["Max"] = 0.9
	},
	{
		["Min"] = 0.55,
		["Max"] = 0.7
	},
	{
		["Min"] = 0.385,
		["Max"] = 0.55
	},
	{
		["Min"] = 0,
		["Max"] = 0.385
	}
}
v13.Segments = v14
v_u_10.Phases = v13
v_u_10["Special Attacks"] = {
	["Enabled"] = false,
	["Rate"] = 5,
	["Multiplier"] = 1,
	["Used"] = false,
	["Moveset"] = {}
}
local function v_u_20(p15)
	if p15 then
		if p15.Parent:FindFirstChild("Humanoid") and p15.Parent.Humanoid.Health < 2 then
			return
		else
			local v16 = p15:FindFirstChildOfClass("BodyPosition")
			if v16 then
				local v17 = Random.new():NextNumber(-200, -437)
				local v18 = Random.new():NextNumber(50, 60)
				local v19 = Random.new()
				v16.Position = Vector3.new(v17, v18, v19:NextNumber(-100, 100))
			end
		end
	else
		return
	end
end
local function v_u_25(p21, p22, p23, _, p24, _)
	-- upvalues: (copy) v_u_1, (copy) v_u_5
	if p21 and (p24 and (p24.Parent and (p22 and p22.Health > 0))) then
		if not p21.MinDifficulty or v_u_1.Session.Difficulty.Value >= p21.MinDifficulty then
			if p21.Cue and p21.Cue.ID then
				v_u_5.CreateSound(p21.Cue, p23)
			end
		end
	else
		return
	end
end
function v_u_10.Equip(_, _) end
function v_u_10.Attack(p_u_26)
	-- upvalues: (copy) v_u_2, (copy) v_u_1, (copy) v_u_5, (copy) v_u_10, (copy) v_u_6, (copy) v_u_9, (copy) v_u_8, (copy) v_u_4, (copy) v_u_7, (copy) v_u_20, (copy) v_u_25
	local v_u_27 = p_u_26:WaitForChild("Humanoid", 2)
	local v_u_28 = p_u_26:WaitForChild("TEAM", 2)
	local v_u_29 = p_u_26.PrimaryPart
	local v_u_30 = nil
	p_u_26:FindFirstChildOfClass("Tool")
	local v_u_31 = Instance.new("ForceField")
	v_u_31.Visible = false
	v_u_31.Parent = p_u_26
	local _ = v_u_27.WalkSpeed
	local v_u_32 = v_u_29.Aim
	local v_u_33 = p_u_26:FindFirstChild("Stats")
	if v_u_33 then
		v_u_33 = require(p_u_26.Stats)
	end
	local _ = v_u_2.Gameplay.VFX
	local v_u_34 = RaycastParams.new()
	local v_u_35 = RaycastParams.new()
	if v_u_29:FindFirstChildOfClass("BodyPosition") then
		v_u_29:FindFirstChildOfClass("BodyPosition").Position = Vector3.new(-209.178, 64.734, 0.228)
	end
	local v36 = Random.new():NextInteger(0, 100)
	local v_u_37 = math.abs(v36) <= 1
	v_u_27:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
	local v_u_38 = v_u_1.Core.Miscellaneous:WaitForChild("Erelphos Runes"):Clone()
	v_u_38.Owner.Value = p_u_26
	for _, v39 in pairs(v_u_38:GetDescendants()) do
		if v39:IsA("BasePart") then
			if v39.Name == "Out" then
				v39.Transparency = 1
			else
				v39.Transparency = 1
			end
		end
		if v39:IsA("Beam") then
			v39.Enabled = false
		end
	end
	v_u_38.Parent = workspace.JunkHolder
	local function v_u_44(p40)
		-- upvalues: (copy) v_u_33
		local v41 = true
		local v42
		if p40 then
			v42 = p40:FindFirstChild("Humanoid")
		else
			v42 = p40
		end
		local v43 = p40 and v_u_33.Ranged == true and p40:FindFirstChild("Head")
		if not v43 then
			if p40 then
				v43 = p40.PrimaryPart
			else
				v43 = p40
			end
		end
		if p40 then
			p40 = p40:FindFirstChild("TEAM")
		end
		if v42 and (v43 and p40) then
			v41 = false
		end
		return v41, v42, v43, p40
	end
	local function v_u_69(p45)
		-- upvalues: (copy) v_u_29, (ref) v_u_5, (copy) p_u_26, (copy) v_u_33, (copy) v_u_28, (copy) v_u_34, (copy) v_u_44
		local v46 = v_u_29.CFrame * CFrame.new(0, 1.5, 0).Position
		local v47 = v_u_5.CreateIgnoreList(p_u_26, false, true)
		local v48 = {}
		local v49 = (1 / 0)
		for _, v50 in pairs(workspace:GetChildren()) do
			if v50:FindFirstChild("Humanoid") and (v50.Humanoid:GetState() ~= Enum.HumanoidStateType.Dead and (not v50:FindFirstChildOfClass("ForceField") and v50 ~= p_u_26)) then
				local v51 = v50:FindFirstChild("Humanoid")
				local v52 = v_u_33.Ranged == true and v50:FindFirstChild("Head") or v50.PrimaryPart
				local v53 = v50:FindFirstChild("TEAM")
				if v51 and (v51:GetState() ~= Enum.HumanoidStateType.Dead and (v52 and (v53 and v53.Value ~= v_u_28.Value))) then
					local v54 = CFrame.new(v46, v52.CFrame.Position).LookVector
					local v55 = v_u_34
					local v56 = v_u_34
					local v57 = v_u_34
					local v58 = Enum.RaycastFilterType.Exclude
					v55.FilterDescendantsInstances = v47
					v56.FilterType = v58
					v57.IgnoreWater = true
					local v59 = workspace:Raycast(v46, v54 * 2048, v_u_34)
					local v60
					if v59 then
						v60 = v59.Instance
						local _ = v59.Position
					else
						v60 = nil
					end
					if v60 and (v60.Parent and v60:IsDescendantOf(v50)) then
						table.insert(v48, v50)
					end
				end
			end
		end
		local v61 = nil
		for _, v62 in pairs(v48) do
			local v63 = v62:FindFirstChild("Humanoid")
			local v64 = v_u_33.Ranged == true and v62:FindFirstChild("Head") or v62.PrimaryPart
			local v65 = v62:FindFirstChild("TEAM")
			if v63 and (v63:GetState() ~= Enum.HumanoidStateType.Dead and (v63.Health > 0 and (v64 and (v65 and (v65.Value ~= v_u_28.Value and (v64.Position - p45).Magnitude < v49))))) then
				v49 = (v64.Position - p45).Magnitude
				v61 = v62
			end
		end
		local _, v66, v67, v68 = v_u_44(v61)
		return v61, v66, v67, v68
	end
	coroutine.wrap(function()
		-- upvalues: (copy) p_u_26, (copy) v_u_27, (ref) v_u_10, (ref) v_u_6, (copy) v_u_29, (ref) v_u_37, (ref) v_u_2, (copy) v_u_28, (ref) v_u_5, (ref) v_u_9, (ref) v_u_8, (copy) v_u_69, (copy) v_u_35, (ref) v_u_30, (copy) v_u_32, (ref) v_u_4, (ref) v_u_7
		while p_u_26.Parent and (v_u_27 and v_u_27.Health > 1) do
			if v_u_10.Phases and (v_u_10.Phases.Enabled == true and #v_u_10.Phases.Segments > 0) then
				for v70, v71 in pairs(v_u_10.Phases.Segments) do
					if (v71.Min and (v71.Max and (v_u_27.Health >= v_u_27.MaxHealth * v71.Min and v_u_27.Health < v_u_27.MaxHealth * v71.Max)) or v71.Min and (not v71.Max and v_u_27.Health >= v_u_27.MaxHealth * v71.Min)) and v_u_10.Phases.Level < v70 then
						v_u_10.Phases.Level = v70
						if v70 == 1 then
							v_u_6.CueSpecial(v_u_29, {
								["Range"] = 60,
								["Color"] = Color3.fromRGB(0, 255, 0),
								["FadeTime"] = 2,
								["Transparency"] = 0
							})
						end
						if v70 == 2 then
							v_u_6.CueSpecial(v_u_29, {
								["Range"] = 60,
								["Color"] = Color3.fromRGB(85, 255, 255),
								["FadeTime"] = 2,
								["Transparency"] = 0
							})
							if v_u_37 == false then
								v_u_2.Core.Master:FireAllClients("PlayMusic", {
									["Music"] = v_u_10.Themes[2]
								})
							end
						end
						if v70 == 3 then
							v_u_6.CueSpecial(v_u_29, {
								["Range"] = 60,
								["Color"] = Color3.fromRGB(255, 0, 0),
								["FadeTime"] = 2,
								["Transparency"] = 0
							})
							if v_u_37 == false then
								v_u_2.Core.Master:FireAllClients("PlayMusic", {
									["Music"] = v_u_10.Themes[3]
								})
							end
						end
						if v70 == 4 and v_u_37 == false then
							v_u_10.Anticipation = true
							v_u_2.Core.Master:FireAllClients("PlayMusic", {
								["Music"] = v_u_10.Themes.Anticipation
							})
							local v72 = Instance.new("ForceField")
							v72.Visible = false
							v72.Parent = p_u_26
							task.wait(20.247)
							v_u_10.Anticipation = false
							if v72 then
								v72:Destroy()
							end
							v_u_6.CueSpecial(v_u_29, {
								["Range"] = 60,
								["Color"] = Color3.fromRGB(255, 255, 0),
								["FadeTime"] = 2,
								["Transparency"] = 0
							})
							v_u_2.Core.Master:FireAllClients("PlayMusic", {
								["Music"] = v_u_10.Themes[4]
							})
							if p_u_26:FindFirstChild("Classification") then
								local v73 = Instance.new("BoolValue")
								v73.Name = "Raged"
								v73.Value = true
								v73.Parent = p_u_26
							end
						end
					end
				end
			end
			for _, v74 in pairs(workspace:GetChildren()) do
				if v74:FindFirstChild("Humanoid") and (v74.Humanoid.Health > 0 and (v74.PrimaryPart and (not v74:FindFirstChildOfClass("ForceField") and v74 ~= p_u_26))) then
					local v75 = v74.Humanoid
					local v76 = v74.PrimaryPart
					local v77 = v74:FindFirstChild("TEAM")
					game:GetService("Players"):GetPlayerFromCharacter(v74)
					if v77 and v77.Value ~= v_u_28.Value then
						v_u_2.Binds.Ailments:Fire("AddAilmentToPlayer", {
							["User"] = v74,
							["Item"] = nil,
							["Duration"] = nil,
							["AttributesFolder"] = nil,
							["Parent"] = "Ailments",
							["Visual"] = false,
							["Bind"] = nil,
							["Module"] = nil,
							["EffectName"] = v_u_10["Passive Debuff"],
							["Predecessor"] = p_u_26
						})
					end
					if (v76.Position - workspace.Statue.PrimaryPart.Position).Magnitude < 4096 and ((v76.Position - workspace.Statue.PrimaryPart.Position).Magnitude >= v_u_10["Incrypted Fracture"].Range and v75.Health > 0) then
						v_u_2.Gameplay.VFX:FireAllClients("Start Incrypted Fracture", {
							["Character"] = v74
						})
						local v78 = v_u_5.ModifyEnemyStats({
							["User"] = p_u_26,
							["Target"] = v74,
							["Damage"] = v_u_10["Incrypted Fracture"].Damage * (v_u_9 and v_u_9.DamageMultiplier or 1) * v_u_8["Global Scaling"],
							["KB"] = nil,
							["Element"] = v_u_10["Incrypted Fracture"].Element
						})
						if v78 > 0 then
							v75:TakeDamage(v78)
						end
					else
						v_u_2.Gameplay.VFX:FireAllClients("Stop Incrypted Fracture", {
							["Character"] = v74
						})
					end
				end
			end
			local v79, v80, v81, v82 = v_u_69(v_u_29.CFrame.Position)
			if v79 and (v80 and (v81 and v82)) then
				local v83 = v_u_29.CFrame * CFrame.new(0, 1.5, 0).Position
				local v84 = CFrame.new(v83, v81.CFrame.Position).LookVector
				local v85 = v_u_5.CreateIgnoreList(p_u_26, false, true)
				local v86 = v_u_35
				local v87 = v_u_35
				local v88 = v_u_35
				local v89 = Enum.RaycastFilterType.Exclude
				v86.FilterDescendantsInstances = v85
				v87.FilterType = v89
				v88.IgnoreWater = true
				local v90 = workspace:Raycast(v83, v84 * 2048, v_u_35)
				if v90 then
					local _ = v90.Instance
					local _ = v90.Position
				end
				v_u_30 = v79
				v_u_32.CFrame = CFrame.new(v_u_29.CFrame.Position, v_u_30.PrimaryPart.Position)
			end
			v_u_4.Heartbeat:Wait()
		end
		if p_u_26 and p_u_26.Parent then
			for _, v91 in pairs(workspace:GetChildren()) do
				v_u_2.Gameplay.VFX:FireAllClients("Stop Incrypted Fracture", {
					["Character"] = v91
				})
			end
			v_u_2.Gameplay.VFX:FireAllClients("Cleanup Incrypted Fracture")
			v_u_27:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
			v_u_27.Health = 1
			local v92 = Instance.new("ForceField")
			v92.Parent = p_u_26
			v92.Visible = false
			local v93 = {
				["NPC"] = p_u_26
			}
			v_u_7.Scene("Erelphos", v93)
			v_u_2.Core.Master:FireAllClients("Create Cutscene", {
				["Camera"] = nil,
				["Settings"] = v_u_7.Scenes_Settings.Erelphos
			})
		end
	end)()
	coroutine.wrap(function()
		-- upvalues: (copy) v_u_31, (ref) v_u_6, (copy) v_u_29, (copy) v_u_38, (ref) v_u_37, (copy) p_u_26, (ref) v_u_5, (ref) v_u_2, (copy) v_u_27, (ref) v_u_10, (ref) v_u_20
		task.wait(12)
		if v_u_31 then
			v_u_31:Destroy()
		end
		v_u_6.CueSpecial(v_u_29, {
			["Range"] = 150,
			["Color"] = Color3.fromRGB(255, 255, 255),
			["FadeTime"] = 1,
			["Transparency"] = 0
		})
		for _, v94 in pairs(v_u_38:GetDescendants()) do
			if v94:IsA("BasePart") then
				if v94.Name == "Out" then
					v94.Transparency = -5
				else
					v94.Transparency = 0
				end
			end
			if v94:IsA("Beam") then
				v94.Enabled = true
			end
		end
		v_u_38.CoreRune.Decoration.MiddleRing.Transparency = 1
		if v_u_37 == true then
			p_u_26.Name = "SUPREME KEVINBOP!"
			if p_u_26:FindFirstChild("Bloxxercap") then
				p_u_26.Bloxxercap.Handle.Transparency = 0
			end
			if p_u_26:FindFirstChild("Sideswept Bangs Brown") then
				p_u_26["Sideswept Bangs Brown"].Handle.Transparency = 0
			end
			p_u_26.Head:FindFirstChildOfClass("Decal").Transparency = 0
			p_u_26.HumanoidRootPart:FindFirstChildOfClass("Decal").Transparency = 0
			v_u_5.CreateSound({
				["ID"] = 7989088301,
				["Volume"] = 20,
				["Pitch"] = 1
			}, workspace)
			local v95 = {
				["Music"] = {
					["ID"] = 8192674140,
					["Volume"] = 1,
					["Pitch"] = 1
				}
			}
			v_u_2.Core.Master:FireAllClients("PlayMusic", v95)
			p_u_26.Humanoid.HealthChanged:Connect(function()
				-- upvalues: (ref) v_u_5, (ref) v_u_29
				v_u_5.CreateSound({
					["ID"] = 8603227350,
					["Volume"] = 0.5,
					["Pitch"] = 1
				}, v_u_29)
			end)
		end
		while p_u_26.Parent and (v_u_27 and v_u_27.Health > 1) do
			task.wait(v_u_10.TimeToMove)
			if v_u_27.Health <= 1 then
				return
			end
			v_u_20(v_u_29)
		end
	end)()
	if v_u_10["Special Attacks"].Enabled == true then
		coroutine.wrap(function()
			-- upvalues: (ref) v_u_10, (ref) v_u_25, (copy) v_u_27, (copy) v_u_29, (copy) v_u_28, (copy) p_u_26, (ref) v_u_30, (ref) v_u_4
			while true do
				wait(v_u_10["Special Attacks"].Rate * v_u_10["Special Attacks"].Multiplier)
				if v_u_10["Special Attacks"].Used == false and #v_u_10["Special Attacks"].Moveset > 0 then
					local v96 = v_u_10["Special Attacks"].Moveset[Random.new():NextInteger(1, #v_u_10["Special Attacks"].Moveset)]
					v_u_10["Special Attacks"].Used = true
					v_u_25(v96, v_u_27, v_u_29, v_u_28, p_u_26, v_u_30)
					wait(v96.Cooldown)
					v_u_10["Special Attacks"].Used = false
				end
				v_u_4.Heartbeat:Wait()
				if not p_u_26.Parent or v_u_27 and v_u_27:GetState() == Enum.HumanoidStateType.Dead then
					return
				end
			end
		end)()
	end
end
return v_u_10

Assistant: