function module.getSide(t,y)local S=t.CFrame if y.x>0 then return(S*CFrame.fromAxisAngle(Vector3.new(0,-1,0),math.pi/2)).lookVector elseif y.x<0 then return(S*CFrame.fromAxisAngle(Vector3.new(0,1,0),math.pi/2)).lookVector end if y.y<0 then return(S*CFrame.fromAxisAngle(Vector3.new(-1,0,0),math.pi/2)).lookVector elseif y.y>0 then return(S*CFrame.fromAxisAngle(Vector3.new(1,0,0),math.pi/2)).lookVector end if y.z<0 then return S.lookVector elseif y.z>0 then return-S.lookVector end end function module.debounce(t)local y=false return function(...)if not y then y=true t(...)y=false end end end function module.part(t)local y={}local function S(g)for g,W in pairs(g:GetChildren())do if W:IsA("\080\097\114\116")and W~=t then table.insert(y,#y+1,W)elseif W:IsA("\077\111\100\101\108")then S(W)end end end S(game.Workspace)local g={}for y,S in pairs(y)do local W=(S.Position-t.Position).magnitude if W<g[1]then g[1]=W g[2]=S end end return g[2]end function module.weld(t,y)local S=Instance.new("\087\101\108\100")S.Part0=t S.Part1=y S.C0=t.CFrame:inverse()*y.CFrame S.Parent=t return S end function module.gpos(t,y,S,g)if g==0 then g=999 end local W=Ray.new(t.Position,(y-t.Position).unit*g)return workspace:FindPartOnRayWithIgnoreList(W,S)end function module.volume(t)return(t.Size.x*t.Size.y)*t.Size.z end function module.visualizeRay(t,y,S)S.Size=Vector3.new(S.Size.x,S.Size.y,(y-t).magnitude)S.CFrame=CFrame.new((t+y)/Vector3.new(2,2,2),y)end function module.getModelVolume(t)if t==nil then return 0 end local y=0 local function S(t)for t,g in pairs(t:GetChildren())do if g:IsA("\066\097\115\101\080\097\114\116")then y=y+module.volume(g)elseif g:IsA("\077\111\100\101\108")then S(g)end end end S(t)return y end return module
--^^^ Made by Anaminus ^^^---

function module.getSide(p, s)
	local cf = p.CFrame
	if s.x > 0 then
		return (cf * CFrame.fromAxisAngle(Vector3.new(0, -1, 0), math.pi / 2)).lookVector
	elseif s.x < 0 then
		return (cf * CFrame.fromAxisAngle(Vector3.new(0, 1, 0), math.pi / 2)).lookVector
	end

	if s.y < 0 then
		return (cf * CFrame.fromAxisAngle(Vector3.new(-1, 0, 0), math.pi / 2)).lookVector
	elseif s.y > 0 then
		return (cf * CFrame.fromAxisAngle(Vector3.new(1, 0, 0), math.pi / 2)).lookVector
	end

	if s.z < 0 then
		return cf.lookVector
	elseif s.z > 0 then
		return -cf.lookVector
	end
end

function module.debounce(func)
	local debounce = false
	return function(...)
		if not debounce then
			debounce = true
			func(...)
			debounce = false
		end
	end
end

function module.part(p)
	local parts = {}
	local function getParts(m)
		for _, v in pairs(m:GetChildren()) do
			if v:IsA("Part") and v ~= p then
				table.insert(parts, #parts + 1, v)
			elseif v:IsA("Model") then
				getParts(v)
			end
		end
	end
	getParts(game.Workspace)
	local winner = {}
	for _, q in pairs(parts) do
		local mag = (q.Position - p.Position).magnitude
		if mag < winner[1] then
			winner[1] = mag
			winner[2] = q
		end
	end
	return winner[2]
end

function module.weld(p1, p2)
	local w = Instance.new("Weld")
	w.Part0 = p1
	w.Part1 = p2
	w.C0 = p1.CFrame:inverse() * p2.CFrame
	w.Parent = p1
	return w
end

function module.gpos(part, pos, ignore, dist)
	if dist == 0 then
		dist = 999
	end
	local r = Ray.new(part.Position, (pos - part.Position).unit * dist)
	return workspace:FindPartOnRayWithIgnoreList(r, ignore)
end

function module.volume(m)
	return m.Size.x * m.Size.y * m.Size.z
end

function module.visualizeRay(origin, pos, laser)
	laser.Size = Vector3.new(laser.Size.x, laser.Size.y, (pos - origin).magnitude)
	laser.CFrame = CFrame.new((origin + pos) / Vector3.new(2, 2, 2), pos)
end

function module.getModelVolume(model)
	if model == nil then
		return 0
	end
	local mass = 0
	local function getModelMass(m)
		for i, v in pairs(m:GetChildren()) do
			if v:IsA("BasePart") then
				mass = mass + module.volume(v)
			elseif v:IsA("Model") then
				getModelMass(v)
			end
		end
	end
	getModelMass(model)
	return mass
end

return module
