Skip to content

Instantly share code, notes, and snippets.

@BitChop
Forked from dsetzer/diceCheck.js
Created August 18, 2019 04:10
Show Gist options
  • Save BitChop/08d56159e5ef745a9ad4d82717bda36e to your computer and use it in GitHub Desktop.
Save BitChop/08d56159e5ef745a9ad4d82717bda36e 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