All pastes #953339 Raw Edit

Miscellany

public text v1 · immutable
#953339 ·published 2008-03-23 00:16 UTC
rendered paste body
playing = game.Workspace.Playing
numPlaying = 0
winner = nil
god = nil

--Waiting For Players...
while true do
	wait(5)
	if game.Players.NumPlayers > 1 then
		playing.Value = true
		break
	end
end

--Game Script
while playing.Value == true do
	local players = game.Players:GetPlayers()
	local chosen = players[math.random(1,#players)]
	while true do
		if chosen.Character~=nil then break end
		wait(1)
	end
	chosen.Character.Torso.CFrame = CFrame.new(Vector3.new(0,30,0))
	chosen.leaderstats.Rounds.Value = 2
	god = chosen
	wait(1)
	local c = game.Players:GetPlayers()
	for i=1, #c do
		if c[i]~=chosen then
			if c[i].Character~=nil then
				random = math.random(1,4)
				if random == 1 then
					c[i].Character.Torso.CFrame = CFrame.new(Vector3.new(48,10,48))
				elseif random == 2 then
					c[i].Character.Torso.CFrame = CFrame.new(Vector3.new(-48,10,-48))
				elseif random == 3 then
					c[i].Character.Torso.CFrame = CFrame.new(Vector3.new(-48,10,48))
				elseif random == 4 then
					c[i].Character.Torso.CFrame = CFrame.new(Vector3.new(48,10,-48))
				end
				c[i].leaderstats.Rounds.Value = 1
			end
		end
	end
	while true do
		wait(3)
		local f = game.Players:GetPlayers()
		for x=1, #f do
			if f[x].leaderstats.Round.Value == 1 then
				numPlaying = numPlaying + 1
			elseif f[x].leaderstats.Round.Value == 2 then
				numPlaying = numPlaying - 1
			end
			if numPlaying == 1 then
				if f[x].leaderstats.Round.Value == 1 then
					winner = f[x]
					break
				end
			elseif numPlaying == 0 then
				winner = god
				break
			end
			numPlaying = 0
		end
	end
	wait(10)
end