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