Loading model...
by Abraham Amer · 5/1/2026
Lua Script
| 1 | -- Generated with StudForge.org | AI-powered 3D models for Roblox |
| 2 | -- Model: SciFiAssaultRifle |
| 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 = "SciFiAssaultRifle" |
| 21 | model.Parent = workspace |
| 22 | |
| 23 | local variants = { |
| 24 | ["Dark stone grey"] = "2022 Stud", |
| 25 | ["Institutional white"] = "2022 Stud", |
| 26 | ["Really black"] = "2022 Universal", |
| 27 | } |
| 28 | do |
| 29 | local p = Instance.new("Part") |
| 30 | p.Name = "ReceiverCore" |
| 31 | p.Size = Vector3.new(1.2, 2.5, 8) |
| 32 | p.CFrame = CFrame.new(0, 0, 0) |
| 33 | p.BrickColor = BrickColor.new("Really black") |
| 34 | p.Material = Enum.Material.Glacier |
| 35 | p.MaterialVariant = "2022 Universal" |
| 36 | p.Anchored = true |
| 37 | p.Parent = model |
| 38 | end |
| 39 | do |
| 40 | local p = Instance.new("Part") |
| 41 | p.Name = "ReceiverPlateL" |
| 42 | p.Size = Vector3.new(0.2, 2.2, 7.8) |
| 43 | p.CFrame = CFrame.new(-0.65, 0.28, 0) |
| 44 | p.BrickColor = BrickColor.new("Institutional white") |
| 45 | p.Material = Enum.Material.Glacier |
| 46 | p.MaterialVariant = "2022 Stud" |
| 47 | p.Anchored = true |
| 48 | p.Parent = model |
| 49 | end |
| 50 | do |
| 51 | local p = Instance.new("Part") |
| 52 | p.Name = "ReceiverPlateR" |
| 53 | p.Size = Vector3.new(0.2, 2.2, 7.8) |
| 54 | p.CFrame = CFrame.new(0.65, 0.28, 0) |
| 55 | p.BrickColor = BrickColor.new("Institutional white") |
| 56 | p.Material = Enum.Material.Glacier |
| 57 | p.MaterialVariant = "2022 Stud" |
| 58 | p.Anchored = true |
| 59 | p.Parent = model |
| 60 | end |
| 61 | do |
| 62 | local p = Instance.new("Part") |
| 63 | p.Name = "ReceiverTop" |
| 64 | p.Size = Vector3.new(1.3, 0.3, 5) |
| 65 | p.CFrame = CFrame.new(-0.08, 1.3, -1) |
| 66 | p.BrickColor = BrickColor.new("Institutional white") |
| 67 | p.Material = Enum.Material.Glacier |
| 68 | p.MaterialVariant = "2022 Stud" |
| 69 | p.Anchored = true |
| 70 | p.Parent = model |
| 71 | end |
| 72 | do |
| 73 | local p = Instance.new("Part") |
| 74 | p.Name = "ReceiverGlow1" |
| 75 | p.Size = Vector3.new(0.1, 0.2, 2) |
| 76 | p.CFrame = CFrame.new(-0.74, 0.5, 1) |
| 77 | p.BrickColor = BrickColor.new("Toothpaste") |
| 78 | p.Material = Enum.Material.Neon |
| 79 | p.Anchored = true |
| 80 | p.Parent = model |
| 81 | end |
| 82 | do |
| 83 | local p = Instance.new("Part") |
| 84 | p.Name = "ReceiverGlow2" |
| 85 | p.Size = Vector3.new(0.1, 0.2, 2) |
| 86 | p.CFrame = CFrame.new(0.74, 0.5, 1) |
| 87 | p.BrickColor = BrickColor.new("Toothpaste") |
| 88 | p.Material = Enum.Material.Neon |
| 89 | p.Anchored = true |
| 90 | p.Parent = model |
| 91 | end |
| 92 | do |
| 93 | local p = Instance.new("Part") |
| 94 | p.Name = "GripCore" |
| 95 | p.Size = Vector3.new(2.97321, 1, 1.8) |
| 96 | p.CFrame = CFrame.new(0, -2.6, 3.5) * CFrame.Angles(math.rad(70.3462), math.rad(-90), math.rad(0)) |
| 97 | p.BrickColor = BrickColor.new("Really black") |
| 98 | p.Material = Enum.Material.Glacier |
| 99 | p.MaterialVariant = "2022 Universal" |
| 100 | p.Anchored = true |
| 101 | p.Parent = model |
| 102 | end |
| 103 | do |
| 104 | local p = Instance.new("Part") |
| 105 | p.Name = "GripPlateL" |
| 106 | p.Size = Vector3.new(2.46982, 0.2, 1.6) |
| 107 | p.CFrame = CFrame.new(-0.55, -2.463751, 3.57712) * CFrame.Angles(math.rad(68.6294), math.rad(-90), math.rad(0)) |
| 108 | p.BrickColor = BrickColor.new("Institutional white") |
| 109 | p.Material = Enum.Material.Glacier |
| 110 | p.MaterialVariant = "2022 Stud" |
| 111 | p.Anchored = true |
| 112 | p.Parent = model |
| 113 | end |
| 114 | do |
| 115 | local p = Instance.new("Part") |
| 116 | p.Name = "GripPlateR" |
| 117 | p.Size = Vector3.new(2.46982, 0.2, 1.6) |
| 118 | p.CFrame = CFrame.new(0.55, -2.463751, 3.57712) * CFrame.Angles(math.rad(68.6294), math.rad(-90), math.rad(0)) |
| 119 | p.BrickColor = BrickColor.new("Institutional white") |
| 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 = "TriggerGuardBottom" |
| 128 | p.Size = Vector3.new(0.8, 0.2, 2) |
| 129 | p.CFrame = CFrame.new(0, -2.5, 2) |
| 130 | p.BrickColor = BrickColor.new("Really black") |
| 131 | p.Material = Enum.Material.Glacier |
| 132 | p.MaterialVariant = "2022 Universal" |
| 133 | p.Anchored = true |
| 134 | p.Parent = model |
| 135 | end |
| 136 | do |
| 137 | local p = Instance.new("Part") |
| 138 | p.Name = "TriggerGuardFront" |
| 139 | p.Size = Vector3.new(0.8, 1.5, 0.2) |
| 140 | p.CFrame = CFrame.new(0.04, -1.8, 1) |
| 141 | p.BrickColor = BrickColor.new("Really black") |
| 142 | p.Material = Enum.Material.Glacier |
| 143 | p.MaterialVariant = "2022 Universal" |
| 144 | p.Anchored = true |
| 145 | p.Parent = model |
| 146 | end |
| 147 | do |
| 148 | local p = Instance.new("Part") |
| 149 | p.Name = "Trigger" |
| 150 | p.Size = Vector3.new(0.4, 0.8, 0.2) |
| 151 | p.CFrame = CFrame.new(0, -1.6, 2.2) * CFrame.Angles(math.rad(-15), math.rad(0), math.rad(0)) |
| 152 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 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 p = Instance.new("Part") |
| 160 | p.Shape = Enum.PartType.Cylinder |
| 161 | p.Name = "StockTube" |
| 162 | p.Size = Vector3.new(4.03113, 0.8, 0.8) |
| 163 | p.CFrame = CFrame.new(0, -0.25, 6) * CFrame.Angles(math.rad(7.12502), math.rad(-90), math.rad(0)) |
| 164 | p.BrickColor = BrickColor.new("Really black") |
| 165 | p.Material = Enum.Material.Glacier |
| 166 | p.MaterialVariant = "2022 Universal" |
| 167 | p.Anchored = true |
| 168 | p.Parent = model |
| 169 | end |
| 170 | do |
| 171 | local p = Instance.new("Part") |
| 172 | p.Name = "StockBody" |
| 173 | p.Size = Vector3.new(1.2, 3, 4) |
| 174 | p.CFrame = CFrame.new(0, -1, 9) |
| 175 | p.BrickColor = BrickColor.new("Really black") |
| 176 | p.Material = Enum.Material.Glacier |
| 177 | p.MaterialVariant = "2022 Universal" |
| 178 | p.Anchored = true |
| 179 | p.Parent = model |
| 180 | end |
| 181 | do |
| 182 | local p = Instance.new("Part") |
| 183 | p.Name = "StockPlateL" |
| 184 | p.Size = Vector3.new(0.2, 2.8, 3.8) |
| 185 | p.CFrame = CFrame.new(-0.65, -1, 9) |
| 186 | p.BrickColor = BrickColor.new("Institutional white") |
| 187 | p.Material = Enum.Material.Glacier |
| 188 | p.MaterialVariant = "2022 Stud" |
| 189 | p.Anchored = true |
| 190 | p.Parent = model |
| 191 | end |
| 192 | do |
| 193 | local p = Instance.new("Part") |
| 194 | p.Name = "StockPlateR" |
| 195 | p.Size = Vector3.new(0.2, 2.8, 3.8) |
| 196 | p.CFrame = CFrame.new(0.65, -1, 9) |
| 197 | p.BrickColor = BrickColor.new("Institutional white") |
| 198 | p.Material = Enum.Material.Glacier |
| 199 | p.MaterialVariant = "2022 Stud" |
| 200 | p.Anchored = true |
| 201 | p.Parent = model |
| 202 | end |
| 203 | do |
| 204 | local p = Instance.new("Part") |
| 205 | p.Name = "StockPad" |
| 206 | p.Size = Vector3.new(1.3, 3.2, 0.4) |
| 207 | p.CFrame = CFrame.new(0, -1, 11.14) |
| 208 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 209 | p.Material = Enum.Material.Glacier |
| 210 | p.MaterialVariant = "2022 Stud" |
| 211 | p.Anchored = true |
| 212 | p.Parent = model |
| 213 | end |
| 214 | do |
| 215 | local p = Instance.new("Part") |
| 216 | p.Name = "StockGlow" |
| 217 | p.Size = Vector3.new(1.4, 0.4, 2) |
| 218 | p.CFrame = CFrame.new(0, -1, 9) |
| 219 | p.BrickColor = BrickColor.new("Toothpaste") |
| 220 | p.Material = Enum.Material.Neon |
| 221 | p.Anchored = true |
| 222 | p.Parent = model |
| 223 | end |
| 224 | do |
| 225 | local p = Instance.new("Part") |
| 226 | p.Name = "HandguardCore" |
| 227 | p.Size = Vector3.new(1.4, 2.2, 6) |
| 228 | p.CFrame = CFrame.new(0, 0.2, -6) |
| 229 | p.BrickColor = BrickColor.new("Really black") |
| 230 | p.Material = Enum.Material.Glacier |
| 231 | p.MaterialVariant = "2022 Universal" |
| 232 | p.Anchored = true |
| 233 | p.Parent = model |
| 234 | end |
| 235 | do |
| 236 | local p = Instance.new("Part") |
| 237 | p.Name = "HandguardPlateL" |
| 238 | p.Size = Vector3.new(0.2, 2, 5.8) |
| 239 | p.CFrame = CFrame.new(-0.75, 0.24, -6) |
| 240 | p.BrickColor = BrickColor.new("Institutional white") |
| 241 | p.Material = Enum.Material.Glacier |
| 242 | p.MaterialVariant = "2022 Stud" |
| 243 | p.Anchored = true |
| 244 | p.Parent = model |
| 245 | end |
| 246 | do |
| 247 | local p = Instance.new("Part") |
| 248 | p.Name = "HandguardPlateR" |
| 249 | p.Size = Vector3.new(0.2, 2, 5.8) |
| 250 | p.CFrame = CFrame.new(0.75, 0.24, -6) |
| 251 | p.BrickColor = BrickColor.new("Institutional white") |
| 252 | p.Material = Enum.Material.Glacier |
| 253 | p.MaterialVariant = "2022 Stud" |
| 254 | p.Anchored = true |
| 255 | p.Parent = model |
| 256 | end |
| 257 | do |
| 258 | local p = Instance.new("Part") |
| 259 | p.Name = "HandguardTop" |
| 260 | p.Size = Vector3.new(1.2, 0.4, 5.8) |
| 261 | p.CFrame = CFrame.new(0.08, 1.4, -6) |
| 262 | p.BrickColor = BrickColor.new("Institutional white") |
| 263 | p.Material = Enum.Material.Glacier |
| 264 | p.MaterialVariant = "2022 Stud" |
| 265 | p.Anchored = true |
| 266 | p.Parent = model |
| 267 | end |
| 268 | do |
| 269 | local p = Instance.new("Part") |
| 270 | p.Name = "HandguardBottom" |
| 271 | p.Size = Vector3.new(1.2, 0.4, 5.8) |
| 272 | p.CFrame = CFrame.new(0.08, -1, -6) |
| 273 | p.BrickColor = BrickColor.new("Institutional white") |
| 274 | p.Material = Enum.Material.Glacier |
| 275 | p.MaterialVariant = "2022 Stud" |
| 276 | p.Anchored = true |
| 277 | p.Parent = model |
| 278 | end |
| 279 | do |
| 280 | local p = Instance.new("Part") |
| 281 | p.Name = "Handstop" |
| 282 | p.Size = Vector3.new(1, 1, 1.5) |
| 283 | p.CFrame = CFrame.new(0, -1.6, -7.5) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)) |
| 284 | p.BrickColor = BrickColor.new("Really black") |
| 285 | p.Material = Enum.Material.Glacier |
| 286 | p.MaterialVariant = "2022 Universal" |
| 287 | p.Anchored = true |
| 288 | p.Parent = model |
| 289 | end |
| 290 | do |
| 291 | local p = Instance.new("Part") |
| 292 | p.Name = "VentsL_0" |
| 293 | p.Size = Vector3.new(0.2, 1, 0.4) |
| 294 | p.CFrame = CFrame.new(-0.88, 0.2, -4) |
| 295 | p.BrickColor = BrickColor.new("Toothpaste") |
| 296 | p.Material = Enum.Material.Neon |
| 297 | p.Anchored = true |
| 298 | p.Parent = model |
| 299 | end |
| 300 | do |
| 301 | local p = Instance.new("Part") |
| 302 | p.Name = "VentsR_0" |
| 303 | p.Size = Vector3.new(0.2, 1, 0.4) |
| 304 | p.CFrame = CFrame.new(0.88, 0.2, -4) |
| 305 | p.BrickColor = BrickColor.new("Toothpaste") |
| 306 | p.Material = Enum.Material.Neon |
| 307 | p.Anchored = true |
| 308 | p.Parent = model |
| 309 | end |
| 310 | do |
| 311 | local p = Instance.new("Part") |
| 312 | p.Name = "VentsL_1" |
| 313 | p.Size = Vector3.new(0.2, 1, 0.4) |
| 314 | p.CFrame = CFrame.new(-0.84, 0.2, -5.2) |
| 315 | p.BrickColor = BrickColor.new("Toothpaste") |
| 316 | p.Material = Enum.Material.Neon |
| 317 | p.Anchored = true |
| 318 | p.Parent = model |
| 319 | end |
| 320 | do |
| 321 | local p = Instance.new("Part") |
| 322 | p.Name = "VentsR_1" |
| 323 | p.Size = Vector3.new(0.2, 1, 0.4) |
| 324 | p.CFrame = CFrame.new(0.84, 0.2, -5.2) |
| 325 | p.BrickColor = BrickColor.new("Toothpaste") |
| 326 | p.Material = Enum.Material.Neon |
| 327 | p.Anchored = true |
| 328 | p.Parent = model |
| 329 | end |
| 330 | do |
| 331 | local p = Instance.new("Part") |
| 332 | p.Name = "VentsL_2" |
| 333 | p.Size = Vector3.new(0.2, 1, 0.4) |
| 334 | p.CFrame = CFrame.new(-0.84, 0.2, -6.4) |
| 335 | p.BrickColor = BrickColor.new("Toothpaste") |
| 336 | p.Material = Enum.Material.Neon |
| 337 | p.Anchored = true |
| 338 | p.Parent = model |
| 339 | end |
| 340 | do |
| 341 | local p = Instance.new("Part") |
| 342 | p.Name = "VentsR_2" |
| 343 | p.Size = Vector3.new(0.2, 1, 0.4) |
| 344 | p.CFrame = CFrame.new(0.84, 0.2, -6.4) |
| 345 | p.BrickColor = BrickColor.new("Toothpaste") |
| 346 | p.Material = Enum.Material.Neon |
| 347 | p.Anchored = true |
| 348 | p.Parent = model |
| 349 | end |
| 350 | do |
| 351 | local p = Instance.new("Part") |
| 352 | p.Name = "VentsL_3" |
| 353 | p.Size = Vector3.new(0.2, 1, 0.4) |
| 354 | p.CFrame = CFrame.new(-0.84, 0.2, -7.6) |
| 355 | p.BrickColor = BrickColor.new("Toothpaste") |
| 356 | p.Material = Enum.Material.Neon |
| 357 | p.Anchored = true |
| 358 | p.Parent = model |
| 359 | end |
| 360 | do |
| 361 | local p = Instance.new("Part") |
| 362 | p.Name = "VentsR_3" |
| 363 | p.Size = Vector3.new(0.2, 1, 0.4) |
| 364 | p.CFrame = CFrame.new(0.84, 0.2, -7.6) |
| 365 | p.BrickColor = BrickColor.new("Toothpaste") |
| 366 | p.Material = Enum.Material.Neon |
| 367 | p.Anchored = true |
| 368 | p.Parent = model |
| 369 | end |
| 370 | do |
| 371 | local p = Instance.new("Part") |
| 372 | p.Shape = Enum.PartType.Cylinder |
| 373 | p.Name = "Barrel" |
| 374 | p.Size = Vector3.new(8, 0.6, 0.6) |
| 375 | p.CFrame = CFrame.new(0, 0.5, -11) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 376 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 377 | p.Material = Enum.Material.Glacier |
| 378 | p.MaterialVariant = "2022 Stud" |
| 379 | p.Anchored = true |
| 380 | p.Parent = model |
| 381 | end |
| 382 | do |
| 383 | local p = Instance.new("Part") |
| 384 | p.Shape = Enum.PartType.Cylinder |
| 385 | p.Name = "GasTube" |
| 386 | p.Size = Vector3.new(6, 0.4, 0.4) |
| 387 | p.CFrame = CFrame.new(0, 1.2, -9.96) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 388 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 389 | p.Material = Enum.Material.Glacier |
| 390 | p.MaterialVariant = "2022 Stud" |
| 391 | p.Anchored = true |
| 392 | p.Parent = model |
| 393 | end |
| 394 | do |
| 395 | local p = Instance.new("Part") |
| 396 | p.Name = "GasBlock" |
| 397 | p.Size = Vector3.new(0.8, 1.5, 1) |
| 398 | p.CFrame = CFrame.new(0, 0.85, -12.5) |
| 399 | p.BrickColor = BrickColor.new("Really black") |
| 400 | p.Material = Enum.Material.Glacier |
| 401 | p.MaterialVariant = "2022 Universal" |
| 402 | p.Anchored = true |
| 403 | p.Parent = model |
| 404 | end |
| 405 | do |
| 406 | local p = Instance.new("Part") |
| 407 | p.Shape = Enum.PartType.Cylinder |
| 408 | p.Name = "MuzzleBrake" |
| 409 | p.Size = Vector3.new(2, 0.8, 0.8) |
| 410 | p.CFrame = CFrame.new(0, 0.5, -15.5) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 411 | p.BrickColor = BrickColor.new("Really black") |
| 412 | p.Material = Enum.Material.Glacier |
| 413 | p.MaterialVariant = "2022 Universal" |
| 414 | p.Anchored = true |
| 415 | p.Parent = model |
| 416 | end |
| 417 | do |
| 418 | local p = Instance.new("Part") |
| 419 | p.Shape = Enum.PartType.Cylinder |
| 420 | p.Name = "MuzzleBrakeSlit1" |
| 421 | p.Size = Vector3.new(0.2, 0.9, 0.9) |
| 422 | p.CFrame = CFrame.new(0, 0.5, -15.2) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 423 | p.BrickColor = BrickColor.new("Institutional white") |
| 424 | p.Material = Enum.Material.Glacier |
| 425 | p.MaterialVariant = "2022 Stud" |
| 426 | p.Anchored = true |
| 427 | p.Parent = model |
| 428 | end |
| 429 | do |
| 430 | local p = Instance.new("Part") |
| 431 | p.Shape = Enum.PartType.Cylinder |
| 432 | p.Name = "MuzzleBrakeSlit2" |
| 433 | p.Size = Vector3.new(0.2, 0.9, 0.9) |
| 434 | p.CFrame = CFrame.new(0, 0.5, -15.8) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)) |
| 435 | p.BrickColor = BrickColor.new("Institutional white") |
| 436 | p.Material = Enum.Material.Glacier |
| 437 | p.MaterialVariant = "2022 Stud" |
| 438 | p.Anchored = true |
| 439 | p.Parent = model |
| 440 | end |
| 441 | do |
| 442 | local p = Instance.new("Part") |
| 443 | p.Name = "RearSightBase" |
| 444 | p.Size = Vector3.new(1, 0.8, 1.5) |
| 445 | p.CFrame = CFrame.new(0, 1.8, -2) |
| 446 | p.BrickColor = BrickColor.new("Really black") |
| 447 | p.Material = Enum.Material.Glacier |
| 448 | p.MaterialVariant = "2022 Universal" |
| 449 | p.Anchored = true |
| 450 | p.Parent = model |
| 451 | end |
| 452 | do |
| 453 | local p = Instance.new("Part") |
| 454 | p.Name = "RearSightNotch" |
| 455 | p.Size = Vector3.new(0.8, 0.4, 0.4) |
| 456 | p.CFrame = CFrame.new(0, 2.3, -2) |
| 457 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 458 | p.Material = Enum.Material.Glacier |
| 459 | p.MaterialVariant = "2022 Stud" |
| 460 | p.Anchored = true |
| 461 | p.Parent = model |
| 462 | end |
| 463 | do |
| 464 | local p = Instance.new("Part") |
| 465 | p.Name = "FrontSightBase" |
| 466 | p.Size = Vector3.new(0.6, 1.2, 0.8) |
| 467 | p.CFrame = CFrame.new(0, 1.8, -12.5) |
| 468 | p.BrickColor = BrickColor.new("Really black") |
| 469 | p.Material = Enum.Material.Glacier |
| 470 | p.MaterialVariant = "2022 Universal" |
| 471 | p.Anchored = true |
| 472 | p.Parent = model |
| 473 | end |
| 474 | do |
| 475 | local p = Instance.new("Part") |
| 476 | p.Name = "FrontSightPost" |
| 477 | p.Size = Vector3.new(0.2, 0.6, 0.2) |
| 478 | p.CFrame = CFrame.new(0, 2.6, -12.5) |
| 479 | p.BrickColor = BrickColor.new("Dark stone grey") |
| 480 | p.Material = Enum.Material.Glacier |
| 481 | p.MaterialVariant = "2022 Stud" |
| 482 | p.Anchored = true |
| 483 | p.Parent = model |
| 484 | end |
| 485 | do |
| 486 | local p = Instance.new("Part") |
| 487 | p.Name = "HoloSightBase" |
| 488 | p.Size = Vector3.new(1.2, 0.6, 2) |
| 489 | p.CFrame = CFrame.new(0.08, 1.64, 1) |
| 490 | p.BrickColor = BrickColor.new("Really black") |
| 491 | p.Material = Enum.Material.Glacier |
| 492 | p.MaterialVariant = "2022 Universal" |
| 493 | p.Anchored = true |
| 494 | p.Parent = model |
| 495 | end |
| 496 | do |
| 497 | local p = Instance.new("Part") |
| 498 | p.Name = "HoloSightGlass" |
| 499 | p.Size = Vector3.new(0.1, 1, 1.5) |
| 500 | p.CFrame = CFrame.new(0, 2.2, 1) |
| 501 | p.BrickColor = BrickColor.new("Toothpaste") |
| 502 | p.Material = Enum.Material.Neon |
| 503 | p.Anchored = true |
| 504 | p.Parent = model |
| 505 | end |
| 506 | do |
| 507 | local rightV = Vector3.new(0,0,1).Unit |
| 508 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 509 | local normalV = upV:Cross(rightV) |
| 510 | local pos = Vector3.new(0, -3.5, -1.5) |
| 511 | local cyl = Instance.new("Part") |
| 512 | cyl.Shape = Enum.PartType.Cylinder |
| 513 | cyl.Size = Vector3.new(1, 12, 12) |
| 514 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 515 | cyl.BrickColor = BrickColor.new("Really black") |
| 516 | cyl.Material = Enum.Material.Glacier |
| 517 | cyl.MaterialVariant = "2022 Universal" |
| 518 | cyl.Anchored = true; cyl.Parent = workspace |
| 519 | local cuts = {} |
| 520 | local hole = Instance.new("Part") |
| 521 | hole.Shape = Enum.PartType.Cylinder |
| 522 | hole.Size = Vector3.new(1.2, 8, 8) |
| 523 | hole.CFrame = cyl.CFrame |
| 524 | hole.BrickColor = BrickColor.new("Really black") |
| 525 | hole.Material = Enum.Material.Glacier |
| 526 | hole.MaterialVariant = "2022 Universal" |
| 527 | hole.Anchored = true; hole.Parent = workspace |
| 528 | table.insert(cuts, hole) |
| 529 | local angBoxes = {} |
| 530 | do |
| 531 | local edgeDir = -1*rightV + 0*upV |
| 532 | local edgePerp = 0*rightV + -1*upV |
| 533 | local cut = Instance.new("Part") |
| 534 | cut.Size = Vector3.new(24, 1.2, 24) |
| 535 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 12 * edgePerp, edgeDir, normalV) |
| 536 | cut.BrickColor = BrickColor.new("Really black") |
| 537 | cut.Material = Enum.Material.Glacier |
| 538 | cut.MaterialVariant = "2022 Universal" |
| 539 | cut.Anchored = true; cut.Parent = workspace |
| 540 | table.insert(angBoxes, cut) |
| 541 | end |
| 542 | do |
| 543 | local edgeDir = -0.5*rightV + -0.866025*upV |
| 544 | local edgePerp = 0.866025*rightV + -0.5*upV |
| 545 | local cut = Instance.new("Part") |
| 546 | cut.Size = Vector3.new(24, 1.2, 24) |
| 547 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 12 * edgePerp, edgeDir, normalV) |
| 548 | cut.BrickColor = BrickColor.new("Really black") |
| 549 | cut.Material = Enum.Material.Glacier |
| 550 | cut.MaterialVariant = "2022 Universal" |
| 551 | cut.Anchored = true; cut.Parent = workspace |
| 552 | table.insert(angBoxes, cut) |
| 553 | end |
| 554 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 555 | if #cuts > 0 then |
| 556 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 557 | for _, c in ipairs(cuts) do c:Destroy() end |
| 558 | if ok and result then |
| 559 | cyl:Destroy() |
| 560 | result.Name = "MagCurve"; result.Anchored = true; result.Parent = model |
| 561 | else |
| 562 | cyl.Name = "MagCurve"; cyl.Parent = model |
| 563 | end |
| 564 | else |
| 565 | cyl.Name = "MagCurve"; cyl.Parent = model |
| 566 | end |
| 567 | end |
| 568 | do |
| 569 | local rightV = Vector3.new(0,0,1).Unit |
| 570 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 571 | local normalV = upV:Cross(rightV) |
| 572 | local pos = Vector3.new(-0.55, -3.42, -1.5) |
| 573 | local cyl = Instance.new("Part") |
| 574 | cyl.Shape = Enum.PartType.Cylinder |
| 575 | cyl.Size = Vector3.new(0.2, 11.6, 11.6) |
| 576 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 577 | cyl.BrickColor = BrickColor.new("Institutional white") |
| 578 | cyl.Material = Enum.Material.Glacier |
| 579 | cyl.MaterialVariant = "2022 Stud" |
| 580 | cyl.Anchored = true; cyl.Parent = workspace |
| 581 | local cuts = {} |
| 582 | local hole = Instance.new("Part") |
| 583 | hole.Shape = Enum.PartType.Cylinder |
| 584 | hole.Size = Vector3.new(0.4, 8.4, 8.4) |
| 585 | hole.CFrame = cyl.CFrame |
| 586 | hole.BrickColor = BrickColor.new("Institutional white") |
| 587 | hole.Material = Enum.Material.Glacier |
| 588 | hole.MaterialVariant = "2022 Stud" |
| 589 | hole.Anchored = true; hole.Parent = workspace |
| 590 | table.insert(cuts, hole) |
| 591 | local angBoxes = {} |
| 592 | do |
| 593 | local edgeDir = -1*rightV + 0*upV |
| 594 | local edgePerp = 0*rightV + -1*upV |
| 595 | local cut = Instance.new("Part") |
| 596 | cut.Size = Vector3.new(23.2, 0.4, 23.2) |
| 597 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 11.6 * edgePerp, edgeDir, normalV) |
| 598 | cut.BrickColor = BrickColor.new("Institutional white") |
| 599 | cut.Material = Enum.Material.Glacier |
| 600 | cut.MaterialVariant = "2022 Stud" |
| 601 | cut.Anchored = true; cut.Parent = workspace |
| 602 | table.insert(angBoxes, cut) |
| 603 | end |
| 604 | do |
| 605 | local edgeDir = -0.5*rightV + -0.866025*upV |
| 606 | local edgePerp = 0.866025*rightV + -0.5*upV |
| 607 | local cut = Instance.new("Part") |
| 608 | cut.Size = Vector3.new(23.2, 0.4, 23.2) |
| 609 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 11.6 * edgePerp, edgeDir, normalV) |
| 610 | cut.BrickColor = BrickColor.new("Institutional white") |
| 611 | cut.Material = Enum.Material.Glacier |
| 612 | cut.MaterialVariant = "2022 Stud" |
| 613 | cut.Anchored = true; cut.Parent = workspace |
| 614 | table.insert(angBoxes, cut) |
| 615 | end |
| 616 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 617 | if #cuts > 0 then |
| 618 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 619 | for _, c in ipairs(cuts) do c:Destroy() end |
| 620 | if ok and result then |
| 621 | cyl:Destroy() |
| 622 | result.Name = "MagPlateL"; result.Anchored = true; result.Parent = model |
| 623 | else |
| 624 | cyl.Name = "MagPlateL"; cyl.Parent = model |
| 625 | end |
| 626 | else |
| 627 | cyl.Name = "MagPlateL"; cyl.Parent = model |
| 628 | end |
| 629 | end |
| 630 | do |
| 631 | local rightV = Vector3.new(0,0,1).Unit |
| 632 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 633 | local normalV = upV:Cross(rightV) |
| 634 | local pos = Vector3.new(0.55, -3.42, -1.5) |
| 635 | local cyl = Instance.new("Part") |
| 636 | cyl.Shape = Enum.PartType.Cylinder |
| 637 | cyl.Size = Vector3.new(0.2, 11.6, 11.6) |
| 638 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 639 | cyl.BrickColor = BrickColor.new("Institutional white") |
| 640 | cyl.Material = Enum.Material.Glacier |
| 641 | cyl.MaterialVariant = "2022 Stud" |
| 642 | cyl.Anchored = true; cyl.Parent = workspace |
| 643 | local cuts = {} |
| 644 | local hole = Instance.new("Part") |
| 645 | hole.Shape = Enum.PartType.Cylinder |
| 646 | hole.Size = Vector3.new(0.4, 8.4, 8.4) |
| 647 | hole.CFrame = cyl.CFrame |
| 648 | hole.BrickColor = BrickColor.new("Institutional white") |
| 649 | hole.Material = Enum.Material.Glacier |
| 650 | hole.MaterialVariant = "2022 Stud" |
| 651 | hole.Anchored = true; hole.Parent = workspace |
| 652 | table.insert(cuts, hole) |
| 653 | local angBoxes = {} |
| 654 | do |
| 655 | local edgeDir = -1*rightV + 0*upV |
| 656 | local edgePerp = 0*rightV + -1*upV |
| 657 | local cut = Instance.new("Part") |
| 658 | cut.Size = Vector3.new(23.2, 0.4, 23.2) |
| 659 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 11.6 * edgePerp, edgeDir, normalV) |
| 660 | cut.BrickColor = BrickColor.new("Institutional white") |
| 661 | cut.Material = Enum.Material.Glacier |
| 662 | cut.MaterialVariant = "2022 Stud" |
| 663 | cut.Anchored = true; cut.Parent = workspace |
| 664 | table.insert(angBoxes, cut) |
| 665 | end |
| 666 | do |
| 667 | local edgeDir = -0.5*rightV + -0.866025*upV |
| 668 | local edgePerp = 0.866025*rightV + -0.5*upV |
| 669 | local cut = Instance.new("Part") |
| 670 | cut.Size = Vector3.new(23.2, 0.4, 23.2) |
| 671 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 11.6 * edgePerp, edgeDir, normalV) |
| 672 | cut.BrickColor = BrickColor.new("Institutional white") |
| 673 | cut.Material = Enum.Material.Glacier |
| 674 | cut.MaterialVariant = "2022 Stud" |
| 675 | cut.Anchored = true; cut.Parent = workspace |
| 676 | table.insert(angBoxes, cut) |
| 677 | end |
| 678 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 679 | if #cuts > 0 then |
| 680 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 681 | for _, c in ipairs(cuts) do c:Destroy() end |
| 682 | if ok and result then |
| 683 | cyl:Destroy() |
| 684 | result.Name = "MagPlateR"; result.Anchored = true; result.Parent = model |
| 685 | else |
| 686 | cyl.Name = "MagPlateR"; cyl.Parent = model |
| 687 | end |
| 688 | else |
| 689 | cyl.Name = "MagPlateR"; cyl.Parent = model |
| 690 | end |
| 691 | end |
| 692 | do |
| 693 | local rightV = Vector3.new(0,0,1).Unit |
| 694 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 695 | local normalV = upV:Cross(rightV) |
| 696 | local pos = Vector3.new(-0.64, -3.5, -1.5) |
| 697 | local cyl = Instance.new("Part") |
| 698 | cyl.Shape = Enum.PartType.Cylinder |
| 699 | cyl.Size = Vector3.new(0.2, 10.4, 10.4) |
| 700 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 701 | cyl.BrickColor = BrickColor.new("Toothpaste") |
| 702 | cyl.Material = Enum.Material.Glacier |
| 703 | cyl.Anchored = true; cyl.Parent = workspace |
| 704 | local cuts = {} |
| 705 | local hole = Instance.new("Part") |
| 706 | hole.Shape = Enum.PartType.Cylinder |
| 707 | hole.Size = Vector3.new(0.4, 9.6, 9.6) |
| 708 | hole.CFrame = cyl.CFrame |
| 709 | hole.BrickColor = BrickColor.new("Toothpaste") |
| 710 | hole.Material = Enum.Material.Glacier |
| 711 | hole.Anchored = true; hole.Parent = workspace |
| 712 | table.insert(cuts, hole) |
| 713 | local angBoxes = {} |
| 714 | do |
| 715 | local edgeDir = -0.984808*rightV + -0.173648*upV |
| 716 | local edgePerp = 0.173648*rightV + -0.984808*upV |
| 717 | local cut = Instance.new("Part") |
| 718 | cut.Size = Vector3.new(20.8, 0.4, 20.8) |
| 719 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 10.4 * edgePerp, edgeDir, normalV) |
| 720 | cut.BrickColor = BrickColor.new("Toothpaste") |
| 721 | cut.Material = Enum.Material.Glacier |
| 722 | cut.Anchored = true; cut.Parent = workspace |
| 723 | table.insert(angBoxes, cut) |
| 724 | end |
| 725 | do |
| 726 | local edgeDir = -0.642788*rightV + -0.766044*upV |
| 727 | local edgePerp = 0.766044*rightV + -0.642788*upV |
| 728 | local cut = Instance.new("Part") |
| 729 | cut.Size = Vector3.new(20.8, 0.4, 20.8) |
| 730 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 10.4 * edgePerp, edgeDir, normalV) |
| 731 | cut.BrickColor = BrickColor.new("Toothpaste") |
| 732 | cut.Material = Enum.Material.Glacier |
| 733 | cut.Anchored = true; cut.Parent = workspace |
| 734 | table.insert(angBoxes, cut) |
| 735 | end |
| 736 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 737 | if #cuts > 0 then |
| 738 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 739 | for _, c in ipairs(cuts) do c:Destroy() end |
| 740 | if ok and result then |
| 741 | cyl:Destroy() |
| 742 | result.Name = "MagGlow"; result.Anchored = true; result.Parent = model |
| 743 | else |
| 744 | cyl.Name = "MagGlow"; cyl.Parent = model |
| 745 | end |
| 746 | else |
| 747 | cyl.Name = "MagGlow"; cyl.Parent = model |
| 748 | end |
| 749 | end |
| 750 | do |
| 751 | local rightV = Vector3.new(0,0,1).Unit |
| 752 | local upV = (Vector3.new(0,1,0) - Vector3.new(0,1,0):Dot(rightV)*rightV).Unit |
| 753 | local normalV = upV:Cross(rightV) |
| 754 | local pos = Vector3.new(0.64, -3.5, -1.5) |
| 755 | local cyl = Instance.new("Part") |
| 756 | cyl.Shape = Enum.PartType.Cylinder |
| 757 | cyl.Size = Vector3.new(0.2, 10.4, 10.4) |
| 758 | cyl.CFrame = CFrame.fromMatrix(pos, normalV, rightV) |
| 759 | cyl.BrickColor = BrickColor.new("Toothpaste") |
| 760 | cyl.Material = Enum.Material.Glacier |
| 761 | cyl.Anchored = true; cyl.Parent = workspace |
| 762 | local cuts = {} |
| 763 | local hole = Instance.new("Part") |
| 764 | hole.Shape = Enum.PartType.Cylinder |
| 765 | hole.Size = Vector3.new(0.4, 9.6, 9.6) |
| 766 | hole.CFrame = cyl.CFrame |
| 767 | hole.BrickColor = BrickColor.new("Toothpaste") |
| 768 | hole.Material = Enum.Material.Glacier |
| 769 | hole.Anchored = true; hole.Parent = workspace |
| 770 | table.insert(cuts, hole) |
| 771 | local angBoxes = {} |
| 772 | do |
| 773 | local edgeDir = -0.984808*rightV + -0.173648*upV |
| 774 | local edgePerp = 0.173648*rightV + -0.984808*upV |
| 775 | local cut = Instance.new("Part") |
| 776 | cut.Size = Vector3.new(20.8, 0.4, 20.8) |
| 777 | cut.CFrame = CFrame.fromMatrix(pos + -1 * 10.4 * edgePerp, edgeDir, normalV) |
| 778 | cut.BrickColor = BrickColor.new("Toothpaste") |
| 779 | cut.Material = Enum.Material.Glacier |
| 780 | cut.Anchored = true; cut.Parent = workspace |
| 781 | table.insert(angBoxes, cut) |
| 782 | end |
| 783 | do |
| 784 | local edgeDir = -0.642788*rightV + -0.766044*upV |
| 785 | local edgePerp = 0.766044*rightV + -0.642788*upV |
| 786 | local cut = Instance.new("Part") |
| 787 | cut.Size = Vector3.new(20.8, 0.4, 20.8) |
| 788 | cut.CFrame = CFrame.fromMatrix(pos + 1 * 10.4 * edgePerp, edgeDir, normalV) |
| 789 | cut.BrickColor = BrickColor.new("Toothpaste") |
| 790 | cut.Material = Enum.Material.Glacier |
| 791 | cut.Anchored = true; cut.Parent = workspace |
| 792 | table.insert(angBoxes, cut) |
| 793 | end |
| 794 | for _, b in ipairs(angBoxes) do table.insert(cuts, b) end |
| 795 | if #cuts > 0 then |
| 796 | local ok, result = pcall(function() return cyl:SubtractAsync(cuts) end) |
| 797 | for _, c in ipairs(cuts) do c:Destroy() end |
| 798 | if ok and result then |
| 799 | cyl:Destroy() |
| 800 | result.Name = "MagGlowR"; result.Anchored = true; result.Parent = model |
| 801 | else |
| 802 | cyl.Name = "MagGlowR"; cyl.Parent = model |
| 803 | end |
| 804 | else |
| 805 | cyl.Name = "MagGlowR"; cyl.Parent = model |
| 806 | end |
| 807 | end |
| 808 | model.PrimaryPart = model:FindFirstChild("ReceiverCore") |
| 809 | print("SciFiAssaultRifle built: " .. #model:GetChildren() .. " parts") |
Loading comments...