Skip to content

Instantly share code, notes, and snippets.

@dsetzer
Last active August 18, 2019 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dsetzer/a71aac43ae701dfb67b08c82357f80ed to your computer and use it in GitHub Desktop.
Save dsetzer/a71aac43ae701dfb67b08c82357f80ed to your computer and use it in GitHub Desktop.
Method for detecting which game the script is run on.
const dice = (()=>{try{engine.getState()}catch(e){return!0}return!1})();
if (dice) console.log('This is bustadice');
if (!dice) console.log('This is bustabit');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment