You should be terrified; that was a pretty silly thing to do. Not that I haven't made mistakes in my life but I am always amazed with people who are terrified AFTER they get caught. $5k of theft would be grand larceny in Virginia. As you can see it carries 1-20 years!
Now, if you have no record, I would get together as much of that $5k as fast as I can and beg the mercy of the court for your truly boneheaded act (and you better tell them you consider it boneheaded) and offer to pay all or as much as you can in restitution as SOON AS POSSIBLE. You will probably still get 5 or 10 years in prison but the eager restitution offer will probably get most if not all of the time suspended for a probationary period.
They MAY, and I do mean MAY, consider giving you a first offender program if you qualify. If you get out of this without jail time, you better go home, hug your kids and thank GOD for protecting you when you did something dumb.
Sorry to come down on you so hard but I practiced law in VA and they are no joke. I get especially tweaked when someone comes in "terrified" AFTER stealing with impunity. Afterwards isn't the time to be scared. Look at your kids; DO RIGHT or you won't see them grow up. Good luck. (What jurisdiction are you in? What judge?)
§ 18.2-95. Grand larceny defined; how punished
Any person who (i) commits larceny from the person of another of money or other thing of value of $5 or more, (ii) commits simple larceny not from the person of another of goods and chattels of the value of $200 or more, or (iii) commits simple larceny not from the person of another of any firearm, regardless of the firearm's value, shall be guilty of grand larceny, punishable by imprisonment in a state correctional facility for not less than one nor more than twenty years or, in the discretion of the jury or court trying the case without a jury, be confined in jail for a period not exceeding twelve months or fined not more than $2,500, either or both.