I want to know whats the difference between GamePassService and MarketPlaceService. I want to make a gamepass enabled game but I do not know which to choose to use my my gamepass runner.
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)
local id = 103728213 game.Players.PlayerAdded:connect(function(player) if Game:GetService("GamePassService"):PlayerHasPass(player, id) then print(player.Name .. " has the game pass!") else print(player.Name .. " doesn't have the game pass...") end end)
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)
game.Players.PlayerAdded:connect(function(player) game:GetService("MarketplaceService"):PromptPurchase(player, 16630147) end)
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.
Use GamePassService, MarketPlaceService is responsible for in-game transactions. The GamePassService is used to check if a player has a gamepass.