The following script is what I use as a donate button so it alerts my Discord server like, hey! Tell the webhook to send this message.
local MarketplaceService = game:GetService("MarketplaceService")
function leftClick()
game:GetService("MarketplaceService"):PromptPurchase(player, 647999048)
end
function message()
MarketplaceService.PromptPurchaseFinished:Connect(function(player, assetId, isPurchased)
if isPurchased then
local http = game:GetService("HttpService")
local Data = {
["content"] = player.Name.. " bought the R$5 donation on " ..date.month.."/"..date.day.."/"..date.year
}
Data = http:JSONEncode(Data)
http:PostAsync("You're not getting my webhook link", Data)
end
end)
script.Parent.MouseButton1Click:Connect(leftClick)
Am I scripting it right? Sorry in advance for my terrible coding. Thanks for the help! :)

2 comments
Have you tested your script? When you ask if you're scripting it right, I think the best way to get an answer is to check and see if the code does what you expect.
I did check. When I click it doesn't show up.