--LocalScript in StarterCharacterScripts
local player = game.Players.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local countdownEvent = ReplicatedStorage:WaitForChild("CountdownEvent")
local countdownPart = workspace:WaitForChild("CountdownPart")
local billboardGui = countdownPart:FindFirstChildOfClass("BillboardGui") or Instance.new("BillboardGui")
billboardGui.Parent = countdownPart
billboardGui.Adornee = countdownPart
billboardGui.Size = UDim2.new(0, 250, 0, 50)
billboardGui.StudsOffset = Vector3.new(0, 5, 0)
local textLabel = billboardGui:FindFirstChildOfClass("TextLabel") or Instance.new("TextLabel")
textLabel.Parent = billboardGui
textLabel.Size = UDim2.new(1, 0, 1, 0)
textLabel.TextScaled = true
textLabel.BackgroundTransparency = 1
textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
textLabel.Text = "Loading..."
local function updateCountdownText(timeRemaining)
local days = math.floor(timeRemaining / 86400)
local hours = math.floor((timeRemaining % 86400) / 3600)
local minutes = math.floor((timeRemaining % 3600) / 60)
local seconds = timeRemaining % 60
textLabel.Text = string.format("%d:%02d:%02d:%02d", days, hours, minutes, seconds)
end
countdownEvent.OnClientEvent:Connect(function(timeRemaining)
updateCountdownText(timeRemaining)
end)