How do I call a script to save a score?

Hello all.
If I want to call the below script in the end scene to save the player’s final score at the end of the game, can I put a javascript block inside the end scene?
We need to get the score from the game and register it on the server.
If so, could you please tell me at what point and how to enter the javascript (the end of game scene is divided into success and failure).

[script]
window.parent.postMessage(“1234”, “*”);
“1234” is the final score

Looking for this too…

Anyone to help here?

@timwetech @logan_lee Save / Load your game (Quick + In Depth Tutorial works on all devices including browsers)

@ZeroX4, what we are looking for is a way to pass the Final Score as a postMessage to a parent HTML and from there call an API to post that in a server.

Sorry that is beyond my knowledge