Hi i have a script that removes your tools if you click this gui and it makes an image appear too and when you click the gui again the image will disappear but i want the tools that got removed to come back too. The problem is i really have no idea how to do that. Can someone please help me. Here is my script. (I'd like to get the tools i had in my inventory before instead of getting specific tools since my game has a shop and you can have 1-3 items at a time). Thanks :D
state = true f = script.Parent.Parent.EpixShop f.Visible = false function click() if state == true then script.Parent.ImageTransparency = 0.5 f.Visible = true state = false for _,child in pairs(script.Parent.Parent.Parent.Parent.Backpack:GetChildren()) do if child.ClassName == "Tool" or child.ClassName == "HopperBin" then print ("Removed "..child.Name.."!") child:remove() else script.Parent.ImageTransparency = 0 f.Visible = false state = true end end end end script.Parent.MouseButton1Down:connect(click)