--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
