Does anyone have the lua code required to spawn confetti around the player?

Hi, i am working on a SWEP, and the one final thing i need to do is have it spawn Confetti around the player for as long as the left mouse is held down for.
if anyone could help me out it would be greatly appreciated.

It’s similar to how muzzle effects are done… Just change the data to match the target player, position, and gunsmoke to the proper effect name.


local _p = self.Owner;
	local _effect = EffectData( );
	_effect:SetOrigin( _p:GetShootPos( ) );
	_effect:SetEntity( self );
	_effect:SetStart( _p:GetShootPos( ) );
	_effect:SetNormal( _p:GetAimVector( ) );
	_effect:SetAttachment( 1 );
	util.Effect( "gunsmoke", _effect );