local a={}local n={}local function t(t)if t=="\083\119\105\110\103"then local a=n[R:NextInteger(1,#n)]local t=Tool.Animations:findFirstChild(a)return t elseif t=="\083\111\117\110\100"then local n=a[R:NextInteger(1,#a)]local t=Tool.Sounds:findFirstChild(n)return t end end function CheckTables()if LoadedTables==false then local t=Tool.Sounds:GetChildren()local H=Tool.Animations:GetChildren()for n=1,#t,1 do if t[n].Name~="\069\113\117\105\112"then table.insert(a,tostring(t[n].Name))end end for a=1,#H,1 do if H[a].Name~="\069\113\117\105\112"then table.insert(n,tostring(H[a].Name))end end LoadedTables=true end end
--tables
local SoundTable = {}
local AnimTable = {}

local function PickThing(ThingToPick)
	if ThingToPick == "Swing" then
		--pick anim
		local SwingA = AnimTable[R:NextInteger(1, #AnimTable)]
		local findA = Tool.Animations:findFirstChild(SwingA)
		return findA
	elseif ThingToPick == "Sound" then
		--pick sound
		local SoundA = SoundTable[R:NextInteger(1, #SoundTable)]
		local findA = Tool.Sounds:findFirstChild(SoundA)
		return findA
	end
end

--check if trables have been filled
function CheckTables()
	if LoadedTables == false then
		local GetS = Tool.Sounds:GetChildren()
		local GetA = Tool.Animations:GetChildren()
		for i = 1, #GetS do
			if GetS[i].Name ~= "Equip" then --ignore equip sound
				table.insert(SoundTable, tostring(GetS[i].Name))
			end
		end
		for i = 1, #GetA do
			if GetA[i].Name ~= "Equip" then --ignore equip animation
				table.insert(AnimTable, tostring(GetA[i].Name))
			end
		end
		LoadedTables = true
	end
end
