I agree that it sounds like fuel starvation and a blocked fuel cap vent is a probable cause. As mentioned, if loosening the cap an allowing air into the tank makes it run again, then there's your culprit.
If it's a blockage in the fuel delivery to the carbs, then it entail (starting with the easy stuff first) pulling the fuel lines off of the carbs and from the petcocks then checking them for any blockage. Someone may have added a fuel filter into the fuel lines which could be clogged. And lastly, removing the petcocks from the tank and seeing if the wire mesh filters are clogged.
Other than that (and only look into this if the fuel cap vent problem gets ruled out) might be a short somewhere in the wiring. Possibly the kill switch or wiring to/from it is shorting-out.