main.marketplaceService.PromptGamePassPurchaseFinished:Connect(function(t,a,R)local P=main.pd[t]if R and P then local R=main.permissions.gamepasses[tostring(a)]if R and not(main:GetModule("\099\102")):FindValue(P.Gamepasses,a)then(main:GetModule("\080\108\097\121\101\114\068\097\116\097")):InsertStat(t,"\071\097\109\101\112\097\115\115\101\115",a);(main:GetModule("\099\102")):RankPlayerSimple(t,R.Rank)if not(main:GetModule("\099\102")):FindValue(main.products,a)then(main:GetModule("\099\102")):FormatAndFireNotice(t,"\085\110\108\111\099\107\082\097\110\107",(main:GetModule("\099\102")):GetRankName(R.Rank))end;(main:GetModule("\099\102")):CheckAndRankToDonor(t,P,a)end end end)return module

main.marketplaceService.PromptGamePassPurchaseFinished:Connect(function(player,assetId,isPurchased)
	local pdata = main.pd[player]
	if isPurchased and pdata then
		local validGamepass = main.permissions.gamepasses[tostring(assetId)]
		if validGamepass and not main:GetModule("cf"):FindValue(pdata.Gamepasses, assetId) then
			main:GetModule("PlayerData"):InsertStat(player, "Gamepasses", assetId)
			main:GetModule("cf"):RankPlayerSimple(player, validGamepass.Rank)
			if not main:GetModule("cf"):FindValue(main.products, assetId) then
				main:GetModule("cf"):FormatAndFireNotice(player, "UnlockRank", main:GetModule("cf"):GetRankName(validGamepass.Rank))
			end
			main:GetModule("cf"):CheckAndRankToDonor(player, pdata, assetId)
		end
	end
end)




return module
