Loading model...
by ahmet köksal · 5/24/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: StoneFountain |
| 3 | |
| 4 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 5 | -- Model: StoneFountain |
| 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 = "StoneFountain" |
| 24 | model.Parent = workspace |
| 25 | |
| 26 | local variants = { |
| 27 | ["Dark stone grey"] = "2022 Inlet", |
| 28 | ["Light stone grey"] = "2022 Inlet", |
| 29 | ["Medium stone grey"] = "2022 Inlet", |
| 30 | ["Pastel Blue"] = "2022 Stud", |
| 31 | } |
| 32 | do |
| 33 | local p = Instance.new("Part") |
| 34 | p.Shape = Enum.PartType.Cylinder |
| 35 | p.Name = "BaseFloor" |
| 36 | p.Size = Vector3.new(1, 24, 24) |
| 37 | p.CFrame = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 38 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 39 | p.Material = Enum.Material.Glacier |
| 40 | p.MaterialVariant = "2022 Inlet" |
| 41 | p.Anchored = true |
| 42 | p.Parent = model |
| 43 | end |
| 44 | do |
| 45 | local p = Instance.new("Part") |
| 46 | p.Shape = Enum.PartType.Cylinder |
| 47 | p.Name = "BaseWater" |
| 48 | p.Size = Vector3.new(0.2, 23.5, 23.5) |
| 49 | p.CFrame = CFrame.new(0, 1.2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 50 | p.BrickColor = BrickColor.new("Pastel Blue") |
| 51 | p.Material = Enum.Material.Glacier |
| 52 | p.MaterialVariant = "2022 Stud" |
| 53 | p.Anchored = true |
| 54 | p.Parent = model |
| 55 | end |
| 56 | do |
| 57 | local p = Instance.new("Part") |
| 58 | p.Shape = Enum.PartType.Cylinder |
| 59 | p.Name = "Ped1_Base1" |
| 60 | p.Size = Vector3.new(1, 6, 6) |
| 61 | p.CFrame = CFrame.new(0, 1.66, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 62 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 63 | p.Material = Enum.Material.Glacier |
| 64 | p.MaterialVariant = "2022 Inlet" |
| 65 | p.Anchored = true |
| 66 | p.Parent = model |
| 67 | end |
| 68 | do |
| 69 | local p = Instance.new("Part") |
| 70 | p.Shape = Enum.PartType.Cylinder |
| 71 | p.Name = "Ped1_Base2" |
| 72 | p.Size = Vector3.new(0.5, 5, 5) |
| 73 | p.CFrame = CFrame.new(0, 2.37, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 74 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 75 | p.Material = Enum.Material.Glacier |
| 76 | p.MaterialVariant = "2022 Inlet" |
| 77 | p.Anchored = true |
| 78 | p.Parent = model |
| 79 | end |
| 80 | do |
| 81 | local p = Instance.new("Part") |
| 82 | p.Shape = Enum.PartType.Cylinder |
| 83 | p.Name = "Ped1_Stem" |
| 84 | p.Size = Vector3.new(4, 3, 3) |
| 85 | p.CFrame = CFrame.new(0, 4.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 86 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 87 | p.Material = Enum.Material.Glacier |
| 88 | p.MaterialVariant = "2022 Inlet" |
| 89 | p.Anchored = true |
| 90 | p.Parent = model |
| 91 | end |
| 92 | do |
| 93 | local p = Instance.new("Part") |
| 94 | p.Shape = Enum.PartType.Cylinder |
| 95 | p.Name = "Ped1_Rib1" |
| 96 | p.Size = Vector3.new(0.4, 3.2, 3.2) |
| 97 | p.CFrame = CFrame.new(0, 3.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 98 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 99 | p.Material = Enum.Material.Glacier |
| 100 | p.MaterialVariant = "2022 Inlet" |
| 101 | p.Anchored = true |
| 102 | p.Parent = model |
| 103 | end |
| 104 | do |
| 105 | local p = Instance.new("Part") |
| 106 | p.Shape = Enum.PartType.Cylinder |
| 107 | p.Name = "Ped1_Rib2" |
| 108 | p.Size = Vector3.new(0.4, 3.2, 3.2) |
| 109 | p.CFrame = CFrame.new(0, 5.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 110 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 111 | p.Material = Enum.Material.Glacier |
| 112 | p.MaterialVariant = "2022 Inlet" |
| 113 | p.Anchored = true |
| 114 | p.Parent = model |
| 115 | end |
| 116 | do |
| 117 | local p = Instance.new("Part") |
| 118 | p.Shape = Enum.PartType.Cylinder |
| 119 | p.Name = "Ped1_Cap" |
| 120 | p.Size = Vector3.new(0.5, 4.5, 4.5) |
| 121 | p.CFrame = CFrame.new(0, 6.79, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 122 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 123 | p.Material = Enum.Material.Glacier |
| 124 | p.MaterialVariant = "2022 Inlet" |
| 125 | p.Anchored = true |
| 126 | p.Parent = model |
| 127 | end |
| 128 | do |
| 129 | local p = Instance.new("Part") |
| 130 | p.Shape = Enum.PartType.Cylinder |
| 131 | p.Name = "MidWater" |
| 132 | p.Size = Vector3.new(0.2, 9.5, 9.5) |
| 133 | p.CFrame = CFrame.new(0, 11.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 134 | p.BrickColor = BrickColor.new("Pastel Blue") |
| 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.Shape = Enum.PartType.Cylinder |
| 143 | p.Name = "Ped2_Base" |
| 144 | p.Size = Vector3.new(1, 3.5, 3.5) |
| 145 | p.CFrame = CFrame.new(0, 12, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 146 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 147 | p.Material = Enum.Material.Glacier |
| 148 | p.MaterialVariant = "2022 Inlet" |
| 149 | p.Anchored = true |
| 150 | p.Parent = model |
| 151 | end |
| 152 | do |
| 153 | local p = Instance.new("Part") |
| 154 | p.Shape = Enum.PartType.Cylinder |
| 155 | p.Name = "Ped2_Stem" |
| 156 | p.Size = Vector3.new(2.5, 2, 2) |
| 157 | p.CFrame = CFrame.new(0, 13.79, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 158 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 159 | p.Material = Enum.Material.Glacier |
| 160 | p.MaterialVariant = "2022 Inlet" |
| 161 | p.Anchored = true |
| 162 | p.Parent = model |
| 163 | end |
| 164 | do |
| 165 | local p = Instance.new("Part") |
| 166 | p.Shape = Enum.PartType.Cylinder |
| 167 | p.Name = "Ped2_Rib1" |
| 168 | p.Size = Vector3.new(0.3, 2.2, 2.2) |
| 169 | p.CFrame = CFrame.new(0, 13.75, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 170 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 171 | p.Material = Enum.Material.Glacier |
| 172 | p.MaterialVariant = "2022 Inlet" |
| 173 | p.Anchored = true |
| 174 | p.Parent = model |
| 175 | end |
| 176 | do |
| 177 | local p = Instance.new("Part") |
| 178 | p.Shape = Enum.PartType.Cylinder |
| 179 | p.Name = "Ped2_Cap" |
| 180 | p.Size = Vector3.new(0.5, 3, 3) |
| 181 | p.CFrame = CFrame.new(0, 15.33, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 182 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 183 | p.Material = Enum.Material.Glacier |
| 184 | p.MaterialVariant = "2022 Inlet" |
| 185 | p.Anchored = true |
| 186 | p.Parent = model |
| 187 | end |
| 188 | do |
| 189 | local p = Instance.new("Part") |
| 190 | p.Shape = Enum.PartType.Cylinder |
| 191 | p.Name = "TopWater" |
| 192 | p.Size = Vector3.new(0.2, 5.5, 5.5) |
| 193 | p.CFrame = CFrame.new(0, 18.2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 194 | p.BrickColor = BrickColor.new("Pastel Blue") |
| 195 | p.Material = Enum.Material.Glacier |
| 196 | p.MaterialVariant = "2022 Stud" |
| 197 | p.Anchored = true |
| 198 | p.Parent = model |
| 199 | end |
| 200 | do |
| 201 | local p = Instance.new("Part") |
| 202 | p.Shape = Enum.PartType.Cylinder |
| 203 | p.Name = "FinialBase" |
| 204 | p.Size = Vector3.new(0.6, 2, 2) |
| 205 | p.CFrame = CFrame.new(0, 18.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 206 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 207 | p.Material = Enum.Material.Glacier |
| 208 | p.MaterialVariant = "2022 Inlet" |
| 209 | p.Anchored = true |
| 210 | p.Parent = model |
| 211 | end |
| 212 | do |
| 213 | local p = Instance.new("Part") |
| 214 | p.Name = "BirdBody" |
| 215 | p.Size = Vector3.new(1.5, 1.2, 1.8) |
| 216 | p.CFrame = CFrame.new(0, 19.5, 0) |
| 217 | p.BrickColor = BrickColor.new("Light stone grey") |
| 218 | p.Material = Enum.Material.Glacier |
| 219 | p.MaterialVariant = "2022 Inlet" |
| 220 | p.Anchored = true |
| 221 | p.Parent = model |
| 222 | end |
| 223 | do |
| 224 | local p = Instance.new("Part") |
| 225 | p.Shape = Enum.PartType.Ball |
| 226 | p.Name = "BirdHead" |
| 227 | p.Size = Vector3.new(1, 1, 1) |
| 228 | p.CFrame = CFrame.new(0, 20.5, -0.5) |
| 229 | p.BrickColor = BrickColor.new("Light stone grey") |
| 230 | p.Material = Enum.Material.Glacier |
| 231 | p.MaterialVariant = "2022 Inlet" |
| 232 | p.Anchored = true |
| 233 | p.Parent = model |
| 234 | end |
| 235 | do |
| 236 | local p = Instance.new("Part") |
| 237 | p.Name = "BirdBeak" |
| 238 | p.Size = Vector3.new(0.4, 0.4, 0.6) |
| 239 | p.CFrame = CFrame.new(0, 20.5, -1.1) |
| 240 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 241 | p.Material = Enum.Material.Glacier |
| 242 | p.MaterialVariant = "2022 Inlet" |
| 243 | p.Anchored = true |
| 244 | p.Parent = model |
| 245 | end |
| 246 | do |
| 247 | local p = Instance.new("Part") |
| 248 | p.Name = "BirdTail" |
| 249 | p.Size = Vector3.new(0.8, 0.8, 1.5) |
| 250 | p.CFrame = CFrame.new(0, 19.8, 1) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)) |
| 251 | p.BrickColor = BrickColor.new("Light stone grey") |
| 252 | p.Material = Enum.Material.Glacier |
| 253 | p.MaterialVariant = "2022 Inlet" |
| 254 | p.Anchored = true |
| 255 | p.Parent = model |
| 256 | end |
| 257 | do |
| 258 | local rightV = Vector3.new(1,0,0).Unit |
| 259 | local upV = (Vector3.new(0,0,-1) - Vector3.new(0,0,-1):Dot(rightV)*rightV).Unit |
| 260 | local normalV = upV:Cross(rightV) |
| 261 | local pos = Vector3.new(0, 1.04, 0) |
| 262 | local cyl = Instance.new("Part") |
| 263 | cyl.Shape = Enum.PartType.Cylinder |
| 264 | cyl.Size = Vector3.new(2, 24, 24) |
| 265 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 266 | cyl.BrickColor = BrickColor.new("Medium stone grey") |
| 267 | cyl.Material = Enum.Material.Glacier |
| 268 | cyl.MaterialVariant = "2022 Inlet" |
| 269 | cyl.Anchored = true; cyl.Parent = workspace |
| 270 | local cuts = {} |
| 271 | local hole = Instance.new("Part") |
| 272 | hole.Shape = Enum.PartType.Cylinder |
| 273 | hole.Size = Vector3.new(2.2, 22, 22) |
| 274 | hole.CFrame = cyl.CFrame |
| 275 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 276 | hole.Material = Enum.Material.Glacier |
| 277 | hole.MaterialVariant = "2022 Inlet" |
| 278 | hole.Anchored = true; hole.Parent = workspace |
| 279 | table.insert(cuts, hole) |
| 280 | local angBoxes = {} |
| 281 | do |
| 282 | local edgeDir = 1*rightV + 0*upV |
| 283 | local edgePerp = 0*rightV + 1*upV |
| 284 | local cut = Instance.new("Part") |
| 285 | cut.Size = Vector3.new(48, 2.2, 48) |
| 286 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 24 * edgePerp, edgeDir, normalV) |
| 287 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 288 | cut.Material = Enum.Material.Glacier |
| 289 | cut.MaterialVariant = "2022 Inlet" |
| 290 | cut.Anchored = true; cut.Parent = workspace |
| 291 | table.insert(angBoxes, cut) |
| 292 | end |
| 293 | do |
| 294 | local edgeDir = 0*rightV + 1*upV |
| 295 | local edgePerp = -1*rightV + 0*upV |
| 296 | local cut = Instance.new("Part") |
| 297 | cut.Size = Vector3.new(48, 2.2, 48) |
| 298 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 24 * edgePerp, edgeDir, normalV) |
| 299 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 300 | cut.Material = Enum.Material.Glacier |
| 301 | cut.MaterialVariant = "2022 Inlet" |
| 302 | cut.Anchored = true; cut.Parent = workspace |
| 303 | table.insert(angBoxes, cut) |
| 304 | end |
| 305 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 306 | if #cuts > 0 then |
| 307 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 308 | for _, c in ipairs(cuts) do c:Destroy() end |
| 309 | if ok and result then |
| 310 | cyl:Destroy() |
| 311 | result.Name = "BaseWall_0"; result.Anchored = true; result.Parent = model |
| 312 | else |
| 313 | cyl.Name = "BaseWall_0"; cyl.Parent = model |
| 314 | end |
| 315 | else |
| 316 | cyl.Name = "BaseWall_0"; cyl.Parent = model |
| 317 | end |
| 318 | end |
| 319 | do |
| 320 | local rightV = Vector3.new(1,0,0).Unit |
| 321 | local upV = (Vector3.new(0,0,-1) - Vector3.new(0,0,-1):Dot(rightV)*rightV).Unit |
| 322 | local normalV = upV:Cross(rightV) |
| 323 | local pos = Vector3.new(0, 1.04, 0) |
| 324 | local cyl = Instance.new("Part") |
| 325 | cyl.Shape = Enum.PartType.Cylinder |
| 326 | cyl.Size = Vector3.new(2, 24, 24) |
| 327 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 328 | cyl.BrickColor = BrickColor.new("Medium stone grey") |
| 329 | cyl.Material = Enum.Material.Glacier |
| 330 | cyl.MaterialVariant = "2022 Inlet" |
| 331 | cyl.Anchored = true; cyl.Parent = workspace |
| 332 | local cuts = {} |
| 333 | local hole = Instance.new("Part") |
| 334 | hole.Shape = Enum.PartType.Cylinder |
| 335 | hole.Size = Vector3.new(2.2, 22, 22) |
| 336 | hole.CFrame = cyl.CFrame |
| 337 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 338 | hole.Material = Enum.Material.Glacier |
| 339 | hole.MaterialVariant = "2022 Inlet" |
| 340 | hole.Anchored = true; hole.Parent = workspace |
| 341 | table.insert(cuts, hole) |
| 342 | local angBoxes = {} |
| 343 | do |
| 344 | local edgeDir = 0*rightV + 1*upV |
| 345 | local edgePerp = -1*rightV + 0*upV |
| 346 | local cut = Instance.new("Part") |
| 347 | cut.Size = Vector3.new(48, 2.2, 48) |
| 348 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 24 * edgePerp, edgeDir, normalV) |
| 349 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 350 | cut.Material = Enum.Material.Glacier |
| 351 | cut.MaterialVariant = "2022 Inlet" |
| 352 | cut.Anchored = true; cut.Parent = workspace |
| 353 | table.insert(angBoxes, cut) |
| 354 | end |
| 355 | do |
| 356 | local edgeDir = -1*rightV + 0*upV |
| 357 | local edgePerp = 0*rightV + -1*upV |
| 358 | local cut = Instance.new("Part") |
| 359 | cut.Size = Vector3.new(48, 2.2, 48) |
| 360 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 24 * edgePerp, edgeDir, normalV) |
| 361 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 362 | cut.Material = Enum.Material.Glacier |
| 363 | cut.MaterialVariant = "2022 Inlet" |
| 364 | cut.Anchored = true; cut.Parent = workspace |
| 365 | table.insert(angBoxes, cut) |
| 366 | end |
| 367 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 368 | if #cuts > 0 then |
| 369 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 370 | for _, c in ipairs(cuts) do c:Destroy() end |
| 371 | if ok and result then |
| 372 | cyl:Destroy() |
| 373 | result.Name = "BaseWall_1"; result.Anchored = true; result.Parent = model |
| 374 | else |
| 375 | cyl.Name = "BaseWall_1"; cyl.Parent = model |
| 376 | end |
| 377 | else |
| 378 | cyl.Name = "BaseWall_1"; cyl.Parent = model |
| 379 | end |
| 380 | end |
| 381 | do |
| 382 | local rightV = Vector3.new(1,0,0).Unit |
| 383 | local upV = (Vector3.new(0,0,-1) - Vector3.new(0,0,-1):Dot(rightV)*rightV).Unit |
| 384 | local normalV = upV:Cross(rightV) |
| 385 | local pos = Vector3.new(0, 1.04, 0) |
| 386 | local cyl = Instance.new("Part") |
| 387 | cyl.Shape = Enum.PartType.Cylinder |
| 388 | cyl.Size = Vector3.new(2, 24, 24) |
| 389 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 390 | cyl.BrickColor = BrickColor.new("Medium stone grey") |
| 391 | cyl.Material = Enum.Material.Glacier |
| 392 | cyl.MaterialVariant = "2022 Inlet" |
| 393 | cyl.Anchored = true; cyl.Parent = workspace |
| 394 | local cuts = {} |
| 395 | local hole = Instance.new("Part") |
| 396 | hole.Shape = Enum.PartType.Cylinder |
| 397 | hole.Size = Vector3.new(2.2, 22, 22) |
| 398 | hole.CFrame = cyl.CFrame |
| 399 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 400 | hole.Material = Enum.Material.Glacier |
| 401 | hole.MaterialVariant = "2022 Inlet" |
| 402 | hole.Anchored = true; hole.Parent = workspace |
| 403 | table.insert(cuts, hole) |
| 404 | local angBoxes = {} |
| 405 | do |
| 406 | local edgeDir = -1*rightV + 0*upV |
| 407 | local edgePerp = 0*rightV + -1*upV |
| 408 | local cut = Instance.new("Part") |
| 409 | cut.Size = Vector3.new(48, 2.2, 48) |
| 410 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 24 * edgePerp, edgeDir, normalV) |
| 411 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 412 | cut.Material = Enum.Material.Glacier |
| 413 | cut.MaterialVariant = "2022 Inlet" |
| 414 | cut.Anchored = true; cut.Parent = workspace |
| 415 | table.insert(angBoxes, cut) |
| 416 | end |
| 417 | do |
| 418 | local edgeDir = 0*rightV + -1*upV |
| 419 | local edgePerp = 1*rightV + 0*upV |
| 420 | local cut = Instance.new("Part") |
| 421 | cut.Size = Vector3.new(48, 2.2, 48) |
| 422 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 24 * edgePerp, edgeDir, normalV) |
| 423 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 424 | cut.Material = Enum.Material.Glacier |
| 425 | cut.MaterialVariant = "2022 Inlet" |
| 426 | cut.Anchored = true; cut.Parent = workspace |
| 427 | table.insert(angBoxes, cut) |
| 428 | end |
| 429 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 430 | if #cuts > 0 then |
| 431 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 432 | for _, c in ipairs(cuts) do c:Destroy() end |
| 433 | if ok and result then |
| 434 | cyl:Destroy() |
| 435 | result.Name = "BaseWall_2"; result.Anchored = true; result.Parent = model |
| 436 | else |
| 437 | cyl.Name = "BaseWall_2"; cyl.Parent = model |
| 438 | end |
| 439 | else |
| 440 | cyl.Name = "BaseWall_2"; cyl.Parent = model |
| 441 | end |
| 442 | end |
| 443 | do |
| 444 | local rightV = Vector3.new(1,0,0).Unit |
| 445 | local upV = (Vector3.new(0,0,-1) - Vector3.new(0,0,-1):Dot(rightV)*rightV).Unit |
| 446 | local normalV = upV:Cross(rightV) |
| 447 | local pos = Vector3.new(0, 1.04, 0) |
| 448 | local cyl = Instance.new("Part") |
| 449 | cyl.Shape = Enum.PartType.Cylinder |
| 450 | cyl.Size = Vector3.new(2, 24, 24) |
| 451 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 452 | cyl.BrickColor = BrickColor.new("Medium stone grey") |
| 453 | cyl.Material = Enum.Material.Glacier |
| 454 | cyl.MaterialVariant = "2022 Inlet" |
| 455 | cyl.Anchored = true; cyl.Parent = workspace |
| 456 | local cuts = {} |
| 457 | local hole = Instance.new("Part") |
| 458 | hole.Shape = Enum.PartType.Cylinder |
| 459 | hole.Size = Vector3.new(2.2, 22, 22) |
| 460 | hole.CFrame = cyl.CFrame |
| 461 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 462 | hole.Material = Enum.Material.Glacier |
| 463 | hole.MaterialVariant = "2022 Inlet" |
| 464 | hole.Anchored = true; hole.Parent = workspace |
| 465 | table.insert(cuts, hole) |
| 466 | local angBoxes = {} |
| 467 | do |
| 468 | local edgeDir = 0*rightV + -1*upV |
| 469 | local edgePerp = 1*rightV + 0*upV |
| 470 | local cut = Instance.new("Part") |
| 471 | cut.Size = Vector3.new(48, 2.2, 48) |
| 472 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 24 * edgePerp, edgeDir, normalV) |
| 473 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 474 | cut.Material = Enum.Material.Glacier |
| 475 | cut.MaterialVariant = "2022 Inlet" |
| 476 | cut.Anchored = true; cut.Parent = workspace |
| 477 | table.insert(angBoxes, cut) |
| 478 | end |
| 479 | do |
| 480 | local edgeDir = 1*rightV + 0*upV |
| 481 | local edgePerp = 0*rightV + 1*upV |
| 482 | local cut = Instance.new("Part") |
| 483 | cut.Size = Vector3.new(48, 2.2, 48) |
| 484 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 24 * edgePerp, edgeDir, normalV) |
| 485 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 486 | cut.Material = Enum.Material.Glacier |
| 487 | cut.MaterialVariant = "2022 Inlet" |
| 488 | cut.Anchored = true; cut.Parent = workspace |
| 489 | table.insert(angBoxes, cut) |
| 490 | end |
| 491 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 492 | if #cuts > 0 then |
| 493 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 494 | for _, c in ipairs(cuts) do c:Destroy() end |
| 495 | if ok and result then |
| 496 | cyl:Destroy() |
| 497 | result.Name = "BaseWall_3"; result.Anchored = true; result.Parent = model |
| 498 | else |
| 499 | cyl.Name = "BaseWall_3"; cyl.Parent = model |
| 500 | end |
| 501 | else |
| 502 | cyl.Name = "BaseWall_3"; cyl.Parent = model |
| 503 | end |
| 504 | end |
| 505 | do |
| 506 | local upV = Vector3.new(0,1,0).Unit |
| 507 | local rightV = (Vector3.new(1,0,0) - Vector3.new(1,0,0):Dot(upV)*upV).Unit |
| 508 | local forwardV = rightV:Cross(upV) |
| 509 | local pos = Vector3.new(0, 12, 0) |
| 510 | local ball = Instance.new("Part") |
| 511 | ball.Shape = Enum.PartType.Ball |
| 512 | ball.Size = Vector3.new(10, 10, 10) |
| 513 | ball.CFrame = CFrame.new(pos) |
| 514 | ball.BrickColor = BrickColor.new("Medium stone grey") |
| 515 | ball.Material = Enum.Material.Glacier |
| 516 | ball.MaterialVariant = "2022 Inlet" |
| 517 | ball.Anchored = true; ball.Parent = workspace |
| 518 | local cuts = {} |
| 519 | local hole = Instance.new("Part") |
| 520 | hole.Shape = Enum.PartType.Ball |
| 521 | hole.Size = Vector3.new(8.4, 8.4, 8.4) |
| 522 | hole.CFrame = CFrame.new(pos) |
| 523 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 524 | hole.Material = Enum.Material.Glacier |
| 525 | hole.MaterialVariant = "2022 Inlet" |
| 526 | hole.Anchored = true; hole.Parent = workspace |
| 527 | table.insert(cuts, hole) |
| 528 | do |
| 529 | local h = 0 |
| 530 | local cut = Instance.new("Part") |
| 531 | cut.Size = Vector3.new(20, 20, 20) |
| 532 | cut.CFrame = CFrame.fromMatrix(pos + upV*(10), rightV, upV) |
| 533 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 534 | cut.Material = Enum.Material.Glacier |
| 535 | cut.MaterialVariant = "2022 Inlet" |
| 536 | cut.Anchored = true; cut.Parent = workspace |
| 537 | table.insert(cuts, cut) |
| 538 | end |
| 539 | if #cuts > 0 then |
| 540 | local ok, result = pcall(function() return ball:SubtractAsync(cuts) end) |
| 541 | for _, c in ipairs(cuts) do c:Destroy() end |
| 542 | if ok and result then |
| 543 | ball:Destroy() |
| 544 | result.Name = "MidBowl"; result.Anchored = true; result.Parent = model |
| 545 | else |
| 546 | ball.Name = "MidBowl"; ball.Parent = model |
| 547 | end |
| 548 | else |
| 549 | ball.Name = "MidBowl"; ball.Parent = model |
| 550 | end |
| 551 | end |
| 552 | do |
| 553 | local upV = Vector3.new(0,1,0).Unit |
| 554 | local rightV = (Vector3.new(1,0,0) - Vector3.new(1,0,0):Dot(upV)*upV).Unit |
| 555 | local forwardV = rightV:Cross(upV) |
| 556 | local pos = Vector3.new(0, 18.5, 0) |
| 557 | local ball = Instance.new("Part") |
| 558 | ball.Shape = Enum.PartType.Ball |
| 559 | ball.Size = Vector3.new(6, 6, 6) |
| 560 | ball.CFrame = CFrame.new(pos) |
| 561 | ball.BrickColor = BrickColor.new("Medium stone grey") |
| 562 | ball.Material = Enum.Material.Glacier |
| 563 | ball.MaterialVariant = "2022 Inlet" |
| 564 | ball.Anchored = true; ball.Parent = workspace |
| 565 | local cuts = {} |
| 566 | local hole = Instance.new("Part") |
| 567 | hole.Shape = Enum.PartType.Ball |
| 568 | hole.Size = Vector3.new(4.8, 4.8, 4.8) |
| 569 | hole.CFrame = CFrame.new(pos) |
| 570 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 571 | hole.Material = Enum.Material.Glacier |
| 572 | hole.MaterialVariant = "2022 Inlet" |
| 573 | hole.Anchored = true; hole.Parent = workspace |
| 574 | table.insert(cuts, hole) |
| 575 | do |
| 576 | local h = 0 |
| 577 | local cut = Instance.new("Part") |
| 578 | cut.Size = Vector3.new(12, 12, 12) |
| 579 | cut.CFrame = CFrame.fromMatrix(pos + upV*(6), rightV, upV) |
| 580 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 581 | cut.Material = Enum.Material.Glacier |
| 582 | cut.MaterialVariant = "2022 Inlet" |
| 583 | cut.Anchored = true; cut.Parent = workspace |
| 584 | table.insert(cuts, cut) |
| 585 | end |
| 586 | if #cuts > 0 then |
| 587 | local ok, result = pcall(function() return ball:SubtractAsync(cuts) end) |
| 588 | for _, c in ipairs(cuts) do c:Destroy() end |
| 589 | if ok and result then |
| 590 | ball:Destroy() |
| 591 | result.Name = "TopBowl"; result.Anchored = true; result.Parent = model |
| 592 | else |
| 593 | ball.Name = "TopBowl"; ball.Parent = model |
| 594 | end |
| 595 | else |
| 596 | ball.Name = "TopBowl"; ball.Parent = model |
| 597 | end |
| 598 | end |
| 599 | model.PrimaryPart = model:FindFirstChild("BaseFloor") |
| 600 | print("StoneFountain built: " .. #model:GetChildren() .. " parts") |
Loading comments...