How do I make an alert box’s input change the value in localstorage?

I’m trying to make a bookmarklet that modifies the “local storage” for a game online, but I want it to question the user the amount of “coins” the user wants via an alert.

This is the code

localStorage.setItem('mjs-drift-boss-game-v1.0.1-dailyreward',
 '{"sound":0.7,"music":0,"score":-3,"hasShownTutorial":true,"collectedCoin":999999,"cars":[0,1,2,3,4,5,6,7],"currentCar":7,"currentTip":0,"booster1":99999999,"booster2":9999999,"booster3":999999,"ko":0,"hasShownBoosterTutorial":true}')
alert('Modifed Game!')
location.reload();