PLEASE HELP dev product that gives leaderstat

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to make a gui when you click it it opens a dev product and when you buy the dev product it adds 100 to the leaderstat
  2. *What is the issue?
    I do not know how to code this certain script because I am unfamiliar with it
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I looked on a lot of tutorials but nothing seemed to work. Please help

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- This is an example Lua code block

You can’t just give people on the DevForum something to do and expect them to do it while you just sit back. You have to at least made a start on a script or something

3 Likes

My apologies I’m new to the dev forum and this was my 2nd post

2 Likes

You can find out how to detect when somebody buys a developer product here.

We cant and shouldn’t give you exact code, but ill give you the basic idea assuming thats what you need.

below is the basic steps:
detect that the player clicked the UI
Prompt the purchase (read about this in the documentation)
(everything above should happen in a local script)
Detect the purchase (read about this in the documentation)
Give the player the leaderstat depending on the purchased item (I would assume you know how to use leaderstats since its not in your question)

3 Likes

Well, you can. People use other peoples code all the time, in all parts of the coding industry. Yes, giving them it and them not knowing how it works isnt a good way to strengthen knowledge, but its common practice.

using someone’s code is a thing, telling someone to write you code is another

i have this script but i am unsure on how to make a detector if you bought it

local button = script.Parent
local mpService = game:getService("MarketplaceService")

button.MouseButton1Click:connect(function()
	mpService:PromptProductPurchase(game.Players.LocalPlayer, 1346737089)  
end)														


mpService:UserOwnsGamePassAsync()

this is a late reply, but im pretty sure there was a devforum rule about not giving or asking for full code.
I do know that you can use and give code to others, I do it all the time as well, but in this specific case, I cannot give the exact code as they are not asking for only a fragment

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.