--Globals

local AI = script.Parent
local AIName = AI.Name
local AItorso = AI.Torso


if true then -- if your torso doesn't have a Humanoid; flip this to false
local HumanoidType = nil   -- find-a-HumanoidObject  --  make sure

local list = AI:GetChildren()        -- temp var.
for x = 1, #list do
local temp = list[x]
	if (temp.className == "Humanoid") then  
        HumanoidType = temp.Name
   end  -- found Humanoid
end -- AI Parts

if HumanoidType then
number = math.floor(number*100) -- serial# of AI
hum = AI[HumanoidType]
BRAINWave = 7/hum.WalkSpeed  -- For extreme speeds, this may have to be adjusted.
print (script, ": Humanoid = ", hum, AI:GetFullName(), number, "- Think Speed = ", BRAINWave)
end
end -- set speed
