Developer Product Tutorial (Car Regen)

Pubblicato il: 14 dicembre 2020
sul canale di: 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)


In questa pagina del sito puoi guardare il video online Developer Product Tutorial (Car Regen) della durata di online in buona qualità , che l'utente ha caricato Crozur 14 dicembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 198 volte e gli è piaciuto 3 spettatori. Buona visione!