Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local module = {}
- function module.Timer()
- local millaseconds = 0
- local seconds = 0
- local minutes = 0
- local MillasecondsValue = script.Millaseconds
- local SecondsValue = script.Seconds
- while wait(0.01) do
- millaseconds += 3
- if seconds < 10 then
- SecondsValue.Value = "0"..seconds
- else
- SecondsValue.Value = seconds
- end
- if millaseconds < 10 then
- MillasecondsValue.Value = "0"..millaseconds
- else
- MillasecondsValue.Value = millaseconds
- end
- script.Parent.Text = minutes..":"..SecondsValue.Value.."."..MillasecondsValue.Value
- if millaseconds > 99 then
- millaseconds = 0
- seconds += 1
- end
- if seconds == 60 then
- seconds = 0
- minutes += 1
- end
- end
- end
- return module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement