Your code looks like it isn't indentated for lines 7 and 8. If it is and still isn't working, switch the code (for the if statement) to:
if wave == 1 then wait(1) mob.Spawn("wretch", map) end