It crashed before you added the "Wait(1000)" because you accidentally swapped the position of the "wait(0)" with "end".
The structure of a while true do is:
While true do
--Your code here
Wait(0)
end
Not:
While true do
end
Wait(0)
Fix this and you can get rid of that "Wait(1000)".
I've noticed you forgot to change the faction ID for the Jocks and Greasers and left 1, which is for nerds.
This means the game will never be able to find Damon and Norton because they're not part of the Nerd clique.
Derpy's Lua Reference site has lists of all kinds of stuff you might need.
Also, again, remember that (most) code is case-sensitive.
You typed "ped" in PedGetName(), when I programmed the for loop to work with "Ped".