✓ Accepted answer
tick() works on UNIX time which is the number of seconds that have passed since January 1, 1970. By using tick(), it'll return that number.
What that program is doing, is that it's using tick() to get the number of seconds that have passed since the last click. Basically, it only allows you to use the sword after 1 second of its previous use.
No, lastclick won't be the same as tick() because after 1 second, tick() will return a time 1 second ahead of lastclick, that way, you can check how much time has passed between 2 points in a program or something of that sort.
Hope this helped!
1 comment
Bro i love your explanation when you mentioned January 1 1970 that was deep yo.