Joriangames

SkipStage script

Dec 10th, 2022
1,491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. --[[
  2. Thanks for using this script
  3. This script was made by Joriangames/BloxianCode
  4. Want to know how to use this and script explanation?
  5. Check the video here: https://youtu.be/SIW3Vq-DjZI
  6. ]]
  7.  
  8. local devId = 1337988868 --your devId here
  9. local MS = game:GetService("MarketplaceService")
  10. local players = game:GetService("Players")
  11.  
  12.  
  13. local function processReceipt(info)
  14.    
  15.     local plr = players:GetPlayerByUserId(info.PlayerId)
  16.    
  17.     if not plr then
  18.         --player left the game
  19.         return Enum.ProductPurchaseDecision.NotProcessedYet
  20.     end
  21.    
  22.     if plr then
  23.         print("Player bought the product")
  24.         local currentStage = plr:FindFirstChild("leaderstats").Stage.Value
  25.         local newStage = currentStage +1
  26.        
  27.         local char = plr.Character
  28.         char:MoveTo(game.Workspace.Spawns[newStage].Position)
  29.     end
  30.    
  31.     return Enum.ProductPurchaseDecision.PurchaseGranted
  32. end
  33.  
  34. MS.ProcessReceipt = processReceipt
Advertisement
Add Comment
Please, Sign In to add comment