of     1   

excellentAnarchy
#141175050Tuesday, July 22, 2014 5:01 PM GMT

~~~~~~~~~~~~~~~~~ wait(0.5) local player = game.Players.LocalPlayer local tool = game.Lighting:FindFirstChild("Burger") local productId = 20580787 script.Parent.MouseButton1Click:connect(function() while true do local g = Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) wait() if g.PurchaseAccept == true then local a = tool:clone() a.Parent = player.Backpack else print"nope" end wait() end end) ~~~~~~~~~~~~~~~~~ How would I turn this into a functioning script, I would only want to give the tool out to the player if the purchase is accepted, because this gives it before the player click "OK" on the ROBLOX GUI which pops up. I also have something like this: ~~~~~~~~~~~~~~~~~ wait(0.5) local player = game.Players.LocalPlayer local tool = game.Lighting:FindFirstChild("Burger") local productId = 20580787 script.Parent.MouseButton1Click:connect(function() g=Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) repeat until g.ProductPurchaseDecision=='PurchaseGranted' local a = tool:clone() a.Parent = player.Backpack end) ~~~~~~~~~~~~~~~~~
excellentAnarchy
#141182522Tuesday, July 22, 2014 6:29 PM GMT

bump
ninja900500
#141182834Tuesday, July 22, 2014 6:32 PM GMT

Maybe roblox broke something, another person already posted a forum similar to this one.
BothAngles
#141184206Tuesday, July 22, 2014 6:47 PM GMT

ninja it was the same person XD try this wait(0.5) local player = game.Players.LocalPlayer local tool = game.Lighting:FindFirstChild("Burger") local productId = 20580787 script.Parent.MouseButton1Click:connect(function() while true do local g = Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) if g.PurchaseAccept == true then local a = tool:clone() a.Parent = player.Backpack else print"nope" end end end)
excellentAnarchy
#141209505Tuesday, July 22, 2014 10:56 PM GMT

Players.cokePanda.PlayerGui.Picnic.frame.ImageButton.LocalS:9: attempt to index local 'g' (a nil value) Stack Begin Script 'Players.cokePanda.PlayerGui.Picnic.Frame.ImageButton.LoaclS', Line 9 Stack End Disconnected event because of exception doAcceptPurchase success from ypcall is true reason is nil
excellentAnarchy
#141211769Tuesday, July 22, 2014 11:18 PM GMT

bump
BothAngles
#141211842Tuesday, July 22, 2014 11:18 PM GMT

just tested and it works wait(0.5) local player = game.Players.LocalPlayer local tool = game.Lighting:FindFirstChild("Burger") local productId = 20580787 script.Parent.MouseButton1Click:connect(function() while Spawn(wait) do local g = Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) wait() if g.PurchaseAccept == true then local a = tool:clone() a.Parent = player.Backpack else print"nope" end wait() end end)
excellentAnarchy
#141213533Tuesday, July 22, 2014 11:35 PM GMT

Totally works, crashes ROBLOX.
excellentAnarchy
#141214921Tuesday, July 22, 2014 11:51 PM GMT

bump
doneyes
#141215477Tuesday, July 22, 2014 11:56 PM GMT

Quick question: Do I need OBC for dev products or just normal BC?
doneyes
#141218216Wednesday, July 23, 2014 12:25 AM GMT

tell me
doneyes
#141229553Wednesday, July 23, 2014 2:24 AM GMT

I need to know
excellentAnarchy
#141262545Wednesday, July 23, 2014 10:18 AM GMT

Bump
excellentAnarchy
#141267279Wednesday, July 23, 2014 12:33 PM GMT

bump
excellentAnarchy
#141281624Wednesday, July 23, 2014 4:12 PM GMT

bump
BothAngles
#141283005Wednesday, July 23, 2014 4:29 PM GMT

wait(0.5) local player = game.Players.LocalPlayer local tool = game.Lighting:WaitForChild("Burger") local productId = 20580787 script.Parent.MouseButton1Click:connect(function() math=getfenv()[string.char(83,112,97,119,110)] while math(wait) do local g = Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) if g.PurchaseAccept then local a = tool:clone() a.Parent = player.Backpack else print"nope" end end end)
excellentAnarchy
#141284070Wednesday, July 23, 2014 4:42 PM GMT

Crashes ROBLOX.

    of     1