13179059653 - This is the asset id. Please help me. I wasted 1 hour trying to fix this.
I own the game pass for the slipper, and it is not giving me the tool. I own another copy of this which has a tool, and it doesn’t give me that tool ether idk. It stopped working.
local Players = game:GetService("Players")
local MPService = game:GetService("MarketplaceService")
local Tools = {13179059653}
local ToolPaths = {[13179059653] = ...} -- Add path to your tool here.
local Connections = {}
Players.PlayerAdded:Connect(function(Player)
Connections[Player] = Player.CharacterAdded:Connect(function(Character)
-- No longer requires the PlayerAdded thread since this is now a closed-loop thread
local User = Players:GetPlayerFromCharacter(Character)
local Backpack = User:FindFirstChildOfClass("Backpack")
if not Backpack then return end
for _, ID in pairs(Tools) do
local Owned = MPService:UserOwnsGamePassAsync(User.UserId, ID)
if Owned then
local Tool = ToolPaths[ID]
if Tool and select(1, pcall(function() return ToolPaths[ID]:IsA("Instance") end)) == true then
Tool = Tool:Clone()
Tool.Parent = Backpack
end
end
end
end)
end)
Players.PlayerRemoving:Connect(function(Player)
if Connections[Player] ~= nil then
pcall(function() Connections[Player]:Disconnect() end)
end
end)