Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to give players a speedboost once they buy a gamepass?

Asked by 8 years ago
Edited 8 years ago

Here's what I got but I don't know where to put the script or I wrote it wrong because its not working.

I have this script so far:


        local player = game.Players.LocalPlayer
        local id = 479948091
        script.Parent.MouseButton1Down:connect(function()
         game:GetService("MarketplaceService"):PromptPurchase(player, id)
  end)





local passId = 479948091 local marketplaceService = game:GetService("MarketplaceService")

marketplaceService.PromptPurchaseFinished:connect(function(player,assetId,isPurchased) if isPurchased then -- if assetId == passId then game.Parent.Humanoid.Walkspeed=60 end end end)

I don't know where to put the script. Or if its even right.

Answer this question