Local Script

local function QuirkChosen()
	if GamePass == true then
		game.Players.PlayerAdded:Connect(function(player)
			if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserID, ID) then
				print("Player owns gamepass.")
				Menu.Visible = false
				CurrentQuirk = script.Parent.Name
				print(CurrentQuirk) -- for testing purposes
			else
				game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,ID)
			end
		end)
	elseif GamePass == false then
		Menu.Visible = false
		CurrentQuirk = script.Parent.Name
		print(CurrentQuirk) -- for testing purposes
	end
end

1 comment

0
  1. PlayerAdded will not fire 2. Why are you doing this locally