Loading model...
by SnowyAlpines · 3/29/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: OilRig |
| 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 = "OilRig" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Bright red"] = "2022 Weld", |
| 25 | ["Bright yellow"] = "2022 Big Stud", |
| 26 | ["Medium stone grey"] = "2022 Inlet", |
| 27 | ["Navy blue"] = "2022 Weld", |
| 28 | ["Really black"] = "2022 Glue", |
| 29 | } |
| 30 | do |
| 31 | local p = Instance.new("Part") |
| 32 | p.Name = "BasePlatform" |
| 33 | p.Size = Vector3.new(12, 1, 24) |
| 34 | p.CFrame = CFrame.new(0, 0.5, 0) |
| 35 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 36 | p.Material = Enum.Material.Glacier |
| 37 | p.MaterialVariant = "2022 Inlet" |
| 38 | p.Anchored = true |
| 39 | p.Parent = model |
| 40 | end |
| 41 | do |
| 42 | local p = Instance.new("Part") |
| 43 | p.Name = "FrameLegFrontL" |
| 44 | p.Size = Vector3.new(11.4455, 0.8, 0.8) |
| 45 | p.CFrame = CFrame.new(-1.5, 6.5, 0.5) * CFrame.Angles(math.rad(0), math.rad(-71.5651), math.rad(73.9611)) |
| 46 | p.BrickColor = BrickColor.new("Navy blue") |
| 47 | p.Material = Enum.Material.Glacier |
| 48 | p.MaterialVariant = "2022 Weld" |
| 49 | p.Anchored = true |
| 50 | p.Parent = model |
| 51 | end |
| 52 | do |
| 53 | local p = Instance.new("Part") |
| 54 | p.Name = "FrameLegFrontR" |
| 55 | p.Size = Vector3.new(11.4455, 0.8, 0.8) |
| 56 | p.CFrame = CFrame.new(1.5, 6.5, 0.5) * CFrame.Angles(math.rad(-180), math.rad(-71.5651), math.rad(-106.039)) |
| 57 | p.BrickColor = BrickColor.new("Navy blue") |
| 58 | p.Material = Enum.Material.Glacier |
| 59 | p.MaterialVariant = "2022 Weld" |
| 60 | p.Anchored = true |
| 61 | p.Parent = model |
| 62 | end |
| 63 | do |
| 64 | local p = Instance.new("Part") |
| 65 | p.Name = "FrameLegBackL" |
| 66 | p.Size = Vector3.new(11.4455, 0.8, 0.8) |
| 67 | p.CFrame = CFrame.new(-1.5, 6.5, 3.5) * CFrame.Angles(math.rad(0), math.rad(71.5651), math.rad(73.9611)) |
| 68 | p.BrickColor = BrickColor.new("Navy blue") |
| 69 | p.Material = Enum.Material.Glacier |
| 70 | p.MaterialVariant = "2022 Weld" |
| 71 | p.Anchored = true |
| 72 | p.Parent = model |
| 73 | end |
| 74 | do |
| 75 | local p = Instance.new("Part") |
| 76 | p.Name = "FrameLegBackR" |
| 77 | p.Size = Vector3.new(11.4455, 0.8, 0.8) |
| 78 | p.CFrame = CFrame.new(1.5, 6.5, 3.5) * CFrame.Angles(math.rad(-180), math.rad(71.5651), math.rad(-106.039)) |
| 79 | p.BrickColor = BrickColor.new("Navy blue") |
| 80 | p.Material = Enum.Material.Glacier |
| 81 | p.MaterialVariant = "2022 Weld" |
| 82 | p.Anchored = true |
| 83 | p.Parent = model |
| 84 | end |
| 85 | do |
| 86 | local p = Instance.new("Part") |
| 87 | p.Name = "TopPivot" |
| 88 | p.Size = Vector3.new(3, 1, 1) |
| 89 | p.CFrame = CFrame.new(0, 12, 2) |
| 90 | p.BrickColor = BrickColor.new("Navy blue") |
| 91 | p.Material = Enum.Material.Glacier |
| 92 | p.MaterialVariant = "2022 Weld" |
| 93 | p.Anchored = true |
| 94 | p.Parent = model |
| 95 | end |
| 96 | do |
| 97 | local p = Instance.new("Part") |
| 98 | p.Name = "WalkingBeam" |
| 99 | p.Size = Vector3.new(1, 1.5, 16) |
| 100 | p.CFrame = CFrame.new(0, 12.5, 0) * CFrame.Angles(math.rad(10), math.rad(0), math.rad(0)) |
| 101 | p.BrickColor = BrickColor.new("Navy blue") |
| 102 | p.Material = Enum.Material.Glacier |
| 103 | p.MaterialVariant = "2022 Weld" |
| 104 | p.Anchored = true |
| 105 | p.Parent = model |
| 106 | end |
| 107 | do |
| 108 | local p = Instance.new("Part") |
| 109 | p.Name = "HeadFlat" |
| 110 | p.Size = Vector3.new(1.2, 7, 2) |
| 111 | p.CFrame = CFrame.new(0.04, 11, -6.96) |
| 112 | p.BrickColor = BrickColor.new("Bright red") |
| 113 | p.Material = Enum.Material.Glacier |
| 114 | p.MaterialVariant = "2022 Weld" |
| 115 | p.Anchored = true |
| 116 | p.Parent = model |
| 117 | end |
| 118 | do |
| 119 | local p = Instance.new("Part") |
| 120 | p.Name = "PumpRod" |
| 121 | p.Size = Vector3.new(0.2, 12, 0.2) |
| 122 | p.CFrame = CFrame.new(0, 6.04, -11) |
| 123 | p.BrickColor = BrickColor.new("Really black") |
| 124 | p.Material = Enum.Material.Glacier |
| 125 | p.MaterialVariant = "2022 Glue" |
| 126 | p.Anchored = true |
| 127 | p.Parent = model |
| 128 | end |
| 129 | do |
| 130 | local p = Instance.new("Part") |
| 131 | p.Shape = Enum.PartType.Cylinder |
| 132 | p.Name = "RodWeight" |
| 133 | p.Size = Vector3.new(2, 0.6, 0.6) |
| 134 | p.CFrame = CFrame.new(0, 2.04, -11) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 135 | p.BrickColor = BrickColor.new("Really black") |
| 136 | p.Material = Enum.Material.Glacier |
| 137 | p.MaterialVariant = "2022 Glue" |
| 138 | p.Anchored = true |
| 139 | p.Parent = model |
| 140 | end |
| 141 | do |
| 142 | local p = Instance.new("Part") |
| 143 | p.Shape = Enum.PartType.Cylinder |
| 144 | p.Name = "WellHole" |
| 145 | p.Size = Vector3.new(0.1, 3, 3) |
| 146 | p.CFrame = CFrame.new(0, 1.01, -11) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 147 | p.BrickColor = BrickColor.new("Really black") |
| 148 | p.Material = Enum.Material.Glacier |
| 149 | p.MaterialVariant = "2022 Glue" |
| 150 | p.Anchored = true |
| 151 | p.Parent = model |
| 152 | end |
| 153 | do |
| 154 | local p = Instance.new("Part") |
| 155 | p.Name = "MotorBase" |
| 156 | p.Size = Vector3.new(4, 3, 5) |
| 157 | p.CFrame = CFrame.new(0, 2.54, 8) |
| 158 | p.BrickColor = BrickColor.new("Navy blue") |
| 159 | p.Material = Enum.Material.Glacier |
| 160 | p.MaterialVariant = "2022 Weld" |
| 161 | p.Anchored = true |
| 162 | p.Parent = model |
| 163 | end |
| 164 | do |
| 165 | local p = Instance.new("Part") |
| 166 | p.Name = "CrankArmL" |
| 167 | p.Size = Vector3.new(0.5, 6, 1) |
| 168 | p.CFrame = CFrame.new(-2.5, 4, 8) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)) |
| 169 | p.BrickColor = BrickColor.new("Navy blue") |
| 170 | p.Material = Enum.Material.Glacier |
| 171 | p.MaterialVariant = "2022 Weld" |
| 172 | p.Anchored = true |
| 173 | p.Parent = model |
| 174 | end |
| 175 | do |
| 176 | local p = Instance.new("Part") |
| 177 | p.Name = "CrankArmR" |
| 178 | p.Size = Vector3.new(0.5, 6, 1) |
| 179 | p.CFrame = CFrame.new(2.5, 4, 8) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)) |
| 180 | p.BrickColor = BrickColor.new("Navy blue") |
| 181 | p.Material = Enum.Material.Glacier |
| 182 | p.MaterialVariant = "2022 Weld" |
| 183 | p.Anchored = true |
| 184 | p.Parent = model |
| 185 | end |
| 186 | do |
| 187 | local p = Instance.new("Part") |
| 188 | p.Name = "CounterweightL" |
| 189 | p.Size = Vector3.new(1, 3, 4) |
| 190 | p.CFrame = CFrame.new(-3, 2, 9) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)) |
| 191 | p.BrickColor = BrickColor.new("Bright red") |
| 192 | p.Material = Enum.Material.Glacier |
| 193 | p.MaterialVariant = "2022 Weld" |
| 194 | p.Anchored = true |
| 195 | p.Parent = model |
| 196 | end |
| 197 | do |
| 198 | local p = Instance.new("Part") |
| 199 | p.Name = "CounterweightR" |
| 200 | p.Size = Vector3.new(1, 3, 4) |
| 201 | p.CFrame = CFrame.new(3, 2, 9) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)) |
| 202 | p.BrickColor = BrickColor.new("Bright red") |
| 203 | p.Material = Enum.Material.Glacier |
| 204 | p.MaterialVariant = "2022 Weld" |
| 205 | p.Anchored = true |
| 206 | p.Parent = model |
| 207 | end |
| 208 | do |
| 209 | local p = Instance.new("Part") |
| 210 | p.Name = "PitmanL" |
| 211 | p.Size = Vector3.new(7.75306, 0.4, 0.4) |
| 212 | p.CFrame = CFrame.new(-1.55, 10.25, 6.25) * CFrame.Angles(math.rad(0), math.rad(14.7436), math.rad(75.3207)) |
| 213 | p.BrickColor = BrickColor.new("Navy blue") |
| 214 | p.Material = Enum.Material.Glacier |
| 215 | p.MaterialVariant = "2022 Weld" |
| 216 | p.Anchored = true |
| 217 | p.Parent = model |
| 218 | end |
| 219 | do |
| 220 | local p = Instance.new("Part") |
| 221 | p.Name = "PitmanR" |
| 222 | p.Size = Vector3.new(7.75306, 0.4, 0.4) |
| 223 | p.CFrame = CFrame.new(1.55, 10.25, 6.25) * CFrame.Angles(math.rad(-180), math.rad(14.7436), math.rad(-104.679)) |
| 224 | p.BrickColor = BrickColor.new("Navy blue") |
| 225 | p.Material = Enum.Material.Glacier |
| 226 | p.MaterialVariant = "2022 Weld" |
| 227 | p.Anchored = true |
| 228 | p.Parent = model |
| 229 | end |
| 230 | do |
| 231 | local p = Instance.new("Part") |
| 232 | p.Shape = Enum.PartType.Cylinder |
| 233 | p.Name = "PipeHorizontal" |
| 234 | p.Size = Vector3.new(8, 0.56, 0.56) |
| 235 | p.CFrame = CFrame.new(-4, 1.5, -11) |
| 236 | p.BrickColor = BrickColor.new("Really black") |
| 237 | p.Material = Enum.Material.Glacier |
| 238 | p.MaterialVariant = "2022 Glue" |
| 239 | p.Anchored = true |
| 240 | p.Parent = model |
| 241 | end |
| 242 | do |
| 243 | local p = Instance.new("Part") |
| 244 | p.Shape = Enum.PartType.Cylinder |
| 245 | p.Name = "PipeCorner" |
| 246 | p.Size = Vector3.new(4, 0.6, 0.6) |
| 247 | p.CFrame = CFrame.new(-8, 1.5, -9.04) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 248 | p.BrickColor = BrickColor.new("Really black") |
| 249 | p.Material = Enum.Material.Glacier |
| 250 | p.MaterialVariant = "2022 Glue" |
| 251 | p.Anchored = true |
| 252 | p.Parent = model |
| 253 | end |
| 254 | do |
| 255 | local p = Instance.new("Part") |
| 256 | p.Name = "PipeBox" |
| 257 | p.Size = Vector3.new(3, 1, 3) |
| 258 | p.CFrame = CFrame.new(-8, 1.5, -6) |
| 259 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 260 | p.Material = Enum.Material.Glacier |
| 261 | p.MaterialVariant = "2022 Inlet" |
| 262 | p.Anchored = true |
| 263 | p.Parent = model |
| 264 | end |
| 265 | do |
| 266 | local p = Instance.new("Part") |
| 267 | p.Name = "PipeBoxTop" |
| 268 | p.Size = Vector3.new(2, 0.5, 2) |
| 269 | p.CFrame = CFrame.new(-8, 2, -6) |
| 270 | p.BrickColor = BrickColor.new("Bright red") |
| 271 | p.Material = Enum.Material.Glacier |
| 272 | p.MaterialVariant = "2022 Weld" |
| 273 | p.Anchored = true |
| 274 | p.Parent = model |
| 275 | end |
| 276 | do |
| 277 | local p = Instance.new("Part") |
| 278 | p.Name = "ControlTower" |
| 279 | p.Size = Vector3.new(2, 10, 2) |
| 280 | p.CFrame = CFrame.new(5, 6.04, 10) |
| 281 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 282 | p.Material = Enum.Material.Glacier |
| 283 | p.MaterialVariant = "2022 Inlet" |
| 284 | p.Anchored = true |
| 285 | p.Parent = model |
| 286 | end |
| 287 | do |
| 288 | local p = Instance.new("Part") |
| 289 | p.Name = "TowerArm" |
| 290 | p.Size = Vector3.new(3, 1.5, 1.5) |
| 291 | p.CFrame = CFrame.new(3.5, 10, 10) |
| 292 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 293 | p.Material = Enum.Material.Glacier |
| 294 | p.MaterialVariant = "2022 Inlet" |
| 295 | p.Anchored = true |
| 296 | p.Parent = model |
| 297 | end |
| 298 | do |
| 299 | local p = Instance.new("Part") |
| 300 | p.Name = "TowerBox" |
| 301 | p.Size = Vector3.new(1, 1, 1) |
| 302 | p.CFrame = CFrame.new(2, 9.5, 10) |
| 303 | p.BrickColor = BrickColor.new("Really black") |
| 304 | p.Material = Enum.Material.Glacier |
| 305 | p.MaterialVariant = "2022 Glue" |
| 306 | p.Anchored = true |
| 307 | p.Parent = model |
| 308 | end |
| 309 | do |
| 310 | local p = Instance.new("Part") |
| 311 | p.Name = "SideSupport" |
| 312 | p.Size = Vector3.new(1.5, 6, 1.5) |
| 313 | p.CFrame = CFrame.new(7, 4, 10) |
| 314 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 315 | p.Material = Enum.Material.Glacier |
| 316 | p.MaterialVariant = "2022 Inlet" |
| 317 | p.Anchored = true |
| 318 | p.Parent = model |
| 319 | end |
| 320 | do |
| 321 | local p = Instance.new("WedgePart") |
| 322 | p.Name = "SideSupportAngle" |
| 323 | p.Size = Vector3.new(1.5, 1.5, 1.5) |
| 324 | p.CFrame = CFrame.new(6, 7.5, 10.04) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)) |
| 325 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 326 | p.Material = Enum.Material.Glacier |
| 327 | p.MaterialVariant = "2022 Inlet" |
| 328 | p.Anchored = true |
| 329 | p.Parent = model |
| 330 | end |
| 331 | do |
| 332 | local p = Instance.new("Part") |
| 333 | p.Name = "YellowBox" |
| 334 | p.Size = Vector3.new(2, 1.5, 2) |
| 335 | p.CFrame = CFrame.new(3.04, 1.5, 7) |
| 336 | p.BrickColor = BrickColor.new("Bright yellow") |
| 337 | p.Material = Enum.Material.Glacier |
| 338 | p.MaterialVariant = "2022 Big Stud" |
| 339 | p.Anchored = true |
| 340 | p.Parent = model |
| 341 | end |
| 342 | do |
| 343 | local rightV = Vector3.new(0,1,0).Unit |
| 344 | local upV = (Vector3.new(0,0,1) - Vector3.new(0,0,1):Dot(rightV)*rightV).Unit |
| 345 | local normalV = upV:Cross(rightV) |
| 346 | local pos = Vector3.new(0, 11, -8) |
| 347 | local cyl = Instance.new("Part") |
| 348 | cyl.Shape = Enum.PartType.Cylinder |
| 349 | cyl.Size = Vector3.new(1.2, 7, 7) |
| 350 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 351 | cyl.BrickColor = BrickColor.new("Bright red") |
| 352 | cyl.Material = Enum.Material.Glacier |
| 353 | cyl.MaterialVariant = "2022 Weld" |
| 354 | cyl.Anchored = true; cyl.Parent = workspace |
| 355 | local cuts = {} |
| 356 | local angBoxes = {} |
| 357 | do |
| 358 | local edgeDir = 1*rightV + 0*upV |
| 359 | local edgePerp = 0*rightV + 1*upV |
| 360 | local cut = Instance.new("Part") |
| 361 | cut.Size = Vector3.new(14, 1.4, 14) |
| 362 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 7 * edgePerp, edgeDir, normalV) |
| 363 | cut.BrickColor = BrickColor.new("Bright red") |
| 364 | cut.Material = Enum.Material.Glacier |
| 365 | cut.MaterialVariant = "2022 Weld" |
| 366 | cut.Anchored = true; cut.Parent = workspace |
| 367 | table.insert(angBoxes, cut) |
| 368 | end |
| 369 | do |
| 370 | local edgeDir = -1*rightV + 0*upV |
| 371 | local edgePerp = 0*rightV + -1*upV |
| 372 | local cut = Instance.new("Part") |
| 373 | cut.Size = Vector3.new(14, 1.4, 14) |
| 374 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 7 * edgePerp, edgeDir, normalV) |
| 375 | cut.BrickColor = BrickColor.new("Bright red") |
| 376 | cut.Material = Enum.Material.Glacier |
| 377 | cut.MaterialVariant = "2022 Weld" |
| 378 | cut.Anchored = true; cut.Parent = workspace |
| 379 | table.insert(angBoxes, cut) |
| 380 | end |
| 381 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 382 | if #cuts > 0 then |
| 383 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 384 | for _, c in ipairs(cuts) do c:Destroy() end |
| 385 | if ok and result then |
| 386 | cyl:Destroy() |
| 387 | result.Name = "HorseHead"; result.Anchored = true; result.Parent = model |
| 388 | else |
| 389 | cyl.Name = "HorseHead"; cyl.Parent = model |
| 390 | end |
| 391 | else |
| 392 | cyl.Name = "HorseHead"; cyl.Parent = model |
| 393 | end |
| 394 | end |
| 395 | model.PrimaryPart = model:FindFirstChild("BasePlatform") |
| 396 | print("OilRig built: " .. #model:GetChildren() .. " parts") |
Loading comments...