One time tool purchase system not working.
Code: --Hi guys edit the three lines below and this is PharohFlys and make sure to like my model
local Id = 1741305140 --This is the gamepass ID: Example: Red Balloon - Roblox take the number part and put it there
local VipPlayers = {“Conclusiongiver”, “Roblox”} – replace these people one of them is me and put who you want it to get for free
local ToolName = {“ClassicSword”} --replace RedBalloon and put the name of the tool and it needs to be in ServerStorage
–dont edit below unless you know what your doing!
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)