Add this into a module.
Code:
'Made by Blupig. Give credit if you use this in your applications or else I'll hunt you down and gut your dog.
Function Buy(intCost As Integer, intCash As Integer, strCurrency As String, strItemName As String)
Dim Msg1
Msg1 = MsgBox("Buy " & strItemName & " for " & strCurrency & intCost & "?", vbYesNo + vbQuestion, "Blupig's Buy Mod")
If Msg1 = vbYes Then
If intCash < intCost Then
MsgBox "You don't have enough money.", vbInformation, "Blupig's Buy Mod"
Else: intCash = intCash - intCost
End If
ElseIf Msg1 = vbNo Then
Exit Function
End If
End Function
Sub Main()
Dim Cost As Integer
Dim Cash As Integer
Dim Curr As String
Dim Item As String
Cost = 19
Cash = 20
Curr = "$"
Item = "Apple"
Call Buy(Cost, Cash, Curr, Item)
MsgBox Curr & Cash & " remains.", vbInformation, "Blupig's Buy Mod"
End Sub


