How to make tool only accessible with gamepass?

How do I Make a tool only accessible with gamepass? I’m making a Happy Home in Robloxia Recreation.

Any Questions? :wink:

2 Likes

As your post contains no code whatsoever, I’ve moved it out of #development-support:code-review and into #development-support:scripting-support. Please see the About topic for Code Review if you want to post there:

Try using this:

local MarketplaceService = game:GetService("MarketplaceService")
local gamepassId -- put your ID here

game:GetService("Players").PlayerAdded:Connect(function(player)
    if MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamepassId) then
        -- give them the tools
    end
end)

You can alternate the connection to UIs instead.

3 Likes