-
What do you want to achieve?
If the player has the Roblox Premium membership, the GUI is enabled. -
What is the issue?
I can’t test whether or not the script actually works since I don’t have Roblox Premium so therefore I wanted to ask whether or not my script is written correctly on the DevForum to ensure that premium players have access.
local Players = game:GetService("Players")
local function onPlayerAdded(player)
if player.MembershipType == Enum.MembershipType.Premium then
print(player.Name .. " has premium membership")
--game.StarterGui.Paint.Enabled = true
player.PlayerGui.InventoryGui.Enabled = true
game:GetService("BadgeService"):AwardBadge(player.UserId, 2130978100)
-- Assign this player the ability or bonus related to the game pass
--
print(player.Name .. " BuildGUI enabled ")
end
end
-- Connect "PlayerAdded" events to the "onPlayerAdded()" function
Players.PlayerAdded:Connect(onPlayerAdded)