local player = game.Players.LocalPlayer local val = player.Backpack:GetChildren() local inc = -1 local rot = 0 local iter = 0 local y = 0 local num = 360 local square = math.sqrt(#val) local ron = math.ceil(square) local function mode(type) iter = 0 y = 0 inc = -1 rot = 0 if type == 1 then -- wall for _, v in pairs(val) do if v:IsA("Tool") then if iter >= ron then iter = 0 y -= 1 end inc += 1 iter += 1 rot += 35 v.Grip = CFrame.new(0,-y,iter) * CFrame.Angles(math.rad(-90), math.rad(90), 0) end end elseif type == 2 then -- platform for _, v in pairs(val) do if v:IsA("Tool") then if iter >= ron then iter = 0 y += 1 end inc += 1 iter += 1 rot += 35 v.Grip = CFrame.new(y,0,iter) end end elseif type == 3 then -- spiral for _, v in pairs(val) do if v:IsA("Tool") then if iter >= 2 then iter = 0 y += 1 end inc += 1 iter += 1 rot += 35 v.Grip = CFrame.new(0,-y,iter) * CFrame.Angles(0, math.rad(y*40), 0) end end elseif type == 4 then -- line for _, v in pairs(val) do if v:IsA("Tool") then inc += 1 iter += 1 rot += 35 v.Grip = CFrame.new(0,0,iter) end end elseif type == 5 then -- small spiral for _, v in pairs(val) do if v:IsA("Tool") then iter += 1 if iter > 3 then iter = 1 y += 1 end v.Grip = CFrame.new(0,-y,iter) * CFrame.Angles(0, math.rad(y*40), 0) end end elseif type == 6 then -- circle local radius = 5 local angleStep = 360 / #val local currentAngle = 0 for _, v in pairs(val) do if v:IsA("Tool") then local rad = math.rad(currentAngle) v.Grip = CFrame.new(math.cos(rad)*radius,0,math.sin(rad)*radius) currentAngle += angleStep end end elseif type == 7 then -- vertical stack for _, v in pairs(val) do if v:IsA("Tool") then v.Grip = CFrame.new(0,-inc,0) inc += 1 end end elseif type == 8 then -- cube edges (basic hollow cube) local cubeSize = 5 local layerHeight = 1 local edgeCount = 12 local toolsPerLayer = edgeCount local layer = 0 for i, tool in ipairs(val) do if tool:IsA("Tool") then layer = math.floor((i-1)/toolsPerLayer) local posIndex = (i-1) % toolsPerLayer local x, yPos, z = 0, -layer*layerHeight, 0 if posIndex == 0 then x, z = -cubeSize, -cubeSize elseif posIndex == 1 then x, z = cubeSize, -cubeSize elseif posIndex == 2 then x, z = cubeSize, cubeSize elseif posIndex == 3 then x, z = -cubeSize, cubeSize elseif posIndex == 4 then x, z = -cubeSize, -cubeSize elseif posIndex == 5 then x, z = cubeSize, -cubeSize elseif posIndex == 6 then x, z = cubeSize, cubeSize elseif posIndex == 7 then x, z = -cubeSize, cubeSize elseif posIndex == 8 then x, z = 0, -cubeSize elseif posIndex == 9 then x, z = cubeSize, 0 elseif posIndex == 10 then x, z = 0, cubeSize elseif posIndex == 11 then x, z = -cubeSize, 0 end tool.Grip = CFrame.new(x, yPos, z) inc += 1 end end elseif type == 9 then -- hollow 3D cube with multiple tools per edge local cubeSize = 5 local layerHeight = 1 local toolsList = {} for _, tool in pairs(val) do if tool:IsA("Tool") then table.insert(toolsList, tool) end end local totalTools = #toolsList if totalTools == 0 then return end local edges = 12 local toolsPerEdge = math.ceil(totalTools / edges) local edgeVectors = { Vector3.new(-cubeSize,0,-cubeSize), Vector3.new(cubeSize,0,-cubeSize), Vector3.new(cubeSize,0,cubeSize), Vector3.new(-cubeSize,0,cubeSize), Vector3.new(-cubeSize,0,-cubeSize), Vector3.new(cubeSize,0,-cubeSize), Vector3.new(cubeSize,0,cubeSize), Vector3.new(-cubeSize,0,cubeSize), Vector3.new(0,0,-cubeSize), Vector3.new(cubeSize,0,0), Vector3.new(0,0,cubeSize), Vector3.new(-cubeSize,0,0) } local toolIndex = 1 for edge = 1, edges do local startPos = edgeVectors[edge] local endPos = edgeVectors[(edge % edges) + 1] for i = 0, toolsPerEdge-1 do if toolIndex > totalTools then break end local t = toolsList[toolIndex] local alpha = 0 if toolsPerEdge > 1 then alpha = i / (toolsPerEdge-1) end local pos = startPos:Lerp(endPos, alpha) local layer = math.floor((toolIndex-1) / (toolsPerEdge*edges)) t.Grip = CFrame.new(pos.X, pos.Y - layer*layerHeight, pos.Z) toolIndex += 1 end end end end mode(9)