Facepunch Studios has released the s&box code to the public, but there are some caveats
s&box is both a platform for launching UGC (User-Generated Content) games and a set of development tools from the creators of Garry’s Mod. Recently, Facepunch Studios decided to make the project open-source and published its source code on GitHub.