Script that check if a player has Premium

  1. What do you want to achieve? A script that runs when a player joins, and checks if a player has Premium. If they do, they can play the game normally, but if they don’t they get prompted to get premium, and if they buy it, they get kicked out for “Player’s Membership Status changed. Please rejoin the game.”

  2. What is the issue? I am not as good in scripting, so I kind of struggle with this, although I do know some events used for this, like :PromptPremiumPurchase and others.

  3. What solutions have you tried so far? I have looked at Premium Purchase Modal - Article, but it has only helped me with fired events (i think they’re called that).

Any help is appreciated, and thank you.

Hello @shankbeforetank.

Yes you can do that by using: Player.MembershipType

This will return the type of Membership of player

1 Like
local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(plr)
	local success,result = pcall(function()
		return plr.MembershipType
	end)

	if success then
		print(result)
	end
end)