d=true
script.Parent.Touched:connect(function(hit)
	if d and hit.Parent:FindFirstChild("Humanoid") and script.Parent.BrickColor~=BrickColor.Green() then
		d=false
		local plr=game.Players:FindFirstChild(hit.Parent.Name)
		hit.Parent.Humanoid.WalkSpeed=0
		script.Parent.BrickColor=BrickColor.Green()
		plr.Court.Value=script.Parent.Parent.Name
		script.Parent.Parent.gotnext.Value=script.Parent.Parent.gotnext.Value+1
		plr.PlayerGui.scoreboard:findFirstChild(script.Parent.Parent.Name).Visible=true
		plr.TeamColor=BrickColor.MidGray()
		plr.game.parent.parent.Workspace.StarterGui.Exitcourt.Visible=true
		game.Worspace.findfirstchild.Exitcourt = true
		d=true
	end
end)