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

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
