save game

Hi guys l made 5 level button with ui l want save levels examp if player finish level 1 boolean will== true and he can continue level 2 even if he close the game level2 button must investigate lvl1 boolean by the way l can add java but l cant add charp to ui button