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

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(.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
