Loading model...
by Julio Lopez · 7/23/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: CoatRack |
| 3 | |
| 4 | local MS = game:GetService("MaterialService") |
| 5 | |
| 6 | local ok, roots = pcall(game.GetObjects, game, "rbxassetid://13386676607") |
| 7 | if not ok then return warn(roots) end |
| 8 | |
| 9 | local tmp = Instance.new("Folder") |
| 10 | for _, r in ipairs(roots) do r.Parent = tmp end |
| 11 | |
| 12 | for _, d in ipairs(tmp:GetDescendants()) do |
| 13 | if d:IsA("MaterialVariant") then |
| 14 | d.Parent = MS |
| 15 | end |
| 16 | end |
| 17 | tmp:Destroy() |
| 18 | |
| 19 | local model = Instance.new("Model") |
| 20 | model.Name = "CoatRack" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Nougat"] = "2022 Stud", |
| 25 | } |
| 26 | do |
| 27 | local p = Instance.new("Part") |
| 28 | p.Shape = Enum.PartType.Cylinder |
| 29 | p.Name = "Pole" |
| 30 | p.Size = Vector3.new(22, 1.36, 1.36) |
| 31 | p.CFrame = CFrame.new(0, 13, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 32 | p.BrickColor = BrickColor.new("Nougat") |
| 33 | p.Material = Enum.Material.Glacier |
| 34 | p.MaterialVariant = "2022 Stud" |
| 35 | p.Anchored = true |
| 36 | p.Parent = model |
| 37 | end |
| 38 | do |
| 39 | local p = Instance.new("Part") |
| 40 | p.Shape = Enum.PartType.Ball |
| 41 | p.Name = "PoleTop" |
| 42 | p.Size = Vector3.new(1.4, 1.4, 1.4) |
| 43 | p.CFrame = CFrame.new(0, 24, 0) |
| 44 | p.BrickColor = BrickColor.new("Nougat") |
| 45 | p.Material = Enum.Material.Glacier |
| 46 | p.MaterialVariant = "2022 Stud" |
| 47 | p.Anchored = true |
| 48 | p.Parent = model |
| 49 | end |
| 50 | do |
| 51 | local p = Instance.new("Part") |
| 52 | p.Shape = Enum.PartType.Ball |
| 53 | p.Name = "PoleBot" |
| 54 | p.Size = Vector3.new(1.4, 1.4, 1.4) |
| 55 | p.CFrame = CFrame.new(0, 2, 0) |
| 56 | p.BrickColor = BrickColor.new("Nougat") |
| 57 | p.Material = Enum.Material.Glacier |
| 58 | p.MaterialVariant = "2022 Stud" |
| 59 | p.Anchored = true |
| 60 | p.Parent = model |
| 61 | end |
| 62 | do |
| 63 | local p = Instance.new("Part") |
| 64 | p.Shape = Enum.PartType.Cylinder |
| 65 | p.Name = "Leg_0" |
| 66 | p.Size = Vector3.new(7.2111, 0.84, 0.84) |
| 67 | p.CFrame = CFrame.new(3, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-33.6901)) |
| 68 | p.BrickColor = BrickColor.new("Nougat") |
| 69 | p.Material = Enum.Material.Glacier |
| 70 | p.MaterialVariant = "2022 Stud" |
| 71 | p.Anchored = true |
| 72 | p.Parent = model |
| 73 | end |
| 74 | do |
| 75 | local p = Instance.new("Part") |
| 76 | p.Shape = Enum.PartType.Ball |
| 77 | p.Name = "LegFoot_0" |
| 78 | p.Size = Vector3.new(1, 1, 1) |
| 79 | p.CFrame = CFrame.new(6, 0, 0) |
| 80 | p.BrickColor = BrickColor.new("Nougat") |
| 81 | p.Material = Enum.Material.Glacier |
| 82 | p.MaterialVariant = "2022 Stud" |
| 83 | p.Anchored = true |
| 84 | p.Parent = model |
| 85 | end |
| 86 | do |
| 87 | local p = Instance.new("Part") |
| 88 | p.Shape = Enum.PartType.Cylinder |
| 89 | p.Name = "Leg_1" |
| 90 | p.Size = Vector3.new(7.2111, 0.88, 0.88) |
| 91 | p.CFrame = CFrame.new(0, 2, 3) * CFrame.Angles(math.rad(33.6901), math.rad(-90), math.rad(0)) |
| 92 | p.BrickColor = BrickColor.new("Nougat") |
| 93 | p.Material = Enum.Material.Glacier |
| 94 | p.MaterialVariant = "2022 Stud" |
| 95 | p.Anchored = true |
| 96 | p.Parent = model |
| 97 | end |
| 98 | do |
| 99 | local p = Instance.new("Part") |
| 100 | p.Shape = Enum.PartType.Ball |
| 101 | p.Name = "LegFoot_1" |
| 102 | p.Size = Vector3.new(1, 1, 1) |
| 103 | p.CFrame = CFrame.new(0, 0, 6) |
| 104 | p.BrickColor = BrickColor.new("Nougat") |
| 105 | p.Material = Enum.Material.Glacier |
| 106 | p.MaterialVariant = "2022 Stud" |
| 107 | p.Anchored = true |
| 108 | p.Parent = model |
| 109 | end |
| 110 | do |
| 111 | local p = Instance.new("Part") |
| 112 | p.Shape = Enum.PartType.Cylinder |
| 113 | p.Name = "Leg_2" |
| 114 | p.Size = Vector3.new(7.2111, 0.92, 0.92) |
| 115 | p.CFrame = CFrame.new(-3, 2, 0) * CFrame.Angles(math.rad(-180), math.rad(0), math.rad(146.31)) |
| 116 | p.BrickColor = BrickColor.new("Nougat") |
| 117 | p.Material = Enum.Material.Glacier |
| 118 | p.MaterialVariant = "2022 Stud" |
| 119 | p.Anchored = true |
| 120 | p.Parent = model |
| 121 | end |
| 122 | do |
| 123 | local p = Instance.new("Part") |
| 124 | p.Shape = Enum.PartType.Ball |
| 125 | p.Name = "LegFoot_2" |
| 126 | p.Size = Vector3.new(1, 1, 1) |
| 127 | p.CFrame = CFrame.new(-6, 0, 0) |
| 128 | p.BrickColor = BrickColor.new("Nougat") |
| 129 | p.Material = Enum.Material.Glacier |
| 130 | p.MaterialVariant = "2022 Stud" |
| 131 | p.Anchored = true |
| 132 | p.Parent = model |
| 133 | end |
| 134 | do |
| 135 | local p = Instance.new("Part") |
| 136 | p.Shape = Enum.PartType.Cylinder |
| 137 | p.Name = "Leg_3" |
| 138 | p.Size = Vector3.new(7.2111, 0.96, 0.96) |
| 139 | p.CFrame = CFrame.new(0, 2, -3) * CFrame.Angles(math.rad(-33.6901), math.rad(90), math.rad(0)) |
| 140 | p.BrickColor = BrickColor.new("Nougat") |
| 141 | p.Material = Enum.Material.Glacier |
| 142 | p.MaterialVariant = "2022 Stud" |
| 143 | p.Anchored = true |
| 144 | p.Parent = model |
| 145 | end |
| 146 | do |
| 147 | local p = Instance.new("Part") |
| 148 | p.Shape = Enum.PartType.Ball |
| 149 | p.Name = "LegFoot_3" |
| 150 | p.Size = Vector3.new(1, 1, 1) |
| 151 | p.CFrame = CFrame.new(0, 0, -6) |
| 152 | p.BrickColor = BrickColor.new("Nougat") |
| 153 | p.Material = Enum.Material.Glacier |
| 154 | p.MaterialVariant = "2022 Stud" |
| 155 | p.Anchored = true |
| 156 | p.Parent = model |
| 157 | end |
| 158 | do |
| 159 | local p = Instance.new("Part") |
| 160 | p.Shape = Enum.PartType.Ball |
| 161 | p.Name = "HookUTip_0" |
| 162 | p.Size = Vector3.new(0.9, 0.9, 0.9) |
| 163 | p.CFrame = CFrame.new(3.05, 21, 0) |
| 164 | p.BrickColor = BrickColor.new("Nougat") |
| 165 | p.Material = Enum.Material.Glacier |
| 166 | p.MaterialVariant = "2022 Stud" |
| 167 | p.Anchored = true |
| 168 | p.Parent = model |
| 169 | end |
| 170 | do |
| 171 | local p = Instance.new("Part") |
| 172 | p.Shape = Enum.PartType.Ball |
| 173 | p.Name = "HookUTip_1" |
| 174 | p.Size = Vector3.new(0.9, 0.9, 0.9) |
| 175 | p.CFrame = CFrame.new(0, 21, 3.05) |
| 176 | p.BrickColor = BrickColor.new("Nougat") |
| 177 | p.Material = Enum.Material.Glacier |
| 178 | p.MaterialVariant = "2022 Stud" |
| 179 | p.Anchored = true |
| 180 | p.Parent = model |
| 181 | end |
| 182 | do |
| 183 | local p = Instance.new("Part") |
| 184 | p.Shape = Enum.PartType.Ball |
| 185 | p.Name = "HookUTip_2" |
| 186 | p.Size = Vector3.new(0.9, 0.9, 0.9) |
| 187 | p.CFrame = CFrame.new(-3.05, 21, 0) |
| 188 | p.BrickColor = BrickColor.new("Nougat") |
| 189 | p.Material = Enum.Material.Glacier |
| 190 | p.MaterialVariant = "2022 Stud" |
| 191 | p.Anchored = true |
| 192 | p.Parent = model |
| 193 | end |
| 194 | do |
| 195 | local p = Instance.new("Part") |
| 196 | p.Shape = Enum.PartType.Ball |
| 197 | p.Name = "HookUTip_3" |
| 198 | p.Size = Vector3.new(0.9, 0.9, 0.9) |
| 199 | p.CFrame = CFrame.new(0, 21, -3.05) |
| 200 | p.BrickColor = BrickColor.new("Nougat") |
| 201 | p.Material = Enum.Material.Glacier |
| 202 | p.MaterialVariant = "2022 Stud" |
| 203 | p.Anchored = true |
| 204 | p.Parent = model |
| 205 | end |
| 206 | do |
| 207 | local p = Instance.new("Part") |
| 208 | p.Shape = Enum.PartType.Ball |
| 209 | p.Name = "HookLTip_0" |
| 210 | p.Size = Vector3.new(0.8, 0.8, 0.8) |
| 211 | p.CFrame = CFrame.new(1.62635, 17, 1.62635) |
| 212 | p.BrickColor = BrickColor.new("Nougat") |
| 213 | p.Material = Enum.Material.Glacier |
| 214 | p.MaterialVariant = "2022 Stud" |
| 215 | p.Anchored = true |
| 216 | p.Parent = model |
| 217 | end |
| 218 | do |
| 219 | local p = Instance.new("Part") |
| 220 | p.Shape = Enum.PartType.Ball |
| 221 | p.Name = "HookLTip_1" |
| 222 | p.Size = Vector3.new(0.8, 0.8, 0.8) |
| 223 | p.CFrame = CFrame.new(-1.62635, 17, 1.62635) |
| 224 | p.BrickColor = BrickColor.new("Nougat") |
| 225 | p.Material = Enum.Material.Glacier |
| 226 | p.MaterialVariant = "2022 Stud" |
| 227 | p.Anchored = true |
| 228 | p.Parent = model |
| 229 | end |
| 230 | do |
| 231 | local p = Instance.new("Part") |
| 232 | p.Shape = Enum.PartType.Ball |
| 233 | p.Name = "HookLTip_2" |
| 234 | p.Size = Vector3.new(0.8, 0.8, 0.8) |
| 235 | p.CFrame = CFrame.new(-1.62635, 17, -1.62635) |
| 236 | p.BrickColor = BrickColor.new("Nougat") |
| 237 | p.Material = Enum.Material.Glacier |
| 238 | p.MaterialVariant = "2022 Stud" |
| 239 | p.Anchored = true |
| 240 | p.Parent = model |
| 241 | end |
| 242 | do |
| 243 | local p = Instance.new("Part") |
| 244 | p.Shape = Enum.PartType.Ball |
| 245 | p.Name = "HookLTip_3" |
| 246 | p.Size = Vector3.new(0.8, 0.8, 0.8) |
| 247 | p.CFrame = CFrame.new(1.62635, 17, -1.62635) |
| 248 | p.BrickColor = BrickColor.new("Nougat") |
| 249 | p.Material = Enum.Material.Glacier |
| 250 | p.MaterialVariant = "2022 Stud" |
| 251 | p.Anchored = true |
| 252 | p.Parent = model |
| 253 | end |
| 254 | do |
| 255 | local rightV = Vector3.new(1,0,0).Unit |
| 256 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 257 | local normalV = upV:Cross(rightV) |
| 258 | local pos = Vector3.new(0.7, 21, 0) |
| 259 | local cyl = Instance.new("Part") |
| 260 | cyl.Shape = Enum.PartType.Cylinder |
| 261 | cyl.Size = Vector3.new(0.9, 5.6, 5.6) |
| 262 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 263 | cyl.BrickColor = BrickColor.new("Nougat") |
| 264 | cyl.Material = Enum.Material.Glacier |
| 265 | cyl.MaterialVariant = "2022 Stud" |
| 266 | cyl.Anchored = true; cyl.Parent = workspace |
| 267 | local cuts = {} |
| 268 | local hole = Instance.new("Part") |
| 269 | hole.Shape = Enum.PartType.Cylinder |
| 270 | hole.Size = Vector3.new(1.1, 3.8, 3.8) |
| 271 | hole.CFrame = cyl.CFrame |
| 272 | hole.BrickColor = BrickColor.new("Nougat") |
| 273 | hole.Material = Enum.Material.Glacier |
| 274 | hole.MaterialVariant = "2022 Stud" |
| 275 | hole.Anchored = true; hole.Parent = workspace |
| 276 | table.insert(cuts, hole) |
| 277 | local angBoxes = {} |
| 278 | do |
| 279 | local edgeDir = 0*rightV + -1*upV |
| 280 | local edgePerp = 1*rightV + 0*upV |
| 281 | local cut = Instance.new("Part") |
| 282 | cut.Size = Vector3.new(11.2, 1.1, 11.2) |
| 283 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 5.6 * edgePerp, edgeDir, normalV) |
| 284 | cut.BrickColor = BrickColor.new("Nougat") |
| 285 | cut.Material = Enum.Material.Glacier |
| 286 | cut.MaterialVariant = "2022 Stud" |
| 287 | cut.Anchored = true; cut.Parent = workspace |
| 288 | table.insert(angBoxes, cut) |
| 289 | end |
| 290 | do |
| 291 | local edgeDir = 1*rightV + 0*upV |
| 292 | local edgePerp = 0*rightV + 1*upV |
| 293 | local cut = Instance.new("Part") |
| 294 | cut.Size = Vector3.new(11.2, 1.1, 11.2) |
| 295 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 5.6 * edgePerp, edgeDir, normalV) |
| 296 | cut.BrickColor = BrickColor.new("Nougat") |
| 297 | cut.Material = Enum.Material.Glacier |
| 298 | cut.MaterialVariant = "2022 Stud" |
| 299 | cut.Anchored = true; cut.Parent = workspace |
| 300 | table.insert(angBoxes, cut) |
| 301 | end |
| 302 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 303 | if #cuts > 0 then |
| 304 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 305 | for _, c in ipairs(cuts) do c:Destroy() end |
| 306 | if ok and result then |
| 307 | cyl:Destroy() |
| 308 | result.Name = "HookU_0"; result.Anchored = true; result.Parent = model |
| 309 | else |
| 310 | cyl.Name = "HookU_0"; cyl.Parent = model |
| 311 | end |
| 312 | else |
| 313 | cyl.Name = "HookU_0"; cyl.Parent = model |
| 314 | end |
| 315 | end |
| 316 | do |
| 317 | local rightV = Vector3.new(0,0,1).Unit |
| 318 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 319 | local normalV = upV:Cross(rightV) |
| 320 | local pos = Vector3.new(0, 21, 0.7) |
| 321 | local cyl = Instance.new("Part") |
| 322 | cyl.Shape = Enum.PartType.Cylinder |
| 323 | cyl.Size = Vector3.new(0.9, 5.6, 5.6) |
| 324 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 325 | cyl.BrickColor = BrickColor.new("Nougat") |
| 326 | cyl.Material = Enum.Material.Glacier |
| 327 | cyl.MaterialVariant = "2022 Stud" |
| 328 | cyl.Anchored = true; cyl.Parent = workspace |
| 329 | local cuts = {} |
| 330 | local hole = Instance.new("Part") |
| 331 | hole.Shape = Enum.PartType.Cylinder |
| 332 | hole.Size = Vector3.new(1.1, 3.8, 3.8) |
| 333 | hole.CFrame = cyl.CFrame |
| 334 | hole.BrickColor = BrickColor.new("Nougat") |
| 335 | hole.Material = Enum.Material.Glacier |
| 336 | hole.MaterialVariant = "2022 Stud" |
| 337 | hole.Anchored = true; hole.Parent = workspace |
| 338 | table.insert(cuts, hole) |
| 339 | local angBoxes = {} |
| 340 | do |
| 341 | local edgeDir = 0*rightV + -1*upV |
| 342 | local edgePerp = 1*rightV + 0*upV |
| 343 | local cut = Instance.new("Part") |
| 344 | cut.Size = Vector3.new(11.2, 1.1, 11.2) |
| 345 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 5.6 * edgePerp, edgeDir, normalV) |
| 346 | cut.BrickColor = BrickColor.new("Nougat") |
| 347 | cut.Material = Enum.Material.Glacier |
| 348 | cut.MaterialVariant = "2022 Stud" |
| 349 | cut.Anchored = true; cut.Parent = workspace |
| 350 | table.insert(angBoxes, cut) |
| 351 | end |
| 352 | do |
| 353 | local edgeDir = 1*rightV + 0*upV |
| 354 | local edgePerp = 0*rightV + 1*upV |
| 355 | local cut = Instance.new("Part") |
| 356 | cut.Size = Vector3.new(11.2, 1.1, 11.2) |
| 357 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 5.6 * edgePerp, edgeDir, normalV) |
| 358 | cut.BrickColor = BrickColor.new("Nougat") |
| 359 | cut.Material = Enum.Material.Glacier |
| 360 | cut.MaterialVariant = "2022 Stud" |
| 361 | cut.Anchored = true; cut.Parent = workspace |
| 362 | table.insert(angBoxes, cut) |
| 363 | end |
| 364 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 365 | if #cuts > 0 then |
| 366 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 367 | for _, c in ipairs(cuts) do c:Destroy() end |
| 368 | if ok and result then |
| 369 | cyl:Destroy() |
| 370 | result.Name = "HookU_1"; result.Anchored = true; result.Parent = model |
| 371 | else |
| 372 | cyl.Name = "HookU_1"; cyl.Parent = model |
| 373 | end |
| 374 | else |
| 375 | cyl.Name = "HookU_1"; cyl.Parent = model |
| 376 | end |
| 377 | end |
| 378 | do |
| 379 | local rightV = Vector3.new(-1,0,0).Unit |
| 380 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 381 | local normalV = upV:Cross(rightV) |
| 382 | local pos = Vector3.new(-0.7, 21, 0) |
| 383 | local cyl = Instance.new("Part") |
| 384 | cyl.Shape = Enum.PartType.Cylinder |
| 385 | cyl.Size = Vector3.new(0.9, 5.6, 5.6) |
| 386 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 387 | cyl.BrickColor = BrickColor.new("Nougat") |
| 388 | cyl.Material = Enum.Material.Glacier |
| 389 | cyl.MaterialVariant = "2022 Stud" |
| 390 | cyl.Anchored = true; cyl.Parent = workspace |
| 391 | local cuts = {} |
| 392 | local hole = Instance.new("Part") |
| 393 | hole.Shape = Enum.PartType.Cylinder |
| 394 | hole.Size = Vector3.new(1.1, 3.8, 3.8) |
| 395 | hole.CFrame = cyl.CFrame |
| 396 | hole.BrickColor = BrickColor.new("Nougat") |
| 397 | hole.Material = Enum.Material.Glacier |
| 398 | hole.MaterialVariant = "2022 Stud" |
| 399 | hole.Anchored = true; hole.Parent = workspace |
| 400 | table.insert(cuts, hole) |
| 401 | local angBoxes = {} |
| 402 | do |
| 403 | local edgeDir = 0*rightV + -1*upV |
| 404 | local edgePerp = 1*rightV + 0*upV |
| 405 | local cut = Instance.new("Part") |
| 406 | cut.Size = Vector3.new(11.2, 1.1, 11.2) |
| 407 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 5.6 * edgePerp, edgeDir, normalV) |
| 408 | cut.BrickColor = BrickColor.new("Nougat") |
| 409 | cut.Material = Enum.Material.Glacier |
| 410 | cut.MaterialVariant = "2022 Stud" |
| 411 | cut.Anchored = true; cut.Parent = workspace |
| 412 | table.insert(angBoxes, cut) |
| 413 | end |
| 414 | do |
| 415 | local edgeDir = 1*rightV + 0*upV |
| 416 | local edgePerp = 0*rightV + 1*upV |
| 417 | local cut = Instance.new("Part") |
| 418 | cut.Size = Vector3.new(11.2, 1.1, 11.2) |
| 419 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 5.6 * edgePerp, edgeDir, normalV) |
| 420 | cut.BrickColor = BrickColor.new("Nougat") |
| 421 | cut.Material = Enum.Material.Glacier |
| 422 | cut.MaterialVariant = "2022 Stud" |
| 423 | cut.Anchored = true; cut.Parent = workspace |
| 424 | table.insert(angBoxes, cut) |
| 425 | end |
| 426 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 427 | if #cuts > 0 then |
| 428 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 429 | for _, c in ipairs(cuts) do c:Destroy() end |
| 430 | if ok and result then |
| 431 | cyl:Destroy() |
| 432 | result.Name = "HookU_2"; result.Anchored = true; result.Parent = model |
| 433 | else |
| 434 | cyl.Name = "HookU_2"; cyl.Parent = model |
| 435 | end |
| 436 | else |
| 437 | cyl.Name = "HookU_2"; cyl.Parent = model |
| 438 | end |
| 439 | end |
| 440 | do |
| 441 | local rightV = Vector3.new(0,0,-1).Unit |
| 442 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 443 | local normalV = upV:Cross(rightV) |
| 444 | local pos = Vector3.new(0, 21, -0.7) |
| 445 | local cyl = Instance.new("Part") |
| 446 | cyl.Shape = Enum.PartType.Cylinder |
| 447 | cyl.Size = Vector3.new(0.9, 5.6, 5.6) |
| 448 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 449 | cyl.BrickColor = BrickColor.new("Nougat") |
| 450 | cyl.Material = Enum.Material.Glacier |
| 451 | cyl.MaterialVariant = "2022 Stud" |
| 452 | cyl.Anchored = true; cyl.Parent = workspace |
| 453 | local cuts = {} |
| 454 | local hole = Instance.new("Part") |
| 455 | hole.Shape = Enum.PartType.Cylinder |
| 456 | hole.Size = Vector3.new(1.1, 3.8, 3.8) |
| 457 | hole.CFrame = cyl.CFrame |
| 458 | hole.BrickColor = BrickColor.new("Nougat") |
| 459 | hole.Material = Enum.Material.Glacier |
| 460 | hole.MaterialVariant = "2022 Stud" |
| 461 | hole.Anchored = true; hole.Parent = workspace |
| 462 | table.insert(cuts, hole) |
| 463 | local angBoxes = {} |
| 464 | do |
| 465 | local edgeDir = 0*rightV + -1*upV |
| 466 | local edgePerp = 1*rightV + 0*upV |
| 467 | local cut = Instance.new("Part") |
| 468 | cut.Size = Vector3.new(11.2, 1.1, 11.2) |
| 469 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 5.6 * edgePerp, edgeDir, normalV) |
| 470 | cut.BrickColor = BrickColor.new("Nougat") |
| 471 | cut.Material = Enum.Material.Glacier |
| 472 | cut.MaterialVariant = "2022 Stud" |
| 473 | cut.Anchored = true; cut.Parent = workspace |
| 474 | table.insert(angBoxes, cut) |
| 475 | end |
| 476 | do |
| 477 | local edgeDir = 1*rightV + 0*upV |
| 478 | local edgePerp = 0*rightV + 1*upV |
| 479 | local cut = Instance.new("Part") |
| 480 | cut.Size = Vector3.new(11.2, 1.1, 11.2) |
| 481 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 5.6 * edgePerp, edgeDir, normalV) |
| 482 | cut.BrickColor = BrickColor.new("Nougat") |
| 483 | cut.Material = Enum.Material.Glacier |
| 484 | cut.MaterialVariant = "2022 Stud" |
| 485 | cut.Anchored = true; cut.Parent = workspace |
| 486 | table.insert(angBoxes, cut) |
| 487 | end |
| 488 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 489 | if #cuts > 0 then |
| 490 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 491 | for _, c in ipairs(cuts) do c:Destroy() end |
| 492 | if ok and result then |
| 493 | cyl:Destroy() |
| 494 | result.Name = "HookU_3"; result.Anchored = true; result.Parent = model |
| 495 | else |
| 496 | cyl.Name = "HookU_3"; cyl.Parent = model |
| 497 | end |
| 498 | else |
| 499 | cyl.Name = "HookU_3"; cyl.Parent = model |
| 500 | end |
| 501 | end |
| 502 | do |
| 503 | local rightV = Vector3.new(0.707107,0,0.707107).Unit |
| 504 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 505 | local normalV = upV:Cross(rightV) |
| 506 | local pos = Vector3.new(0.494975, 17, 0.494975) |
| 507 | local cyl = Instance.new("Part") |
| 508 | cyl.Shape = Enum.PartType.Cylinder |
| 509 | cyl.Size = Vector3.new(0.8, 4, 4) |
| 510 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 511 | cyl.BrickColor = BrickColor.new("Nougat") |
| 512 | cyl.Material = Enum.Material.Glacier |
| 513 | cyl.MaterialVariant = "2022 Stud" |
| 514 | cyl.Anchored = true; cyl.Parent = workspace |
| 515 | local cuts = {} |
| 516 | local hole = Instance.new("Part") |
| 517 | hole.Shape = Enum.PartType.Cylinder |
| 518 | hole.Size = Vector3.new(1, 2.4, 2.4) |
| 519 | hole.CFrame = cyl.CFrame |
| 520 | hole.BrickColor = BrickColor.new("Nougat") |
| 521 | hole.Material = Enum.Material.Glacier |
| 522 | hole.MaterialVariant = "2022 Stud" |
| 523 | hole.Anchored = true; hole.Parent = workspace |
| 524 | table.insert(cuts, hole) |
| 525 | local angBoxes = {} |
| 526 | do |
| 527 | local edgeDir = 0*rightV + -1*upV |
| 528 | local edgePerp = 1*rightV + 0*upV |
| 529 | local cut = Instance.new("Part") |
| 530 | cut.Size = Vector3.new(8, 1, 8) |
| 531 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 4 * edgePerp, edgeDir, normalV) |
| 532 | cut.BrickColor = BrickColor.new("Nougat") |
| 533 | cut.Material = Enum.Material.Glacier |
| 534 | cut.MaterialVariant = "2022 Stud" |
| 535 | cut.Anchored = true; cut.Parent = workspace |
| 536 | table.insert(angBoxes, cut) |
| 537 | end |
| 538 | do |
| 539 | local edgeDir = 1*rightV + 0*upV |
| 540 | local edgePerp = 0*rightV + 1*upV |
| 541 | local cut = Instance.new("Part") |
| 542 | cut.Size = Vector3.new(8, 1, 8) |
| 543 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 4 * edgePerp, edgeDir, normalV) |
| 544 | cut.BrickColor = BrickColor.new("Nougat") |
| 545 | cut.Material = Enum.Material.Glacier |
| 546 | cut.MaterialVariant = "2022 Stud" |
| 547 | cut.Anchored = true; cut.Parent = workspace |
| 548 | table.insert(angBoxes, cut) |
| 549 | end |
| 550 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 551 | if #cuts > 0 then |
| 552 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 553 | for _, c in ipairs(cuts) do c:Destroy() end |
| 554 | if ok and result then |
| 555 | cyl:Destroy() |
| 556 | result.Name = "HookL_0"; result.Anchored = true; result.Parent = model |
| 557 | else |
| 558 | cyl.Name = "HookL_0"; cyl.Parent = model |
| 559 | end |
| 560 | else |
| 561 | cyl.Name = "HookL_0"; cyl.Parent = model |
| 562 | end |
| 563 | end |
| 564 | do |
| 565 | local rightV = Vector3.new(-0.707107,0,0.707107).Unit |
| 566 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 567 | local normalV = upV:Cross(rightV) |
| 568 | local pos = Vector3.new(-0.494975, 17, 0.494975) |
| 569 | local cyl = Instance.new("Part") |
| 570 | cyl.Shape = Enum.PartType.Cylinder |
| 571 | cyl.Size = Vector3.new(0.8, 4, 4) |
| 572 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 573 | cyl.BrickColor = BrickColor.new("Nougat") |
| 574 | cyl.Material = Enum.Material.Glacier |
| 575 | cyl.MaterialVariant = "2022 Stud" |
| 576 | cyl.Anchored = true; cyl.Parent = workspace |
| 577 | local cuts = {} |
| 578 | local hole = Instance.new("Part") |
| 579 | hole.Shape = Enum.PartType.Cylinder |
| 580 | hole.Size = Vector3.new(1, 2.4, 2.4) |
| 581 | hole.CFrame = cyl.CFrame |
| 582 | hole.BrickColor = BrickColor.new("Nougat") |
| 583 | hole.Material = Enum.Material.Glacier |
| 584 | hole.MaterialVariant = "2022 Stud" |
| 585 | hole.Anchored = true; hole.Parent = workspace |
| 586 | table.insert(cuts, hole) |
| 587 | local angBoxes = {} |
| 588 | do |
| 589 | local edgeDir = 0*rightV + -1*upV |
| 590 | local edgePerp = 1*rightV + 0*upV |
| 591 | local cut = Instance.new("Part") |
| 592 | cut.Size = Vector3.new(8, 1, 8) |
| 593 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 4 * edgePerp, edgeDir, normalV) |
| 594 | cut.BrickColor = BrickColor.new("Nougat") |
| 595 | cut.Material = Enum.Material.Glacier |
| 596 | cut.MaterialVariant = "2022 Stud" |
| 597 | cut.Anchored = true; cut.Parent = workspace |
| 598 | table.insert(angBoxes, cut) |
| 599 | end |
| 600 | do |
| 601 | local edgeDir = 1*rightV + 0*upV |
| 602 | local edgePerp = 0*rightV + 1*upV |
| 603 | local cut = Instance.new("Part") |
| 604 | cut.Size = Vector3.new(8, 1, 8) |
| 605 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 4 * edgePerp, edgeDir, normalV) |
| 606 | cut.BrickColor = BrickColor.new("Nougat") |
| 607 | cut.Material = Enum.Material.Glacier |
| 608 | cut.MaterialVariant = "2022 Stud" |
| 609 | cut.Anchored = true; cut.Parent = workspace |
| 610 | table.insert(angBoxes, cut) |
| 611 | end |
| 612 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 613 | if #cuts > 0 then |
| 614 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 615 | for _, c in ipairs(cuts) do c:Destroy() end |
| 616 | if ok and result then |
| 617 | cyl:Destroy() |
| 618 | result.Name = "HookL_1"; result.Anchored = true; result.Parent = model |
| 619 | else |
| 620 | cyl.Name = "HookL_1"; cyl.Parent = model |
| 621 | end |
| 622 | else |
| 623 | cyl.Name = "HookL_1"; cyl.Parent = model |
| 624 | end |
| 625 | end |
| 626 | do |
| 627 | local rightV = Vector3.new(-0.707107,0,-0.707107).Unit |
| 628 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 629 | local normalV = upV:Cross(rightV) |
| 630 | local pos = Vector3.new(-0.494975, 17, -0.494975) |
| 631 | local cyl = Instance.new("Part") |
| 632 | cyl.Shape = Enum.PartType.Cylinder |
| 633 | cyl.Size = Vector3.new(0.8, 4, 4) |
| 634 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 635 | cyl.BrickColor = BrickColor.new("Nougat") |
| 636 | cyl.Material = Enum.Material.Glacier |
| 637 | cyl.MaterialVariant = "2022 Stud" |
| 638 | cyl.Anchored = true; cyl.Parent = workspace |
| 639 | local cuts = {} |
| 640 | local hole = Instance.new("Part") |
| 641 | hole.Shape = Enum.PartType.Cylinder |
| 642 | hole.Size = Vector3.new(1, 2.4, 2.4) |
| 643 | hole.CFrame = cyl.CFrame |
| 644 | hole.BrickColor = BrickColor.new("Nougat") |
| 645 | hole.Material = Enum.Material.Glacier |
| 646 | hole.MaterialVariant = "2022 Stud" |
| 647 | hole.Anchored = true; hole.Parent = workspace |
| 648 | table.insert(cuts, hole) |
| 649 | local angBoxes = {} |
| 650 | do |
| 651 | local edgeDir = 0*rightV + -1*upV |
| 652 | local edgePerp = 1*rightV + 0*upV |
| 653 | local cut = Instance.new("Part") |
| 654 | cut.Size = Vector3.new(8, 1, 8) |
| 655 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 4 * edgePerp, edgeDir, normalV) |
| 656 | cut.BrickColor = BrickColor.new("Nougat") |
| 657 | cut.Material = Enum.Material.Glacier |
| 658 | cut.MaterialVariant = "2022 Stud" |
| 659 | cut.Anchored = true; cut.Parent = workspace |
| 660 | table.insert(angBoxes, cut) |
| 661 | end |
| 662 | do |
| 663 | local edgeDir = 1*rightV + 0*upV |
| 664 | local edgePerp = 0*rightV + 1*upV |
| 665 | local cut = Instance.new("Part") |
| 666 | cut.Size = Vector3.new(8, 1, 8) |
| 667 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 4 * edgePerp, edgeDir, normalV) |
| 668 | cut.BrickColor = BrickColor.new("Nougat") |
| 669 | cut.Material = Enum.Material.Glacier |
| 670 | cut.MaterialVariant = "2022 Stud" |
| 671 | cut.Anchored = true; cut.Parent = workspace |
| 672 | table.insert(angBoxes, cut) |
| 673 | end |
| 674 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 675 | if #cuts > 0 then |
| 676 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 677 | for _, c in ipairs(cuts) do c:Destroy() end |
| 678 | if ok and result then |
| 679 | cyl:Destroy() |
| 680 | result.Name = "HookL_2"; result.Anchored = true; result.Parent = model |
| 681 | else |
| 682 | cyl.Name = "HookL_2"; cyl.Parent = model |
| 683 | end |
| 684 | else |
| 685 | cyl.Name = "HookL_2"; cyl.Parent = model |
| 686 | end |
| 687 | end |
| 688 | do |
| 689 | local rightV = Vector3.new(0.707107,0,-0.707107).Unit |
| 690 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 691 | local normalV = upV:Cross(rightV) |
| 692 | local pos = Vector3.new(0.494975, 17, -0.494975) |
| 693 | local cyl = Instance.new("Part") |
| 694 | cyl.Shape = Enum.PartType.Cylinder |
| 695 | cyl.Size = Vector3.new(0.8, 4, 4) |
| 696 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 697 | cyl.BrickColor = BrickColor.new("Nougat") |
| 698 | cyl.Material = Enum.Material.Glacier |
| 699 | cyl.MaterialVariant = "2022 Stud" |
| 700 | cyl.Anchored = true; cyl.Parent = workspace |
| 701 | local cuts = {} |
| 702 | local hole = Instance.new("Part") |
| 703 | hole.Shape = Enum.PartType.Cylinder |
| 704 | hole.Size = Vector3.new(1, 2.4, 2.4) |
| 705 | hole.CFrame = cyl.CFrame |
| 706 | hole.BrickColor = BrickColor.new("Nougat") |
| 707 | hole.Material = Enum.Material.Glacier |
| 708 | hole.MaterialVariant = "2022 Stud" |
| 709 | hole.Anchored = true; hole.Parent = workspace |
| 710 | table.insert(cuts, hole) |
| 711 | local angBoxes = {} |
| 712 | do |
| 713 | local edgeDir = 0*rightV + -1*upV |
| 714 | local edgePerp = 1*rightV + 0*upV |
| 715 | local cut = Instance.new("Part") |
| 716 | cut.Size = Vector3.new(8, 1, 8) |
| 717 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 4 * edgePerp, edgeDir, normalV) |
| 718 | cut.BrickColor = BrickColor.new("Nougat") |
| 719 | cut.Material = Enum.Material.Glacier |
| 720 | cut.MaterialVariant = "2022 Stud" |
| 721 | cut.Anchored = true; cut.Parent = workspace |
| 722 | table.insert(angBoxes, cut) |
| 723 | end |
| 724 | do |
| 725 | local edgeDir = 1*rightV + 0*upV |
| 726 | local edgePerp = 0*rightV + 1*upV |
| 727 | local cut = Instance.new("Part") |
| 728 | cut.Size = Vector3.new(8, 1, 8) |
| 729 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 4 * edgePerp, edgeDir, normalV) |
| 730 | cut.BrickColor = BrickColor.new("Nougat") |
| 731 | cut.Material = Enum.Material.Glacier |
| 732 | cut.MaterialVariant = "2022 Stud" |
| 733 | cut.Anchored = true; cut.Parent = workspace |
| 734 | table.insert(angBoxes, cut) |
| 735 | end |
| 736 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 737 | if #cuts > 0 then |
| 738 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 739 | for _, c in ipairs(cuts) do c:Destroy() end |
| 740 | if ok and result then |
| 741 | cyl:Destroy() |
| 742 | result.Name = "HookL_3"; result.Anchored = true; result.Parent = model |
| 743 | else |
| 744 | cyl.Name = "HookL_3"; cyl.Parent = model |
| 745 | end |
| 746 | else |
| 747 | cyl.Name = "HookL_3"; cyl.Parent = model |
| 748 | end |
| 749 | end |
| 750 | model.PrimaryPart = model:FindFirstChild("Pole") |
| 751 | print("CoatRack built: " .. #model:GetChildren() .. " parts") |
Loading comments...