Man who bought guns for killer pleads guilty