TJ Warren erupted for 35 points as the Indiana Pacers defeated the Milwaukee Bucks to snap their six-game losing streak.