function HideAllTabs()local L=script.Parent.TABS:GetChildren()for A=1,#L,1 do L[A].Visible=false end local A=script.Parent.SelectTab:GetChildren()for L=1,#A,1 do A[L].Style="\082\111\098\108\111\120\066\117\116\116\111\110"end end function Sword()HideAllTabs()script.Parent.TABS.SwordFrame1.Visible=true script.Parent.SelectTab.Swords.Style="\082\111\098\108\111\120\066\117\116\116\111\110\068\101\102\097\117\108\116"script.Parent.CurrentPage.Value=1 script.Parent.CurrentType.Value="\083\119\111\114\100"script.Parent.Page.Text=script.Parent.CurrentPage.Value end function Staff()HideAllTabs()script.Parent.TABS.StaffFrame1.Visible=true script.Parent.SelectTab.Staffs.Style="\082\111\098\108\111\120\066\117\116\116\111\110\068\101\102\097\117\108\116"script.Parent.CurrentPage.Value=1 script.Parent.CurrentType.Value="\083\116\097\102\102"script.Parent.Page.Text=script.Parent.CurrentPage.Value end function Ranged()HideAllTabs()script.Parent.TABS.RangedFrame1.Visible=true script.Parent.SelectTab.Ranged.Style="\082\111\098\108\111\120\066\117\116\116\111\110\068\101\102\097\117\108\116"script.Parent.CurrentPage.Value=1 script.Parent.CurrentType.Value="\082\097\110\103\101\100"script.Parent.Page.Text=script.Parent.CurrentPage.Value end
--This script is what make tabs and pages work.

function HideAllTabs()
	local Tabs = script.Parent.TABS:GetChildren()
	for i = 1, #Tabs do
		Tabs[i].Visible = false
	end
	local Buttons = script.Parent.SelectTab:GetChildren()
	for i = 1, #Buttons do
		Buttons[i].Style = "RobloxButton"
	end
end

function Sword()
	HideAllTabs()
	script.Parent.TABS.SwordFrame1.Visible = true
	script.Parent.SelectTab.Swords.Style = "RobloxButtonDefault"
	script.Parent.CurrentPage.Value = 1
	script.Parent.CurrentType.Value = "Sword"
	script.Parent.Page.Text = script.Parent.CurrentPage.Value
end

function Staff()
	HideAllTabs()
	script.Parent.TABS.StaffFrame1.Visible = true
	script.Parent.SelectTab.Staffs.Style = "RobloxButtonDefault"
	script.Parent.CurrentPage.Value = 1
	script.Parent.CurrentType.Value = "Staff"
	script.Parent.Page.Text = script.Parent.CurrentPage.Value
end

function Ranged()
	HideAllTabs()
	script.Parent.TABS.RangedFrame1.Visible = true
	script.Parent.SelectTab.Ranged.Style = "RobloxButtonDefault"
	script.Parent.CurrentPage.Value = 1
	script.Parent.CurrentType.Value = "Ranged"
	script.Parent.Page.Text = script.Parent.CurrentPage.Value
end
