Original Spelunky's source code is available for download for a while now.
The downloadable project is, however, in GM8 format, and does not easily work in GMS.
At the same time, a GameMaker:Studio-compatible (ported) version of Spelunky Classic was included in Humble GameMaker Bundle, and thus available to anyone that bought the bundle.
A certain problem with that is, obviously, that if you haven't had the luck to be made aware of and buy the bundle in time, you would not have access to it afterwards.
However, I was able to confirm that the GMS version of Spelunky Classic included in the bundle can in fact be distributed publicly (because the GM8 one already is publicly available), so here's that:
yal.cc
Dropbox
Google Drive
MD5 checksum: 65c418623581b9d0c392cd8709e2739f
SHA-1 checksum: fd9794f05d62e37dfd1213769bb8afcad9cfaf16
Keep in mind, however, that this the exact file made available via Humble - it may still have some oddities that you'd need to resolve. Regardless, a solid starting point.
For discussions, check out the official forums. Have fun!
Do you mean the GameMaker Humble Bundle from September 2016 or was there a new one?
GameMaker was included in two Humble Bundles – Play and Create with GameMaker (September 2015) and Humble GameMaker Bundle (September 2016). Spelunky Classic source code was included in 2015 one.
Thanks man! A while ago I attempted to port it to GMS and do some optimizations, didn’t really finish it though. Is this optimized in anyway other than it now being GMS?
That is hard to tell. I assume that this is the version used for HTML5 demos back in the day, so there should be some tweaks to it, but I don’t think there was time for any substantial changes.
Out of easy-to-do things that benefit Spelunky the most, you can enable “fast collision system” in Global Game Settings. In GMS2 this is on by default.