local X=nil for X,N in pairs(pages.Home:GetChildren())do if N:IsA("\084\101\120\116\066\117\116\116\111\110")then local X=N.Fade local function K()if guiDe then guiDe=false local X=pages:FindFirstChild(N.Name)if X then tweenPages(UDim2.new(-1,0,0,0),X)end guiDe=true end end if main.device=="\077\111\098\105\108\101"then N.MouseButton1Up:Connect(function()K()end)else N.MouseButton1Down:Connect(function()K()end)end N.InputBegan:Connect(function(K)if not N.RankBlocker.Visible then(main.tweenService:Create(X,TweenInfo.new(.2),{BackgroundTransparency=.8})):Play()end end)N.InputEnded:Connect(function(N)(main.tweenService:Create(X,TweenInfo.new(.2),{BackgroundTransparency=1})):Play()end)end end
--Hover and select home buttons
local hovering = nil
for a, b in pairs(pages.Home:GetChildren()) do
	if b:IsA("TextButton") then
		local fade = b.Fade
		local function pressButton()
			if guiDe then
				guiDe = false
				local pageIn = pages:FindFirstChild(b.Name)
				if pageIn then
					tweenPages(UDim2.new(-1, 0, 0, 0), pageIn)
				end
				guiDe = true
			end
		end
		if main.device == "Mobile" then
			b.MouseButton1Up:Connect(function()
				pressButton()
			end)
		else
			b.MouseButton1Down:Connect(function()
				pressButton()
			end)
		end
		b.InputBegan:Connect(function(input)
			if not b.RankBlocker.Visible then
				main.tweenService:Create(fade, TweenInfo.new(0.2), { BackgroundTransparency = 0.8 }):Play()
			end
		end)
		b.InputEnded:Connect(function(input)
			main.tweenService:Create(fade, TweenInfo.new(0.2), { BackgroundTransparency = 1 }):Play()
		end)
	end
end
