The game you're remembering is likely Kirby's Dream Land 3 — but it's on SNES, not N64. This is a common misremembering.
In Kirby's Dream Land 3, Kirby gains the Green ability (one of many color-based abilities from Animal Friends). This transforms him into a cluster of green balls that can bounce and roll uniquely.
It might be Kirby 64: The Crystal Shards, where Kirby also transforms via copy ability combinations (e.g., Cutter + Spark = lightning sword), but the specific "green balls" visual matches Dream Land 3's Green ability perfectly.
Memory often conflates SNES and N64 Kirby games. Dream Land 3 (SNES, 1997) and Kirby 64 (N64, 2000) are both excellent.