How to keep the screen locked until the player can reach a certain score?

I want to make a language quiz where, to unlock level 3, the player must successfully complete level 1 and level 2 with a certain score. to make “if” logic with one condition is really easy, but when the conditions are 2 or more, the “if” logic doesn’t work. I use TinyDB to call the value. I want to require players to pass levels 1 and 2 before they can open level 3, but in fact, only after finishing level 1, level 3 is already unlocked.

See the tinydb logic

this is the logic of the scoring system, so every time a certain level is completed, the value will be input to TinyDB

Start value shows the level , I think.
But you show in a label named final score and then you get value from tiny by start value . There is something wrong :thinking:
This screen starts after end game ? You want to use it to save or manage the scores ?

this is the input value logic

oh yeah, sorry I haven’t explained yet, it’s true, the score for each level has been inputted on the previous screen, and this screen is only for displaying the final score for each level. and this system runs well and there are no problems.

what is problematic is when I start locking certain levels that cannot be unlocked before completing the previous level. I’m confused to make the logic

What happen when both scores are < 80 ? You can’t play ?
Only when both scores are >80 the quiz starts ?

Probably you have to use the or logic. If first or second score are < 80 stop the game .

player can only play level 1 only

If score 1>80 and score2 > 80 then go level 2 else level 1

If score 1 < 80 or score 2<80 then play level 1 else level 2

2 logic same way