That’s complicated. First of all, remember that a credit score is only used by a lender to evaluate you as a potential borrower. If you aren’t interested in borrowing more money after you take out the consolidation loan, then it doesn’t really matter what the consolidation loan does to your credit score.
in the short term, your credit score will go down because you will have the credit inquiry (the application for a new loan), and you will have a new loan balance that for at least one month will overlap the old loan balances. Once you have paid off the old credit cards, your credit score will start to increase again, because your overall loan balances will stay the same or go down while your borrowing ability has gone up (because you have both the open unused credit cards and the new loan available to you). If you leave the credit card accounts open but unused and paid off, and you make your new loan payments on time, your credit score will gradually improve. If you continue to spend more money than you can afford and you run up the balances on your credit cards again, your credit score will drop.