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

can someone tell me how to add gamepass pet that following me?

i need it pls tell me

2 comments

0

You want us you a whole script(s) for you?

0

A full script that isn't super simple..?

1 answer

If you don't have any scripts, I would suggest making it simple but go on toolbox and get a pet then make a gamepass prompt then make a script like this Main

local Lighting = game:GetService("Lighting")
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")

local gamepassId = 8849124 --Put the ID of the asset here
local toolNames = {"RainbowMagicCarpet"} --Must be in lighting
local toolsParent = Lighting

local function onPlayerAdded(player)
    local function onCharacterAdded(character)
        if MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamepassId) then
            for i = 1, #toolNames do
                local tool = toolsParent:FindFirstChild(toolNames[i])
                if tool then
                    local clone = tool:Clone()
                    clone.Parent = player.Backpack
					
                end
            end
        end
    end

    if player.Character then
        onCharacterAdded(player.Character)
    end
    player.CharacterAdded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded)

Prompt its a local script

script.Parent.MouseButton1Click:connect(function()
	game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,8849694)
end)

2 comments

0

it's not working

0

bruh why giving scripts away if they did not try it themselves?

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