-(void)buyButtonPressed
{
if (playersMoney<purchaseAmount)
{
self.bringUpInAppPurchaseForThatProduct
}
}
But seriously, your question is really vague. Here's your likely next course of action:
1) assign callback (can do that in spritebuilder)
2) create mechanism to store in game currency
3) figure out how IAP processing works
4) on the button press event (like above) insert all that you learned so that it works.
There's an older IAP tutorial here:
http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial