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