local timeLeft = 10
while timeLeft > 0 do
print("Осталось: " .. timeLeft)
wait(1)
timeLeft -= 1
end
print("Время вышло!")local label = script.Parent
local timeLeft = 15
while timeLeft >= 0 do
label.Text = "Время: " .. timeLeft
wait(1)
timeLeft -= 1
end
label.Text = "⛔ Время вышло!"local function formatTime(seconds)
local minutes = math.floor(seconds / 60)
local secs = seconds % 60
return string.format("%02d:%02d", minutes, secs)
end
local timeLeft = 90
while timeLeft >= 0 do
label.Text = formatTime(timeLeft)
wait(1)
timeLeft -= 1
endif timeLeft <= 0 then
player.Character:BreakJoints()
endwhile true do
print("Раунд начался!")
for i = 10, 0, -1 do
print(i)
wait(1)
end
print("Раунд закончился!")
wait(5)
end-- ServerScript
local time = 20
while time >= 0 do
game.ReplicatedStorage.TimerEvent:FireAllClients(time)
wait(1)
time -= 1
end
-- LocalScript
game.ReplicatedStorage.TimerEvent.OnClientEvent:Connect(function(time)
label.Text = "Время: " .. time
end)