Loading model...
by David · 6/5/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: PotionBottle |
| 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 = "PotionBottle" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Brick yellow"] = "2022 Stud", |
| 25 | ["Dark stone grey"] = "2022 Stud", |
| 26 | ["Institutional white"] = "2022 Stud", |
| 27 | ["Nougat"] = "2022 Stud", |
| 28 | } |
| 29 | do |
| 30 | local p = Instance.new("Part") |
| 31 | p.Shape = Enum.PartType.Ball |
| 32 | p.Name = "LiquidCore" |
| 33 | p.Size = Vector3.new(8, 8, 8) |
| 34 | p.CFrame = CFrame.new(0, 0, 0) |
| 35 | p.BrickColor = BrickColor.new("Toothpaste") |
| 36 | p.Material = Enum.Material.Neon |
| 37 | p.Anchored = true |
| 38 | p.Parent = model |
| 39 | end |
| 40 | do |
| 41 | local p = Instance.new("Part") |
| 42 | p.Shape = Enum.PartType.Ball |
| 43 | p.Name = "Highlight" |
| 44 | p.Size = Vector3.new(1.8, 1.8, 1.8) |
| 45 | p.CFrame = CFrame.new(1.8, 1.2, -3.2) |
| 46 | p.BrickColor = BrickColor.new("Institutional white") |
| 47 | p.Material = Enum.Material.Glacier |
| 48 | p.MaterialVariant = "2022 Stud" |
| 49 | p.Anchored = true |
| 50 | p.Parent = model |
| 51 | end |
| 52 | do |
| 53 | local p = Instance.new("Part") |
| 54 | p.Shape = Enum.PartType.Cylinder |
| 55 | p.Name = "GlassNeck" |
| 56 | p.Size = Vector3.new(1.6, 5, 5) |
| 57 | p.CFrame = CFrame.new(0, 4.2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 58 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 59 | p.Material = Enum.Material.Glacier |
| 60 | p.MaterialVariant = "2022 Stud" |
| 61 | p.Anchored = true |
| 62 | p.Parent = model |
| 63 | end |
| 64 | do |
| 65 | local p = Instance.new("Part") |
| 66 | p.Shape = Enum.PartType.Cylinder |
| 67 | p.Name = "Cork" |
| 68 | p.Size = Vector3.new(2, 4.4, 4.4) |
| 69 | p.CFrame = CFrame.new(0, 5.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 70 | p.BrickColor = BrickColor.new("Nougat") |
| 71 | p.Material = Enum.Material.Glacier |
| 72 | p.MaterialVariant = "2022 Stud" |
| 73 | p.Anchored = true |
| 74 | p.Parent = model |
| 75 | end |
| 76 | do |
| 77 | local p = Instance.new("Part") |
| 78 | p.Shape = Enum.PartType.Cylinder |
| 79 | p.Name = "CorkBand" |
| 80 | p.Size = Vector3.new(0.3, 4.6, 4.6) |
| 81 | p.CFrame = CFrame.new(0, 5.3, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 82 | p.BrickColor = BrickColor.new("Brick yellow") |
| 83 | p.Material = Enum.Material.Glacier |
| 84 | p.MaterialVariant = "2022 Stud" |
| 85 | p.Anchored = true |
| 86 | p.Parent = model |
| 87 | end |
| 88 | do |
| 89 | local upV = Vector3.new(0,1,0).Unit |
| 90 | local rightV = (Vector3.new(1,0,0) - Vector3.new(1,0,0):Dot(upV)*upV).Unit |
| 91 | local forwardV = rightV:Cross(upV) |
| 92 | local pos = Vector3.new(0, 0, 0) |
| 93 | local ball = Instance.new("Part") |
| 94 | ball.Shape = Enum.PartType.Ball |
| 95 | ball.Size = Vector3.new(8.8, 8.8, 8.8) |
| 96 | ball.CFrame = CFrame.new(pos) |
| 97 | ball.BrickColor = BrickColor.new("Dark stone grey") |
| 98 | ball.Material = Enum.Material.Glacier |
| 99 | ball.MaterialVariant = "2022 Stud" |
| 100 | ball.Anchored = true; ball.Parent = workspace |
| 101 | local cuts = {} |
| 102 | local hole = Instance.new("Part") |
| 103 | hole.Shape = Enum.PartType.Ball |
| 104 | hole.Size = Vector3.new(8, 8, 8) |
| 105 | hole.CFrame = CFrame.new(pos) |
| 106 | hole.BrickColor = BrickColor.new("Dark stone grey") |
| 107 | hole.Material = Enum.Material.Glacier |
| 108 | hole.MaterialVariant = "2022 Stud" |
| 109 | hole.Anchored = true; hole.Parent = workspace |
| 110 | table.insert(cuts, hole) |
| 111 | do |
| 112 | local h = 3.604269 |
| 113 | local cut = Instance.new("Part") |
| 114 | cut.Size = Vector3.new(17.6, 17.6, 17.6) |
| 115 | cut.CFrame = CFrame.fromMatrix(pos + upV*(12.404269), rightV, upV) |
| 116 | cut.BrickColor = BrickColor.new("Dark stone grey") |
| 117 | cut.Material = Enum.Material.Glacier |
| 118 | cut.MaterialVariant = "2022 Stud" |
| 119 | cut.Anchored = true; cut.Parent = workspace |
| 120 | table.insert(cuts, cut) |
| 121 | end |
| 122 | if #cuts > 0 then |
| 123 | local ok, result = pcall(function() return ball:SubtractAsync(cuts) end) |
| 124 | for _, c in ipairs(cuts) do c:Destroy() end |
| 125 | if ok and result then |
| 126 | ball:Destroy() |
| 127 | result.Name = "GlassShell"; result.Anchored = true; result.Parent = model |
| 128 | else |
| 129 | ball.Name = "GlassShell"; ball.Parent = model |
| 130 | end |
| 131 | else |
| 132 | ball.Name = "GlassShell"; ball.Parent = model |
| 133 | end |
| 134 | end |
| 135 | model.PrimaryPart = model:FindFirstChild("LiquidCore") |
| 136 | print("PotionBottle built: " .. #model:GetChildren() .. " parts") |
Loading comments...