Raid abilities evaluate the entire turn to see if you attacked with a creature. That creature doesn't have to still be on the battlefield. Similarly, the player, planeswalker, or battle it attacked doesn't have to still be in the game or on the battlefield.

Artwork
Loading artwork…
Gutless Plunderer
Foundations · #60 · EN
Nonfoil—Foil—
Card rules
Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)
Raid — When this creature enters, if you attacked this turn, look at the top three cards of your library. You may put one of those cards back on top of your library. Put the rest into your graveyard.
2/2
Common · Illustrated by Loïc Canavaggia
Format legality
Alchemy Legal
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Future Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Old School Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Raid abilities care only that you attacked with a creature. It doesn't matter how many creatures you attacked with or which player, planeswalker, or battle those creatures attacked.
If there are fewer than three cards remaining in your library when Gutless Plunderer's last ability resolves, look at all of the cards in your library and follow the instructions in order. For example, if you had only two cards in your library, you would look at both, put up to one on top of your library, and put the rest into your graveyard. Sounds like a gutsy move.