-- Here's the script for a page: 

player = script.Parent.Parent.Parent
backpack = player.Backpack

function chooseClass(class)
	for i, v in pairs(backpack:GetChildren()) do v:remove() end
	for i, v in pairs(class:GetChildren()) do
		if v:IsA("Tool") then
			v:clone().Parent = backpack
		elseif v:IsA("HopperBin") then
			v:clone().Parent = backpack
		end
	end
	script.Parent.Main.Visible = true
	wait(0.01)
	script.Parent.Main.Visible = false
end

for i, v in pairs(script.Parent.Main:GetChildren()) do
	v.MouseButton1Up:connect(function () chooseClass(v) end)
end

-- How do I make it so that it can also work for SECONDPAGE? And what would I do for a "Next" button, so that if it's clicked it reveals the SECONDPAGE Frame?

1 comment

0

Just make the second page visible