function hi(x)
local y = x.Backpack
local z = game.Lighting["Dragon Slayer"]
z:Clone().Parent = y -- then put your item in lightning.
end
script.Parent.ClickDetector.MouseClick:connect(hi)
So this is my code above... how would I fix this so that if the tool that is being given is already in the person inventory not be given otherwise if they don't have the tool it will be given?

1 comment
I tried something like if not player.Backpack:FindFirstChild("Dragon Slayer" ) then if not char:FindFirstChild("Dragon Slayer") then