I am trying to make a store system and nothing happens after I paid the robux.
This script makes the robux thing come up and the other is supposed to give you the orbs. How do i fix this
Also I used Print
and found that it does not print when I put it here
MarketPlaceService.ProcessReceipt = function(receiptInfo)
Print("Done")
-- LOCAL SCRIPT INSIDE SIDEUI
---> services
local value = script.Parent.Parent:WaitForChild("ValueUI")
local stat = value:WaitForChild("Stat")
---> variables
local frame = script.Parent.MainFrame
local sframe = script.Parent.SettingsFrame
local iframe = script.Parent.IndexFrame
local openbuttons = frame.Open
local donated = frame.Donate
local gear = frame.Gears
local orbs = frame.Orbs
local exit = script.Parent.MainFrame.Exit
local button = script.Parent.Buttons.A
local obutton = openbuttons.A
local gbutton = openbuttons.B
local dbutton = openbuttons.C
local AD = donated.A
local BD = donated.A
local CD = donated.A
local DD = donated.A
local ED = donated.A
local FD = donated.F
local AO = orbs.A
local BO = orbs.B
local CO = orbs.C
local DO = orbs.D
local EO = orbs.E
local FO = orbs.F
local settingA = script.Parent.Buttons.C
local settingB = script.Parent.SettingsFrame.Exit
local indexA = script.Parent.Buttons.B
local indexB = script.Parent.IndexFrame.Exit
---> main
indexA.MouseButton1Down:Connect(function()
iframe.Visible = not iframe.Visible
frame.Visible = false
sframe.Visible = false
stat.Visible = false
end)
indexB.MouseButton1Down:Connect(function()
iframe.Visible = not iframe.Visible
end)
settingA.MouseButton1Down:Connect(function()
sframe.Visible = not sframe.Visible
frame.Visible = false
iframe.Visible = false
stat.Visible = false
end)
settingB.MouseButton1Down:Connect(function()
sframe.Visible = not sframe.Visible
end)
button.MouseButton1Down:Connect(function()
frame.Visible = not frame.Visible
sframe.Visible = false
iframe.Visible = false
stat.Visible = false
end)
obutton.MouseButton1Down:Connect(function()
orbs.Visible = not orbs.Visible
gear.Visible = false
donated.Visible = false
stat.Visible = false
end)
gbutton.MouseButton1Down:Connect(function()
gear.Visible = not gear.Visible
orbs.Visible = false
donated.Visible = false
stat.Visible = false
end)
dbutton.MouseButton1Down:Connect(function()
donated.Visible = not donated.Visible
gear.Visible = false
orbs.Visible = false
stat.Visible = false
end)
exit.MouseButton1Down:Connect(function()
frame.Visible = not frame.Visible
end)
AD.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456828) -- change to your product id --
end)
BD.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456827)
end)
CD.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456826)
end)
DD.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456825)
end)
ED.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456823)
end)
FD.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456821)
end)
AO.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456820)
end)
BO.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456819)
end)
CO.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456818)
end)
DO.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456816)
end)
EO.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456814)
end)
FO.MouseButton1Down:Connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1612456813)
end)
-- LOCAL SCRIPT INSIDE STARTERGUI
---> services
local MarketPlaceService = game:GetService("MarketplaceService")
---> main
MarketPlaceService.ProcessReceipt = function(receiptInfo)
--ORBS
if receiptInfo.ProductId == 1612456820 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Orbs.Value += 30
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456819 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Orbs.Value += 150
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456818 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Orbs.Value += 400
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456816 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Orbs.Value += 1000
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456814 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Orbs.Value += 2000
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456813 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Orbs.Value += 5000
return Enum.ProductPurchaseDecision.PurchaseGranted
--DONATED
else if receiptInfo.ProductId == 1612456828 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Donated.Value += 10
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456827 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Donated.Value += 100
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456826 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Donated.Value += 500
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456825 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Donated.Value += 1000
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456823 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Donated.Value += 10000
return Enum.ProductPurchaseDecision.PurchaseGranted
else if receiptInfo.ProductId == 1612456821 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Donated.Value += 100000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
end
end
end
end
end
end
end
end
end
end
end