📜  roblox studio 购买 robux - Lua 代码示例

📅  最后修改于: 2022-03-11 14:54:54.527000             🧑  作者: Mango

代码示例1
-- Gets the click detector on the objectbuyButton = script.ParentclickDetector = buyButton.ClickDetector local MarketplaceService = game:GetService("MarketplaceService")local gamePassID = 0000000  -- Change this to your game pass ID -- Whenever someone presses the click detector, run this codelocal function buyPass(player)    -- Ask players to buy a specific game pass based on it's ID     MarketplaceService:PromptGamePassPurchase(player, gamePassID)end clickDetector.MouseClick:Connect(buyPass)