Im needing a script to where there is a time limit and if it reaches the time limit the get respawned, or if everyone but one person lives they get teleported, or if a person kills all of the players they win etc...
Basically all the murder Games lol, But I need that script and Have no Idea where to start.
Here's a rough sketch of how it might look:
roundLength = 60 function getPlayersAlive() -- Look through all the players who aren't in a lobby and check if they -- are on the right team, etc, -- returning a list of players end function roundFindWinner() local startTime = tick() -- Current time while tick() - startTime < roundLength do wait(1) local peopleAlive = getPlayersAlive() if #peopleAlive == 1 then -- Last person standing. -- Different lists for different teams and checking that -- one of the lists is empty would work, too, depending -- on the rules of the game. return peopleAlive[1].Name elseif #peopleAlive == 0 then -- No one is left playing, so there was no winner return "none" end end -- Out of time. return "none" end while true do wait(5) -- Time between rounds local winner = roundFindWinner() if winner ~= "none" then -- `winner` is name of player who won! else -- no one won (out of time or no survivors) end end