Loading model...
by Slowzy · 6/19/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: MusketRifle |
| 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 = "MusketRifle" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Dark stone grey"] = "2022 Stud", |
| 25 | ["Medium stone grey"] = "2022 Inlet", |
| 26 | ["Reddish brown"] = "2022 Small Stud", |
| 27 | } |
| 28 | do |
| 29 | local p = Instance.new("Part") |
| 30 | p.Name = "Buttplate" |
| 31 | p.Size = Vector3.new(0.6, 3.2, 0.4) |
| 32 | p.CFrame = CFrame.new(0, -1, 12) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)) |
| 33 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 34 | p.Material = Enum.Material.Glacier |
| 35 | p.MaterialVariant = "2022 Inlet" |
| 36 | p.Anchored = true |
| 37 | p.Parent = model |
| 38 | end |
| 39 | do |
| 40 | local p = Instance.new("Part") |
| 41 | p.Name = "StockBack" |
| 42 | p.Size = Vector3.new(0.8, 3, 3) |
| 43 | p.CFrame = CFrame.new(0, -0.8, 10.5) * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)) |
| 44 | p.BrickColor = BrickColor.new("Reddish brown") |
| 45 | p.Material = Enum.Material.Glacier |
| 46 | p.MaterialVariant = "2022 Small Stud" |
| 47 | p.Anchored = true |
| 48 | p.Parent = model |
| 49 | end |
| 50 | do |
| 51 | local p = Instance.new("Part") |
| 52 | p.Name = "StockMid" |
| 53 | p.Size = Vector3.new(0.8, 2.2, 2.5) |
| 54 | p.CFrame = CFrame.new(0.04, -0.4, 8) * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)) |
| 55 | p.BrickColor = BrickColor.new("Reddish brown") |
| 56 | p.Material = Enum.Material.Glacier |
| 57 | p.MaterialVariant = "2022 Small Stud" |
| 58 | p.Anchored = true |
| 59 | p.Parent = model |
| 60 | end |
| 61 | do |
| 62 | local p = Instance.new("Part") |
| 63 | p.Name = "StockGrip" |
| 64 | p.Size = Vector3.new(0.8, 1.6, 2) |
| 65 | p.CFrame = CFrame.new(-0.04, 0, 6) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)) |
| 66 | p.BrickColor = BrickColor.new("Reddish brown") |
| 67 | p.Material = Enum.Material.Glacier |
| 68 | p.MaterialVariant = "2022 Small Stud" |
| 69 | p.Anchored = true |
| 70 | p.Parent = model |
| 71 | end |
| 72 | do |
| 73 | local p = Instance.new("Part") |
| 74 | p.Name = "ReceiverWood" |
| 75 | p.Size = Vector3.new(1, 1.6, 2.5) |
| 76 | p.CFrame = CFrame.new(0, 0.4, 4) |
| 77 | p.BrickColor = BrickColor.new("Reddish brown") |
| 78 | p.Material = Enum.Material.Glacier |
| 79 | p.MaterialVariant = "2022 Small Stud" |
| 80 | p.Anchored = true |
| 81 | p.Parent = model |
| 82 | end |
| 83 | do |
| 84 | local p = Instance.new("Part") |
| 85 | p.Name = "Forend1" |
| 86 | p.Size = Vector3.new(0.9, 1.2, 3) |
| 87 | p.CFrame = CFrame.new(0, 0.4, 1.5) |
| 88 | p.BrickColor = BrickColor.new("Reddish brown") |
| 89 | p.Material = Enum.Material.Glacier |
| 90 | p.MaterialVariant = "2022 Small Stud" |
| 91 | p.Anchored = true |
| 92 | p.Parent = model |
| 93 | end |
| 94 | do |
| 95 | local p = Instance.new("Part") |
| 96 | p.Name = "Forend2" |
| 97 | p.Size = Vector3.new(0.8, 1, 3) |
| 98 | p.CFrame = CFrame.new(0, 0.4, -1.54) |
| 99 | p.BrickColor = BrickColor.new("Reddish brown") |
| 100 | p.Material = Enum.Material.Glacier |
| 101 | p.MaterialVariant = "2022 Small Stud" |
| 102 | p.Anchored = true |
| 103 | p.Parent = model |
| 104 | end |
| 105 | do |
| 106 | local p = Instance.new("Part") |
| 107 | p.Name = "Forend3" |
| 108 | p.Size = Vector3.new(0.7, 0.9, 2.5) |
| 109 | p.CFrame = CFrame.new(0, 0.4, -4) |
| 110 | p.BrickColor = BrickColor.new("Reddish brown") |
| 111 | p.Material = Enum.Material.Glacier |
| 112 | p.MaterialVariant = "2022 Small Stud" |
| 113 | p.Anchored = true |
| 114 | p.Parent = model |
| 115 | end |
| 116 | do |
| 117 | local p = Instance.new("Part") |
| 118 | p.Shape = Enum.PartType.Cylinder |
| 119 | p.Name = "BarrelMain" |
| 120 | p.Size = Vector3.new(18, 0.6, 0.6) |
| 121 | p.CFrame = CFrame.new(0, 1, -4) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 122 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 123 | p.Material = Enum.Material.Glacier |
| 124 | p.MaterialVariant = "2022 Inlet" |
| 125 | p.Anchored = true |
| 126 | p.Parent = model |
| 127 | end |
| 128 | do |
| 129 | local p = Instance.new("Part") |
| 130 | p.Name = "Band1" |
| 131 | p.Size = Vector3.new(1.1, 1.4, 0.4) |
| 132 | p.CFrame = CFrame.new(0, 0.64, -2) |
| 133 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 134 | p.Material = Enum.Material.Glacier |
| 135 | p.MaterialVariant = "2022 Inlet" |
| 136 | p.Anchored = true |
| 137 | p.Parent = model |
| 138 | end |
| 139 | do |
| 140 | local p = Instance.new("Part") |
| 141 | p.Name = "Band2" |
| 142 | p.Size = Vector3.new(1, 1.2, 0.4) |
| 143 | p.CFrame = CFrame.new(0, 0.6, -4.5) |
| 144 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 145 | p.Material = Enum.Material.Glacier |
| 146 | p.MaterialVariant = "2022 Inlet" |
| 147 | p.Anchored = true |
| 148 | p.Parent = model |
| 149 | end |
| 150 | do |
| 151 | local p = Instance.new("Part") |
| 152 | p.Name = "FrontSightBase" |
| 153 | p.Size = Vector3.new(0.2, 0.3, 0.6) |
| 154 | p.CFrame = CFrame.new(0, 1.4, -12.5) |
| 155 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 156 | p.Material = Enum.Material.Glacier |
| 157 | p.MaterialVariant = "2022 Inlet" |
| 158 | p.Anchored = true |
| 159 | p.Parent = model |
| 160 | end |
| 161 | do |
| 162 | local p = Instance.new("Part") |
| 163 | p.Name = "FrontSightBlade" |
| 164 | p.Size = Vector3.new(0.1, 0.2, 0.3) |
| 165 | p.CFrame = CFrame.new(0, 1.6, -12.5) |
| 166 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 167 | p.Material = Enum.Material.Glacier |
| 168 | p.MaterialVariant = "2022 Inlet" |
| 169 | p.Anchored = true |
| 170 | p.Parent = model |
| 171 | end |
| 172 | do |
| 173 | local p = Instance.new("Part") |
| 174 | p.Name = "RearSightBase" |
| 175 | p.Size = Vector3.new(0.4, 0.3, 1.2) |
| 176 | p.CFrame = CFrame.new(0, 1.4, -0.5) |
| 177 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 178 | p.Material = Enum.Material.Glacier |
| 179 | p.MaterialVariant = "2022 Inlet" |
| 180 | p.Anchored = true |
| 181 | p.Parent = model |
| 182 | end |
| 183 | do |
| 184 | local p = Instance.new("Part") |
| 185 | p.Name = "RearSightLeaf" |
| 186 | p.Size = Vector3.new(0.3, 0.4, 0.8) |
| 187 | p.CFrame = CFrame.new(0, 1.6, -0.8) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)) |
| 188 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 189 | p.Material = Enum.Material.Glacier |
| 190 | p.MaterialVariant = "2022 Inlet" |
| 191 | p.Anchored = true |
| 192 | p.Parent = model |
| 193 | end |
| 194 | do |
| 195 | local p = Instance.new("Part") |
| 196 | p.Name = "Lockplate" |
| 197 | p.Size = Vector3.new(0.2, 1, 2.2) |
| 198 | p.CFrame = CFrame.new(0.63, 0.6, 4) |
| 199 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 200 | p.Material = Enum.Material.Glacier |
| 201 | p.MaterialVariant = "2022 Inlet" |
| 202 | p.Anchored = true |
| 203 | p.Parent = model |
| 204 | end |
| 205 | do |
| 206 | local p = Instance.new("Part") |
| 207 | p.Name = "HammerBase" |
| 208 | p.Size = Vector3.new(0.3, 0.8, 0.6) |
| 209 | p.CFrame = CFrame.new(0.72, 1, 4.5) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)) |
| 210 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 211 | p.Material = Enum.Material.Glacier |
| 212 | p.MaterialVariant = "2022 Inlet" |
| 213 | p.Anchored = true |
| 214 | p.Parent = model |
| 215 | end |
| 216 | do |
| 217 | local p = Instance.new("Part") |
| 218 | p.Name = "HammerSpur" |
| 219 | p.Size = Vector3.new(0.2, 0.6, 0.3) |
| 220 | p.CFrame = CFrame.new(0.56, 1.6, 4.8) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(0)) |
| 221 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 222 | p.Material = Enum.Material.Glacier |
| 223 | p.MaterialVariant = "2022 Inlet" |
| 224 | p.Anchored = true |
| 225 | p.Parent = model |
| 226 | end |
| 227 | do |
| 228 | local p = Instance.new("Part") |
| 229 | p.Name = "HammerHead" |
| 230 | p.Size = Vector3.new(0.3, 0.4, 0.4) |
| 231 | p.CFrame = CFrame.new(0.56, 1.4, 4.2) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)) |
| 232 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 233 | p.Material = Enum.Material.Glacier |
| 234 | p.MaterialVariant = "2022 Inlet" |
| 235 | p.Anchored = true |
| 236 | p.Parent = model |
| 237 | end |
| 238 | do |
| 239 | local p = Instance.new("Part") |
| 240 | p.Name = "NippleBolster" |
| 241 | p.Size = Vector3.new(0.4, 0.4, 0.6) |
| 242 | p.CFrame = CFrame.new(0.4, 1.04, 3.5) |
| 243 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 244 | p.Material = Enum.Material.Glacier |
| 245 | p.MaterialVariant = "2022 Inlet" |
| 246 | p.Anchored = true |
| 247 | p.Parent = model |
| 248 | end |
| 249 | do |
| 250 | local p = Instance.new("Part") |
| 251 | p.Name = "TriggerGuardTangFront" |
| 252 | p.Size = Vector3.new(0.3, 0.1, 1) |
| 253 | p.CFrame = CFrame.new(0, -0.4, 3.5) |
| 254 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 255 | p.Material = Enum.Material.Glacier |
| 256 | p.MaterialVariant = "2022 Inlet" |
| 257 | p.Anchored = true |
| 258 | p.Parent = model |
| 259 | end |
| 260 | do |
| 261 | local p = Instance.new("Part") |
| 262 | p.Name = "TriggerGuardTangRear" |
| 263 | p.Size = Vector3.new(0.3, 0.1, 1.5) |
| 264 | p.CFrame = CFrame.new(0, -0.4, 5.5) * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)) |
| 265 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 266 | p.Material = Enum.Material.Glacier |
| 267 | p.MaterialVariant = "2022 Inlet" |
| 268 | p.Anchored = true |
| 269 | p.Parent = model |
| 270 | end |
| 271 | do |
| 272 | local p = Instance.new("Part") |
| 273 | p.Name = "Trigger" |
| 274 | p.Size = Vector3.new(0.1, 0.6, 0.2) |
| 275 | p.CFrame = CFrame.new(0, -0.2, 4.5) * CFrame.Angles(math.rad(-15), math.rad(0), math.rad(0)) |
| 276 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 277 | p.Material = Enum.Material.Glacier |
| 278 | p.MaterialVariant = "2022 Stud" |
| 279 | p.Anchored = true |
| 280 | p.Parent = model |
| 281 | end |
| 282 | do |
| 283 | local p = Instance.new("Part") |
| 284 | p.Shape = Enum.PartType.Cylinder |
| 285 | p.Name = "Ramrod" |
| 286 | p.Size = Vector3.new(13, 0.2, 0.2) |
| 287 | p.CFrame = CFrame.new(0, 0, -6) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 288 | p.BrickColor = BrickColor.new("Medium stone grey") |
| 289 | p.Material = Enum.Material.Glacier |
| 290 | p.MaterialVariant = "2022 Inlet" |
| 291 | p.Anchored = true |
| 292 | p.Parent = model |
| 293 | end |
| 294 | do |
| 295 | local rightV = Vector3.new(0,0,1).Unit |
| 296 | local upV = (Vector3.new(0,-1,0) - Vector3.new(0,-1,0):Dot(rightV)*rightV).Unit |
| 297 | local normalV = upV:Cross(rightV) |
| 298 | local pos = Vector3.new(0, -0.6, 4.5) |
| 299 | local cyl = Instance.new("Part") |
| 300 | cyl.Shape = Enum.PartType.Cylinder |
| 301 | cyl.Size = Vector3.new(0.3, 1.6, 1.6) |
| 302 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 303 | cyl.BrickColor = BrickColor.new("Medium stone grey") |
| 304 | cyl.Material = Enum.Material.Glacier |
| 305 | cyl.MaterialVariant = "2022 Inlet" |
| 306 | cyl.Anchored = true; cyl.Parent = workspace |
| 307 | local cuts = {} |
| 308 | local hole = Instance.new("Part") |
| 309 | hole.Shape = Enum.PartType.Cylinder |
| 310 | hole.Size = Vector3.new(0.5, 1.2, 1.2) |
| 311 | hole.CFrame = cyl.CFrame |
| 312 | hole.BrickColor = BrickColor.new("Medium stone grey") |
| 313 | hole.Material = Enum.Material.Glacier |
| 314 | hole.MaterialVariant = "2022 Inlet" |
| 315 | hole.Anchored = true; hole.Parent = workspace |
| 316 | table.insert(cuts, hole) |
| 317 | local angBoxes = {} |
| 318 | do |
| 319 | local edgeDir = 1*rightV + 0*upV |
| 320 | local edgePerp = 0*rightV + 1*upV |
| 321 | local cut = Instance.new("Part") |
| 322 | cut.Size = Vector3.new(3.2, 0.5, 3.2) |
| 323 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 1.6 * edgePerp, edgeDir, normalV) |
| 324 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 325 | cut.Material = Enum.Material.Glacier |
| 326 | cut.MaterialVariant = "2022 Inlet" |
| 327 | cut.Anchored = true; cut.Parent = workspace |
| 328 | table.insert(angBoxes, cut) |
| 329 | end |
| 330 | do |
| 331 | local edgeDir = -1*rightV + 0*upV |
| 332 | local edgePerp = 0*rightV + -1*upV |
| 333 | local cut = Instance.new("Part") |
| 334 | cut.Size = Vector3.new(3.2, 0.5, 3.2) |
| 335 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 1.6 * edgePerp, edgeDir, normalV) |
| 336 | cut.BrickColor = BrickColor.new("Medium stone grey") |
| 337 | cut.Material = Enum.Material.Glacier |
| 338 | cut.MaterialVariant = "2022 Inlet" |
| 339 | cut.Anchored = true; cut.Parent = workspace |
| 340 | table.insert(angBoxes, cut) |
| 341 | end |
| 342 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 343 | if #cuts > 0 then |
| 344 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 345 | for _, c in ipairs(cuts) do c:Destroy() end |
| 346 | if ok and result then |
| 347 | cyl:Destroy() |
| 348 | result.Name = "TriggerGuardArc"; result.Anchored = true; result.Parent = model |
| 349 | else |
| 350 | cyl.Name = "TriggerGuardArc"; cyl.Parent = model |
| 351 | end |
| 352 | else |
| 353 | cyl.Name = "TriggerGuardArc"; cyl.Parent = model |
| 354 | end |
| 355 | end |
| 356 | model.PrimaryPart = model:FindFirstChild("ReceiverWood") |
| 357 | print("MusketRifle built: " .. #model:GetChildren() .. " parts") |
Loading comments...