You can write your topic however you want, but you need to answer these questions:
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
*What is the issue?
I do not know how to code this certain script because I am unfamiliar with it
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!
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
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)
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.
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