# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/create-an-item-pickup-interactable-component-in-fortnite
# Local doc: epic-docs/documentation/en-us/fortnite/create-an-item-pickup-interactable-component-in-fortnite.md
# Section: Write the Verse Code
OnSucceededEvent(Agent:agent):void =
if(PickupInventory := GetInventoryRoot[Agent]):
if(PickupInventory.AddItemDistribute(Entity).GetSuccess[]):
Verse Library
verse
07 Write The Verse Code
Processes item pickup success by adding the entity to the agent inventory and verifying it.
extracted-snippets/documentation/en-us/fortnite/create-an-item-pickup-interactable-component-in-fortnite/07-write-the-verse-code.verse