Grease a 9x13-inch baking dish with butter or cooking spray, or line it with parchment paper.
In a large saucepan, melt the butter over low heat. Once melted, add the marshmallows and stir until completely melted and smooth. Mix in vanilla extract.
Remove the saucepan from heat. Quickly stir in the Cocoa Pebbles (or Fruity Pebbles) until the cereal is evenly coated with the marshmallow mixture.
Pour the mixture into your prepared baking dish. Using a spatula or wax paper, gently press it down into an even layer. Be careful not to press too hard, or it might become too compact.
Allow the treats to cool for about 30 minutes, or until they are firm and set. Once cooled, cut them into squares or rectangles. Enjoy!