limit switches to Sainsmart 2in1

I can't find any info on how to wire the Rigidbot's stock limit switches to my Sainsmart 2in1, can anyone help me out?I know the axes, but I have 3 pins per switch on the board to choose from: S (Signal?), G, 5V:

I've already fried a voltage regulator on a previous board due to this issue, so any help would be greatly appreciated