This is not a stock RetroPie image/installation - I advise you to ask the author of the image/scripts for help, since we don't know how those extra scripts work.
@Ataru22 Yep, the gun(s) play like to be in the lowest number USB Ports on the PI, its easier to configure that way. I have two guns plugged in like that and have a USB hub for all the stuff, after those and it all works fine.
@mitu Thanks, I'll try that. As for the script. It needs to be run to start the lightgun service to get the lightgun working. Only needs to be run once though. I think this is just a work around at the moment. Hopefully, once the sinden lightgun gets established, it will be integrated better with retropie.