Ad
Log in to vote
0

Gamepass tool scirpt error help? [closed]

Asked by 11 days ago

i got this code:

-- Thommy :)
-- I suggest storing this script inside ServerScriptService or Workspace
-- Sorry about it not working earlier, V2

local Id = 3424575 -- Put the gamepass id here, it is found in the url and is the number part
local VipPlayers = {"thomasdj01", "Yologuy009", "tytgamer06"} -- Any person's name put here will get the gamepass for free
local ToolName = {"Rijbewijs","Scooter"} -- Put the name of your tool here that MUST be stored in ServerStorage

local function FindPlayer(Plr)
    for Num, Pler in pairs(VipPlayers) do
        if Pler == Plr then
            return true
        end
    end
end

game.Players.PlayerAdded:connect(function(Player)
    if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(Player.UserId, Id) or FindPlayer(Player.Name) then 
        Player.CharacterAdded:Connect(function(character)
            for Num, Tool in pairs(ToolName) do
                if game:GetService("ServerStorage"):FindFirstChild(Tool) then
                    game:GetService("ServerStorage")[Tool]:Clone().Parent = Player.Backpack
                end
            end
        end)

        for Num, Tool in pairs(ToolName) do
            if Player.Backpack:FindFirstChild(Tool) == nil then
                if game:GetService("ServerStorage"):FindFirstChild(Tool) then
                    game:GetService("ServerStorage")[Tool]:Clone().Parent = Player.Backpack
                end
            end
        end
    end
end)

can you guys help me?

0
????????????????????????????????????????????????????????????????????????? EXpodo1234ALT 1101 — 11d

Closed as Non-Descriptive by EXpodo1234ALT, zblox164, and yHasteeD

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?