會員分成

Roblox 允許您根據付費會員在您的遊戲中花費的時間來賺取 Robux。無論您的遊戲規模大小,該系統都會為您提供獎勵,並且這些分成收益是在您通過其他方法(如遊戲通行證或遊戲內購買)賺取的收入之上的。付費會員在您的遊戲中花費的時間越多,您賺取的 Robux 就越多。

檢查會員資格並提示購買

local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local part = script.Parent
local showModal = true

part.Touched:Connect(function(otherPart)
	local player = Players:GetPlayerFromCharacter(otherPart.Parent)
	if not player then return end
	if player.MembershipType == Enum.MembershipType.Premium then
		print(player.Name .. " is a Premium user.")
	else
		if not showModal then return end
		showModal = false
		MarketplaceService:PromptPremiumPurchase(player)
		
		task.delay(5, function()  
			showModal = true
		end)
	end
end)

如果你覺得這個教程對你有幫助,並且願意支持我的工作,請考慮請我飲杯咖啡。

非常感謝你的支持!

請我飲杯咖啡