wait(math.random(0,200)/200)if _G.Ignore_Code then if not game.Workspace:FindFirstChild("\073\103\110\111\114\101\095\077\111\100\101\108\095".._G.Ignore_Code)then local n=Instance.new("\077\111\100\101\108")n.Name="\073\103\110\111\114\101\095\077\111\100\101\108\095".._G.Ignore_Code n.Parent=game.Workspace spawn(function()while true do n.Parent=game.Workspace wait(.05)end end)end;((script.Parent:WaitForChild("\071\117\110\095\077\097\105\110")):WaitForChild("\073\103\110\111\114\101\095\067\111\100\101")).Value=_G.Ignore_Code else _G.Ignore_Code=math.random(1,10000.0)if not game.Workspace:FindFirstChild("\073\103\110\111\114\101\095\077\111\100\101\108\095".._G.Ignore_Code)then local n=Instance.new("\077\111\100\101\108")n.Name="\073\103\110\111\114\101\095\077\111\100\101\108\095".._G.Ignore_Code n.Parent=game.Workspace spawn(function()while true do n.Parent=game.Workspace wait(.05)end end)end;((script.Parent:WaitForChild("\071\117\110\095\077\097\105\110")):WaitForChild("\073\103\110\111\114\101\095\067\111\100\101")).Value=_G.Ignore_Code end spawn(function()repeat wait()until _G.Ignore_Code local n=game.Workspace:WaitForChild("\073\103\110\111\114\101\095\077\111\100\101\108\095".._G.Ignore_Code)while true do for n,T in pairs(n:GetChildren())do if not game.Players:FindFirstChild(T.Name:sub(12))then T:Destroy()end end wait(.05)end end)


wait(math.random(0, 200) / 200) --This is to prevent more than one Ignore_Model from being created

if _G.Ignore_Code then --If the Ignore_Code already exists, then the script creates the Ignore_Model
	--[[
		The purpose of this is so that every gun in a game that uses this gun kit will share one Ignore_Model. That way,
		bullet trails, bullet holes, and other fake arms will be ignored by the gun which makes the bullets more likely to
		hit a character part
	--]]
	if (not game.Workspace:FindFirstChild("Ignore_Model_".._G.Ignore_Code)) then
		local Ignore_Model = Instance.new("Model")
		Ignore_Model.Name = "Ignore_Model_".._G.Ignore_Code
		Ignore_Model.Parent = game.Workspace
	
		spawn(function()
			while true do
				Ignore_Model.Parent = game.Workspace
				wait(1 / 20)
			end
		end)
	end
	
	script.Parent:WaitForChild("Gun_Main"):WaitForChild("Ignore_Code").Value = _G.Ignore_Code
else
	--[[
		If there isn't already an Ignore_Code, then this creates one. The purpose of it being random is so that if there is
		an Ignore_Model for something else in the game, the script won't end up placing the ignored objects in that Ignore_Model
	--]]
	_G.Ignore_Code = math.random(1, 1e4)
	
	if (not game.Workspace:FindFirstChild("Ignore_Model_".._G.Ignore_Code)) then
		local Ignore_Model = Instance.new("Model")
		Ignore_Model.Name = "Ignore_Model_".._G.Ignore_Code
		Ignore_Model.Parent = game.Workspace
	
		spawn(function()
			while true do
				Ignore_Model.Parent = game.Workspace
				wait(1 / 20)
			end
		end)
	end
	
	script.Parent:WaitForChild("Gun_Main"):WaitForChild("Ignore_Code").Value = _G.Ignore_Code
end

spawn(function()
	repeat wait() until _G.Ignore_Code
	local Ignore_Model = game.Workspace:WaitForChild("Ignore_Model_".._G.Ignore_Code)
	while true do
		for _, Gun_Ignore in pairs(Ignore_Model:GetChildren()) do
			if (not game.Players:FindFirstChild(Gun_Ignore.Name:sub(12))) then
				Gun_Ignore:Destroy()
			end
		end
		wait(1 / 20)
	end
end)
