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

Gamepass Script not working, used to work, Any Ideas? Roblox messing with us again im guessing?

local GamePassId = 4451626 --- Gamepass ID
tools = {"Sapper Tool"}  --- Tool

local MarketplaceService = game:GetService("MarketplaceService")

function respawned(char)
	player = game.Players:FindFirstChild(char.Name)
	if player.TeamColor==BrickColor.new("Fog") then
		script.Parent["Sapper"].disabled = true
	elseif player.TeamColor==BrickColor.new("Laurel green") then
		script.Parent["Sapper"].disabled = true
	elseif char:FindFirstChild("Head") ~= nil then
		if MarketplaceService:UserOwnsGamePassAsync(player.UserId,GamePassId)
		then
		print('player owns pass')
			for i = 1,#tools do
				game.ServerStorage.Gamepasses:FindFirstChild(tools[i]):Clone().Parent = player.Backpack
			end
		end
	end
end

game.Workspace.ChildAdded:connect(respawned)

3 comments

0

What's it supposed to do? I changed the Id to a gamepass I own and it printed "player owns pass"

0

It's meant to give a tool but it dosent.

0

Just re-ran the script again, it works, sorry for the inconvienence

1 answer

Just re-ran the script again, it works, sorry for the inconvienence

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