-- Mouse

Mouse.Move:connect(function()
	gui.FakeC.Position = UDim2.new(0,Mouse.x-gui.FakeC.Size.X.Offset/2,0,Mouse.y-gui.FakeC.Size.Y.Offset/2)	

	if Mouse.Target then
		if game.Players:FindFirstChild(Mouse.Target.Parent.Name) and Mouse.Target.Parent.Name ~= plr.Name then
			if game.Players[Mouse.Target.Parent.Name].TeamColor == plr.TeamColor then
				gui.FakeC.BackgroundColor3 = Color3.fromRGB(0,255,0)
			else
				gui.FakeC.BackgroundColor3 = Color3.fromRGB(255,0,0)				
			end
		elseif game.Players:FindFirstChild(Mouse.Target.Parent.Parent.Name) and Mouse.Target.Parent.Parent.Name ~= plr.Name then
			if game.Players[Mouse.Target.Parent.Parent.Name].TeamColor == plr.TeamColor then
				gui.FakeC.BackgroundColor3 = Color3.fromRGB(0,255,0)
			else
				gui.FakeC.BackgroundColor3 = Color3.fromRGB(255,0,0)				
			end
		elseif Mouse.Target.Parent:FindFirstChild("HumanoidLink") and Mouse.Target.Parent.HumanoidLink.Value.Parent.Name ~= plr.Name then
			if game.Players[Mouse.Target.Parent.HumanoidLink.Value.Parent.Name].TeamColor == plr.TeamColor then
				gui.FakeC.BackgroundColor3 = Color3.fromRGB(0,255,0)
			else
				gui.FakeC.BackgroundColor3 = Color3.fromRGB(255,0,0)				
			end
		else
			gui.FakeC.BackgroundColor3 = Color3.fromRGB(255,255,255)
		end
	end
end)

local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton3 then
		if script.Parent.MainGui.FakeC.Size == UDim2.new(0,4,0,4) then
		   script.Parent.MainGui.FakeC.Size = UDim2.new(0,2,0,2)
		else
		   script.Parent.MainGui.FakeC.Size = UDim2.new(0,4,0,4)		
		end
		gui.FakeC.Position = UDim2.new(0,Mouse.x-gui.FakeC.Size.X.Offset/2,0,Mouse.y-gui.FakeC.Size.Y.Offset/2)	
	end	
end)
