Scriptname aaUCPetButtonBuyScript extends ObjectReference  
{Script for buying a pet}

Message Property PetMsg Auto
{Message for which pet you are buying}

MiscObject property Gold auto
{Gold to be removed}

Key property PetDoorKey auto
{Key for the door}

Event OnActivate(ObjectReference akActionRef)
  
	Int iButton = PetMsg.Show()

	If (iButton == 0)
        	Game.GetPlayer().RemoveItem(Gold, 1000)
		Game.GetPlayer().AddItem(PetDoorKey, 1)
		Disable(true)

	ElseIf (iButton == 1)
		Return 
       EndIf

endEvent