local function M(M,O)local y local function K()y={}y.LastUpdate=tick()local K=M.Parent y.RootPart=K:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")y.Parts={}for M=1,4,1 do local K=EFFECT_LIB.NewInvisiblePart()K.Transparency=.2 K.Material="\078\101\111\110"local e=Instance.new("\066\108\111\099\107\077\101\115\104")e.Scale=Vector3.new(15,2,15)e.Parent=K y.Parts[M]=K K.Parent=O end end local function e()local O if y.RootPart==nil then O=M:GetRenderCFrame()else O=y.RootPart:GetRenderCFrame()end local K=EFFECT_LIB.Loop(.85)y.Parts[1].CFrame=O*CFrame.new(-1.6,-3,-1.6)y.Parts[2].CFrame=O*CFrame.new(-1.6,-3,1.6)y.Parts[3].CFrame=O*CFrame.new(1.6,-3,1.6)y.Parts[4].CFrame=O*CFrame.new(1.6,-3,-1.6)local e local d if K>=0 and K<=.1 then e=BrickColor.new("\072\111\116 \112\105\110\107")d=BrickColor.new("\076\105\109\101 \103\114\101\101\110")end if K>.1 and K<=.5 then e=BrickColor.new("\069\103\103\112\108\097\110\116")d=BrickColor.new("\070\111\114\101\115\116 \103\114\101\101\110")end if K>.5 and K<=.6 then d=BrickColor.new("\072\111\116 \112\105\110\107")e=BrickColor.new("\076\105\109\101 \103\114\101\101\110")end if K>.6 then d=BrickColor.new("\069\103\103\112\108\097\110\116")e=BrickColor.new("\070\111\114\101\115\116 \103\114\101\101\110")end y.Parts[1].BrickColor=e y.Parts[2].BrickColor=d y.Parts[3].BrickColor=e y.Parts[4].BrickColor=d end local function d()O:ClearAllChildren()y=nil end return{Start=K;Update=e;Stop=d}end return M
--Main function
local function AttachAuraControl(source_part, eff_cont) --(source_part, effect_container)
	local AnimObj

	local function Start()
		AnimObj = {}
		AnimObj["LastUpdate"] = tick()

		local char = source_part.Parent
		AnimObj["RootPart"] = char:FindFirstChild("HumanoidRootPart")

		AnimObj["Parts"] = {}

		for i = 1, 4 do
			local np = EFFECT_LIB.NewInvisiblePart()
			np.Transparency = 0.2
			np.Material = "Neon"

			local knife_mesh = Instance.new("BlockMesh")
			knife_mesh.Scale = Vector3.new(15, 2, 15)
			knife_mesh.Parent = np

			AnimObj["Parts"][i] = np

			np.Parent = eff_cont
		end
	end

	local function Update()
		local base_cf
		if AnimObj["RootPart"] == nil then
			base_cf = source_part:GetRenderCFrame()
		else
			base_cf = AnimObj["RootPart"]:GetRenderCFrame()
		end

		local loop = EFFECT_LIB.Loop(0.85)
		AnimObj["Parts"][1].CFrame = base_cf * CFrame.new(-1.6, -3, -1.6)
		AnimObj["Parts"][2].CFrame = base_cf * CFrame.new(-1.6, -3, 1.6)
		AnimObj["Parts"][3].CFrame = base_cf * CFrame.new(1.6, -3, 1.6)
		AnimObj["Parts"][4].CFrame = base_cf * CFrame.new(1.6, -3, -1.6)

		local color1
		local color2
		if loop >= 0 and loop <= 0.1 then
			color1 = BrickColor.new("Hot pink")
			color2 = BrickColor.new("Lime green")
		end
		if loop > 0.1 and loop <= 0.5 then
			color1 = BrickColor.new("Eggplant")
			color2 = BrickColor.new("Forest green")
		end
		if loop > 0.5 and loop <= 0.6 then
			color2 = BrickColor.new("Hot pink")
			color1 = BrickColor.new("Lime green")
		end
		if loop > 0.6 then
			color2 = BrickColor.new("Eggplant")
			color1 = BrickColor.new("Forest green")
		end

		AnimObj["Parts"][1].BrickColor = color1
		AnimObj["Parts"][2].BrickColor = color2
		AnimObj["Parts"][3].BrickColor = color1
		AnimObj["Parts"][4].BrickColor = color2
	end

	local function Stop()
		eff_cont:ClearAllChildren()
		AnimObj = nil
	end

	return { Start = Start, Update = Update, Stop = Stop }
end

return AttachAuraControl
