4zx16

Prompt on Touch

Oct 3rd, 2021 (edited)
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.73 KB | None | 0 0
  1. local Gamepass = 0 -- Your desired Gamepass ID
  2. local MPS = game:GetService("MarketplaceService")
  3.  
  4. script.Parent.Touched:Connect(function(plr)
  5.     local player = game.Players:GetPlayerFromCharacter(plr.Parent)
  6.  
  7.     if player ~= nil then
  8.         local Character = plr.Parent
  9.         MPS:PromptGamePassPurchase(player, Gamepass)
  10.     end
  11. end)
  12.  
  13. -- [ ^^ PROMPT GAMEPASS PURCHASE ^^ ] --
  14.  
  15. local Bundle = 0 -- Your desired Bundle ID.
  16. local MPS = game:GetService("MarketplaceService")
  17.  
  18. script.Parent.Touched:Connect(function(plr)
  19.     local player = game.Players:GetPlayerFromCharacter(plr.Parent)
  20.  
  21.     if player ~= nil then
  22.         local Character = plr.Parent
  23.         MPS:PromptBundlePurchase(player, Bundle)
  24.     end
  25. end)
  26.  
  27. -- [ ^^ PROMPT BUNDLE PURCHASE ^^ ] --
  28.  
  29. local MPS = game:GetService("MarketplaceService")
  30.  
  31. script.Parent.Touched:Connect(function(plr)
  32.     local player = game.Players:GetPlayerFromCharacter(plr.Parent)
  33.  
  34.     if player ~= nil then
  35.         local Character = plr.Parent
  36.         MPS:PromptPremiumPurchase(player)
  37.     end
  38. end)
  39.  
  40. -- [ ^^ PROMPT PREMIUM PURCHASE ^^ ] --
  41.  
  42. local Product = 0 -- Your desired Developer Product ID
  43. local MPS = game:GetService("MarketplaceService")
  44.  
  45. script.Parent.Touched:Connect(function(plr)
  46.     local player = game.Players:GetPlayerFromCharacter(plr.Parent)
  47.  
  48.     if player ~= nil then
  49.         local Character = plr.Parent
  50.         MPS:PromptProductPurchase(player, Product)
  51.     end
  52. end)
  53.  
  54. -- [ ^^ PROMPT PRODUCT PURCHASE ^^ ] --
  55.  
  56. local ID = 0 -- Your desired Sell ID
  57. local MPS = game:GetService("MarketplaceService")
  58.  
  59. script.Parent.Touched:Connect(function(plr)
  60.     local player = game.Players:GetPlayerFromCharacter(plr.Parent)
  61.  
  62.     if player ~= nil then
  63.         local Character = plr.Parent
  64.         MPS:PromptPurchase(player, ID)
  65.     end
  66. end)
  67.  
  68. -- [ ^^ PROMPT PURCHASE ^^ ] --
Advertisement
Add Comment
Please, Sign In to add comment