Is this a corescript?

i made a gamepass for a group game that im working on with my friends, however when i try to buy it, an error pops up:

I clicked on it, and took me a to a script that warns you if AllowThirdPartySales is false. The script itself looks like a core script, and here’s a snippet of the code:


i decided to turn on AllowThirdPartySales and now it just prompts me with the desired gamepass.
However, why does the script return with the account ID 5229056? that’s an old account from 2009, unless i have misinterpreted everything.

full code
local Root = script.Parent.Parent
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")

local PurchaseError = require(Root.Enums.PurchaseError)

local GetFFlagLuaPremiumCatalogIGPP = require(Root.Flags.GetFFlagLuaPremiumCatalogIGPP)

local CONTENT_RATING_13_PLUS = 1
local ROBLOX_CREATOR = 1
local DEVELOPER_PRODUCT_TYPE = "Developer Product"

local THIRD_PARTY_WARNING = "AllowThirdPartySales has blocked the purchase"
	.. " prompt for %d created by %d. To sell this asset made by a"
	.. " different %s, you will need to enable AllowThirdPartySales."

local function meetsPrerequisites(productInfo, alreadyOwned, restrictThirdParty, externalSettings)
	if alreadyOwned then
		return false, PurchaseError.AlreadyOwn
	end

	if not (productInfo.IsForSale or productInfo.IsPublicDomain) then
		return false, PurchaseError.NotForSale
	end

	if productInfo.IsLimited or productInfo.IsLimitedUnique then
		if productInfo.Remaining == nil or productInfo.Remaining == 0 then
			return false, PurchaseError.Limited
		end
	end

	if GetFFlagLuaPremiumCatalogIGPP() and productInfo.MinimumMembershipLevel == Enum.MembershipType.Premium.Value
			and Players.LocalPlayer.MembershipType ~= Enum.MembershipType.Premium then
		return false, PurchaseError.PremiumOnly
	end

	if productInfo.ContentRatingTypeId == CONTENT_RATING_13_PLUS and Players.LocalPlayer:GetUnder13() then
		return false, PurchaseError.Under13
	end

	local allowThirdPartyPurchase = true
	if externalSettings.getLuaUseThirdPartyPermissions() then
		-- Use Q2 2020 universe-wide permission to restrict access.
		allowThirdPartyPurchase = externalSettings.isThirdPartyPurchaseAllowed()
	else
		-- TODO(DEVTOOLS-4227): Need to remove here before removing AllowThirdPartySales from DataModel/Workspace.
		allowThirdPartyPurchase = Workspace.AllowThirdPartySales
	end

	-- Restricting third party sales is only valid for Assets and Game Passes
	if productInfo.ProductType ~= DEVELOPER_PRODUCT_TYPE
		and restrictThirdParty
		and not allowThirdPartyPurchase
	then
		local isGroupGame = game.CreatorType == Enum.CreatorType.Group
		local isGroupAsset = productInfo.Creator.CreatorType == "Group"
		local productCreator = tonumber(productInfo.Creator.CreatorTargetId)

		--[[
			Third party sales will be restricted if the creator of the asset
			is not the creator of this game, whether the creators be users or groups
		]]
		if productCreator ~= ROBLOX_CREATOR
			and (isGroupGame ~= isGroupAsset or productCreator ~= game.CreatorId)
		then
			--[[
				Typically we avoid messaging the console for core scripts, but
				in this case we want to inform developers why their game isn't
				allowing sales while they're testing.
			]]
			warn((THIRD_PARTY_WARNING):format(
				productInfo.AssetId,
				productCreator,
				isGroupGame and "group" or "user"
			))
			return false, PurchaseError.ThirdPartyDisabled
		end
	end

	-- No failed prerequisites
	return true, nil
end

return meetsPrerequisites

did i misinterpret anything? is it a corescript? it definitely feels like one as i cant seem to trace the origin of the script itself and if i search for it using ctrl shift f it returns with nothing.

1 Like

You need to get the ID from the developer product page itself, not the URL. I’ve had issues with this before.

1 Like

I believe it’s a property of somewhere, probably workspace.

I already have the gamepass ID.
do you mean this? image
if not, please elaborate

Oh no, nevermind I misread. Erm, this does look like a core issue.

Maybe it is something related to this update Introducing Two Game Security Settings: Third Party Sales & Cross Game Teleports

By default roblox studio will set AllowThirdPartySales to false. I never make a gamepass before, but maybe you need to set the ownership of the gamepass as the group. Then you can purchase it normally even with allow third party sales disabled.

1 Like

It looks like a CoreScript because I was trying to find that source code.
And CoreScripts are on Github by the way: here

Ok, my theory is that gamepasses on group games are made by no actual person and they need to have AllowThirdPartySales on for it to actually work.