And no, I'm not multi-posting to bump. It won't let me attach more than one file.
it lets me attach two files on my first post, then i can edit a third in.
edit: tested the script, you need to change:
shapeFile = "./shapes/gun.dts";
to:
shapeFile = "./shapes/pistol.dts";
edit: retested, needs some work, right now all it does is shoot a short blue laser, not what i think of a railgun, when someone says railgun i think a gun that shoots a super fast laser that goes though players, but i don't think you can do the though player part with out some hacky coding. guess what I'm trying to say is patch it up a bit