delete item from player's inventory roblox studio
local itemName = "Cup" --Change this
if player.Backpack:FindFirstChild(itemName) and player.Backpack[itemName]:IsA("Tool") then
player.Backpack.Cup:Destroy()
end --Destroy Non-Equipped tool in inventory / Backpack
if player.Character and player.Character:FindFirstChild(itemName) and player.Character[itemName]:IsA("Tool") then
player.Character[itemName]:Destroy()
end --Destroy Equipped Tool