local NewYear = (os.time() + 10) -- New Year Time In Epoch
local TimeToClaimTitle = 1704178800
local Countdown = workspace:WaitForChild("NewYearCountdown")
local function UpdateCountdown(TimeRemaining)
Countdown.UI.Status.Text = ("%i:%02i:%02i:%02i"):format(TimeRemaining/60^2/24, TimeRemaining/60^2, TimeRemaining/60%60, TimeRemaining%60)
end
local GloballyAnnounceNewYear = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvents").GloballyAnnounceNewYear
local MessagingService = game:GetService("MessagingService")
MessagingService:SubscribeAsync("GloballyAnnounceNewYear",function()
GloballyAnnounceNewYear:FireAllClients()
print("Announced " .. tonumber(os.date("%Y")) .. " globally.")
end)
while true do
local CurrentTime = os.time()
if CurrentTime < NewYear then
local TimeDifference = NewYear - CurrentTime
UpdateCountdown(TimeDifference)
else
MessagingService:PublishAsync("GloballyAnnounceNewYear")
end
task.wait(1)
end
I want to remove the days counter once the counter is under 1 day or 24hrs