I have a question, since I read this thing on the gmod wiki, that this has to be shared, I was wondering if I need to put this in shared.lua, here is the code. I look forward to a response. Thank you.

function checkDead(ply)
	if(ply.Team == 2) or ply:IsAdmin() then
		return true

hook.Add( "PlayerNoClip", "ghost", checkDead )

When something says Shared, it means that it can both be used on client- and serverside

You don’t absolutely have to put it on both client and server. It’s just that if the client presses his noclip key, he won’t see himself noclipping until the server’s run the hook and told him he can. So he’ll jerk into the air. So yes, it helps to put it on the client as well as the server.