Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make an gamepass that makes player jump higher?

local gampass_id = 35168372

script.Parent.MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, gampass_id)

end)

gamepass link: https://www.roblox.com/game-pass/35168372/thx

2 answers

✓ Accepted answer

Use humanoid.JumpPower to change it. I made a script for you (server-sided):

local gamepass_Id = 35168372
local MarketplaceService = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		if MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamepass_Id) then
			character:WaitForChild("Humanoid").JumpPower = 50 -- Change to any amount you like
		end
	end)
end)

9 comments

0

where do I put it? In server script? Or in local server script? Or somewhere else?

0

I've put it in server script service in normal script. ERROR: 12:16:29.474 UserOwnsGamepassAsync is not a valid member of MarketplaceService "MarketplaceService" - Server - Script:6

0

Oh, sorry, use UserOwnsGamePassAsync instead because Pass is uppercase

0

17:00:21.030 UserOwnsGamepassAsync is not a valid member of MarketplaceService "MarketplaceService" - Server - Script:6. U meant to use Pass instead of UserOwnsGamePassAsync? Cuz i dont see any "pass" in the script

0

I used if MarketplaceService:PromptGamePassPurchase(player, gamepass_Id) then

0

It shows me info to buy gamepass on the start of the game, but then nothing. My charcher doestn jump higher. And btw wdym by saying ,,Use humanoid.JumpPower to change it"?

0

Do not use UserOwnsGamepassAsync but use UserOwnsGamePassAsync Sorry i made a typo, Pass must be uppercase. You are still using the same string as before

0

14:58:17.982 Unable to cast Instance to int64 - Server - Script:6

0

Instead of player use player.UserId

Please research more on this before asking a question, as there are multiple sources that provide an answer to your question.

You can use this Roblox article to figure this out.

1 comment

0

u meant to send the gamepass link? I saw 2 types of links on this article

This discussion is preserved as it was. New answers, comments, and votes are closed.