# Reset high score via code

**URL:** <https://forum.makecode.com/t/reset-high-score-via-code/5884>\
**Category:** Help\
**Created:** [January 30, 2021, 11:36pm UTC](https://forum.makecode.com/t/reset-high-score-via-code/5884 "2021-01-30T23:36:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [January 30, 2021, 11:36pm UTC](https://forum.makecode.com/t/reset-high-score-via-code/5884/1 "2021-01-30T23:36:55Z")

</div>

Maybe a `set high score to {number}` or `reset high score`? Because I am making a game with multiple levels and I want each level to have a different high score.

---

<div class="post-metadata">

**Author:** ![shiba-jp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shiba-jp/32/2879_2.png) [@shiba-jp](https://forum.makecode.com/u/shiba-jp)\
**Post date:** [January 31, 2021, 2:48am UTC](https://forum.makecode.com/t/reset-high-score-via-code/5884/2 "2021-01-31T02:48:32Z")

</div>

Reset HighScore

```auto
settings.remove("high-score")

```

You can see this by referring to the game.ts and info.ts sources.

In settings, each number is managed as a list with a KeyValue, but the determination of the high score is hard-coded in game.ts with the string “high-score”.  
Therefore, it would be easier to use your own variables to manipulate the high score.

---

<div class="post-metadata">

**Author:** ![shiba-jp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shiba-jp/32/2879_2.png) [@shiba-jp](https://forum.makecode.com/u/shiba-jp)\
**Post date:** [January 31, 2021, 4:10am UTC](https://forum.makecode.com/t/reset-high-score-via-code/5884/3 "2021-01-31T04:10:34Z")

</div>

Set HightScore

```auto
settings.writeNumber("high-score", 100);

```
