local function a(a)for f,B in pairs(mainFrame.Pages.Home:GetChildren())do if B:FindFirstChild("\065\114\114\111\119")then B.Arrow.Visible=a end end end local function f()if currentPage.Name=="\072\111\109\101"then local f=main.hdAdminCoreName:find(" ")mainFrame.DragBar.Title.Text=main.hdAdminCoreName:sub(1,f-1)..(main.hdAdminCoreName:sub(f)):upper()mainFrame.DragBar.Back.Visible=false mainFrame.DragBar.Title.Position=UDim2.new(.04,0,.15,0)a(true)else mainFrame.DragBar.Title.Text=string.upper(currentPage.Name)mainFrame.DragBar.Back.Visible=true mainFrame.DragBar.Title.Position=UDim2.new(.15,0,.15,0)a(false)end end local function B(a,B,l)local e if l then e=0 else e=.3 end local Q=TweenInfo.new(e,Enum.EasingStyle.Quad)local o=currentPage local d=main.tweenService:Create(currentPage,Q,{Position=a})local Z=main.tweenService:Create(B,Q,{Position=UDim2.new(0,0,0,0)})if B.Name=="\072\111\109\101"then B.Position=UDim2.new(-1,0,0,0)else B.Position=UDim2.new(1,0,0,0)if B.Name=="\065\100\109\105\110"then spawn(function()(main:GetModule("\080\097\103\101\065\100\109\105\110")):UpdatePages()end)end end B.Visible=true d:Play()Z:Play()currentPage=B f()Z.Completed:Wait()o.Visible=false end

local function displayHomeArrowIcons(status)
	for a,b in pairs(mainFrame.Pages.Home:GetChildren()) do
		if b:FindFirstChild("Arrow") then
			b.Arrow.Visible = status
		end
	end
end

local function updateDragBar()
	if currentPage.Name == "Home" then
		local forceUpperFrom = main.hdAdminCoreName:find(" ")
		mainFrame.DragBar.Title.Text = main.hdAdminCoreName:sub(1, forceUpperFrom-1).. (main.hdAdminCoreName:sub(forceUpperFrom)):upper()
		mainFrame.DragBar.Back.Visible = false
		mainFrame.DragBar.Title.Position = UDim2.new(0.04, 0, 0.15, 0)
		displayHomeArrowIcons(true)
	else
		mainFrame.DragBar.Title.Text = string.upper(currentPage.Name)
		mainFrame.DragBar.Back.Visible = true
		mainFrame.DragBar.Title.Position = UDim2.new(0.15, 0, 0.15, 0)
		displayHomeArrowIcons(false)
	end
end

local function tweenPages(tweenOutPosition, tweenInPage, instantTween)
	local tweenTime
	if instantTween then
		tweenTime = 0
	else
		tweenTime = 0.3
	end
	local tweenInfoSlide = TweenInfo.new(tweenTime, Enum.EasingStyle.Quad)
	local oldPage = currentPage
	local tweenOut =  main.tweenService:Create(currentPage, tweenInfoSlide, {Position = tweenOutPosition})
	local tweenIn = main.tweenService:Create(tweenInPage, tweenInfoSlide, {Position = UDim2.new(0, 0, 0, 0)})
	if tweenInPage.Name == "Home" then
		tweenInPage.Position = UDim2.new(-1,0,0,0)
	else
		tweenInPage.Position = UDim2.new(1,0,0,0)
		if tweenInPage.Name == "Admin" then
			spawn(function() main:GetModule("PageAdmin"):UpdatePages() end)
		end
	end
	tweenInPage.Visible = true
	tweenOut:Play()
	tweenIn:Play()
	currentPage = tweenInPage
	updateDragBar()
	tweenIn.Completed:Wait()
	oldPage.Visible = false
end

