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: my dev product gui keeps looking for place ids

Previous Thread :: Next Thread 
mustardPrime is not online. mustardPrime
Joined: 26 Dec 2011
Total Posts: 5529
13 Dec 2015 07:09 PM
when you click on the button it says "item not for sale" and so i checked all my dev product ids and they were all places
Report Abuse
mustardPrime is not online. mustardPrime
Joined: 26 Dec 2011
Total Posts: 5529
13 Dec 2015 07:10 PM
why does it look for place ids instead of product ids
Report Abuse
mustardPrime is not online. mustardPrime
Joined: 26 Dec 2011
Total Posts: 5529
13 Dec 2015 07:14 PM
game.StarterGui.ResetPlayerGuiOnSpawn = false

local MarketplaceService = game:GetService("MarketplaceService")

function getPlayerFromId(id)
for i,v in pairs(game.Players:GetChildren()) do
if v.userId == id then
return v
end
end
return nil
end

MarketplaceService.ProcessReceipt = function(receiptInfo)
local productId = receiptInfo.ProductId
local playerId = receiptInfo.PlayerId
local player = getPlayerFromId(playerId)
local productName
if productId == 22387422 then
productName = "Get 5000 Gold"
local Money = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name)
if Money then
Money.Value = Money.Value + 5000
end
elseif productId == 22387338 then
productName = "Get 10000 Gold"
local Money = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name)
if Money then
Money.Value = Money.Value + 10000
end
elseif productId == 22387307 then
productName = "Start with 2000 Gold"
local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name)
game.ReplicatedStorage.MasterKey:FireClient(player,"PurchaseConfirm")
if cashmoney then
cashmoney.Value = cashmoney.Value + 2000
end
elseif productId == 22387295 then
productName = "Glider"
game.Lighting.Glider:Clone().Parent=player.Backpack
end
elseif productId == 22387645 then
productName = "Gravity Coil"
game.Lighting.GravityCoil:Clone().Parent=player.Backpack
end
elseif productId == 22387639 then
productName = "Water Sword"
game.Lighting.Tsunai:Clone().Parent=player.Backpack
end
game.BadgeService:AwardBadge(playerId,202303025)
local message = Instance.new("Hint",workspace)
message.Text = player.Name.." purchased "..productName.."!"
coroutine.resume(coroutine.create(function()
wait(2)
message:destroy()
end))

return Enum.ProductPurchaseDecision.PurchaseGranted
end
Report Abuse
mustardPrime is not online. mustardPrime
Joined: 26 Dec 2011
Total Posts: 5529
13 Dec 2015 07:21 PM
bump
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