Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("TeamSetting Enabled I love you iRykorz")
- s1 = false
- s2 = false
- s3 = false
- s4 = false
- sd = false
- function onChat(text,recep)
- finaltext=string.lower(text)
- s1 = false
- s2 = false
- s3 = false
- s4 = false
- sX = false
- if string.find(finaltext, "computer")~= nil then
- s1 = true
- if string.find(finaltext, "randomise")~= nil then
- s2 = true
- end
- if string.find(finaltext, "teams")~= nil then
- s3 = true
- end
- if string.find(finaltext, "reset")~= nil then
- s4 = true
- end
- end
- if s4 == true then
- sX = true
- end
- if s1 == true and s2 == true and s3 == true and sX == false then
- Randomise()
- elseif s1 == true and s3 == true and sX == true then
- ResetTeams()
- end
- end
- function Randomise()
- local colors = {"Bright red","Bright blue"}
- nump = {
- ["Bright red"] = 0;
- ["Bright blue"] = 0;
- }
- for _,v in pairs(game.Players:GetPlayers()) do
- if v.TeamColor ~= BrickColor.new("Bright violet") or v.TeamColor ~= BrickColor.new("Dark stone grey") then
- r = math.random(1,2)
- v.TeamColor = BrickColor.new(colors[r])
- nump[colors[r]] = nump[colors[r]] + 1
- end
- end
- repeat
- wait()
- if nump["Bright red"] > nump["Bright blue"] then
- p = game.Players:GetPlayers()
- for i = 1,#p do
- if p[i].TeamColor == BrickColor.new("Bright red") then
- p[i].TeamColor = BrickColor.new("Bright blue")
- nump["Bright red"] = nump["Bright red"] - 1
- nump["Bright blue"] = nump["Bright blue"] + 1
- break
- end
- end
- elseif nump["Bright red"] < nump ["Bright blue"] then
Add Comment
Please, Sign In to add comment