2x Speed Gamepass Issues

Basically im trying to make a 2x Speed gamepass but im having trouble making the actual 2x show up on the leaderstat so is it possible to make a like, if, then function in this script to where if you own a gamepass instead of it giving you 1 step it gives you lets say 2

game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	local Speed = Instance.new("IntValue")
	
	Speed.Name = "Speed"
	Speed.Value = 0
	Speed.Parent = leaderstats
	
	local Rebirths = Instance.new("IntValue")
	
	Rebirths.Name = "Rebirths"
	Rebirths.Value = 1
	Rebirths.Parent = leaderstats
end)
2 Likes

This is not really an issue but more an “I don’t know how to” type situation.

Anyways, refer to this documentation on the MarketplaceService.

Look for the UserOwnsGamePassAsync information. When you check for it and they have the gamepass, access the character via player.Character and change the walkspeed in the humanoid. You may also change the leaderstat to the walkspeed.

You will need to check everytime the player dies, or set the WalkSpeed in the StarterPlayer property of your game to the walkspeed you want LOCALLY.

3 Likes

I have tried that, it does not work in my game, Look at my previous posting history about the 2x speed. Im trying to figure out a way to actually make it work because it doesnt produce errors in output nor will it work,

Your code doesn’t have any reference of MarketplaceService or checking if the player has the gamepass.

Refer to this Trouble making 2x Speed Gamepass

Your gamepass doesn’t exist in roblox as I saw in that other thread you referenced, if it was offsale it would have shown but you wouldn’t be able to buy it