Advertisement
BobMe

Military Clock Converter but not full clock

Aug 22nd, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. -- Military Clock Converter (but better)
  2.  
  3. seconds = 72 -- seconds is now the ONLY input (for a music gui I'm making)
  4. minutes = 0
  5.  
  6. while seconds >= 60 do
  7. minutes = minutes + 1
  8. seconds = seconds - 60
  9. end
  10.  
  11. --Line of strings
  12.  
  13. if seconds < 10 then
  14. seconds = "0"..tostring(seconds)
  15. end
  16.  
  17. print(minutes..":"..seconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement