local function h(h)local f=player.PlayerGui for f,j in ipairs(f:GetChildren())do if j:IsA("\071\117\105\079\098\106\101\099\116")and j.Name~="\084\117\116\111\114\105\097\108"then j.Enabled=h end end end local function f()h(false)Panels.Visible=true Panel1.Visible=true Panel2.Visible=false end local function j(f,j)if Panel1.Visible==true then Panel1.Visible=false Panel2.Visible=true NextButton.ButtonLabel.Text="\071\079\084 \073\084"elseif Panel2.Visible==true then Panel2.Visible=false Panels.Visible=false h(true)if not IS_MOBILE then Arrow.Visible=true local h=coroutine.create(function()local h=totalPoints.Value+10 local f=Arrow.Position repeat Arrow:TweenPosition(UDim2.new(f.X.Scale,0,f.Y.Scale,-20),Enum.EasingDirection.In,Enum.EasingStyle.Quad,1,true)wait(1)Arrow:TweenPosition(UDim2.new(f.X.Scale,0,f.Y.Scale,0),Enum.EasingDirection.In,Enum.EasingStyle.Quad,1,true)wait(1)until totalPoints.Value>=h Arrow.Visible=false end)coroutine.resume(h)end end end
-- Local Functions
local function toggleNonTutorialGui(isEnabled)
	local PlayerGui = player.PlayerGui

	for _, child in ipairs(PlayerGui:GetChildren()) do
		if child:IsA("GuiObject") and child.Name ~= "Tutorial" then
			child.Enabled = isEnabled
		end
	end
end

local function startTutorial()
	toggleNonTutorialGui(false)

	Panels.Visible = true
	Panel1.Visible = true
	Panel2.Visible = false
end

local function nextPanel(input, gameProcessed)
	if Panel1.Visible == true then
		Panel1.Visible = false
		Panel2.Visible = true
		NextButton.ButtonLabel.Text = "GOT IT"
	elseif Panel2.Visible == true then
		Panel2.Visible = false

		-- Disable tutorial
		Panels.Visible = false

		-- Enable other gui
		toggleNonTutorialGui(true)

		if not IS_MOBILE then
			-- Show and tween arrow over move button until player earns
			-- 10 points
			Arrow.Visible = true
			local arrowThread = coroutine.create(function()
				local goal = totalPoints.Value + 10
				local startPos = Arrow.Position

				repeat
					Arrow:TweenPosition(
						UDim2.new(startPos.X.Scale, 0, startPos.Y.Scale, -20),
						Enum.EasingDirection.In,
						Enum.EasingStyle.Quad,
						1,
						true
					)
					wait(1)
					Arrow:TweenPosition(
						UDim2.new(startPos.X.Scale, 0, startPos.Y.Scale, 0),
						Enum.EasingDirection.In,
						Enum.EasingStyle.Quad,
						1,
						true
					)
					wait(1)
				until totalPoints.Value >= goal

				Arrow.Visible = false
			end)
			coroutine.resume(arrowThread)
		end
	end
end
