How to Emit Beam like Particle Emitter with script?

Hello everyone,
I want to know, What is best way to Emit Beam like Particle Emitter with script?