Stir together 5 tablespoons of cornstarch, ½ cup of unsweetened cocoa powder, 1 cup of sugar, and 1 dash of salt in a medium saucepan. Slowly stir in 4 cups of cold whole milk until combined.
Cook over medium heat, stirring constantly, until the mixture comes to a boil. Boil for 1 minute, then remove from the heat.
Stir in 2 tablespoons of butter, cut into small pieces, and 1 teaspoon of vanilla extract. Pour into serving dishes and refrigerate for 1 hour.