How to make a badge thats give money in-game

Hi guys, recently, I’m making a game that uses badges, and I wanted to know how to make a badge add money (edit: to the player) by leaderstats.
I couldn’t find anything here on devforum/youtube.
Any help thanks in advance.
(edit 2: forgot to be clear :no_mouth:)

1 Like

When you award the badge, award the person money too…?

the player, forgot to add this k

Any luck?

local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
	local ownsGamepass = game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,BADGEIDHERE)
	
	if ownsGamepass then
		-- do things here
	end
end)

He wanted it for badges not passes.

Essentially just swap ownsgamepass and the promptgamepasspurchase with userownsbadgeasync

i might be misunderstanding something, but couldn’t you just add the money to the player when you award the badge?

1 Like

They might be using badges for the purpose of data persistence. Although for that I’d recommend the ‘DataStoreService’.

Thanks for the script. Just changed the gamepass stuff to badge and worked! Thanks. :smile:

1 Like