Loading model...
by Matei · 8/11/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: WatermelonSlice |
| 3 | |
| 4 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 5 | -- Model: WatermelonSlice |
| 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 = "WatermelonSlice" |
| 24 | model.Parent = workspace |
| 25 | |
| 26 | local variants = { |
| 27 | ["#ff0000"] = "2022 Stud", |
| 28 | ["Bright green"] = "2022 Stud", |
| 29 | ["Really black"] = "2022 Universal", |
| 30 | ["White"] = "2022 Stud", |
| 31 | } |
| 32 | do |
| 33 | local p = Instance.new("Part") |
| 34 | p.Name = "Seed_0" |
| 35 | p.Size = Vector3.new(0.4, 0.7, 1.2) |
| 36 | p.CFrame = CFrame.new(0.905867, 3.38074, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-15)) |
| 37 | p.BrickColor = BrickColor.new("Really black") |
| 38 | p.Material = Enum.Material.Glacier |
| 39 | p.MaterialVariant = "2022 Universal" |
| 40 | p.Anchored = true |
| 41 | p.Parent = model |
| 42 | end |
| 43 | do |
| 44 | local p = Instance.new("Part") |
| 45 | p.Name = "Seed_1" |
| 46 | p.Size = Vector3.new(0.4, 0.7, 1.2) |
| 47 | p.CFrame = CFrame.new(2.75, 4.76314, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-30)) |
| 48 | p.BrickColor = BrickColor.new("Really black") |
| 49 | p.Material = Enum.Material.Glacier |
| 50 | p.MaterialVariant = "2022 Universal" |
| 51 | p.Anchored = true |
| 52 | p.Parent = model |
| 53 | end |
| 54 | do |
| 55 | local p = Instance.new("Part") |
| 56 | p.Name = "Seed_2" |
| 57 | p.Size = Vector3.new(0.4, 0.7, 1.2) |
| 58 | p.CFrame = CFrame.new(0, 5.5, 0) |
| 59 | p.BrickColor = BrickColor.new("Really black") |
| 60 | p.Material = Enum.Material.Glacier |
| 61 | p.MaterialVariant = "2022 Universal" |
| 62 | p.Anchored = true |
| 63 | p.Parent = model |
| 64 | end |
| 65 | do |
| 66 | local p = Instance.new("Part") |
| 67 | p.Name = "Seed_3" |
| 68 | p.Size = Vector3.new(0.4, 0.7, 1.2) |
| 69 | p.CFrame = CFrame.new(4.61746, 5.91008, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-38)) |
| 70 | p.BrickColor = BrickColor.new("Really black") |
| 71 | p.Material = Enum.Material.Glacier |
| 72 | p.MaterialVariant = "2022 Universal" |
| 73 | p.Anchored = true |
| 74 | p.Parent = model |
| 75 | end |
| 76 | do |
| 77 | local p = Instance.new("Part") |
| 78 | p.Name = "Seed_4" |
| 79 | p.Size = Vector3.new(0.4, 0.7, 1.2) |
| 80 | p.CFrame = CFrame.new(1.94114, 7.24444, 0.04) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-15)) |
| 81 | p.BrickColor = BrickColor.new("Really black") |
| 82 | p.Material = Enum.Material.Glacier |
| 83 | p.MaterialVariant = "2022 Universal" |
| 84 | p.Anchored = true |
| 85 | p.Parent = model |
| 86 | end |
| 87 | do |
| 88 | local p = Instance.new("Part") |
| 89 | p.Name = "Seed_5" |
| 90 | p.Size = Vector3.new(0.4, 0.7, 1.2) |
| 91 | p.CFrame = CFrame.new(-1.0438, 7.42701, 0.04) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(8)) |
| 92 | p.BrickColor = BrickColor.new("Really black") |
| 93 | p.Material = Enum.Material.Glacier |
| 94 | p.MaterialVariant = "2022 Universal" |
| 95 | p.Anchored = true |
| 96 | p.Parent = model |
| 97 | end |
| 98 | do |
| 99 | local rightV = Vector3.new(1,0,0).Unit |
| 100 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 101 | local normalV = upV:Cross(rightV) |
| 102 | local pos = Vector3.new(0, 0, 0) |
| 103 | local cyl = Instance.new("Part") |
| 104 | cyl.Shape = Enum.PartType.Cylinder |
| 105 | cyl.Size = Vector3.new(1, 18, 18) |
| 106 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 107 | cyl.Color = Color3.fromRGB(255, 0, 0) |
| 108 | cyl.Material = Enum.Material.Glacier |
| 109 | cyl.MaterialVariant = "2022 Stud" |
| 110 | cyl.Anchored = true; cyl.Parent = workspace |
| 111 | local cuts = {} |
| 112 | local angBoxes = {} |
| 113 | do |
| 114 | local edgeDir = 0.707107*rightV + 0.707107*upV |
| 115 | local edgePerp = -0.707107*rightV + 0.707107*upV |
| 116 | local cut = Instance.new("Part") |
| 117 | cut.Size = Vector3.new(36, 1.2, 36) |
| 118 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 18 * edgePerp, edgeDir, normalV) |
| 119 | cut.Color = Color3.fromRGB(255, 0, 0) |
| 120 | cut.Material = Enum.Material.Glacier |
| 121 | cut.MaterialVariant = "2022 Stud" |
| 122 | cut.Anchored = true; cut.Parent = workspace |
| 123 | table.insert(angBoxes, cut) |
| 124 | end |
| 125 | do |
| 126 | local edgeDir = -0.258819*rightV + 0.965926*upV |
| 127 | local edgePerp = -0.965926*rightV + -0.258819*upV |
| 128 | local cut = Instance.new("Part") |
| 129 | cut.Size = Vector3.new(36, 1.2, 36) |
| 130 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 18 * edgePerp, edgeDir, normalV) |
| 131 | cut.Color = Color3.fromRGB(255, 0, 0) |
| 132 | cut.Material = Enum.Material.Glacier |
| 133 | cut.MaterialVariant = "2022 Stud" |
| 134 | cut.Anchored = true; cut.Parent = workspace |
| 135 | table.insert(angBoxes, cut) |
| 136 | end |
| 137 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 138 | if #cuts > 0 then |
| 139 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 140 | for _, c in ipairs(cuts) do c:Destroy() end |
| 141 | if ok and result then |
| 142 | cyl:Destroy() |
| 143 | result.Name = "Flesh"; result.Anchored = true; result.Parent = model |
| 144 | else |
| 145 | cyl.Name = "Flesh"; cyl.Parent = model |
| 146 | end |
| 147 | else |
| 148 | cyl.Name = "Flesh"; cyl.Parent = model |
| 149 | end |
| 150 | end |
| 151 | do |
| 152 | local rightV = Vector3.new(1,0,0).Unit |
| 153 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 154 | local normalV = upV:Cross(rightV) |
| 155 | local pos = Vector3.new(0, 0, 0.08) |
| 156 | local cyl = Instance.new("Part") |
| 157 | cyl.Shape = Enum.PartType.Cylinder |
| 158 | cyl.Size = Vector3.new(1, 19, 19) |
| 159 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 160 | cyl.BrickColor = BrickColor.new("White") |
| 161 | cyl.Material = Enum.Material.Glacier |
| 162 | cyl.MaterialVariant = "2022 Stud" |
| 163 | cyl.Anchored = true; cyl.Parent = workspace |
| 164 | local cuts = {} |
| 165 | local hole = Instance.new("Part") |
| 166 | hole.Shape = Enum.PartType.Cylinder |
| 167 | hole.Size = Vector3.new(1.2, 18, 18) |
| 168 | hole.CFrame = cyl.CFrame |
| 169 | hole.BrickColor = BrickColor.new("White") |
| 170 | hole.Material = Enum.Material.Glacier |
| 171 | hole.MaterialVariant = "2022 Stud" |
| 172 | hole.Anchored = true; hole.Parent = workspace |
| 173 | table.insert(cuts, hole) |
| 174 | local angBoxes = {} |
| 175 | do |
| 176 | local edgeDir = 0.707107*rightV + 0.707107*upV |
| 177 | local edgePerp = -0.707107*rightV + 0.707107*upV |
| 178 | local cut = Instance.new("Part") |
| 179 | cut.Size = Vector3.new(38, 1.2, 38) |
| 180 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 19 * edgePerp, edgeDir, normalV) |
| 181 | cut.BrickColor = BrickColor.new("White") |
| 182 | cut.Material = Enum.Material.Glacier |
| 183 | cut.MaterialVariant = "2022 Stud" |
| 184 | cut.Anchored = true; cut.Parent = workspace |
| 185 | table.insert(angBoxes, cut) |
| 186 | end |
| 187 | do |
| 188 | local edgeDir = -0.258819*rightV + 0.965926*upV |
| 189 | local edgePerp = -0.965926*rightV + -0.258819*upV |
| 190 | local cut = Instance.new("Part") |
| 191 | cut.Size = Vector3.new(38, 1.2, 38) |
| 192 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 19 * edgePerp, edgeDir, normalV) |
| 193 | cut.BrickColor = BrickColor.new("White") |
| 194 | cut.Material = Enum.Material.Glacier |
| 195 | cut.MaterialVariant = "2022 Stud" |
| 196 | cut.Anchored = true; cut.Parent = workspace |
| 197 | table.insert(angBoxes, cut) |
| 198 | end |
| 199 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 200 | if #cuts > 0 then |
| 201 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 202 | for _, c in ipairs(cuts) do c:Destroy() end |
| 203 | if ok and result then |
| 204 | cyl:Destroy() |
| 205 | result.Name = "WhiteRind"; result.Anchored = true; result.Parent = model |
| 206 | else |
| 207 | cyl.Name = "WhiteRind"; cyl.Parent = model |
| 208 | end |
| 209 | else |
| 210 | cyl.Name = "WhiteRind"; cyl.Parent = model |
| 211 | end |
| 212 | end |
| 213 | do |
| 214 | local rightV = Vector3.new(1,0,0).Unit |
| 215 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 216 | local normalV = upV:Cross(rightV) |
| 217 | local pos = Vector3.new(0, 0, 0.04) |
| 218 | local cyl = Instance.new("Part") |
| 219 | cyl.Shape = Enum.PartType.Cylinder |
| 220 | cyl.Size = Vector3.new(1, 20, 20) |
| 221 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 222 | cyl.BrickColor = BrickColor.new("Bright green") |
| 223 | cyl.Material = Enum.Material.Glacier |
| 224 | cyl.MaterialVariant = "2022 Stud" |
| 225 | cyl.Anchored = true; cyl.Parent = workspace |
| 226 | local cuts = {} |
| 227 | local hole = Instance.new("Part") |
| 228 | hole.Shape = Enum.PartType.Cylinder |
| 229 | hole.Size = Vector3.new(1.2, 19, 19) |
| 230 | hole.CFrame = cyl.CFrame |
| 231 | hole.BrickColor = BrickColor.new("Bright green") |
| 232 | hole.Material = Enum.Material.Glacier |
| 233 | hole.MaterialVariant = "2022 Stud" |
| 234 | hole.Anchored = true; hole.Parent = workspace |
| 235 | table.insert(cuts, hole) |
| 236 | local angBoxes = {} |
| 237 | do |
| 238 | local edgeDir = 0.707107*rightV + 0.707107*upV |
| 239 | local edgePerp = -0.707107*rightV + 0.707107*upV |
| 240 | local cut = Instance.new("Part") |
| 241 | cut.Size = Vector3.new(40, 1.2, 40) |
| 242 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 20 * edgePerp, edgeDir, normalV) |
| 243 | cut.BrickColor = BrickColor.new("Bright green") |
| 244 | cut.Material = Enum.Material.Glacier |
| 245 | cut.MaterialVariant = "2022 Stud" |
| 246 | cut.Anchored = true; cut.Parent = workspace |
| 247 | table.insert(angBoxes, cut) |
| 248 | end |
| 249 | do |
| 250 | local edgeDir = -0.258819*rightV + 0.965926*upV |
| 251 | local edgePerp = -0.965926*rightV + -0.258819*upV |
| 252 | local cut = Instance.new("Part") |
| 253 | cut.Size = Vector3.new(40, 1.2, 40) |
| 254 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 20 * edgePerp, edgeDir, normalV) |
| 255 | cut.BrickColor = BrickColor.new("Bright green") |
| 256 | cut.Material = Enum.Material.Glacier |
| 257 | cut.MaterialVariant = "2022 Stud" |
| 258 | cut.Anchored = true; cut.Parent = workspace |
| 259 | table.insert(angBoxes, cut) |
| 260 | end |
| 261 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 262 | if #cuts > 0 then |
| 263 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 264 | for _, c in ipairs(cuts) do c:Destroy() end |
| 265 | if ok and result then |
| 266 | cyl:Destroy() |
| 267 | result.Name = "GreenRind"; result.Anchored = true; result.Parent = model |
| 268 | else |
| 269 | cyl.Name = "GreenRind"; cyl.Parent = model |
| 270 | end |
| 271 | else |
| 272 | cyl.Name = "GreenRind"; cyl.Parent = model |
| 273 | end |
| 274 | end |
| 275 | model.PrimaryPart = model:FindFirstChild("Flesh") |
| 276 | print("WatermelonSlice built: " .. #model:GetChildren() .. " parts") |
Loading comments...