How to check if script for Premium only members works or not without buying premium

I have made a script which shows wether the player playing the game is premium or not. The only thing I cant figure out is how do I make sure the script is working properly without needing to purchase Roblox Premium. Any help is appriciated!

2 Likes

well, the Players service has a boolean to check the player’s membership type

local function onPlayerAdded(player)
	if player.MembershipType == Enum.MembershipType.Premium then
		print("player has premium: ", player.Name)
	else
		print("player does not have premium: ", player.Name)
	end
end

game:GetService("Players").PlayerAdded:Connect(onPlayerAdded)
2 Likes

Just reverse the conditions and test it with that.

1 Like

I’m not actually sure if player emulation actually gives you the option for premium but thats something that you could try

1 Like

They know this, they just want to test the premium side of logic.

1 Like

just get someone who has premium to test the game

1 Like

Way harder than just adding “not” to the premium condition.

1 Like

Normally I would just do this so that the premium condition evaluates to true on you only.

if plr.MembershipType == Enum.MembershipType.Premium or plr.Name == 'your_name' then

Then, once you’ve tested the logic in this code block works, you would go back to your original thing without the “or plr.Name == ‘your_name’” in order to test that the regular non-premium condition works.

Hope this helped!

1 Like

It worked, thanks for the help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.