Developer Product Tutorial (Car Regen)

Published: 14 December 2020
on channel: Crozur
198
3

This video was requested by someone who needed help. Sorry if it took too long, I've been busy with school and other things.

local car = script.Parent.Parent.Car
local button = script.Parent
local debounce = false
local ProductId = 1127378142
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")

car.Parent = game.ServerStorage


cd.MouseHoverEnter:Connect(function()
button.Transparency = 0.5
end)

cd.MouseHoverLeave:Connect(function()
button.Transparency = 0
end)

local function processReceipt(receiptInfo)
local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then
return Enum.ProductPurchaseDecision.NotProcessedYet
end

if player then
debounce = true
print("Clicked!")
local newcar = car:Clone()
newcar.Name = ("NewCar")
newcar.Parent = game.Workspace
wait(5)
debounce = false
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end

cd.MouseClick:Connect(function(plr)
if not debounce then
MarketPlaceService:PromptProductPurchase(plr, ProductId)
MarketPlaceService.ProcessReceipt = processReceipt
end
end)


On this page of the site you can watch the video online Developer Product Tutorial (Car Regen) with a duration of online in good quality, which was uploaded by the user Crozur 14 December 2020, share the link with friends and acquaintances, this video has already been watched 198 times on youtube and it was liked by 3 viewers. Enjoy your viewing!