Loading model...
by Simba Zhang · 11/23/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: TerracottaWarrior |
| 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 = "TerracottaWarrior" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Dark nougat"] = "2022 Stud", |
| 25 | ["Dark taupe"] = "2022 Stud", |
| 26 | ["Institutional white"] = "2022 Stud", |
| 27 | ["Really black"] = "2022 Universal", |
| 28 | ["Reddish brown"] = "2022 Small Stud", |
| 29 | } |
| 30 | do |
| 31 | local p = Instance.new("Part") |
| 32 | p.Name = "FootL" |
| 33 | p.Size = Vector3.new(1.2, 0.8, 1.5) |
| 34 | p.CFrame = CFrame.new(0.8, 0.4, 0) |
| 35 | p.BrickColor = BrickColor.new("Reddish brown") |
| 36 | p.Material = Enum.Material.Glacier |
| 37 | p.MaterialVariant = "2022 Small Stud" |
| 38 | p.Anchored = true |
| 39 | p.Parent = model |
| 40 | end |
| 41 | do |
| 42 | local p = Instance.new("Part") |
| 43 | p.Name = "FootR" |
| 44 | p.Size = Vector3.new(1.2, 0.8, 1.5) |
| 45 | p.CFrame = CFrame.new(-0.8, 0.4, 0) |
| 46 | p.BrickColor = BrickColor.new("Reddish brown") |
| 47 | p.Material = Enum.Material.Glacier |
| 48 | p.MaterialVariant = "2022 Small Stud" |
| 49 | p.Anchored = true |
| 50 | p.Parent = model |
| 51 | end |
| 52 | do |
| 53 | local p = Instance.new("Part") |
| 54 | p.Name = "LegL" |
| 55 | p.Size = Vector3.new(1.4, 1.5, 1.4) |
| 56 | p.CFrame = CFrame.new(0.8, 1.5, 0) |
| 57 | p.BrickColor = BrickColor.new("Reddish brown") |
| 58 | p.Material = Enum.Material.Glacier |
| 59 | p.MaterialVariant = "2022 Small Stud" |
| 60 | p.Anchored = true |
| 61 | p.Parent = model |
| 62 | end |
| 63 | do |
| 64 | local p = Instance.new("Part") |
| 65 | p.Name = "LegR" |
| 66 | p.Size = Vector3.new(1.4, 1.5, 1.4) |
| 67 | p.CFrame = CFrame.new(-0.8, 1.5, 0) |
| 68 | p.BrickColor = BrickColor.new("Reddish brown") |
| 69 | p.Material = Enum.Material.Glacier |
| 70 | p.MaterialVariant = "2022 Small Stud" |
| 71 | p.Anchored = true |
| 72 | p.Parent = model |
| 73 | end |
| 74 | do |
| 75 | local p = Instance.new("Part") |
| 76 | p.Name = "SkirtBase" |
| 77 | p.Size = Vector3.new(4.5, 2.5, 3.5) |
| 78 | p.CFrame = CFrame.new(0, 3.5, 0) |
| 79 | p.BrickColor = BrickColor.new("Reddish brown") |
| 80 | p.Material = Enum.Material.Glacier |
| 81 | p.MaterialVariant = "2022 Small Stud" |
| 82 | p.Anchored = true |
| 83 | p.Parent = model |
| 84 | end |
| 85 | do |
| 86 | local p = Instance.new("Part") |
| 87 | p.Name = "SkirtTop" |
| 88 | p.Size = Vector3.new(4, 1, 3) |
| 89 | p.CFrame = CFrame.new(0, 5, 0) |
| 90 | p.BrickColor = BrickColor.new("Reddish brown") |
| 91 | p.Material = Enum.Material.Glacier |
| 92 | p.MaterialVariant = "2022 Small Stud" |
| 93 | p.Anchored = true |
| 94 | p.Parent = model |
| 95 | end |
| 96 | do |
| 97 | local p = Instance.new("Part") |
| 98 | p.Name = "SkirtFlap" |
| 99 | p.Size = Vector3.new(2.5, 2, 0.2) |
| 100 | p.CFrame = CFrame.new(0, 3.5, -1.8) |
| 101 | p.BrickColor = BrickColor.new("Dark nougat") |
| 102 | p.Material = Enum.Material.Glacier |
| 103 | p.MaterialVariant = "2022 Stud" |
| 104 | p.Anchored = true |
| 105 | p.Parent = model |
| 106 | end |
| 107 | do |
| 108 | local p = Instance.new("Part") |
| 109 | p.Name = "Torso" |
| 110 | p.Size = Vector3.new(4.2, 3.5, 3.2) |
| 111 | p.CFrame = CFrame.new(0, 7, 0) |
| 112 | p.BrickColor = BrickColor.new("Reddish brown") |
| 113 | p.Material = Enum.Material.Glacier |
| 114 | p.MaterialVariant = "2022 Small Stud" |
| 115 | p.Anchored = true |
| 116 | p.Parent = model |
| 117 | end |
| 118 | do |
| 119 | local p = Instance.new("Part") |
| 120 | p.Name = "ChestArmor" |
| 121 | p.Size = Vector3.new(3.5, 2.5, 0.5) |
| 122 | p.CFrame = CFrame.new(0, 7.2, -1.5) |
| 123 | p.BrickColor = BrickColor.new("Dark nougat") |
| 124 | p.Material = Enum.Material.Glacier |
| 125 | p.MaterialVariant = "2022 Weld" |
| 126 | p.Anchored = true |
| 127 | p.Parent = model |
| 128 | end |
| 129 | do |
| 130 | local p = Instance.new("Part") |
| 131 | p.Name = "Belt" |
| 132 | p.Size = Vector3.new(4.4, 0.6, 3.4) |
| 133 | p.CFrame = CFrame.new(0, 5.8, 0) |
| 134 | p.BrickColor = BrickColor.new("Dark taupe") |
| 135 | p.Material = Enum.Material.Glacier |
| 136 | p.MaterialVariant = "2022 Stud" |
| 137 | p.Anchored = true |
| 138 | p.Parent = model |
| 139 | end |
| 140 | do |
| 141 | local p = Instance.new("Part") |
| 142 | p.Name = "ArmUpperL" |
| 143 | p.Size = Vector3.new(1.870829, 1.2, 1.2) |
| 144 | p.CFrame = CFrame.new(2.5, 7.25, 0.25) * CFrame.Angles(math.rad(0), math.rad(-26.565051), math.rad(-53.300775)) |
| 145 | p.BrickColor = BrickColor.new("Reddish brown") |
| 146 | p.Material = Enum.Material.Glacier |
| 147 | p.MaterialVariant = "2022 Small Stud" |
| 148 | p.Anchored = true |
| 149 | p.Parent = model |
| 150 | end |
| 151 | do |
| 152 | local p = Instance.new("Part") |
| 153 | p.Name = "ArmUpperR" |
| 154 | p.Size = Vector3.new(1.870829, 1.2, 1.2) |
| 155 | p.CFrame = CFrame.new(-2.5, 7.25, 0.25) * CFrame.Angles(math.rad(-180), math.rad(-26.565051), math.rad(126.699225)) |
| 156 | p.BrickColor = BrickColor.new("Reddish brown") |
| 157 | p.Material = Enum.Material.Glacier |
| 158 | p.MaterialVariant = "2022 Small Stud" |
| 159 | p.Anchored = true |
| 160 | p.Parent = model |
| 161 | end |
| 162 | do |
| 163 | local p = Instance.new("Part") |
| 164 | p.Name = "ArmLowerL" |
| 165 | p.Size = Vector3.new(3.014963, 1, 1) |
| 166 | p.CFrame = CFrame.new(1.9, 6.25, -0.5) * CFrame.Angles(math.rad(-180), math.rad(42.273689), math.rad(170.453992)) |
| 167 | p.BrickColor = BrickColor.new("Reddish brown") |
| 168 | p.Material = Enum.Material.Glacier |
| 169 | p.MaterialVariant = "2022 Small Stud" |
| 170 | p.Anchored = true |
| 171 | p.Parent = model |
| 172 | end |
| 173 | do |
| 174 | local p = Instance.new("Part") |
| 175 | p.Name = "ArmLowerR" |
| 176 | p.Size = Vector3.new(3.014963, 1, 1) |
| 177 | p.CFrame = CFrame.new(-1.9, 6.25, -0.5) * CFrame.Angles(math.rad(0), math.rad(42.273689), math.rad(-9.546008)) |
| 178 | p.BrickColor = BrickColor.new("Reddish brown") |
| 179 | p.Material = Enum.Material.Glacier |
| 180 | p.MaterialVariant = "2022 Small Stud" |
| 181 | p.Anchored = true |
| 182 | p.Parent = model |
| 183 | end |
| 184 | do |
| 185 | local p = Instance.new("Part") |
| 186 | p.Shape = Enum.PartType.Ball |
| 187 | p.Name = "HandL" |
| 188 | p.Size = Vector3.new(0.8, 0.8, 0.8) |
| 189 | p.CFrame = CFrame.new(0.4, 6, -1.6) |
| 190 | p.BrickColor = BrickColor.new("Reddish brown") |
| 191 | p.Material = Enum.Material.Glacier |
| 192 | p.MaterialVariant = "2022 Small Stud" |
| 193 | p.Anchored = true |
| 194 | p.Parent = model |
| 195 | end |
| 196 | do |
| 197 | local p = Instance.new("Part") |
| 198 | p.Shape = Enum.PartType.Ball |
| 199 | p.Name = "HandR" |
| 200 | p.Size = Vector3.new(0.8, 0.8, 0.8) |
| 201 | p.CFrame = CFrame.new(-0.4, 6, -1.6) |
| 202 | p.BrickColor = BrickColor.new("Reddish brown") |
| 203 | p.Material = Enum.Material.Glacier |
| 204 | p.MaterialVariant = "2022 Small Stud" |
| 205 | p.Anchored = true |
| 206 | p.Parent = model |
| 207 | end |
| 208 | do |
| 209 | local p = Instance.new("Part") |
| 210 | p.Shape = Enum.PartType.Cylinder |
| 211 | p.Name = "Neck" |
| 212 | p.Size = Vector3.new(0.6, 1.5, 1.5) |
| 213 | p.CFrame = CFrame.new(0, 8.8, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 214 | p.BrickColor = BrickColor.new("Reddish brown") |
| 215 | p.Material = Enum.Material.Glacier |
| 216 | p.MaterialVariant = "2022 Small Stud" |
| 217 | p.Anchored = true |
| 218 | p.Parent = model |
| 219 | end |
| 220 | do |
| 221 | local p = Instance.new("Part") |
| 222 | p.Name = "Head" |
| 223 | p.Size = Vector3.new(3.2, 3, 3) |
| 224 | p.CFrame = CFrame.new(0, 10.5, 0) |
| 225 | p.BrickColor = BrickColor.new("Reddish brown") |
| 226 | p.Material = Enum.Material.Glacier |
| 227 | p.MaterialVariant = "2022 Small Stud" |
| 228 | p.Anchored = true |
| 229 | p.Parent = model |
| 230 | end |
| 231 | do |
| 232 | local p = Instance.new("Part") |
| 233 | p.Name = "CheekL" |
| 234 | p.Size = Vector3.new(0.4, 2.2, 2.2) |
| 235 | p.CFrame = CFrame.new(1.6, 10.5, 0) |
| 236 | p.BrickColor = BrickColor.new("Reddish brown") |
| 237 | p.Material = Enum.Material.Glacier |
| 238 | p.MaterialVariant = "2022 Small Stud" |
| 239 | p.Anchored = true |
| 240 | p.Parent = model |
| 241 | end |
| 242 | do |
| 243 | local p = Instance.new("Part") |
| 244 | p.Name = "CheekR" |
| 245 | p.Size = Vector3.new(0.4, 2.2, 2.2) |
| 246 | p.CFrame = CFrame.new(-1.6, 10.5, 0) |
| 247 | p.BrickColor = BrickColor.new("Reddish brown") |
| 248 | p.Material = Enum.Material.Glacier |
| 249 | p.MaterialVariant = "2022 Small Stud" |
| 250 | p.Anchored = true |
| 251 | p.Parent = model |
| 252 | end |
| 253 | do |
| 254 | local p = Instance.new("Part") |
| 255 | p.Name = "EarL" |
| 256 | p.Size = Vector3.new(0.3, 0.8, 0.6) |
| 257 | p.CFrame = CFrame.new(1.8, 10.5, 0) |
| 258 | p.BrickColor = BrickColor.new("Reddish brown") |
| 259 | p.Material = Enum.Material.Glacier |
| 260 | p.MaterialVariant = "2022 Small Stud" |
| 261 | p.Anchored = true |
| 262 | p.Parent = model |
| 263 | end |
| 264 | do |
| 265 | local p = Instance.new("Part") |
| 266 | p.Name = "EarR" |
| 267 | p.Size = Vector3.new(0.3, 0.8, 0.6) |
| 268 | p.CFrame = CFrame.new(-1.8, 10.5, 0) |
| 269 | p.BrickColor = BrickColor.new("Reddish brown") |
| 270 | p.Material = Enum.Material.Glacier |
| 271 | p.MaterialVariant = "2022 Small Stud" |
| 272 | p.Anchored = true |
| 273 | p.Parent = model |
| 274 | end |
| 275 | do |
| 276 | local p = Instance.new("Part") |
| 277 | p.Shape = Enum.PartType.Cylinder |
| 278 | p.Name = "EyeL" |
| 279 | p.Size = Vector3.new(0.2, 0.6, 0.6) |
| 280 | p.CFrame = CFrame.new(0.7, 10.8, -1.5) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 281 | p.BrickColor = BrickColor.new("Institutional white") |
| 282 | p.Material = Enum.Material.Glacier |
| 283 | p.MaterialVariant = "2022 Stud" |
| 284 | p.Anchored = true |
| 285 | p.Parent = model |
| 286 | end |
| 287 | do |
| 288 | local p = Instance.new("Part") |
| 289 | p.Shape = Enum.PartType.Cylinder |
| 290 | p.Name = "PupilL" |
| 291 | p.Size = Vector3.new(0.1, 0.3, 0.3) |
| 292 | p.CFrame = CFrame.new(0.7, 10.8, -1.6) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 293 | p.BrickColor = BrickColor.new("Really black") |
| 294 | p.Material = Enum.Material.Glacier |
| 295 | p.MaterialVariant = "2022 Universal" |
| 296 | p.Anchored = true |
| 297 | p.Parent = model |
| 298 | end |
| 299 | do |
| 300 | local p = Instance.new("Part") |
| 301 | p.Shape = Enum.PartType.Cylinder |
| 302 | p.Name = "EyeR" |
| 303 | p.Size = Vector3.new(0.2, 0.6, 0.6) |
| 304 | p.CFrame = CFrame.new(-0.7, 10.8, -1.5) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 305 | p.BrickColor = BrickColor.new("Institutional white") |
| 306 | p.Material = Enum.Material.Glacier |
| 307 | p.MaterialVariant = "2022 Stud" |
| 308 | p.Anchored = true |
| 309 | p.Parent = model |
| 310 | end |
| 311 | do |
| 312 | local p = Instance.new("Part") |
| 313 | p.Shape = Enum.PartType.Cylinder |
| 314 | p.Name = "PupilR" |
| 315 | p.Size = Vector3.new(0.1, 0.3, 0.3) |
| 316 | p.CFrame = CFrame.new(-0.7, 10.8, -1.6) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 317 | p.BrickColor = BrickColor.new("Really black") |
| 318 | p.Material = Enum.Material.Glacier |
| 319 | p.MaterialVariant = "2022 Universal" |
| 320 | p.Anchored = true |
| 321 | p.Parent = model |
| 322 | end |
| 323 | do |
| 324 | local p = Instance.new("Part") |
| 325 | p.Name = "BrowL" |
| 326 | p.Size = Vector3.new(1, 0.2, 0.2) |
| 327 | p.CFrame = CFrame.new(0.8, 11.3, -1.55) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(15)) |
| 328 | p.BrickColor = BrickColor.new("Dark taupe") |
| 329 | p.Material = Enum.Material.Glacier |
| 330 | p.MaterialVariant = "2022 Stud" |
| 331 | p.Anchored = true |
| 332 | p.Parent = model |
| 333 | end |
| 334 | do |
| 335 | local p = Instance.new("Part") |
| 336 | p.Name = "BrowR" |
| 337 | p.Size = Vector3.new(1, 0.2, 0.2) |
| 338 | p.CFrame = CFrame.new(-0.8, 11.3, -1.55) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-15)) |
| 339 | p.BrickColor = BrickColor.new("Dark taupe") |
| 340 | p.Material = Enum.Material.Glacier |
| 341 | p.MaterialVariant = "2022 Stud" |
| 342 | p.Anchored = true |
| 343 | p.Parent = model |
| 344 | end |
| 345 | do |
| 346 | local p = Instance.new("Part") |
| 347 | p.Name = "MustacheL" |
| 348 | p.Size = Vector3.new(0.8, 0.3, 0.2) |
| 349 | p.CFrame = CFrame.new(0.5, 10, -1.6) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-20)) |
| 350 | p.BrickColor = BrickColor.new("Dark taupe") |
| 351 | p.Material = Enum.Material.Glacier |
| 352 | p.MaterialVariant = "2022 Stud" |
| 353 | p.Anchored = true |
| 354 | p.Parent = model |
| 355 | end |
| 356 | do |
| 357 | local p = Instance.new("Part") |
| 358 | p.Name = "MustacheR" |
| 359 | p.Size = Vector3.new(0.8, 0.3, 0.2) |
| 360 | p.CFrame = CFrame.new(-0.5, 10, -1.6) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(20)) |
| 361 | p.BrickColor = BrickColor.new("Dark taupe") |
| 362 | p.Material = Enum.Material.Glacier |
| 363 | p.MaterialVariant = "2022 Stud" |
| 364 | p.Anchored = true |
| 365 | p.Parent = model |
| 366 | end |
| 367 | do |
| 368 | local p = Instance.new("Part") |
| 369 | p.Name = "Nose" |
| 370 | p.Size = Vector3.new(0.4, 0.6, 0.4) |
| 371 | p.CFrame = CFrame.new(0, 10.4, -1.6) |
| 372 | p.BrickColor = BrickColor.new("Reddish brown") |
| 373 | p.Material = Enum.Material.Glacier |
| 374 | p.MaterialVariant = "2022 Small Stud" |
| 375 | p.Anchored = true |
| 376 | p.Parent = model |
| 377 | end |
| 378 | do |
| 379 | local p = Instance.new("Part") |
| 380 | p.Shape = Enum.PartType.Ball |
| 381 | p.Name = "BunBase" |
| 382 | p.Size = Vector3.new(1.2, 1.2, 1.2) |
| 383 | p.CFrame = CFrame.new(0.5, 12.5, 0) |
| 384 | p.BrickColor = BrickColor.new("Dark taupe") |
| 385 | p.Material = Enum.Material.Glacier |
| 386 | p.MaterialVariant = "2022 Stud" |
| 387 | p.Anchored = true |
| 388 | p.Parent = model |
| 389 | end |
| 390 | do |
| 391 | local p = Instance.new("Part") |
| 392 | p.Shape = Enum.PartType.Ball |
| 393 | p.Name = "BunTop" |
| 394 | p.Size = Vector3.new(1, 1, 1) |
| 395 | p.CFrame = CFrame.new(0.7, 13.2, 0) |
| 396 | p.BrickColor = BrickColor.new("Dark taupe") |
| 397 | p.Material = Enum.Material.Glacier |
| 398 | p.MaterialVariant = "2022 Stud" |
| 399 | p.Anchored = true |
| 400 | p.Parent = model |
| 401 | end |
| 402 | do |
| 403 | local rightV = Vector3.new(0,1,0).Unit |
| 404 | local upV = (Vector3.new(1,0,0) - Vector3.new(1,0,0):Dot(rightV)*rightV).Unit |
| 405 | local normalV = upV:Cross(rightV) |
| 406 | local pos = Vector3.new(2.2, 8.5, 0) |
| 407 | local cyl = Instance.new("Part") |
| 408 | cyl.Shape = Enum.PartType.Cylinder |
| 409 | cyl.Size = Vector3.new(2, 4.4, 4.4) |
| 410 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 411 | cyl.BrickColor = BrickColor.new("Dark nougat") |
| 412 | cyl.Material = Enum.Material.Glacier |
| 413 | cyl.MaterialVariant = "2022 Stud" |
| 414 | cyl.Anchored = true; cyl.Parent = workspace |
| 415 | local cuts = {} |
| 416 | local hole = Instance.new("Part") |
| 417 | hole.Shape = Enum.PartType.Cylinder |
| 418 | hole.Size = Vector3.new(2.2, 3, 3) |
| 419 | hole.CFrame = cyl.CFrame |
| 420 | hole.BrickColor = BrickColor.new("Dark nougat") |
| 421 | hole.Material = Enum.Material.Glacier |
| 422 | hole.MaterialVariant = "2022 Stud" |
| 423 | hole.Anchored = true; hole.Parent = workspace |
| 424 | table.insert(cuts, hole) |
| 425 | local angBoxes = {} |
| 426 | do |
| 427 | local edgeDir = 1*rightV + 0*upV |
| 428 | local edgePerp = 0*rightV + 1*upV |
| 429 | local cut = Instance.new("Part") |
| 430 | cut.Size = Vector3.new(8.8, 2.2, 8.8) |
| 431 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 4.4 * edgePerp, edgeDir, normalV) |
| 432 | cut.BrickColor = BrickColor.new("Dark nougat") |
| 433 | cut.Material = Enum.Material.Glacier |
| 434 | cut.MaterialVariant = "2022 Stud" |
| 435 | cut.Anchored = true; cut.Parent = workspace |
| 436 | table.insert(angBoxes, cut) |
| 437 | end |
| 438 | do |
| 439 | local edgeDir = -1*rightV + 0*upV |
| 440 | local edgePerp = 0*rightV + -1*upV |
| 441 | local cut = Instance.new("Part") |
| 442 | cut.Size = Vector3.new(8.8, 2.2, 8.8) |
| 443 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 4.4 * edgePerp, edgeDir, normalV) |
| 444 | cut.BrickColor = BrickColor.new("Dark nougat") |
| 445 | cut.Material = Enum.Material.Glacier |
| 446 | cut.MaterialVariant = "2022 Stud" |
| 447 | cut.Anchored = true; cut.Parent = workspace |
| 448 | table.insert(angBoxes, cut) |
| 449 | end |
| 450 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 451 | if #cuts > 0 then |
| 452 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 453 | for _, c in ipairs(cuts) do c:Destroy() end |
| 454 | if ok and result then |
| 455 | cyl:Destroy() |
| 456 | result.Name = "ShoulderL"; result.Anchored = true; result.Parent = model |
| 457 | else |
| 458 | cyl.Name = "ShoulderL"; cyl.Parent = model |
| 459 | end |
| 460 | else |
| 461 | cyl.Name = "ShoulderL"; cyl.Parent = model |
| 462 | end |
| 463 | end |
| 464 | do |
| 465 | local rightV = Vector3.new(0,1,0).Unit |
| 466 | local upV = (Vector3.new(-1,0,0) - Vector3.new(-1,0,0):Dot(rightV)*rightV).Unit |
| 467 | local normalV = upV:Cross(rightV) |
| 468 | local pos = Vector3.new(-2.2, 8.5, 0) |
| 469 | local cyl = Instance.new("Part") |
| 470 | cyl.Shape = Enum.PartType.Cylinder |
| 471 | cyl.Size = Vector3.new(2, 4.4, 4.4) |
| 472 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 473 | cyl.BrickColor = BrickColor.new("Dark nougat") |
| 474 | cyl.Material = Enum.Material.Glacier |
| 475 | cyl.MaterialVariant = "2022 Stud" |
| 476 | cyl.Anchored = true; cyl.Parent = workspace |
| 477 | local cuts = {} |
| 478 | local hole = Instance.new("Part") |
| 479 | hole.Shape = Enum.PartType.Cylinder |
| 480 | hole.Size = Vector3.new(2.2, 3, 3) |
| 481 | hole.CFrame = cyl.CFrame |
| 482 | hole.BrickColor = BrickColor.new("Dark nougat") |
| 483 | hole.Material = Enum.Material.Glacier |
| 484 | hole.MaterialVariant = "2022 Stud" |
| 485 | hole.Anchored = true; hole.Parent = workspace |
| 486 | table.insert(cuts, hole) |
| 487 | local angBoxes = {} |
| 488 | do |
| 489 | local edgeDir = 1*rightV + 0*upV |
| 490 | local edgePerp = 0*rightV + 1*upV |
| 491 | local cut = Instance.new("Part") |
| 492 | cut.Size = Vector3.new(8.8, 2.2, 8.8) |
| 493 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 4.4 * edgePerp, edgeDir, normalV) |
| 494 | cut.BrickColor = BrickColor.new("Dark nougat") |
| 495 | cut.Material = Enum.Material.Glacier |
| 496 | cut.MaterialVariant = "2022 Stud" |
| 497 | cut.Anchored = true; cut.Parent = workspace |
| 498 | table.insert(angBoxes, cut) |
| 499 | end |
| 500 | do |
| 501 | local edgeDir = -1*rightV + 0*upV |
| 502 | local edgePerp = 0*rightV + -1*upV |
| 503 | local cut = Instance.new("Part") |
| 504 | cut.Size = Vector3.new(8.8, 2.2, 8.8) |
| 505 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 4.4 * edgePerp, edgeDir, normalV) |
| 506 | cut.BrickColor = BrickColor.new("Dark nougat") |
| 507 | cut.Material = Enum.Material.Glacier |
| 508 | cut.MaterialVariant = "2022 Stud" |
| 509 | cut.Anchored = true; cut.Parent = workspace |
| 510 | table.insert(angBoxes, cut) |
| 511 | end |
| 512 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 513 | if #cuts > 0 then |
| 514 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 515 | for _, c in ipairs(cuts) do c:Destroy() end |
| 516 | if ok and result then |
| 517 | cyl:Destroy() |
| 518 | result.Name = "ShoulderR"; result.Anchored = true; result.Parent = model |
| 519 | else |
| 520 | cyl.Name = "ShoulderR"; cyl.Parent = model |
| 521 | end |
| 522 | else |
| 523 | cyl.Name = "ShoulderR"; cyl.Parent = model |
| 524 | end |
| 525 | end |
| 526 | do |
| 527 | local upV = Vector3.new(0,1,0).Unit |
| 528 | local rightV = (Vector3.new(1,0,0) - Vector3.new(1,0,0):Dot(upV)*upV).Unit |
| 529 | local forwardV = rightV:Cross(upV) |
| 530 | local pos = Vector3.new(0, 11.5, 0) |
| 531 | local ball = Instance.new("Part") |
| 532 | ball.Shape = Enum.PartType.Ball |
| 533 | ball.Size = Vector3.new(3.4, 3.4, 3.4) |
| 534 | ball.CFrame = CFrame.new(pos) |
| 535 | ball.BrickColor = BrickColor.new("Dark taupe") |
| 536 | ball.Material = Enum.Material.Glacier |
| 537 | ball.MaterialVariant = "2022 Stud" |
| 538 | ball.Anchored = true; ball.Parent = workspace |
| 539 | local cuts = {} |
| 540 | do |
| 541 | local h = 0 |
| 542 | local cut = Instance.new("Part") |
| 543 | cut.Size = Vector3.new(6.8, 6.8, 6.8) |
| 544 | cut.CFrame = CFrame.fromMatrix(pos + upV*(-3.4), rightV, upV) |
| 545 | cut.BrickColor = BrickColor.new("Dark taupe") |
| 546 | cut.Material = Enum.Material.Glacier |
| 547 | cut.MaterialVariant = "2022 Stud" |
| 548 | cut.Anchored = true; cut.Parent = workspace |
| 549 | table.insert(cuts, cut) |
| 550 | end |
| 551 | if #cuts > 0 then |
| 552 | local ok, result = pcall(function() return ball:SubtractAsync(cuts) end) |
| 553 | for _, c in ipairs(cuts) do c:Destroy() end |
| 554 | if ok and result then |
| 555 | ball:Destroy() |
| 556 | result.Name = "HairCap"; result.Anchored = true; result.Parent = model |
| 557 | else |
| 558 | ball.Name = "HairCap"; ball.Parent = model |
| 559 | end |
| 560 | else |
| 561 | ball.Name = "HairCap"; ball.Parent = model |
| 562 | end |
| 563 | end |
| 564 | model.PrimaryPart = model:FindFirstChild("Torso") |
| 565 | print("TerracottaWarrior built: " .. #model:GetChildren() .. " parts") |
Loading comments...