Players=game:GetService("\080\108\097\121\101\114\115")Debris=game:GetService("\068\101\098\114\105\115")ProjectileNames={"\087\097\116\101\114","\065\114\114\111\119","\080\114\111\106\101\099\116\105\108\101","\069\102\102\101\099\116";"\082\097\105\108","\076\097\115\101\114","\082\097\121","\066\117\108\108\101\116","\080\097\114\116\105\099\108\101\080\097\114\116"}Functions={CheckTableForString=function(u,m)for u,x in pairs(u)do if string.lower(x)==string.lower(m)then return true end end return false end,CheckIntangible=function(u)if u and u.Parent then if u.Transparency>=1 and not u.CanCollide or Functions.CheckTableForString(ProjectileNames,u.Name)then return true end local m=u.Parent local x=m.Parent local d=x:FindFirstChild("\072\117\109\097\110\111\105\100")if d and(d.Health>0 and m:IsA("\065\099\099\111\117\116\114\101\109\101\110\116"))then return true end end return false end,CastRay=function(u,m,x,d,c)local I,g,A=(game:GetService("\087\111\114\107\115\112\097\099\101")):FindPartOnRayWithIgnoreList(Ray.new(u,m*x),d)if I and Functions.CheckIntangible(I)then if c then wait()end I,g,A=Functions.CastRay(g+m*.01,m,x-(u-g).magnitude,d,c)end return I,g,A end,IsTeamMate=function(u,m)return u and(m and(not u.Neutral and(not m.Neutral and u.TeamColor==m.TeamColor)))end,TagHumanoid=function(u,m)local x=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")x.Name="\099\114\101\097\116\111\114"x.Value=m Debris:AddItem(x,2)x.Parent=u end;UntagHumanoid=function(u)for u,m in pairs(u:GetChildren())do if m:IsA("\079\098\106\101\099\116\086\097\108\117\101")and m.Name=="\099\114\101\097\116\111\114"then m:Destroy()end end end}return Functions
--Made by Luckymaxer

Players = game:GetService("Players")
Debris = game:GetService("Debris")

ProjectileNames = { "Water", "Arrow", "Projectile", "Effect", "Rail", "Laser", "Ray", "Bullet", "ParticlePart" }

Functions = {

	CheckTableForString = function(Table, String)
		for i, v in pairs(Table) do
			if string.lower(v) == string.lower(String) then
				return true
			end
		end
		return false
	end,

	CheckIntangible = function(Hit)
		if Hit and Hit.Parent then
			if
				(Hit.Transparency >= 1 and not Hit.CanCollide)
				or Functions.CheckTableForString(ProjectileNames, Hit.Name)
			then
				return true
			end
			local ObjectParent = Hit.Parent
			local Character = ObjectParent.Parent
			local Humanoid = Character:FindFirstChild("Humanoid")
			if Humanoid and Humanoid.Health > 0 and ObjectParent:IsA("Accoutrement") then
				return true
			end
		end
		return false
	end,

	CastRay = function(StartPos, Vec, Length, Ignore, DelayIfHit)
		local RayHit, RayPos, RayNormal = game:GetService("Workspace")
			:FindPartOnRayWithIgnoreList(Ray.new(StartPos, Vec * Length), Ignore)
		if RayHit and Functions.CheckIntangible(RayHit) then
			if DelayIfHit then
				wait()
			end
			RayHit, RayPos, RayNormal = Functions.CastRay(
				(RayPos + (Vec * 0.01)),
				Vec,
				(Length - (StartPos - RayPos).magnitude),
				Ignore,
				DelayIfHit
			)
		end
		return RayHit, RayPos, RayNormal
	end,

	IsTeamMate = function(Player1, Player2)
		return (
			Player1
			and Player2
			and not Player1.Neutral
			and not Player2.Neutral
			and Player1.TeamColor == Player2.TeamColor
		)
	end,

	TagHumanoid = function(humanoid, player)
		local Creator_Tag = Instance.new("ObjectValue")
		Creator_Tag.Name = "creator"
		Creator_Tag.Value = player
		Debris:AddItem(Creator_Tag, 2)
		Creator_Tag.Parent = humanoid
	end,

	UntagHumanoid = function(humanoid)
		for i, v in pairs(humanoid:GetChildren()) do
			if v:IsA("ObjectValue") and v.Name == "creator" then
				v:Destroy()
			end
		end
	end,
}

return Functions
