|
| 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
|
  |
| 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 |
|
|
|
| 25 May 2015 02:54 PM |
| I need it to give in game currency is there any paste bin or something? |
|
|
| Report Abuse |
|
|
|
| 25 May 2015 02:55 PM |
Read his link, please. Don't badger the forums without taking other's advice.
-𝒩 | Anticodist, Scripter |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 25 May 2015 02:58 PM |
^
-𝒩 | Anticodist, Scripter |
|
|
| Report Abuse |
|
|
|
| 25 May 2015 02:58 PM |
| Okay xD I will read that too |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|
| |
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
| |
|
|
| 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 |
|
|
| |
|
|
| 25 May 2015 04:34 PM |
| Guys I made it work but it wont give the gold? |
|
|
| Report Abuse |
|
|
|
| 25 May 2015 08:14 PM |
| NVM I spelt gold like gold instead of Gold xD |
|
|
| Report Abuse |
|
|