Team based No-Block

Can anyone make me a Team based no-block script (For free, I don’t have money to pay anyone at the moment, sorry.), so I don’t have to use some shitty admin mod I won’t use just to get a no-block script out of it, and still not be team based?

By team based no-block I mean teammates don’t collide with other teammates, but they collide with enemies.

If there already is something like this (I couldn’t find it.) then I’d appreciate a download link.

[lua]function NoCollidePeople()
for _, ply in pairs(player.GetAll()) do
ply:SetNoCollideWithTeammates( true )
hook.Add(“PlayerInitialSpawn”, “SetNocollide”, NoCollidePeople)[/lua]
Just throw this in an autorun file.