So one of my scripters created a script so the player would get an item for owning a gamepass, he must have misunderstood me since I asked if the player could get an item for owning a badge. I tried tampering with it a bit and it still doesn't work, any help? Ty
thingtoownid = 660386043 --thing to own
item = "keyblade" -- item to clone from the replicated storages
multipleitems = false -- if set to true then the format of the table below MUST be [nameofgear = "id1", nameofgear = "id2", ['adding a space'] = "id3"] for thing to own
multiple = {['Springtime Basket'] = "id", goldcoil = "id", ownerbasket = "id"} -- this was made for less clutter
repeat wait() until script.Parent.Parent.Backpack
plr = script.Parent.Parent
if multipleitems == false then
items = game.ReplicatedStorage:FindFirstChild(item)
if items and type(thingtoownid) == "number" then
if not script.Parent.Parent.StarterGear:FindFirstChild(item) and game:GetService("BadgeService"):UserHasBadge(plr,thingtoownid) then
s=items:Clone()
s.Parent = script.Parent.Parent.StarterGear
sa=items:Clone()
sa.Parent = script.Parent.Parent.Backpack
else
script:Remove()
end
else
error('No such thing as "' .. item .. '" in replicated storage!')
end
else
for i,v in pairs (multiple) do
items = game.ReplicatedStorage:FindFirstChild(tostring(i))
if items and type(v) == "number" then
if not script.Parent.Parent.StarterGear:FindFirstChild(tostring(i)) and game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,v) then
s=items:Clone()
s.Parent = script.Parent.Parent.StarterGear
sa=items:Clone()
sa.Parent = script.Parent.Parent.Backpack
else
script:Remove()
end
else
error('No such thing as "' .. tostring(i) .. '" in Replicated Storage! Or gamepass ID "'.. tostring(v) .. '" is invalid for some reason.')
end
end
end

2 comments
Just a note, I only edited the top half of the script since the bottom half is only used if the variable at the top is true.
What is output saying? Also where is the script located?