function SpreadSimulator.GetSpreadDirection(J,M)local C=J.rng:NextNumber(0,360)local G=CFrame.Angles(0,0,-C)local W=M*G local V=J.rng:NextNumber(-J.currentSpread,J.currentSpread)/2 local j=W.UpVector*(J.currentSpread*V)return M.LookVector*Spread_Distance_From_Camera+j end

function SpreadSimulator:GetSpreadDirection(cameraCFrame)
	
	-- Roll random angle
	local randomZ = self.rng:NextNumber(0,360)
	-- Make cframe based on random angle
	local randomAngleCFrame = CFrame.Angles(0,0,-randomZ)
	-- Rotate camera cframe
	local rotatedCFrame = cameraCFrame * randomAngleCFrame
	-- Get a random point based on the circumference
	local randomMagnitude = self.rng:NextNumber(-self.currentSpread,self.currentSpread)/2
	
	-- Make spread vector based on current spread and the random point on circumference
	local spreadDirection = rotatedCFrame.UpVector * (self.currentSpread * randomMagnitude)
	

	return cameraCFrame.LookVector * Spread_Distance_From_Camera + spreadDirection 
	
end
