Drugs mod question

I’m trying to make a simple entity that pulls out a gun and fires randomly and i’m trying to learn how to do that by looking at drungzmod’s alcohol and i found a bit of code i don’t understand.

[LUA]
local oldwep = activator:GetActiveWeapon()

if( !oldwep )then return; end
for id,wep in pairs(activator:GetWeapons())do
	if( wep:GetClass() == "weapon_pistol" )then
		activator:SelectWeapon("weapon_pistol")
		timer.Simple(0.3, function()
			if( !activator:GetActiveWeapon() || activator:GetNetworkedFloat("durgz_alcohol_high_end") < CurTime())then return end
			activator:ConCommand("+attack")
			timer.Simple(0.1, function()
				activator:ConCommand("-attack")
				if(oldwep == NULL || !oldwep || !activator:Alive())then return; end
					activator:SelectWeapon(oldwep:GetClass()) --Timer Error: entities/durgz_alcohol/init.lua:65: Tried to use a NULL entity!

			end)
		end)
	end
end

end

[/LUA]

Can someone tell me what this means?

[LUA]
|| !oldwep ||
[/LUA]

I get the oldwep but i don’t know what the || mean.

|| is another way of typing ‘or’. The same applies for && and ‘and’.

! and not.