Illinois and Indiana are reciprocal states. The Illinois dealer collects Illinois sales tax from you on the sale and the state of Illinois reimburses Indiana the tax they collect from the Illinois dealer.
If the Illinois tax collected is more than the Indiana tax, Indiana will refund you the difference when you register the vehicle at your local Indiana DMV office (they are almost painless these days, BTW).
If Illinois collects less than the Indiana tax, you get to make up the difference when you register it
This all happens insantaneously on paper when you buy the vehicle so you can buy the car, drive aross the state line and immediately register it in Indiana.
Just don't take your gun to the peoples republic when you go buy the car.