Loading model...
by Wedny Lucas Fernandes · 5/25/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: SprayCan |
| 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 = "SprayCan" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Bright yellow"] = "2022 Big Stud", |
| 25 | ["Deep orange"] = "2022 Stud", |
| 26 | ["Gold"] = "2022 Stud", |
| 27 | ["Medium stone grey"] = "2022 Inlet", |
| 28 | ["Really black"] = "2022 Universal", |
| 29 | } |
| 30 | do |
| 31 | local p = Instance.new("Part") |
| 32 | p.Shape = Enum.PartType.Cylinder |
| 33 | p.Name = "BottomRim" |
| 34 | p.Size = Vector3.new(0.2, 4.1, 4.1) |
| 35 | p.CFrame = CFrame.new(0, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 36 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 37 | p.Material = Enum.Material.Glacier |
| 38 | p.MaterialVariant = "2022 Inlet" |
| 39 | p.Anchored = true |
| 40 | p.Parent = model |
| 41 | end |
| 42 | do |
| 43 | local p = Instance.new("Part") |
| 44 | p.Shape = Enum.PartType.Cylinder |
| 45 | p.Name = "MainBody" |
| 46 | p.Size = Vector3.new(11.8, 4, 4) |
| 47 | p.CFrame = CFrame.new(0, 6, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 48 | p.BrickColor = BrickColor.new("Bright yellow") |
| 49 | p.Material = Enum.Material.Glacier |
| 50 | p.MaterialVariant = "2022 Big Stud" |
| 51 | p.Anchored = true |
| 52 | p.Parent = model |
| 53 | end |
| 54 | do |
| 55 | local p = Instance.new("Part") |
| 56 | p.Shape = Enum.PartType.Cylinder |
| 57 | p.Name = "TopRim" |
| 58 | p.Size = Vector3.new(0.2, 4.1, 4.1) |
| 59 | p.CFrame = CFrame.new(0, 11.9, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 60 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 61 | p.Material = Enum.Material.Glacier |
| 62 | p.MaterialVariant = "2022 Inlet" |
| 63 | p.Anchored = true |
| 64 | p.Parent = model |
| 65 | end |
| 66 | do |
| 67 | local p = Instance.new("Part") |
| 68 | p.Shape = Enum.PartType.Cylinder |
| 69 | p.Name = "NozzleBase" |
| 70 | p.Size = Vector3.new(0.3, 1.2, 1.2) |
| 71 | p.CFrame = CFrame.new(0, 13.46, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 72 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 73 | p.Material = Enum.Material.Glacier |
| 74 | p.MaterialVariant = "2022 Inlet" |
| 75 | p.Anchored = true |
| 76 | p.Parent = model |
| 77 | end |
| 78 | do |
| 79 | local p = Instance.new("Part") |
| 80 | p.Shape = Enum.PartType.Cylinder |
| 81 | p.Name = "NozzleHead" |
| 82 | p.Size = Vector3.new(0.9, 0.8, 0.8) |
| 83 | p.CFrame = CFrame.new(0, 14.1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 84 | p.BrickColor = BrickColor.new("Deep orange") |
| 85 | p.Material = Enum.Material.Glacier |
| 86 | p.MaterialVariant = "2022 Stud" |
| 87 | p.Anchored = true |
| 88 | p.Parent = model |
| 89 | end |
| 90 | do |
| 91 | local p = Instance.new("Part") |
| 92 | p.Shape = Enum.PartType.Cylinder |
| 93 | p.Name = "NozzleIndent" |
| 94 | p.Size = Vector3.new(0.2, 0.7, 0.7) |
| 95 | p.CFrame = CFrame.new(0, 14.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 96 | p.BrickColor = BrickColor.new("Deep orange") |
| 97 | p.Material = Enum.Material.Glacier |
| 98 | p.MaterialVariant = "2022 Stud" |
| 99 | p.Anchored = true |
| 100 | p.Parent = model |
| 101 | end |
| 102 | do |
| 103 | local p = Instance.new("Part") |
| 104 | p.Shape = Enum.PartType.Cylinder |
| 105 | p.Name = "SprayHole" |
| 106 | p.Size = Vector3.new(0.1, 0.2, 0.2) |
| 107 | p.CFrame = CFrame.new(0, 14.2, -0.35) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 108 | p.BrickColor = BrickColor.new("Really black") |
| 109 | p.Material = Enum.Material.Glacier |
| 110 | p.MaterialVariant = "2022 Universal" |
| 111 | p.Anchored = true |
| 112 | p.Parent = model |
| 113 | end |
| 114 | do |
| 115 | local p = Instance.new("Part") |
| 116 | p.Name = "BodyLine_0" |
| 117 | p.Size = Vector3.new(0.1, 11.8, 0.2) |
| 118 | p.CFrame = CFrame.new(2.02, 6, 0) |
| 119 | p.BrickColor = BrickColor.new("Gold") |
| 120 | p.Material = Enum.Material.Glacier |
| 121 | p.MaterialVariant = "2022 Stud" |
| 122 | p.Anchored = true |
| 123 | p.Parent = model |
| 124 | end |
| 125 | do |
| 126 | local p = Instance.new("Part") |
| 127 | p.Name = "BodyLine_1" |
| 128 | p.Size = Vector3.new(0.1, 11.8, 0.2) |
| 129 | p.CFrame = CFrame.new(0, 6, 2.02) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)) |
| 130 | p.BrickColor = BrickColor.new("Gold") |
| 131 | p.Material = Enum.Material.Glacier |
| 132 | p.MaterialVariant = "2022 Stud" |
| 133 | p.Anchored = true |
| 134 | p.Parent = model |
| 135 | end |
| 136 | do |
| 137 | local p = Instance.new("Part") |
| 138 | p.Name = "BodyLine_2" |
| 139 | p.Size = Vector3.new(0.1, 11.8, 0.2) |
| 140 | p.CFrame = CFrame.new(-2.02, 6, 0) * CFrame.Angles(math.rad(0), math.rad(-180), math.rad(0)) |
| 141 | p.BrickColor = BrickColor.new("Gold") |
| 142 | p.Material = Enum.Material.Glacier |
| 143 | p.MaterialVariant = "2022 Stud" |
| 144 | p.Anchored = true |
| 145 | p.Parent = model |
| 146 | end |
| 147 | do |
| 148 | local p = Instance.new("Part") |
| 149 | p.Name = "BodyLine_3" |
| 150 | p.Size = Vector3.new(0.1, 11.8, 0.2) |
| 151 | p.CFrame = CFrame.new(0, 6, -2.02) * CFrame.Angles(math.rad(0), math.rad(-270), math.rad(0)) |
| 152 | p.BrickColor = BrickColor.new("Gold") |
| 153 | p.Material = Enum.Material.Glacier |
| 154 | p.MaterialVariant = "2022 Stud" |
| 155 | p.Anchored = true |
| 156 | p.Parent = model |
| 157 | end |
| 158 | do |
| 159 | local upV = Vector3.new(0,1,0).Unit |
| 160 | local rightV = (Vector3.new(1,0,0) - Vector3.new(1,0,0):Dot(upV)*upV).Unit |
| 161 | local forwardV = rightV:Cross(upV) |
| 162 | local pos = Vector3.new(0, 11.94, 0) |
| 163 | local ball = Instance.new("Part") |
| 164 | ball.Shape = Enum.PartType.Ball |
| 165 | ball.Size = Vector3.new(4, 4, 4) |
| 166 | ball.CFrame = CFrame.new(pos) |
| 167 | ball.BrickColor = BrickColor.new("Medium stone grey") |
| 168 | ball.Material = Enum.Material.Glacier |
| 169 | ball.MaterialVariant = "2022 Inlet" |
| 170 | ball.Anchored = true; ball.Parent = workspace |
| 171 | local cuts = {} |
| 172 | do |
| 173 | local h = 0 |
| 174 | local cut = Instance.new("Part") |
| 175 | cut.Size = Vector3.new(8, 8, 8) |
| 176 | cut.CFrame = CFrame.fromMatrix(pos + upV*(-4), rightV, upV) |
| 177 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 178 | cut.Material = Enum.Material.Glacier |
| 179 | cut.MaterialVariant = "2022 Inlet" |
| 180 | cut.Anchored = true; cut.Parent = workspace |
| 181 | table.insert(cuts, cut) |
| 182 | end |
| 183 | do |
| 184 | local h = 1.931852 |
| 185 | local cut = Instance.new("Part") |
| 186 | cut.Size = Vector3.new(8, 8, 8) |
| 187 | cut.CFrame = CFrame.fromMatrix(pos + upV*(5.931852), rightV, upV) |
| 188 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 189 | cut.Material = Enum.Material.Glacier |
| 190 | cut.MaterialVariant = "2022 Inlet" |
| 191 | cut.Anchored = true; cut.Parent = workspace |
| 192 | table.insert(cuts, cut) |
| 193 | end |
| 194 | if #cuts > 0 then |
| 195 | local ok, result = pcall(function() return ball:SubtractAsync(cuts) end) |
| 196 | for _, c in ipairs(cuts) do c:Destroy() end |
| 197 | if ok and result then |
| 198 | ball:Destroy() |
| 199 | result.Name = "Dome"; result.Anchored = true; result.Parent = model |
| 200 | else |
| 201 | ball.Name = "Dome"; ball.Parent = model |
| 202 | end |
| 203 | else |
| 204 | ball.Name = "Dome"; ball.Parent = model |
| 205 | end |
| 206 | end |
| 207 | model.PrimaryPart = model:FindFirstChild("MainBody") |
| 208 | print("SprayCan built: " .. #model:GetChildren() .. " parts") |
Loading comments...