会员分成

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)

如果您觉得本教程对您有帮助,并且愿意支持我的工作,请考虑请我喝杯咖啡。

非常感谢您的支持!

请我喝咖啡