local function S(S,w)local J=w.CFrame:vectorToWorldSpace(w.Size)J=Vector3.new(math.abs(J.X),math.abs(J.Y),math.abs(J.Z))local Z,u=w.Position.X-J.X/2,w.Position.X+J.X/2 local a,l=w.Position.Z-J.Z/2,w.Position.Z+J.Z/2 return S.X>=Z and(S.X<=u and(S.Z>=a and S.Z<=l))end
--[[
    Returns true the vector3 is within x and z bounds of an axis aligned part
]]
local function isVector3InBoundsOfPart(vector3, part)
	local worldSize = part.CFrame:vectorToWorldSpace(part.Size)
	worldSize = Vector3.new(math.abs(worldSize.X), math.abs(worldSize.Y), math.abs(worldSize.Z))

	local minX, maxX = part.Position.X - (worldSize.X / 2), part.Position.X + (worldSize.X / 2)
	local minZ, maxZ = part.Position.Z - (worldSize.Z / 2), part.Position.Z + (worldSize.Z / 2)

	return vector3.X >= minX and vector3.X <= maxX and vector3.Z >= minZ and vector3.Z <= maxZ
end
