How to make timer

So, I need a timer? that counts like 30 sec, 29 sec, 28 sec, and everye second text sets a timer’s value(30,29,28)

And, if user do something,some time adds (28sec + 5sec)

Create a function where you do whatever changes you want and use this to call the function:
https://docs.coronalabs.com/api/library/timer/performWithDelay.html