// Add this to the beginning of your GameOver function
if (!runtime.globalVars.scoreSubmitted && window.bestGliderAPI) {
    // Set the flag to prevent multiple submissions
    runtime.globalVars.scoreSubmitted = true;
    console.log("Submitting score once:", runtime.globalVars.Score);
    window.bestGliderAPI.submitScore(runtime.globalVars.Score, 1);
}

// Instead of:
// if (window.bestGliderAPI) {
//     window.bestGliderAPI.submitScore(runtime.globalVars.Score, 1);
// }
