Loading model...
by Jonathan Cheng · 8/7/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: CarnivorousPlant |
| 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 = "CarnivorousPlant" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Bright green"] = "2022 Stud", |
| 25 | ["Bright red"] = "2022 Stud", |
| 26 | ["Dusty Rose"] = "2022 Stud", |
| 27 | ["Institutional white"] = "2022 Stud", |
| 28 | ["Maroon"] = "2022 Stud", |
| 29 | ["Really black"] = "2022 Universal", |
| 30 | } |
| 31 | do |
| 32 | local p = Instance.new("Part") |
| 33 | p.Shape = Enum.PartType.Cylinder |
| 34 | p.Name = "PipeBody" |
| 35 | p.Size = Vector3.new(8, 8, 8) |
| 36 | p.CFrame = CFrame.new(0, 4, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 37 | p.BrickColor = BrickColor.new("Bright green") |
| 38 | p.Material = Enum.Material.Glacier |
| 39 | p.MaterialVariant = "2022 Stud" |
| 40 | p.Anchored = true |
| 41 | p.Parent = model |
| 42 | end |
| 43 | do |
| 44 | local p = Instance.new("Part") |
| 45 | p.Shape = Enum.PartType.Cylinder |
| 46 | p.Name = "PipeRim" |
| 47 | p.Size = Vector3.new(1.5, 9, 9) |
| 48 | p.CFrame = CFrame.new(0, 8.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 49 | p.BrickColor = BrickColor.new("Bright green") |
| 50 | p.Material = Enum.Material.Glacier |
| 51 | p.MaterialVariant = "2022 Stud" |
| 52 | p.Anchored = true |
| 53 | p.Parent = model |
| 54 | end |
| 55 | do |
| 56 | local p = Instance.new("Part") |
| 57 | p.Shape = Enum.PartType.Cylinder |
| 58 | p.Name = "PipeHole" |
| 59 | p.Size = Vector3.new(0.1, 7.5, 7.5) |
| 60 | p.CFrame = CFrame.new(0, 9.24, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 61 | p.BrickColor = BrickColor.new("Really black") |
| 62 | p.Material = Enum.Material.Glacier |
| 63 | p.MaterialVariant = "2022 Universal" |
| 64 | p.Anchored = true |
| 65 | p.Parent = model |
| 66 | end |
| 67 | do |
| 68 | local p = Instance.new("Part") |
| 69 | p.Shape = Enum.PartType.Cylinder |
| 70 | p.Name = "Stem_0" |
| 71 | p.Size = Vector3.new(2, 1.2, 1.2) |
| 72 | p.CFrame = CFrame.new(0, 10, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 73 | p.BrickColor = BrickColor.new("Bright green") |
| 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.Shape = Enum.PartType.Cylinder |
| 82 | p.Name = "Stem_1" |
| 83 | p.Size = Vector3.new(2.06155, 1.16, 1.16) |
| 84 | p.CFrame = CFrame.new(-0.25, 12, 0) * CFrame.Angles(math.rad(-180), math.rad(0), math.rad(-104.036)) |
| 85 | p.BrickColor = BrickColor.new("Bright green") |
| 86 | p.Material = Enum.Material.Glacier |
| 87 | p.MaterialVariant = "2022 Stud" |
| 88 | p.Anchored = true |
| 89 | p.Parent = model |
| 90 | end |
| 91 | do |
| 92 | local p = Instance.new("Part") |
| 93 | p.Shape = Enum.PartType.Cylinder |
| 94 | p.Name = "Stem_2" |
| 95 | p.Size = Vector3.new(2.23607, 1.12, 1.12) |
| 96 | p.CFrame = CFrame.new(-1, 14, 0) * CFrame.Angles(math.rad(-180), math.rad(0), math.rad(-116.565)) |
| 97 | p.BrickColor = BrickColor.new("Bright green") |
| 98 | p.Material = Enum.Material.Glacier |
| 99 | p.MaterialVariant = "2022 Stud" |
| 100 | p.Anchored = true |
| 101 | p.Parent = model |
| 102 | end |
| 103 | do |
| 104 | local p = Instance.new("Part") |
| 105 | p.Shape = Enum.PartType.Cylinder |
| 106 | p.Name = "Stem_3" |
| 107 | p.Size = Vector3.new(2.23607, 1.16, 1.16) |
| 108 | p.CFrame = CFrame.new(-2, 16, 0) * CFrame.Angles(math.rad(-180), math.rad(0), math.rad(-116.565)) |
| 109 | p.BrickColor = BrickColor.new("Bright green") |
| 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.Shape = Enum.PartType.Cylinder |
| 118 | p.Name = "Stem_4" |
| 119 | p.Size = Vector3.new(2.06155, 1.2, 1.2) |
| 120 | p.CFrame = CFrame.new(-2.25, 18, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(75.9638)) |
| 121 | p.BrickColor = BrickColor.new("Bright green") |
| 122 | p.Material = Enum.Material.Glacier |
| 123 | p.MaterialVariant = "2022 Stud" |
| 124 | p.Anchored = true |
| 125 | p.Parent = model |
| 126 | end |
| 127 | do |
| 128 | local p = Instance.new("Part") |
| 129 | p.Shape = Enum.PartType.Cylinder |
| 130 | p.Name = "Stem_5" |
| 131 | p.Size = Vector3.new(2.12132, 1.16, 1.16) |
| 132 | p.CFrame = CFrame.new(-1.25, 19.75, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(45)) |
| 133 | p.BrickColor = BrickColor.new("Bright green") |
| 134 | p.Material = Enum.Material.Glacier |
| 135 | p.MaterialVariant = "2022 Stud" |
| 136 | p.Anchored = true |
| 137 | p.Parent = model |
| 138 | end |
| 139 | do |
| 140 | local p = Instance.new("Part") |
| 141 | p.Name = "LeafL_Base" |
| 142 | p.Size = Vector3.new(4, 0.4, 2.5) |
| 143 | p.CFrame = CFrame.new(-2.5, 11.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(20)) |
| 144 | p.BrickColor = BrickColor.new("Bright green") |
| 145 | p.Material = Enum.Material.Glacier |
| 146 | p.MaterialVariant = "2022 Stud" |
| 147 | p.Anchored = true |
| 148 | p.Parent = model |
| 149 | end |
| 150 | do |
| 151 | local p = Instance.new("Part") |
| 152 | p.Name = "LeafL_Mid" |
| 153 | p.Size = Vector3.new(3, 0.3, 3) |
| 154 | p.CFrame = CFrame.new(-5.5, 12.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)) |
| 155 | p.BrickColor = BrickColor.new("Bright green") |
| 156 | p.Material = Enum.Material.Glacier |
| 157 | p.MaterialVariant = "2022 Stud" |
| 158 | p.Anchored = true |
| 159 | p.Parent = model |
| 160 | end |
| 161 | do |
| 162 | local p = Instance.new("Part") |
| 163 | p.Name = "LeafL_Tip" |
| 164 | p.Size = Vector3.new(2, 0.2, 1.5) |
| 165 | p.CFrame = CFrame.new(-7.5, 12.8, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(5)) |
| 166 | p.BrickColor = BrickColor.new("Bright green") |
| 167 | p.Material = Enum.Material.Glacier |
| 168 | p.MaterialVariant = "2022 Stud" |
| 169 | p.Anchored = true |
| 170 | p.Parent = model |
| 171 | end |
| 172 | do |
| 173 | local p = Instance.new("Part") |
| 174 | p.Name = "LeafR_Base" |
| 175 | p.Size = Vector3.new(4, 0.4, 2.5) |
| 176 | p.CFrame = CFrame.new(2.5, 12, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-20)) |
| 177 | p.BrickColor = BrickColor.new("Bright green") |
| 178 | p.Material = Enum.Material.Glacier |
| 179 | p.MaterialVariant = "2022 Stud" |
| 180 | p.Anchored = true |
| 181 | p.Parent = model |
| 182 | end |
| 183 | do |
| 184 | local p = Instance.new("Part") |
| 185 | p.Name = "LeafR_Mid" |
| 186 | p.Size = Vector3.new(3, 0.3, 3) |
| 187 | p.CFrame = CFrame.new(5.5, 13, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)) |
| 188 | p.BrickColor = BrickColor.new("Bright green") |
| 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.Name = "LeafR_Tip" |
| 197 | p.Size = Vector3.new(2, 0.2, 1.5) |
| 198 | p.CFrame = CFrame.new(7.5, 13.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-5)) |
| 199 | p.BrickColor = BrickColor.new("Bright green") |
| 200 | p.Material = Enum.Material.Glacier |
| 201 | p.MaterialVariant = "2022 Stud" |
| 202 | p.Anchored = true |
| 203 | p.Parent = model |
| 204 | end |
| 205 | do |
| 206 | local p = Instance.new("Part") |
| 207 | p.Shape = Enum.PartType.Ball |
| 208 | p.Name = "MouthInside" |
| 209 | p.Size = Vector3.new(8, 8, 8) |
| 210 | p.CFrame = CFrame.new(1, 22, 0) |
| 211 | p.BrickColor = BrickColor.new("Maroon") |
| 212 | p.Material = Enum.Material.Glacier |
| 213 | p.MaterialVariant = "2022 Stud" |
| 214 | p.Anchored = true |
| 215 | p.Parent = model |
| 216 | end |
| 217 | do |
| 218 | local p = Instance.new("Part") |
| 219 | p.Shape = Enum.PartType.Ball |
| 220 | p.Name = "Tongue" |
| 221 | p.Size = Vector3.new(3.5, 3.5, 3.5) |
| 222 | p.CFrame = CFrame.new(2, 20.5, 0) |
| 223 | p.BrickColor = BrickColor.new("Dusty Rose") |
| 224 | p.Material = Enum.Material.Glacier |
| 225 | p.MaterialVariant = "2022 Stud" |
| 226 | p.Anchored = true |
| 227 | p.Parent = model |
| 228 | end |
| 229 | do |
| 230 | local p = Instance.new("WedgePart") |
| 231 | p.Name = "ToothTop_0" |
| 232 | p.Size = Vector3.new(1.5, 0.8, 0.8) |
| 233 | p.CFrame = CFrame.new(2.81865, 24.1, -3.63731) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(-60)) |
| 234 | p.BrickColor = BrickColor.new("Institutional white") |
| 235 | p.Material = Enum.Material.Glacier |
| 236 | p.MaterialVariant = "2022 Stud" |
| 237 | p.Anchored = true |
| 238 | p.Parent = model |
| 239 | end |
| 240 | do |
| 241 | local p = Instance.new("WedgePart") |
| 242 | p.Name = "ToothTop_1" |
| 243 | p.Size = Vector3.new(1.5, 0.8, 0.8) |
| 244 | p.CFrame = CFrame.new(4.15, 24.1, -2.1) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(-60)) |
| 245 | p.BrickColor = BrickColor.new("Institutional white") |
| 246 | p.Material = Enum.Material.Glacier |
| 247 | p.MaterialVariant = "2022 Stud" |
| 248 | p.Anchored = true |
| 249 | p.Parent = model |
| 250 | end |
| 251 | do |
| 252 | local p = Instance.new("WedgePart") |
| 253 | p.Name = "ToothTop_2" |
| 254 | p.Size = Vector3.new(1.5, 0.8, 0.8) |
| 255 | p.CFrame = CFrame.new(4.63731, 24.1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-60)) |
| 256 | p.BrickColor = BrickColor.new("Institutional white") |
| 257 | p.Material = Enum.Material.Glacier |
| 258 | p.MaterialVariant = "2022 Stud" |
| 259 | p.Anchored = true |
| 260 | p.Parent = model |
| 261 | end |
| 262 | do |
| 263 | local p = Instance.new("WedgePart") |
| 264 | p.Name = "ToothTop_3" |
| 265 | p.Size = Vector3.new(1.5, 0.8, 0.8) |
| 266 | p.CFrame = CFrame.new(4.15, 24.1, 2.1) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(-60)) |
| 267 | p.BrickColor = BrickColor.new("Institutional white") |
| 268 | p.Material = Enum.Material.Glacier |
| 269 | p.MaterialVariant = "2022 Stud" |
| 270 | p.Anchored = true |
| 271 | p.Parent = model |
| 272 | end |
| 273 | do |
| 274 | local p = Instance.new("WedgePart") |
| 275 | p.Name = "ToothTop_4" |
| 276 | p.Size = Vector3.new(1.5, 0.8, 0.8) |
| 277 | p.CFrame = CFrame.new(2.81865, 24.1, 3.63731) * CFrame.Angles(math.rad(60), math.rad(0), math.rad(-60)) |
| 278 | p.BrickColor = BrickColor.new("Institutional white") |
| 279 | p.Material = Enum.Material.Glacier |
| 280 | p.MaterialVariant = "2022 Stud" |
| 281 | p.Anchored = true |
| 282 | p.Parent = model |
| 283 | end |
| 284 | do |
| 285 | local p = Instance.new("WedgePart") |
| 286 | p.Name = "ToothBot_0" |
| 287 | p.Size = Vector3.new(1.5, 0.8, 0.8) |
| 288 | p.CFrame = CFrame.new(3.65869, 21.2707, -3.21739) * CFrame.Angles(math.rad(-50), math.rad(0), math.rad(80)) |
| 289 | p.BrickColor = BrickColor.new("Institutional white") |
| 290 | p.Material = Enum.Material.Glacier |
| 291 | p.MaterialVariant = "2022 Stud" |
| 292 | p.Anchored = true |
| 293 | p.Parent = model |
| 294 | end |
| 295 | do |
| 296 | local p = Instance.new("WedgePart") |
| 297 | p.Name = "ToothBot_1" |
| 298 | p.Size = Vector3.new(1.5, 0.8, 0.8) |
| 299 | p.CFrame = CFrame.new(4.88675, 21.2707, -1.43649) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(80)) |
| 300 | p.BrickColor = BrickColor.new("Institutional white") |
| 301 | p.Material = Enum.Material.Glacier |
| 302 | p.MaterialVariant = "2022 Stud" |
| 303 | p.Anchored = true |
| 304 | p.Parent = model |
| 305 | end |
| 306 | do |
| 307 | local p = Instance.new("WedgePart") |
| 308 | p.Name = "ToothBot_2" |
| 309 | p.Size = Vector3.new(1.5, 0.8, 0.8) |
| 310 | p.CFrame = CFrame.new(4.88675, 21.2707, 1.43649) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(80)) |
| 311 | p.BrickColor = BrickColor.new("Institutional white") |
| 312 | p.Material = Enum.Material.Glacier |
| 313 | p.MaterialVariant = "2022 Stud" |
| 314 | p.Anchored = true |
| 315 | p.Parent = model |
| 316 | end |
| 317 | do |
| 318 | local p = Instance.new("WedgePart") |
| 319 | p.Name = "ToothBot_3" |
| 320 | p.Size = Vector3.new(1.5, 0.8, 0.8) |
| 321 | p.CFrame = CFrame.new(3.65869, 21.2707, 3.21739) * CFrame.Angles(math.rad(50), math.rad(0), math.rad(80)) |
| 322 | p.BrickColor = BrickColor.new("Institutional white") |
| 323 | p.Material = Enum.Material.Glacier |
| 324 | p.MaterialVariant = "2022 Stud" |
| 325 | p.Anchored = true |
| 326 | p.Parent = model |
| 327 | end |
| 328 | do |
| 329 | local p = Instance.new("Part") |
| 330 | p.Shape = Enum.PartType.Ball |
| 331 | p.Name = "Spot1" |
| 332 | p.Size = Vector3.new(2, 2, 2) |
| 333 | p.CFrame = CFrame.new(-1, 25.8, 0) |
| 334 | p.BrickColor = BrickColor.new("Institutional white") |
| 335 | p.Material = Enum.Material.Glacier |
| 336 | p.MaterialVariant = "2022 Stud" |
| 337 | p.Anchored = true |
| 338 | p.Parent = model |
| 339 | end |
| 340 | do |
| 341 | local p = Instance.new("Part") |
| 342 | p.Shape = Enum.PartType.Ball |
| 343 | p.Name = "Spot2" |
| 344 | p.Size = Vector3.new(1.8, 1.8, 1.8) |
| 345 | p.CFrame = CFrame.new(0.5, 25, 2.5) |
| 346 | p.BrickColor = BrickColor.new("Institutional white") |
| 347 | p.Material = Enum.Material.Glacier |
| 348 | p.MaterialVariant = "2022 Stud" |
| 349 | p.Anchored = true |
| 350 | p.Parent = model |
| 351 | end |
| 352 | do |
| 353 | local p = Instance.new("Part") |
| 354 | p.Shape = Enum.PartType.Ball |
| 355 | p.Name = "Spot3" |
| 356 | p.Size = Vector3.new(1.8, 1.8, 1.8) |
| 357 | p.CFrame = CFrame.new(0.5, 25, -2.5) |
| 358 | p.BrickColor = BrickColor.new("Institutional white") |
| 359 | p.Material = Enum.Material.Glacier |
| 360 | p.MaterialVariant = "2022 Stud" |
| 361 | p.Anchored = true |
| 362 | p.Parent = model |
| 363 | end |
| 364 | do |
| 365 | local p = Instance.new("Part") |
| 366 | p.Shape = Enum.PartType.Ball |
| 367 | p.Name = "Spot4" |
| 368 | p.Size = Vector3.new(1.5, 1.5, 1.5) |
| 369 | p.CFrame = CFrame.new(-2.5, 23.5, 1.5) |
| 370 | p.BrickColor = BrickColor.new("Institutional white") |
| 371 | p.Material = Enum.Material.Glacier |
| 372 | p.MaterialVariant = "2022 Stud" |
| 373 | p.Anchored = true |
| 374 | p.Parent = model |
| 375 | end |
| 376 | do |
| 377 | local p = Instance.new("Part") |
| 378 | p.Shape = Enum.PartType.Ball |
| 379 | p.Name = "Spot5" |
| 380 | p.Size = Vector3.new(1.5, 1.5, 1.5) |
| 381 | p.CFrame = CFrame.new(-2.5, 23.5, -1.5) |
| 382 | p.BrickColor = BrickColor.new("Institutional white") |
| 383 | p.Material = Enum.Material.Glacier |
| 384 | p.MaterialVariant = "2022 Stud" |
| 385 | p.Anchored = true |
| 386 | p.Parent = model |
| 387 | end |
| 388 | do |
| 389 | local p = Instance.new("Part") |
| 390 | p.Shape = Enum.PartType.Ball |
| 391 | p.Name = "Spot6" |
| 392 | p.Size = Vector3.new(1.8, 1.8, 1.8) |
| 393 | p.CFrame = CFrame.new(-1.5, 19, 0) |
| 394 | p.BrickColor = BrickColor.new("Institutional white") |
| 395 | p.Material = Enum.Material.Glacier |
| 396 | p.MaterialVariant = "2022 Stud" |
| 397 | p.Anchored = true |
| 398 | p.Parent = model |
| 399 | end |
| 400 | do |
| 401 | local p = Instance.new("Part") |
| 402 | p.Shape = Enum.PartType.Ball |
| 403 | p.Name = "Spot7" |
| 404 | p.Size = Vector3.new(1.5, 1.5, 1.5) |
| 405 | p.CFrame = CFrame.new(0, 19.5, 2) |
| 406 | p.BrickColor = BrickColor.new("Institutional white") |
| 407 | p.Material = Enum.Material.Glacier |
| 408 | p.MaterialVariant = "2022 Stud" |
| 409 | p.Anchored = true |
| 410 | p.Parent = model |
| 411 | end |
| 412 | do |
| 413 | local p = Instance.new("Part") |
| 414 | p.Shape = Enum.PartType.Ball |
| 415 | p.Name = "Spot8" |
| 416 | p.Size = Vector3.new(1.5, 1.5, 1.5) |
| 417 | p.CFrame = CFrame.new(0, 19.5, -2) |
| 418 | p.BrickColor = BrickColor.new("Institutional white") |
| 419 | p.Material = Enum.Material.Glacier |
| 420 | p.MaterialVariant = "2022 Stud" |
| 421 | p.Anchored = true |
| 422 | p.Parent = model |
| 423 | end |
| 424 | do |
| 425 | local rightV = Vector3.new(0.866,-0.5,0).Unit |
| 426 | local upV = (Vector3.new(0,0,1) - Vector3.new(0,0,1):Dot(rightV)*rightV).Unit |
| 427 | local normalV = upV:Cross(rightV) |
| 428 | local pos = Vector3.new(1, 22, 0) |
| 429 | local cyl = Instance.new("Part") |
| 430 | cyl.Shape = Enum.PartType.Cylinder |
| 431 | cyl.Size = Vector3.new(1, 10, 10) |
| 432 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 433 | cyl.BrickColor = BrickColor.new("Institutional white") |
| 434 | cyl.Material = Enum.Material.Glacier |
| 435 | cyl.MaterialVariant = "2022 Stud" |
| 436 | cyl.Anchored = true; cyl.Parent = workspace |
| 437 | local cuts = {} |
| 438 | local hole = Instance.new("Part") |
| 439 | hole.Shape = Enum.PartType.Cylinder |
| 440 | hole.Size = Vector3.new(1.2, 8, 8) |
| 441 | hole.CFrame = cyl.CFrame |
| 442 | hole.BrickColor = BrickColor.new("Institutional white") |
| 443 | hole.Material = Enum.Material.Glacier |
| 444 | hole.MaterialVariant = "2022 Stud" |
| 445 | hole.Anchored = true; hole.Parent = workspace |
| 446 | table.insert(cuts, hole) |
| 447 | local angBoxes = {} |
| 448 | do |
| 449 | local edgeDir = 1*rightV + 0*upV |
| 450 | local edgePerp = 0*rightV + 1*upV |
| 451 | local cut = Instance.new("Part") |
| 452 | cut.Size = Vector3.new(20, 1.2, 20) |
| 453 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 10 * edgePerp, edgeDir, normalV) |
| 454 | cut.BrickColor = BrickColor.new("Institutional white") |
| 455 | cut.Material = Enum.Material.Glacier |
| 456 | cut.MaterialVariant = "2022 Stud" |
| 457 | cut.Anchored = true; cut.Parent = workspace |
| 458 | table.insert(angBoxes, cut) |
| 459 | end |
| 460 | do |
| 461 | local edgeDir = -1*rightV + 0*upV |
| 462 | local edgePerp = 0*rightV + -1*upV |
| 463 | local cut = Instance.new("Part") |
| 464 | cut.Size = Vector3.new(20, 1.2, 20) |
| 465 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 10 * edgePerp, edgeDir, normalV) |
| 466 | cut.BrickColor = BrickColor.new("Institutional white") |
| 467 | cut.Material = Enum.Material.Glacier |
| 468 | cut.MaterialVariant = "2022 Stud" |
| 469 | cut.Anchored = true; cut.Parent = workspace |
| 470 | table.insert(angBoxes, cut) |
| 471 | end |
| 472 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 473 | if #cuts > 0 then |
| 474 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 475 | for _, c in ipairs(cuts) do c:Destroy() end |
| 476 | if ok and result then |
| 477 | cyl:Destroy() |
| 478 | result.Name = "LipTop"; result.Anchored = true; result.Parent = model |
| 479 | else |
| 480 | cyl.Name = "LipTop"; cyl.Parent = model |
| 481 | end |
| 482 | else |
| 483 | cyl.Name = "LipTop"; cyl.Parent = model |
| 484 | end |
| 485 | end |
| 486 | do |
| 487 | local rightV = Vector3.new(0.98,-0.2,0).Unit |
| 488 | local upV = (Vector3.new(0,0,1) - Vector3.new(0,0,1):Dot(rightV)*rightV).Unit |
| 489 | local normalV = upV:Cross(rightV) |
| 490 | local pos = Vector3.new(1, 22, 0) |
| 491 | local cyl = Instance.new("Part") |
| 492 | cyl.Shape = Enum.PartType.Cylinder |
| 493 | cyl.Size = Vector3.new(1, 10, 10) |
| 494 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 495 | cyl.BrickColor = BrickColor.new("Institutional white") |
| 496 | cyl.Material = Enum.Material.Glacier |
| 497 | cyl.MaterialVariant = "2022 Stud" |
| 498 | cyl.Anchored = true; cyl.Parent = workspace |
| 499 | local cuts = {} |
| 500 | local hole = Instance.new("Part") |
| 501 | hole.Shape = Enum.PartType.Cylinder |
| 502 | hole.Size = Vector3.new(1.2, 8, 8) |
| 503 | hole.CFrame = cyl.CFrame |
| 504 | hole.BrickColor = BrickColor.new("Institutional white") |
| 505 | hole.Material = Enum.Material.Glacier |
| 506 | hole.MaterialVariant = "2022 Stud" |
| 507 | hole.Anchored = true; hole.Parent = workspace |
| 508 | table.insert(cuts, hole) |
| 509 | local angBoxes = {} |
| 510 | do |
| 511 | local edgeDir = 1*rightV + 0*upV |
| 512 | local edgePerp = 0*rightV + 1*upV |
| 513 | local cut = Instance.new("Part") |
| 514 | cut.Size = Vector3.new(20, 1.2, 20) |
| 515 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 10 * edgePerp, edgeDir, normalV) |
| 516 | cut.BrickColor = BrickColor.new("Institutional white") |
| 517 | cut.Material = Enum.Material.Glacier |
| 518 | cut.MaterialVariant = "2022 Stud" |
| 519 | cut.Anchored = true; cut.Parent = workspace |
| 520 | table.insert(angBoxes, cut) |
| 521 | end |
| 522 | do |
| 523 | local edgeDir = -1*rightV + 0*upV |
| 524 | local edgePerp = 0*rightV + -1*upV |
| 525 | local cut = Instance.new("Part") |
| 526 | cut.Size = Vector3.new(20, 1.2, 20) |
| 527 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 10 * edgePerp, edgeDir, normalV) |
| 528 | cut.BrickColor = BrickColor.new("Institutional white") |
| 529 | cut.Material = Enum.Material.Glacier |
| 530 | cut.MaterialVariant = "2022 Stud" |
| 531 | cut.Anchored = true; cut.Parent = workspace |
| 532 | table.insert(angBoxes, cut) |
| 533 | end |
| 534 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 535 | if #cuts > 0 then |
| 536 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 537 | for _, c in ipairs(cuts) do c:Destroy() end |
| 538 | if ok and result then |
| 539 | cyl:Destroy() |
| 540 | result.Name = "LipBot"; result.Anchored = true; result.Parent = model |
| 541 | else |
| 542 | cyl.Name = "LipBot"; cyl.Parent = model |
| 543 | end |
| 544 | else |
| 545 | cyl.Name = "LipBot"; cyl.Parent = model |
| 546 | end |
| 547 | end |
| 548 | do |
| 549 | local upV = Vector3.new(0.5,0.866,0).Unit |
| 550 | local rightV = (Vector3.new(0.866,-0.5,0) - Vector3.new(0.866,-0.5,0):Dot(upV)*upV).Unit |
| 551 | local forwardV = rightV:Cross(upV) |
| 552 | local pos = Vector3.new(1, 22, 0) |
| 553 | local ball = Instance.new("Part") |
| 554 | ball.Shape = Enum.PartType.Ball |
| 555 | ball.Size = Vector3.new(9, 9, 9) |
| 556 | ball.CFrame = CFrame.new(pos) |
| 557 | ball.BrickColor = BrickColor.new("Bright red") |
| 558 | ball.Material = Enum.Material.Glacier |
| 559 | ball.MaterialVariant = "2022 Stud" |
| 560 | ball.Anchored = true; ball.Parent = workspace |
| 561 | local cuts = {} |
| 562 | do |
| 563 | local h = 0 |
| 564 | local cut = Instance.new("Part") |
| 565 | cut.Size = Vector3.new(18, 18, 18) |
| 566 | cut.CFrame = CFrame.fromMatrix(pos + upV*(-9), rightV, upV) |
| 567 | cut.BrickColor = BrickColor.new("Bright red") |
| 568 | cut.Material = Enum.Material.Glacier |
| 569 | cut.MaterialVariant = "2022 Stud" |
| 570 | cut.Anchored = true; cut.Parent = workspace |
| 571 | table.insert(cuts, cut) |
| 572 | end |
| 573 | if #cuts > 0 then |
| 574 | local ok, result = pcall(function() return ball:SubtractAsync(cuts) end) |
| 575 | for _, c in ipairs(cuts) do c:Destroy() end |
| 576 | if ok and result then |
| 577 | ball:Destroy() |
| 578 | result.Name = "HeadTop"; result.Anchored = true; result.Parent = model |
| 579 | else |
| 580 | ball.Name = "HeadTop"; ball.Parent = model |
| 581 | end |
| 582 | else |
| 583 | ball.Name = "HeadTop"; ball.Parent = model |
| 584 | end |
| 585 | end |
| 586 | do |
| 587 | local upV = Vector3.new(-0.2,-0.98,0).Unit |
| 588 | local rightV = (Vector3.new(0.98,-0.2,0) - Vector3.new(0.98,-0.2,0):Dot(upV)*upV).Unit |
| 589 | local forwardV = rightV:Cross(upV) |
| 590 | local pos = Vector3.new(1, 22, 0) |
| 591 | local ball = Instance.new("Part") |
| 592 | ball.Shape = Enum.PartType.Ball |
| 593 | ball.Size = Vector3.new(9, 9, 9) |
| 594 | ball.CFrame = CFrame.new(pos) |
| 595 | ball.BrickColor = BrickColor.new("Bright red") |
| 596 | ball.Material = Enum.Material.Glacier |
| 597 | ball.MaterialVariant = "2022 Stud" |
| 598 | ball.Anchored = true; ball.Parent = workspace |
| 599 | local cuts = {} |
| 600 | do |
| 601 | local h = 0 |
| 602 | local cut = Instance.new("Part") |
| 603 | cut.Size = Vector3.new(18, 18, 18) |
| 604 | cut.CFrame = CFrame.fromMatrix(pos + upV*(-9), rightV, upV) |
| 605 | cut.BrickColor = BrickColor.new("Bright red") |
| 606 | cut.Material = Enum.Material.Glacier |
| 607 | cut.MaterialVariant = "2022 Stud" |
| 608 | cut.Anchored = true; cut.Parent = workspace |
| 609 | table.insert(cuts, cut) |
| 610 | end |
| 611 | if #cuts > 0 then |
| 612 | local ok, result = pcall(function() return ball:SubtractAsync(cuts) end) |
| 613 | for _, c in ipairs(cuts) do c:Destroy() end |
| 614 | if ok and result then |
| 615 | ball:Destroy() |
| 616 | result.Name = "HeadBot"; result.Anchored = true; result.Parent = model |
| 617 | else |
| 618 | ball.Name = "HeadBot"; ball.Parent = model |
| 619 | end |
| 620 | else |
| 621 | ball.Name = "HeadBot"; ball.Parent = model |
| 622 | end |
| 623 | end |
| 624 | model.PrimaryPart = model:FindFirstChild("PipeBody") |
| 625 | print("CarnivorousPlant built: " .. #model:GetChildren() .. " parts") |
Loading comments...