local function y(y,q)local g=q.CFrame:vectorToWorldSpace(q.Size)g=Vector3.new(math.abs(g.X),math.abs(g.Y),math.abs(g.Z))local J,m=q.Position.X-g.X/2,q.Position.X+g.X/2 local p,I=q.Position.Z-g.Z/2,q.Position.Z+g.Z/2 return y.X>=J and(y.X<=m and(y.Z>=p and y.Z<=I))end

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
