Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local timeOfEvent = os.time({year = 2021, month = 3, day = 20, hour = 6, min = 0, sec = 0})
- local timeLabel = script.Parent.TimeGui.TimeText
- local rocket = script.Parent.Parent.Rocket
- local ts = game:GetService("TweenService")
- local ti = TweenInfo.new(10, Enum.EasingStyle.Exponential, Enum.EasingDirection.In)
- while wait(1) do
- local timeDifference = timeOfEvent - os.time()
- if timeDifference >= 0 then
- local h = math.floor(timeDifference/60/60)
- local m = math.floor(timeDifference/60) - (h*60)
- local s = timeDifference - (m*60) - (h*60*60)
- local hms = string.format("%02i", h) .. ":" .. string.format("%02i", m) .. ":" .. string.format("%02i", s)
- timeLabel.Text = hms
- if timeDifference == 0 then
- ts:Create(rocket, ti, {CFrame = rocket.CFrame + Vector3.new(0, 10000, 0)}):Play()
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement