Toothpaste that is unopened can usually be brought on the plane as long as it's sealed up and in a sealed Ziploc bag.
Opened Toothpaste that is rolled up or has some missing cannot be brought on the airplane through your carry on luggage.
Any Liquids or gels that you bring on the airplane must be in 3.4-ounce containers or smaller and sealed in a Ziploc bag.