I am working for a game effect

hello everyone
i am working for game effect where game start and showing score total score is 50 and to game score is 15 if i press tab to increase the score times at 15 second but less then 50 then games end and showing animation times up if and stop increase score by pressing tab. 2nd if score is complete on 50 then time stop less then 15 second.
i need 2 thing in this project that if score reached to 50 then time stop if times up dont increase the score or stop tab work please tell me scripts