local minutes = 5 -- What the timer starts from local seconds = 00 -- What the timer starts from local min = minutes local sec = seconds
function killPlayers() local a = game.Players:GetChildren() for _,v in pairs (a) do v.Character:BreakJoints() -- Kills the player end end
while true do wait(1) sec = sec - 1 if sec == 0 then min = min - 1 if min == 0 then killPlayers() min = minutes sec = seconds else sec = 59 end end local count = min.. ":" ..sec Gui.Text = count end
How do I make this script make a GUI appear with a countdown clock? Are there any problems with my script?