I have a problem, I want to make sure that when I buy a game pass or a developer’s product, a message is sent to all servers in the chat, but I can’t do it, can you help me?
Let’s say a user bought a gamepass, then the message “player1 bought gamepass1” is sent to the chat.
local itemId = donateButton.Value.Value
local itemPrice = donateButton.Price.Value
MarketPlaceService:PromptPurchase(loser, itemId)
MarketPlaceService.PromptPurchaseFinished:Connect(function(loser, itemId, was_purchased)
if was_purchased then
loser.leaderstats.Donated.Value += itemPrice
local playerId = loser.UserId
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "[SYSTEM] "..loser.." donated "..itemPrice.." robux to "..winnerName;
Font = Enum.Font.Cartoon;
Color = Color3.new(0,255,0);
FontSize = Enum.FontSize.Size96;
})
end
end)
end