Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Term = Workspace.Terminal.Term
- local CNC = BrickColor.new("Really blue")
- local RC = BrickColor.new("Really red")
- local T = 120
- local CT = 12
- local CN = 0
- local R = 0
- local CNOwned = true
- local tplrs = {}
- function Check(x)
- local added = false
- for i = 1, #tplrs do
- if tplrs[i] == x then
- added = true
- end
- end
- return added
- end
- Term.Touched:connect(function(x)
- if x.Parent:FindFirstChild("Humanoid") then
- if x.Parent.Humanoid.Health < 1 then return end
- local plr = Game.Players[x.Parent.Name]
- if not Check(plr) then table.insert(tplrs, #tplrs+1, plr) end
- end
- end)
- Term.TouchEnded:connect(function(x)
- if x.Parent:FindFirstChild("Humanoid") then
- local plr = Game.Players[x.Parent.Name]
- for i = 1, #tplrs do
- if Workspace:FindFirstChild(tplrs[i].Name) then
- if Workspace[tplrs[i].Name]:FindFirstChild("Torso") then
- local Mag = (Term.Position - Workspace[tplrs[i].Name].Torso.Position).magnitude
- if tplrs[i] == plr or not Game.Players:FindFirstChild(tplrs[i].Name) or not Mag < 15 then
- table.remove(tplrs, i)
- end
- end
- end
- end
- end
- end)
- while wait(1) do
- CN,R = 0,0
- for i = 1, #tplrs do
- if tplrs[i].TeamColor == CNC then
- CN = CN + 1
- elseif tplrs[i].TeamColor == RC then
- R = R + 1
- end
- end
- if CN > 0 and R > 0 then
- else
- if CN > 0 and CT <= 120 then
- CT = CT + 1
- elseif R > 0 and CT > 0 then
- CT = CT - 1
- end
- if CT == 120 then
- CNOwned = true
- elseif CT == 0 then
- CNOwned = false
- end
- end
- if CNOwned and T < 1200 then
- T = T + 1
- elseif not CNOwned and T > 0 then
- T = T - 1
- end
- if CT > 120 then CT = 120 end; if CT < 0 then CT = 0 end; if T < 0 then T = 0 end; if T > 1200 then T = 1200 end
- print(T, CT)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement