help me! high score/ save highest score

i made this game https://flowlab.io/game/play/786004 , and i wanted to have a highscore, or a leaderboard. can someone help me!

1 Like

it is a mobil game, so I don’t know if that makes it harder

Hi @“Magnus Aalde” ,

I’ve made the behaviors for the grass block for highscores. Remove all behaviors in the in the grass block, then click the screen, and click “import” in the circle pop up.

Paste this and the behaviors I’ve made show up:
{"behavior":{"nodes":[{"x":1170,"comp_x":4,"textColor":11956578,"y":192,"text":"score:","scale":6,"group":"","comp_y":2,"borderStyle":"","inputCount":2,"fontName":"oduda","borderColor":16777215,"behaviorType":"logic.hud.Label","outputCount":2,"name":"Label","id":"c12ca9872a72264e"},{"x":990,"comp_x":3,"textColor":456242,"y":640,"text":"0","scale":10,"group":"","comp_y":75,"borderStyle":"","inputCount":2,"fontName":"oduda","borderColor":16777215,"behaviorType":"logic.hud.Label","outputCount":2,"name":"Label","id":"c12b6df810ed8545"},{"x":1170,"storageKey":"highscore","inputCount":2,"y":512,"behaviorType":"logic.logic.Storage","outputCount":1,"name":"Save","group":"","id":"c128fc58616f1d4c"},{"x":810,"storageKey":"highscore","inputCount":2,"y":512,"behaviorType":"logic.logic.Storage","outputCount":1,"name":"Save","group":"","id":"c12a52eab8131348"},{"x":1170,"comp_x":3,"textColor":45858,"y":640,"text":"highscore:","scale":6,"group":"","comp_y":54,"borderStyle":"","inputCount":2,"fontName":"oduda","borderColor":16777215,"behaviorType":"logic.hud.Label","outputCount":2,"name":"Label","id":"c12b8af1d1151745"},{"id":"c12a85d0af4a1a44","x":990,"inputCount":2,"y":512,"behaviorType":"logic.logic.Filter","outputCount":2,"mode":"greater than","name":"Filter","gateVal":0,"group":""},{"outputCount":1,"x":630,"y":352,"group":"","inputCount":0,"behaviorType":"logic.triggers.Collision","targetEntityId":0,"collideWithEntity":false,"collisionFilter":15,"name":"Collision","targetClassId":3687304,"id":"bd0a5a79bfe6b640"},{"x":810,"startVal":1,"inputCount":3,"y":320,"behaviorType":"logic.logic.Value","outputCount":1,"name":"Number","tag":"","group":"","id":"bd38b2500e359d45"},{"x":990,"startVal":0,"inputCount":3,"y":320,"behaviorType":"logic.logic.Value","outputCount":1,"name":"Number","tag":null,"group":"","id":"bd38b3d39d3bb04e"},{"x":1170,"comp_x":2,"textColor":11956578,"y":320,"text":"0","scale":10,"group":"","comp_y":22,"borderStyle":"","inputCount":2,"fontName":"oduda","borderColor":16777215,"behaviorType":"logic.hud.Label","outputCount":2,"name":"Label","id":"bd38f3be50079b4b"},{"x":630,"inputCount":0,"y":512,"behaviorType":"logic.triggers.Once","outputCount":1,"resetOnLevelStart":false,"name":"Once","group":"","id":"c128e9bd3ea3034a"}],"links":[{"input_id":"c12b6df810ed8545i0","output_id":"c12a52eab8131348o0"},{"input_id":"c128fc58616f1d4ci0","output_id":"c12a85d0af4a1a44o0"},{"input_id":"c12a52eab8131348i1","output_id":"c128e9bd3ea3034ao0"},{"input_id":"c12a85d0af4a1a44i1","output_id":"c12a52eab8131348o0"},{"input_id":"c12b6df810ed8545i0","output_id":"c12a52eab8131348o0"},{"input_id":"c12a85d0af4a1a44i0","output_id":"bd38b3d39d3bb04eo0"},{"input_id":"c12a85d0af4a1a44i1","output_id":"c12a52eab8131348o0"},{"input_id":"c128fc58616f1d4ci0","output_id":"c12a85d0af4a1a44o0"},{"input_id":"bd38b2500e359d45i1","output_id":"bd0a5a79bfe6b640o0"},{"input_id":"bd38b2500e359d45i1","output_id":"bd0a5a79bfe6b640o0"},{"input_id":"bd38b3d39d3bb04ei2","output_id":"bd38b2500e359d45o0"},{"input_id":"bd38b3d39d3bb04ei2","output_id":"bd38b2500e359d45o0"},{"input_id":"bd38f3be50079b4bi0","output_id":"bd38b3d39d3bb04eo0"},{"input_id":"c12a85d0af4a1a44i0","output_id":"bd38b3d39d3bb04eo0"},{"input_id":"bd38f3be50079b4bi0","output_id":"bd38b3d39d3bb04eo0"},{"input_id":"c12a52eab8131348i1","output_id":"c128e9bd3ea3034ao0"}],"v":"2"}}

thanks!, @Latif3 . worked perfectly