I don't know how to make it so it say "Update starts in hour:minute:second" on os.time

For example like in Pet Simulator X when there is an update it tells you the Hours:Minutes:Seconds

I looked on the Dev Forum already and it was either really hard to set up each time there is a new update, it skips a number, or it just told you the date.

This is the script I have.

local UpdateStart = 1677286800 --epoch converter start

local UpdateStop = 1677286860 --epoch converter stop

function Event()
	for _, player in pairs(game.Players:GetChildren()) do
		if player:IsA("Player") then
			game:GetService("BadgeService"):AwardBadge(player.UserId, 2141137108)
			
			wait(0.5)
			
			game:GetService("TeleportService"):Teleport(12324682821, player)
			
			wait(1)
			if player then
				player:Kick("Update Rejoin!")
			end
		end
	end
end

while wait(1) do
	local timeNow = os.time()
	
	workspace.UpdateBillboard.BillboardGui.TextLabel.Text = "Update starts in " .. (UpdateStart - timeNow) .. " seconds!"
	
	
	--[[if timeNow >= Updatestop then
		break
	end]]
	
	if timeNow >= UpdateStart then
		Event()
		break
		
	elseif timeNow >= UpdateStop then
		break
	end
end

Thanks!

This has been answered plenty of times:

local function toHMS(s)
	return ("%02i:%02i:%02i"):format(s/60^2, s/60%60, s%60)
end

local seconds = 283
toHMS(seconds)

I also have a version with days on the same topic:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.