--Main function

local function AttachAuraControl(source_part, eff_cont) --(source_part, effect_container)
	
	local AnimObj
	
	local function Start()
		AnimObj = {}
		AnimObj["LastUpdate"] = tick()
		
		AnimObj["Parts"] = {}
		
		for i = 1, 10 do
			local np = EFFECT_LIB.NewInvisiblePart()
			np.Transparency = 0.5
			np.Material = "Neon"
			np.BrickColor = BrickColor.new("Institutional white")
			
			local knife_mesh = Instance.new("BlockMesh")
			knife_mesh.Scale = Vector3.new(8, 2, 2)
			knife_mesh.Parent = np
			
			AnimObj["Parts"][i] = np
	
			np.Parent = eff_cont
		end
	end
	
	local function Update()
		local loop = EFFECT_LIB.Loop(6)
		
		for i = 1, #AnimObj["Parts"] do
			AnimObj["Parts"][i].CFrame = source_part.CFrame * CFrame.Angles(0, 0, math.rad(loop * 360 + (360 / #AnimObj["Parts"] * (i - 1)))) * CFrame.new(-3, 0, 1.5)
		end
	end
	
	local function Stop()
		eff_cont:ClearAllChildren()
		AnimObj = nil
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachAuraControl
