Loading model...
by Jax Fortune · 6/22/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: Aquarium |
| 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 = "Aquarium" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Bright green"] = "2022 Stud", |
| 25 | ["Carnation pink"] = "2022 Stud", |
| 26 | ["Dark blue"] = "2022 Inlet", |
| 27 | ["Dark indigo"] = "2022 Stud", |
| 28 | ["Ghost grey"] = "2022 Stud", |
| 29 | ["Lapis"] = "2022 Stud", |
| 30 | ["Magenta"] = "2022 Stud", |
| 31 | ["Medium stone grey"] = "2022 Inlet", |
| 32 | ["Navy blue"] = "2022 Stud", |
| 33 | ["Sand yellow"] = "2022 Small Stud", |
| 34 | } |
| 35 | do |
| 36 | local p = Instance.new("Part") |
| 37 | p.Name = "FrameBase" |
| 38 | p.Size = Vector3.new(34, 2, 24) |
| 39 | p.CFrame = CFrame.new(0, 1, 0) |
| 40 | p.BrickColor = BrickColor.new("Navy blue") |
| 41 | p.Material = Enum.Material.Glacier |
| 42 | p.MaterialVariant = "2022 Stud" |
| 43 | p.Anchored = true |
| 44 | p.Parent = model |
| 45 | end |
| 46 | do |
| 47 | local p = Instance.new("Part") |
| 48 | p.Name = "PillarFL" |
| 49 | p.Size = Vector3.new(2, 20, 2) |
| 50 | p.CFrame = CFrame.new(-16.08, 12.08, -10.92) |
| 51 | p.BrickColor = BrickColor.new("Navy blue") |
| 52 | p.Material = Enum.Material.Glacier |
| 53 | p.MaterialVariant = "2022 Stud" |
| 54 | p.Anchored = true |
| 55 | p.Parent = model |
| 56 | end |
| 57 | do |
| 58 | local p = Instance.new("Part") |
| 59 | p.Name = "PillarFR" |
| 60 | p.Size = Vector3.new(2, 20, 2) |
| 61 | p.CFrame = CFrame.new(16.08, 12.08, -10.92) |
| 62 | p.BrickColor = BrickColor.new("Navy blue") |
| 63 | p.Material = Enum.Material.Glacier |
| 64 | p.MaterialVariant = "2022 Stud" |
| 65 | p.Anchored = true |
| 66 | p.Parent = model |
| 67 | end |
| 68 | do |
| 69 | local p = Instance.new("Part") |
| 70 | p.Name = "PillarBL" |
| 71 | p.Size = Vector3.new(2, 20, 2) |
| 72 | p.CFrame = CFrame.new(-16.08, 12.08, 11.08) |
| 73 | p.BrickColor = BrickColor.new("Navy blue") |
| 74 | p.Material = Enum.Material.Glacier |
| 75 | p.MaterialVariant = "2022 Stud" |
| 76 | p.Anchored = true |
| 77 | p.Parent = model |
| 78 | end |
| 79 | do |
| 80 | local p = Instance.new("Part") |
| 81 | p.Name = "PillarBR" |
| 82 | p.Size = Vector3.new(2, 20, 2) |
| 83 | p.CFrame = CFrame.new(16.08, 12.08, 11.08) |
| 84 | p.BrickColor = BrickColor.new("Navy blue") |
| 85 | p.Material = Enum.Material.Glacier |
| 86 | p.MaterialVariant = "2022 Stud" |
| 87 | p.Anchored = true |
| 88 | p.Parent = model |
| 89 | end |
| 90 | do |
| 91 | local p = Instance.new("Part") |
| 92 | p.Name = "TopRimF" |
| 93 | p.Size = Vector3.new(34, 2, 2) |
| 94 | p.CFrame = CFrame.new(0, 23, -11) |
| 95 | p.BrickColor = BrickColor.new("Navy blue") |
| 96 | p.Material = Enum.Material.Glacier |
| 97 | p.MaterialVariant = "2022 Stud" |
| 98 | p.Anchored = true |
| 99 | p.Parent = model |
| 100 | end |
| 101 | do |
| 102 | local p = Instance.new("Part") |
| 103 | p.Name = "TopRimB" |
| 104 | p.Size = Vector3.new(34, 2, 2) |
| 105 | p.CFrame = CFrame.new(0, 23, 11) |
| 106 | p.BrickColor = BrickColor.new("Navy blue") |
| 107 | p.Material = Enum.Material.Glacier |
| 108 | p.MaterialVariant = "2022 Stud" |
| 109 | p.Anchored = true |
| 110 | p.Parent = model |
| 111 | end |
| 112 | do |
| 113 | local p = Instance.new("Part") |
| 114 | p.Name = "TopRimL" |
| 115 | p.Size = Vector3.new(2, 2, 20) |
| 116 | p.CFrame = CFrame.new(-16.08, 23.08, 0.08) |
| 117 | p.BrickColor = BrickColor.new("Navy blue") |
| 118 | p.Material = Enum.Material.Glacier |
| 119 | p.MaterialVariant = "2022 Stud" |
| 120 | p.Anchored = true |
| 121 | p.Parent = model |
| 122 | end |
| 123 | do |
| 124 | local p = Instance.new("Part") |
| 125 | p.Name = "TopRimR" |
| 126 | p.Size = Vector3.new(2, 2, 20) |
| 127 | p.CFrame = CFrame.new(16.08, 23.08, 0.08) |
| 128 | p.BrickColor = BrickColor.new("Navy blue") |
| 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.Name = "AccentFL_X" |
| 137 | p.Size = Vector3.new(2, 2, 2) |
| 138 | p.CFrame = CFrame.new(-13.92, 20.96, -11) |
| 139 | p.BrickColor = BrickColor.new("Navy blue") |
| 140 | p.Material = Enum.Material.Glacier |
| 141 | p.MaterialVariant = "2022 Stud" |
| 142 | p.Anchored = true |
| 143 | p.Parent = model |
| 144 | end |
| 145 | do |
| 146 | local p = Instance.new("Part") |
| 147 | p.Name = "AccentFL_Y" |
| 148 | p.Size = Vector3.new(2, 2, 2) |
| 149 | p.CFrame = CFrame.new(-15.96, 19, -10.96) |
| 150 | p.BrickColor = BrickColor.new("Navy blue") |
| 151 | p.Material = Enum.Material.Glacier |
| 152 | p.MaterialVariant = "2022 Stud" |
| 153 | p.Anchored = true |
| 154 | p.Parent = model |
| 155 | end |
| 156 | do |
| 157 | local p = Instance.new("Part") |
| 158 | p.Name = "AccentFR_X" |
| 159 | p.Size = Vector3.new(2, 2, 2) |
| 160 | p.CFrame = CFrame.new(13.96, 20.96, -11) |
| 161 | p.BrickColor = BrickColor.new("Navy blue") |
| 162 | p.Material = Enum.Material.Glacier |
| 163 | p.MaterialVariant = "2022 Stud" |
| 164 | p.Anchored = true |
| 165 | p.Parent = model |
| 166 | end |
| 167 | do |
| 168 | local p = Instance.new("Part") |
| 169 | p.Name = "AccentFR_Y" |
| 170 | p.Size = Vector3.new(2, 2, 2) |
| 171 | p.CFrame = CFrame.new(16.04, 19, -10.96) |
| 172 | p.BrickColor = BrickColor.new("Navy blue") |
| 173 | p.Material = Enum.Material.Glacier |
| 174 | p.MaterialVariant = "2022 Stud" |
| 175 | p.Anchored = true |
| 176 | p.Parent = model |
| 177 | end |
| 178 | do |
| 179 | local p = Instance.new("Part") |
| 180 | p.Name = "Sand" |
| 181 | p.Size = Vector3.new(30, 1, 20) |
| 182 | p.CFrame = CFrame.new(0, 2.54, 0) |
| 183 | p.BrickColor = BrickColor.new("Sand yellow") |
| 184 | p.Material = Enum.Material.Glacier |
| 185 | p.MaterialVariant = "2022 Small Stud" |
| 186 | p.Anchored = true |
| 187 | p.Parent = model |
| 188 | end |
| 189 | do |
| 190 | local p = Instance.new("Part") |
| 191 | p.Name = "RockTier1" |
| 192 | p.Size = Vector3.new(22, 3, 14) |
| 193 | p.CFrame = CFrame.new(0, 4.5, 0) |
| 194 | p.BrickColor = BrickColor.new("Dark blue") |
| 195 | p.Material = Enum.Material.Glacier |
| 196 | p.MaterialVariant = "2022 Inlet" |
| 197 | p.Anchored = true |
| 198 | p.Parent = model |
| 199 | end |
| 200 | do |
| 201 | local p = Instance.new("Part") |
| 202 | p.Name = "RockTier2" |
| 203 | p.Size = Vector3.new(16, 3, 10) |
| 204 | p.CFrame = CFrame.new(0, 7.54, 0) |
| 205 | p.BrickColor = BrickColor.new("Navy blue") |
| 206 | p.Material = Enum.Material.Glacier |
| 207 | p.MaterialVariant = "2022 Stud" |
| 208 | p.Anchored = true |
| 209 | p.Parent = model |
| 210 | end |
| 211 | do |
| 212 | local p = Instance.new("Part") |
| 213 | p.Name = "RockTier3" |
| 214 | p.Size = Vector3.new(10, 3, 6) |
| 215 | p.CFrame = CFrame.new(0, 10.58, -1) |
| 216 | p.BrickColor = BrickColor.new("Dark indigo") |
| 217 | p.Material = Enum.Material.Glacier |
| 218 | p.MaterialVariant = "2022 Stud" |
| 219 | p.Anchored = true |
| 220 | p.Parent = model |
| 221 | end |
| 222 | do |
| 223 | local p = Instance.new("Part") |
| 224 | p.Name = "RockTier4" |
| 225 | p.Size = Vector3.new(6, 3, 4) |
| 226 | p.CFrame = CFrame.new(0, 13.62, -1) |
| 227 | p.BrickColor = BrickColor.new("Dark blue") |
| 228 | p.Material = Enum.Material.Glacier |
| 229 | p.MaterialVariant = "2022 Inlet" |
| 230 | p.Anchored = true |
| 231 | p.Parent = model |
| 232 | end |
| 233 | do |
| 234 | local p = Instance.new("Part") |
| 235 | p.Name = "RockTier5" |
| 236 | p.Size = Vector3.new(4, 2, 2) |
| 237 | p.CFrame = CFrame.new(0, 16.16, -1) |
| 238 | p.BrickColor = BrickColor.new("Lapis") |
| 239 | p.Material = Enum.Material.Glacier |
| 240 | p.MaterialVariant = "2022 Stud" |
| 241 | p.Anchored = true |
| 242 | p.Parent = model |
| 243 | end |
| 244 | do |
| 245 | local p = Instance.new("Part") |
| 246 | p.Name = "CoralPink1" |
| 247 | p.Size = Vector3.new(6, 2, 4) |
| 248 | p.CFrame = CFrame.new(-8, 7.04, 2) |
| 249 | p.BrickColor = BrickColor.new("Carnation pink") |
| 250 | p.Material = Enum.Material.Glacier |
| 251 | p.MaterialVariant = "2022 Stud" |
| 252 | p.Anchored = true |
| 253 | p.Parent = model |
| 254 | end |
| 255 | do |
| 256 | local p = Instance.new("Part") |
| 257 | p.Name = "CoralPink2" |
| 258 | p.Size = Vector3.new(4, 2, 3) |
| 259 | p.CFrame = CFrame.new(-9, 9.08, 1) |
| 260 | p.BrickColor = BrickColor.new("Carnation pink") |
| 261 | p.Material = Enum.Material.Glacier |
| 262 | p.MaterialVariant = "2022 Stud" |
| 263 | p.Anchored = true |
| 264 | p.Parent = model |
| 265 | end |
| 266 | do |
| 267 | local p = Instance.new("Part") |
| 268 | p.Name = "CoralPink3" |
| 269 | p.Size = Vector3.new(3, 3, 3) |
| 270 | p.CFrame = CFrame.new(-12, 4.58, -4) |
| 271 | p.BrickColor = BrickColor.new("Carnation pink") |
| 272 | p.Material = Enum.Material.Glacier |
| 273 | p.MaterialVariant = "2022 Stud" |
| 274 | p.Anchored = true |
| 275 | p.Parent = model |
| 276 | end |
| 277 | do |
| 278 | local p = Instance.new("Part") |
| 279 | p.Name = "CoralMag1" |
| 280 | p.Size = Vector3.new(5, 2, 4) |
| 281 | p.CFrame = CFrame.new(6, 7.04, -2) |
| 282 | p.BrickColor = BrickColor.new("Magenta") |
| 283 | p.Material = Enum.Material.Glacier |
| 284 | p.MaterialVariant = "2022 Stud" |
| 285 | p.Anchored = true |
| 286 | p.Parent = model |
| 287 | end |
| 288 | do |
| 289 | local p = Instance.new("Part") |
| 290 | p.Name = "CoralMag2" |
| 291 | p.Size = Vector3.new(4, 2, 3) |
| 292 | p.CFrame = CFrame.new(4, 9.08, -2) |
| 293 | p.BrickColor = BrickColor.new("Magenta") |
| 294 | p.Material = Enum.Material.Glacier |
| 295 | p.MaterialVariant = "2022 Stud" |
| 296 | p.Anchored = true |
| 297 | p.Parent = model |
| 298 | end |
| 299 | do |
| 300 | local p = Instance.new("Part") |
| 301 | p.Name = "CoralMag3" |
| 302 | p.Size = Vector3.new(4, 4, 3) |
| 303 | p.CFrame = CFrame.new(10.04, 4.5, 4) |
| 304 | p.BrickColor = BrickColor.new("Magenta") |
| 305 | p.Material = Enum.Material.Glacier |
| 306 | p.MaterialVariant = "2022 Stud" |
| 307 | p.Anchored = true |
| 308 | p.Parent = model |
| 309 | end |
| 310 | do |
| 311 | local p = Instance.new("Part") |
| 312 | p.Name = "NeonCoral1" |
| 313 | p.Size = Vector3.new(2, 4, 2) |
| 314 | p.CFrame = CFrame.new(2, 9.96, 2) |
| 315 | p.BrickColor = BrickColor.new("Toothpaste") |
| 316 | p.Material = Enum.Material.Neon |
| 317 | p.Anchored = true |
| 318 | p.Parent = model |
| 319 | end |
| 320 | do |
| 321 | local p = Instance.new("Part") |
| 322 | p.Name = "NeonCoral2" |
| 323 | p.Size = Vector3.new(3, 1, 1) |
| 324 | p.CFrame = CFrame.new(3.04, 11, 2) |
| 325 | p.BrickColor = BrickColor.new("Toothpaste") |
| 326 | p.Material = Enum.Material.Neon |
| 327 | p.Anchored = true |
| 328 | p.Parent = model |
| 329 | end |
| 330 | do |
| 331 | local p = Instance.new("Part") |
| 332 | p.Name = "NeonCoral3" |
| 333 | p.Size = Vector3.new(1, 3, 1) |
| 334 | p.CFrame = CFrame.new(1, 12, 2) |
| 335 | p.BrickColor = BrickColor.new("Toothpaste") |
| 336 | p.Material = Enum.Material.Neon |
| 337 | p.Anchored = true |
| 338 | p.Parent = model |
| 339 | end |
| 340 | do |
| 341 | local p = Instance.new("Part") |
| 342 | p.Name = "NeonCoral4" |
| 343 | p.Size = Vector3.new(2, 2, 2) |
| 344 | p.CFrame = CFrame.new(-2, 8.04, -3) |
| 345 | p.BrickColor = BrickColor.new("Toothpaste") |
| 346 | p.Material = Enum.Material.Neon |
| 347 | p.Anchored = true |
| 348 | p.Parent = model |
| 349 | end |
| 350 | do |
| 351 | local p = Instance.new("Part") |
| 352 | p.Name = "NeonCoral5" |
| 353 | p.Size = Vector3.new(2, 3, 2) |
| 354 | p.CFrame = CFrame.new(12.04, 5, -2) |
| 355 | p.BrickColor = BrickColor.new("Toothpaste") |
| 356 | p.Material = Enum.Material.Neon |
| 357 | p.Anchored = true |
| 358 | p.Parent = model |
| 359 | end |
| 360 | do |
| 361 | local p = Instance.new("Part") |
| 362 | p.Name = "Plant1" |
| 363 | p.Size = Vector3.new(1, 3, 1) |
| 364 | p.CFrame = CFrame.new(-10, 4.58, -7) |
| 365 | p.BrickColor = BrickColor.new("Bright green") |
| 366 | p.Material = Enum.Material.Glacier |
| 367 | p.MaterialVariant = "2022 Stud" |
| 368 | p.Anchored = true |
| 369 | p.Parent = model |
| 370 | end |
| 371 | do |
| 372 | local p = Instance.new("Part") |
| 373 | p.Name = "Plant2" |
| 374 | p.Size = Vector3.new(1, 2, 1) |
| 375 | p.CFrame = CFrame.new(-11, 4.08, -8) |
| 376 | p.BrickColor = BrickColor.new("Bright green") |
| 377 | p.Material = Enum.Material.Glacier |
| 378 | p.MaterialVariant = "2022 Stud" |
| 379 | p.Anchored = true |
| 380 | p.Parent = model |
| 381 | end |
| 382 | do |
| 383 | local p = Instance.new("Part") |
| 384 | p.Name = "Plant3" |
| 385 | p.Size = Vector3.new(1, 4, 1) |
| 386 | p.CFrame = CFrame.new(-9, 5.08, -6) |
| 387 | p.BrickColor = BrickColor.new("Bright green") |
| 388 | p.Material = Enum.Material.Glacier |
| 389 | p.MaterialVariant = "2022 Stud" |
| 390 | p.Anchored = true |
| 391 | p.Parent = model |
| 392 | end |
| 393 | do |
| 394 | local p = Instance.new("Part") |
| 395 | p.Name = "Plant4" |
| 396 | p.Size = Vector3.new(1, 3, 1) |
| 397 | p.CFrame = CFrame.new(8, 4.58, -7) |
| 398 | p.BrickColor = BrickColor.new("Bright green") |
| 399 | p.Material = Enum.Material.Glacier |
| 400 | p.MaterialVariant = "2022 Stud" |
| 401 | p.Anchored = true |
| 402 | p.Parent = model |
| 403 | end |
| 404 | do |
| 405 | local p = Instance.new("Part") |
| 406 | p.Name = "AnchorShaft" |
| 407 | p.Size = Vector3.new(1, 8, 1) |
| 408 | p.CFrame = CFrame.new(-3, 6.5, -7) * CFrame.Angles(math.rad(15), math.rad(0), math.rad(-30)) |
| 409 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 410 | p.Material = Enum.Material.Glacier |
| 411 | p.MaterialVariant = "2022 Inlet" |
| 412 | p.Anchored = true |
| 413 | p.Parent = model |
| 414 | end |
| 415 | do |
| 416 | local p = Instance.new("Part") |
| 417 | p.Name = "AnchorCross" |
| 418 | p.Size = Vector3.new(5, 1, 1) |
| 419 | p.CFrame = CFrame.new(-1.5, 9, -7.5) * CFrame.Angles(math.rad(15), math.rad(0), math.rad(-30)) |
| 420 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 421 | p.Material = Enum.Material.Glacier |
| 422 | p.MaterialVariant = "2022 Inlet" |
| 423 | p.Anchored = true |
| 424 | p.Parent = model |
| 425 | end |
| 426 | do |
| 427 | local p = Instance.new("Part") |
| 428 | p.Name = "Bubble1" |
| 429 | p.Size = Vector3.new(1, 1, 1) |
| 430 | p.CFrame = CFrame.new(-8, 14, -4) |
| 431 | p.BrickColor = BrickColor.new("Ghost grey") |
| 432 | p.Material = Enum.Material.Glacier |
| 433 | p.MaterialVariant = "2022 Stud" |
| 434 | p.Anchored = true |
| 435 | p.Parent = model |
| 436 | end |
| 437 | do |
| 438 | local p = Instance.new("Part") |
| 439 | p.Name = "Bubble2" |
| 440 | p.Size = Vector3.new(1.5, 1.5, 1.5) |
| 441 | p.CFrame = CFrame.new(-6, 18, -2) |
| 442 | p.BrickColor = BrickColor.new("Ghost grey") |
| 443 | p.Material = Enum.Material.Glacier |
| 444 | p.MaterialVariant = "2022 Stud" |
| 445 | p.Anchored = true |
| 446 | p.Parent = model |
| 447 | end |
| 448 | do |
| 449 | local p = Instance.new("Part") |
| 450 | p.Name = "Bubble3" |
| 451 | p.Size = Vector3.new(1, 1, 1) |
| 452 | p.CFrame = CFrame.new(5, 15, -5) |
| 453 | p.BrickColor = BrickColor.new("Ghost grey") |
| 454 | p.Material = Enum.Material.Glacier |
| 455 | p.MaterialVariant = "2022 Stud" |
| 456 | p.Anchored = true |
| 457 | p.Parent = model |
| 458 | end |
| 459 | do |
| 460 | local p = Instance.new("Part") |
| 461 | p.Name = "Bubble4" |
| 462 | p.Size = Vector3.new(1.2, 1.2, 1.2) |
| 463 | p.CFrame = CFrame.new(8, 19, -3) |
| 464 | p.BrickColor = BrickColor.new("Ghost grey") |
| 465 | p.Material = Enum.Material.Glacier |
| 466 | p.MaterialVariant = "2022 Stud" |
| 467 | p.Anchored = true |
| 468 | p.Parent = model |
| 469 | end |
| 470 | do |
| 471 | local p = Instance.new("Part") |
| 472 | p.Name = "Bubble5" |
| 473 | p.Size = Vector3.new(1, 1, 1) |
| 474 | p.CFrame = CFrame.new(0, 17, 4) |
| 475 | p.BrickColor = BrickColor.new("Ghost grey") |
| 476 | p.Material = Enum.Material.Glacier |
| 477 | p.MaterialVariant = "2022 Stud" |
| 478 | p.Anchored = true |
| 479 | p.Parent = model |
| 480 | end |
| 481 | do |
| 482 | local rightV = Vector3.new(1,0,0).Unit |
| 483 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 484 | local normalV = upV:Cross(rightV) |
| 485 | local pos = Vector3.new(-0.5, 10.5, -8) |
| 486 | local cyl = Instance.new("Part") |
| 487 | cyl.Shape = Enum.PartType.Cylinder |
| 488 | cyl.Size = Vector3.new(1, 2.4, 2.4) |
| 489 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 490 | cyl.BrickColor = BrickColor.new("Medium stone grey") |
| 491 | cyl.Material = Enum.Material.Glacier |
| 492 | cyl.MaterialVariant = "2022 Inlet" |
| 493 | cyl.Anchored = true; cyl.Parent = workspace |
| 494 | local cuts = {} |
| 495 | local hole = Instance.new("Part") |
| 496 | hole.Shape = Enum.PartType.Cylinder |
| 497 | hole.Size = Vector3.new(1.2, 1.2, 1.2) |
| 498 | hole.CFrame = cyl.CFrame |
| 499 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 500 | hole.Material = Enum.Material.Glacier |
| 501 | hole.MaterialVariant = "2022 Inlet" |
| 502 | hole.Anchored = true; hole.Parent = workspace |
| 503 | table.insert(cuts, hole) |
| 504 | if #cuts > 0 then |
| 505 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 506 | for _, c in ipairs(cuts) do c:Destroy() end |
| 507 | if ok and result then |
| 508 | cyl:Destroy() |
| 509 | result.Name = "AnchorRing"; result.Anchored = true; result.Parent = model |
| 510 | else |
| 511 | cyl.Name = "AnchorRing"; cyl.Parent = model |
| 512 | end |
| 513 | else |
| 514 | cyl.Name = "AnchorRing"; cyl.Parent = model |
| 515 | end |
| 516 | end |
| 517 | do |
| 518 | local rightV = Vector3.new(0.866,0.5,0).Unit |
| 519 | local upV = (Vector3.new(-0.5,0.866,0) - Vector3.new(-0.5,0.866,0):Dot(rightV)*rightV).Unit |
| 520 | local normalV = upV:Cross(rightV) |
| 521 | local pos = Vector3.new(-5, 3.5, -6.54) |
| 522 | local cyl = Instance.new("Part") |
| 523 | cyl.Shape = Enum.PartType.Cylinder |
| 524 | cyl.Size = Vector3.new(1, 7, 7) |
| 525 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 526 | cyl.BrickColor = BrickColor.new("Medium stone grey") |
| 527 | cyl.Material = Enum.Material.Glacier |
| 528 | cyl.MaterialVariant = "2022 Inlet" |
| 529 | cyl.Anchored = true; cyl.Parent = workspace |
| 530 | local cuts = {} |
| 531 | local hole = Instance.new("Part") |
| 532 | hole.Shape = Enum.PartType.Cylinder |
| 533 | hole.Size = Vector3.new(1.2, 5, 5) |
| 534 | hole.CFrame = cyl.CFrame |
| 535 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 536 | hole.Material = Enum.Material.Glacier |
| 537 | hole.MaterialVariant = "2022 Inlet" |
| 538 | hole.Anchored = true; hole.Parent = workspace |
| 539 | table.insert(cuts, hole) |
| 540 | local angBoxes = {} |
| 541 | do |
| 542 | local edgeDir = -1*rightV + 0*upV |
| 543 | local edgePerp = 0*rightV + -1*upV |
| 544 | local cut = Instance.new("Part") |
| 545 | cut.Size = Vector3.new(14, 1.2, 14) |
| 546 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 7 * edgePerp, edgeDir, normalV) |
| 547 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 548 | cut.Material = Enum.Material.Glacier |
| 549 | cut.MaterialVariant = "2022 Inlet" |
| 550 | cut.Anchored = true; cut.Parent = workspace |
| 551 | table.insert(angBoxes, cut) |
| 552 | end |
| 553 | do |
| 554 | local edgeDir = 1*rightV + 0*upV |
| 555 | local edgePerp = 0*rightV + 1*upV |
| 556 | local cut = Instance.new("Part") |
| 557 | cut.Size = Vector3.new(14, 1.2, 14) |
| 558 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 7 * edgePerp, edgeDir, normalV) |
| 559 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 560 | cut.Material = Enum.Material.Glacier |
| 561 | cut.MaterialVariant = "2022 Inlet" |
| 562 | cut.Anchored = true; cut.Parent = workspace |
| 563 | table.insert(angBoxes, cut) |
| 564 | end |
| 565 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 566 | if #cuts > 0 then |
| 567 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 568 | for _, c in ipairs(cuts) do c:Destroy() end |
| 569 | if ok and result then |
| 570 | cyl:Destroy() |
| 571 | result.Name = "AnchorArms"; result.Anchored = true; result.Parent = model |
| 572 | else |
| 573 | cyl.Name = "AnchorArms"; cyl.Parent = model |
| 574 | end |
| 575 | else |
| 576 | cyl.Name = "AnchorArms"; cyl.Parent = model |
| 577 | end |
| 578 | end |
| 579 | model.PrimaryPart = model:FindFirstChild("FrameBase") |
| 580 | print("Aquarium built: " .. #model:GetChildren() .. " parts") |
Loading comments...