generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How do I make my dev product give in-game Currency

Previous Thread :: Next Thread 
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 02:43 PM
How do I make my dev product sell in-game and give the player In-Game Currency? I want people to buy extra in game currency "Gold" for developer products but I have no clue how and there are 0 websites to tell me how! PLEASE HELP ME!
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 02:45 PM
wiki.roblox.com/index.php?title=Developer_Products
Zero websites eh?
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 02:54 PM
I need it to give in game currency is there any paste bin or something?
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
25 May 2015 02:55 PM
Read his link, please. Don't badger the forums without taking other's advice.



-𝒩 | Anticodist, Scripter
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 02:56 PM
I did read it, It didn't say how to make it give them in game currency or "Gold" in my game
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 02:57 PM
http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
25 May 2015 02:58 PM
^



-𝒩 | Anticodist, Scripter
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 02:58 PM
Okay xD I will read that too
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
25 May 2015 02:59 PM
God bless my eyes. Is that the first person whose ever actually taken the link for 'Absolute Beginners Guide to Scripting.' What a time to be alive.



-𝒩 | Anticodist, Scripter
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 03:01 PM
xD but I already knew that stuff but I am not very familiar with dev products and I need to make it give the player when bought (3000 "Gold")
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 03:08 PM
hello?
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 03:10 PM
--after item is bought
stats.Gold.Value = stats.Gold.Value + 1
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 03:11 PM
Omg Thanks!
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 03:15 PM
No problem.
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 03:41 PM
Guys will this work?

local productId = 23872643 --Change this to your developer product ID!!
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)

local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")

CASHID = 23872643 -- Put the Developer Product ID here

MarketplaceService.ProcessReceipt = function(receiptInfo)
local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId
local numberBought = ds:IncrementAsync(playerProductKey, 1)
for i,v in pairs (game.Players:GetChildren()) do
if v.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == CASHID then


lds = v:FindFirstChild("leaderstats")
if lds ~= nil then
cs = lds:FindFirstChild("gold") --Change to your leaderstat
if cs ~= nil then
cs.Value = cs.Value + 100000 --Change to the amount you want this to add
end
end
end
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end)
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 04:27 PM
Hellow?
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 04:34 PM
Guys I made it work but it wont give the gold?
Report Abuse
christiannewman is not online. christiannewman
Joined: 26 Jan 2013
Total Posts: 70
25 May 2015 08:14 PM
NVM I spelt gold like gold instead of Gold xD
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image