HELP ASAP How to create a countdown

so I need to create a countdown timer for my game it’s a space shooter. it’s almost finished just needs a COUNTDOWN timer
and also when the reaches 0 make a comment (–time stops do what you want here) or something like that and also make it start at 50 seconds

This code initialises the timer at 50 and counts down each frame using DeltaTime (the amount of time since the last draw). Hope this helps.

function setup()
    gameTimer = 50

function draw()
    if gameTimer > 0 then
        gameTimer = gameTimer - DeltaTime
        if gameTimer <= 0 then
            -- game ended code