--The gamepass will not purchase in-game and it will also not upgrade your players jump power to 100, why doesn't it work? The script is shown below--
local button = script.Parent
local marketplaceService = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer
local gamePassId = 345713670

button.MouseButton1Down:connect(function()
  marketplaceService:PromptPurchase(player, gamePassId)
end)
if isPurchased then do
	Game.Workspace.Player.Humanoid.JumpPower = 100
end

marketplaceService.PromptPurchaseFinished:connect(onPurchaseFinished)
if marketplaceService:PlayerOwnsAsset(player, gamePassId) then button.Visible = false
	
end

2 comments

0

function onClick.connect:onClick()? Go back and learn, and then come back once you understand how Lua works. You've skiddied together a script based on other scripts, and you have zero understanding of how this works at all. We're not here for that.

0

That didn't help.