I have a script for an intermission, for a round. I need a script for the end of the round. If blue kills the entire red team, then all players die. Can I create such a script?
Script
while true do
local tvalue = script.Parent.StatusTag
function beginGame()
for i = 45, 0, -1 do
wait(1)
tvalue.Text = "Intermission: " .. i .. ""
if i == 0 then
tvalue.Text = "Game Started!"
wait(0,1)
target = CFrame.new(-635, 16.6, 456)
for i, player in ipairs(game.Players:GetChildren()) do
if player.Character and player.Character:FindFirstChild("Torso") then
player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
wait(0,1)
local plrs = game.Players:GetPlayers()
local chosenPlr = plrs[math.random(1,#plrs)]
if chosenPlr.Character and chosenPlr.Character:FindFirstChild("HumanoidRootPart") then
chosenPlr.Character.HumanoidRootPart.CFrame = CFrame.new(-735, 0.6, 537)
wait(0,1)
for i = 180, 0, -1 do wait(1) tvalue.Text = "Round: " .. i end
wait(1)
tvalue.Text = "Survivors Win!"
wait(2)
p = game.Players:GetChildren()
wait(0,1)
for i = 1,#p do
p[i].Character.Head:remove()
end
end
end
end
end
end
end
if game.Players.NumPlayers > 0 then
beginGame()
else
tvalue.Text = "Needs 2 or more player(s) to begin."
end
end

4 comments
Instead of p[i].Character.Head:remove() on line 386, you can just access their humanoid and change their health to 0. And from line 21 t0 381, you can just use a for loop like with intermission, i.e:
for i = 180, 0, -1 do wait(1) tvalue.Text = "Round: " .. i end
thanks
If there are 0 players left in the red team then the game ends and Tvalue.text = "Killer Win". You know how to do it?