Timer

How can I make a timer that add 1 every one second like a real timer

ElapsedTime and os.time() give you the time since your program started and the time of day respectively.

So, record a time stamp in your setup, or whenever you want to start measuring time using either startTime = ElapsedTime if you want accuracy down to millionths of a second, or startTime = os.time() if you just need seconds.

Then, when you want to stop measuring, the elapsed time will be ElapsedTime - startTime or os.time() - startTime

you can also use tween.delay

-- timer tween

function add()
    count = count + 1 
    print(count)
    tween.delay(1,add)
end
function setup()
    count = 0
    add()
end