GamePassService is used to check whether or not a player owns a gamepass.
Here's an example from the wiki. (http://wiki.roblox.com/index.php?title=API:Class/GamePassService/PlayerHasPass)
3 | game.Players.PlayerAdded:connect( function (player) |
4 | if Game:GetService( "GamePassService" ):PlayerHasPass(player, id) then |
5 | print (player.Name .. " has the game pass!" ) |
7 | print (player.Name .. " doesn't have the game pass..." ) |
MarketPlaceService has a few more features, including the ability to prompt users to buy a gamepass. Here's another example from the wiki that prompts all new players to buy Beautiful Hair for Beautiful People. (http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PromptPurchase)
1 | game.Players.PlayerAdded:connect( function (player) |
2 | game:GetService( "MarketplaceService" ):PromptPurchase(player, 16630147 ) |
If you want to check if a player own's a gamepass use GamePassService. If you would like to prompt a player to buy a gamepass, or handle any other ingame transactions use MarketPlaceService. You can find more uses for MarketPlaceService here: http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService.