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)

5 comments

0

I would advise you to read up about FilteringEnabled and Experimental Games as you obviously dont have it on and this makes your game open for hacking

0

Oh okay i will, thanks for the advice. (Btw what kind of hacking, like hacking in to your whole game or getting what?)

0

Anything. Inserting gear, creating, deleting, moving parts are all possible. Not to mention your game will be hidden from most players.

0

Okay, thanks.

0

I have filtering enabled on and i watched a video about it i understand pretty mutch about it thank you but is it true that it might break some localscripts/normal scripts?