· 8 years ago · Jun 20, 2018, 06:06 PM
1--Made by 1ndrew
2function sandbox(var,func)
3 local env = getfenv(func)
4 local newenv = setmetatable({},{
5 __index = function(self,k)
6 if k=="script" then
7 return var
8 else
9 return env[k]
10 end
11 end,
12 })
13 setfenv(func,newenv)
14 return func
15end
16cors = {}
17mas = Instance.new("Model",game:GetService("Lighting"))
18Tool0 = Instance.new("Tool")
19Part1 = Instance.new("Part")
20BlockMesh2 = Instance.new("BlockMesh")
21Part3 = Instance.new("Part")
22BlockMesh4 = Instance.new("BlockMesh")
23Part5 = Instance.new("Part")
24CylinderMesh6 = Instance.new("CylinderMesh")
25Part7 = Instance.new("Part")
26PointLight8 = Instance.new("PointLight")
27BillboardGui9 = Instance.new("BillboardGui")
28ImageLabel10 = Instance.new("ImageLabel")
29CylinderMesh11 = Instance.new("CylinderMesh")
30Part12 = Instance.new("Part")
31Sound13 = Instance.new("Sound")
32Part14 = Instance.new("Part")
33Part15 = Instance.new("Part")
34CylinderMesh16 = Instance.new("CylinderMesh")
35LocalScript17 = Instance.new("LocalScript")
36IntValue18 = Instance.new("IntValue")
37ScreenGui19 = Instance.new("ScreenGui")
38ImageLabel20 = Instance.new("ImageLabel")
39Frame21 = Instance.new("Frame")
40ImageLabel22 = Instance.new("ImageLabel")
41Frame23 = Instance.new("Frame")
42TextLabel24 = Instance.new("TextLabel")
43TextLabel25 = Instance.new("TextLabel")
44TextLabel26 = Instance.new("TextLabel")
45TextLabel27 = Instance.new("TextLabel")
46TextLabel28 = Instance.new("TextLabel")
47Frame29 = Instance.new("Frame")
48Frame30 = Instance.new("Frame")
49TextLabel31 = Instance.new("TextLabel")
50TextLabel32 = Instance.new("TextLabel")
51TextLabel33 = Instance.new("TextLabel")
52TextLabel34 = Instance.new("TextLabel")
53TextLabel35 = Instance.new("TextLabel")
54Frame36 = Instance.new("Frame")
55TextLabel37 = Instance.new("TextLabel")
56TextLabel38 = Instance.new("TextLabel")
57TextLabel39 = Instance.new("TextLabel")
58Frame40 = Instance.new("Frame")
59TextLabel41 = Instance.new("TextLabel")
60Frame42 = Instance.new("Frame")
61Frame43 = Instance.new("Frame")
62Frame44 = Instance.new("Frame")
63Frame45 = Instance.new("Frame")
64Frame46 = Instance.new("Frame")
65Frame47 = Instance.new("Frame")
66Frame48 = Instance.new("Frame")
67Frame49 = Instance.new("Frame")
68Frame50 = Instance.new("Frame")
69Frame51 = Instance.new("Frame")
70Frame52 = Instance.new("Frame")
71Frame53 = Instance.new("Frame")
72Frame54 = Instance.new("Frame")
73Frame55 = Instance.new("Frame")
74Frame56 = Instance.new("Frame")
75Frame57 = Instance.new("Frame")
76Frame58 = Instance.new("Frame")
77Frame59 = Instance.new("Frame")
78Frame60 = Instance.new("Frame")
79Frame61 = Instance.new("Frame")
80Frame62 = Instance.new("Frame")
81Frame63 = Instance.new("Frame")
82Frame64 = Instance.new("Frame")
83Frame65 = Instance.new("Frame")
84Frame66 = Instance.new("Frame")
85Frame67 = Instance.new("Frame")
86TextLabel68 = Instance.new("TextLabel")
87TextLabel69 = Instance.new("TextLabel")
88TextLabel70 = Instance.new("TextLabel")
89TextLabel71 = Instance.new("TextLabel")
90Frame72 = Instance.new("Frame")
91Frame73 = Instance.new("Frame")
92Frame74 = Instance.new("Frame")
93TextLabel75 = Instance.new("TextLabel")
94TextLabel76 = Instance.new("TextLabel")
95TextLabel77 = Instance.new("TextLabel")
96TextLabel78 = Instance.new("TextLabel")
97ImageLabel79 = Instance.new("ImageLabel")
98TextLabel80 = Instance.new("TextLabel")
99TextLabel81 = Instance.new("TextLabel")
100Frame82 = Instance.new("Frame")
101Frame83 = Instance.new("Frame")
102TextLabel84 = Instance.new("TextLabel")
103TextLabel85 = Instance.new("TextLabel")
104TextLabel86 = Instance.new("TextLabel")
105TextLabel87 = Instance.new("TextLabel")
106ImageLabel88 = Instance.new("ImageLabel")
107TextLabel89 = Instance.new("TextLabel")
108TextLabel90 = Instance.new("TextLabel")
109Frame91 = Instance.new("Frame")
110ImageLabel92 = Instance.new("ImageLabel")
111TextLabel93 = Instance.new("TextLabel")
112Script94 = Instance.new("Script")
113IntValue95 = Instance.new("IntValue")
114IntValue96 = Instance.new("IntValue")
115IntValue97 = Instance.new("IntValue")
116IntValue98 = Instance.new("IntValue")
117IntValue99 = Instance.new("IntValue")
118Part100 = Instance.new("Part")
119SpecialMesh101 = Instance.new("SpecialMesh")
120ManualWeld102 = Instance.new("ManualWeld")
121Part103 = Instance.new("Part")
122BlockMesh104 = Instance.new("BlockMesh")
123Part105 = Instance.new("Part")
124SpecialMesh106 = Instance.new("SpecialMesh")
125Part107 = Instance.new("Part")
126BlockMesh108 = Instance.new("BlockMesh")
127Part109 = Instance.new("Part")
128BlockMesh110 = Instance.new("BlockMesh")
129Part111 = Instance.new("Part")
130SpecialMesh112 = Instance.new("SpecialMesh")
131ManualWeld113 = Instance.new("ManualWeld")
132Part114 = Instance.new("Part")
133SpecialMesh115 = Instance.new("SpecialMesh")
134ManualWeld116 = Instance.new("ManualWeld")
135Part117 = Instance.new("Part")
136SpecialMesh118 = Instance.new("SpecialMesh")
137ManualWeld119 = Instance.new("ManualWeld")
138Part120 = Instance.new("Part")
139SpecialMesh121 = Instance.new("SpecialMesh")
140Part122 = Instance.new("Part")
141SpecialMesh123 = Instance.new("SpecialMesh")
142Part124 = Instance.new("Part")
143BlockMesh125 = Instance.new("BlockMesh")
144Part126 = Instance.new("Part")
145BlockMesh127 = Instance.new("BlockMesh")
146Part128 = Instance.new("Part")
147SpecialMesh129 = Instance.new("SpecialMesh")
148Part130 = Instance.new("Part")
149SpecialMesh131 = Instance.new("SpecialMesh")
150ManualWeld132 = Instance.new("ManualWeld")
151Part133 = Instance.new("Part")
152SpecialMesh134 = Instance.new("SpecialMesh")
153Part135 = Instance.new("Part")
154SpecialMesh136 = Instance.new("SpecialMesh")
155Part137 = Instance.new("Part")
156BlockMesh138 = Instance.new("BlockMesh")
157Part139 = Instance.new("Part")
158BlockMesh140 = Instance.new("BlockMesh")
159Part141 = Instance.new("Part")
160BlockMesh142 = Instance.new("BlockMesh")
161Part143 = Instance.new("Part")
162SpecialMesh144 = Instance.new("SpecialMesh")
163Part145 = Instance.new("Part")
164BlockMesh146 = Instance.new("BlockMesh")
165Part147 = Instance.new("Part")
166BlockMesh148 = Instance.new("BlockMesh")
167Part149 = Instance.new("Part")
168SpecialMesh150 = Instance.new("SpecialMesh")
169Part151 = Instance.new("Part")
170CylinderMesh152 = Instance.new("CylinderMesh")
171Part153 = Instance.new("Part")
172BlockMesh154 = Instance.new("BlockMesh")
173ManualWeld155 = Instance.new("ManualWeld")
174Part156 = Instance.new("Part")
175BlockMesh157 = Instance.new("BlockMesh")
176Part158 = Instance.new("Part")
177SpecialMesh159 = Instance.new("SpecialMesh")
178Part160 = Instance.new("Part")
179CylinderMesh161 = Instance.new("CylinderMesh")
180Part162 = Instance.new("Part")
181SpecialMesh163 = Instance.new("SpecialMesh")
182Part164 = Instance.new("Part")
183SpecialMesh165 = Instance.new("SpecialMesh")
184Part166 = Instance.new("Part")
185SpecialMesh167 = Instance.new("SpecialMesh")
186Part168 = Instance.new("Part")
187CylinderMesh169 = Instance.new("CylinderMesh")
188Part170 = Instance.new("Part")
189BlockMesh171 = Instance.new("BlockMesh")
190Part172 = Instance.new("Part")
191BlockMesh173 = Instance.new("BlockMesh")
192Part174 = Instance.new("Part")
193BlockMesh175 = Instance.new("BlockMesh")
194Part176 = Instance.new("Part")
195CylinderMesh177 = Instance.new("CylinderMesh")
196ManualWeld178 = Instance.new("ManualWeld")
197Tool0.Name = "UNSC Shotgun"
198Tool0.Parent = mas
199Part1.Parent = Tool0
200Part1.Material = Enum.Material.Metal
201Part1.BrickColor = BrickColor.new("Dark stone grey")
202Part1.Anchored = true
203Part1.FormFactor = Enum.FormFactor.Plate
204Part1.Size = Vector3.new(1, 0.400000006, 1)
205Part1.CFrame = CFrame.new(2.5, 1.15334594, 46.5766602, 1, 0, 0, 0, 1, 0, 0, 0, 1)
206Part1.BottomSurface = Enum.SurfaceType.Smooth
207Part1.TopSurface = Enum.SurfaceType.Smooth
208Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
209Part1.Position = Vector3.new(2.5, 1.15334594, 46.5766602)
210Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
211BlockMesh2.Parent = Part1
212BlockMesh2.Scale = Vector3.new(0.0666666701, 0.166666672, 0.0666666701)
213BlockMesh2.Scale = Vector3.new(0.0666666701, 0.166666672, 0.0666666701)
214Part3.Parent = Tool0
215Part3.Material = Enum.Material.Metal
216Part3.Rotation = Vector3.new(-180, 0, -180)
217Part3.Anchored = true
218Part3.FormFactor = Enum.FormFactor.Plate
219Part3.Size = Vector3.new(1, 0.400000006, 1)
220Part3.CFrame = CFrame.new(2.5, 1.10002196, 48.5, -1, 0, 0, 0, 1, 0, 0, 0, -1)
221Part3.BottomSurface = Enum.SurfaceType.Smooth
222Part3.TopSurface = Enum.SurfaceType.Smooth
223Part3.Position = Vector3.new(2.5, 1.10002196, 48.5)
224Part3.Orientation = Vector3.new(0, 180, 0)
225BlockMesh4.Parent = Part3
226BlockMesh4.Scale = Vector3.new(0.100000001, 0.0666666701, 0.300000012)
227BlockMesh4.Scale = Vector3.new(0.100000001, 0.0666666701, 0.300000012)
228Part5.Name = "Mag"
229Part5.Parent = Tool0
230Part5.Material = Enum.Material.Metal
231Part5.BrickColor = BrickColor.new("Bright yellow")
232Part5.Reflectance = 0.10000000149012
233Part5.Rotation = Vector3.new(90, -90, 0)
234Part5.CanCollide = false
235Part5.FormFactor = Enum.FormFactor.Symmetric
236Part5.Size = Vector3.new(1, 1, 1)
237Part5.CFrame = CFrame.new(2.5, 0.70668, 47.7999878, -4.37113883e-08, 0, -1, -1, -4.37113883e-08, 4.37113883e-08, -4.37113883e-08, 1, 1.91068547e-15)
238Part5.BottomSurface = Enum.SurfaceType.Smooth
239Part5.TopSurface = Enum.SurfaceType.Smooth
240Part5.Color = Color3.new(0.960784, 0.803922, 0.188235)
241Part5.Position = Vector3.new(2.5, 0.70668, 47.7999878)
242Part5.Orientation = Vector3.new(0, -90, -90)
243Part5.Color = Color3.new(0.960784, 0.803922, 0.188235)
244CylinderMesh6.Parent = Part5
245CylinderMesh6.Scale = Vector3.new(0.100000001, 0.13333334, 0.100000001)
246CylinderMesh6.Scale = Vector3.new(0.100000001, 0.13333334, 0.100000001)
247Part7.Name = "Main"
248Part7.Parent = Tool0
249Part7.Material = Enum.Material.Metal
250Part7.BrickColor = BrickColor.new("Really black")
251Part7.Transparency = 1
252Part7.Rotation = Vector3.new(90, 90, 0)
253Part7.Anchored = true
254Part7.FormFactor = Enum.FormFactor.Custom
255Part7.Size = Vector3.new(0.25, 0.25, 0.25)
256Part7.CFrame = CFrame.new(2.4749999, 0.99000001, 46.0999985, -2.61729589e-08, 5.96046519e-08, 1, 1, 3.1868769e-08, 2.61729589e-08, -3.1868769e-08, 1, -5.96046519e-08)
257Part7.BottomSurface = Enum.SurfaceType.Smooth
258Part7.TopSurface = Enum.SurfaceType.Smooth
259Part7.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
260Part7.Position = Vector3.new(2.4749999, 0.99000001, 46.0999985)
261Part7.Orientation = Vector3.new(0, 90, 90)
262Part7.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
263PointLight8.Name = "FlashFX"
264PointLight8.Parent = Part7
265PointLight8.Color = Color3.new(1, 1, 0)
266PointLight8.Enabled = false
267PointLight8.Brightness = 10
268PointLight8.Range = 6
269PointLight8.Shadows = true
270PointLight8.Color = Color3.new(1, 1, 0)
271BillboardGui9.Name = "FlashGui"
272BillboardGui9.Parent = Part7
273BillboardGui9.Size = UDim2.new(1.10000002, 0, 1.10000002, 0)
274BillboardGui9.Enabled = false
275ImageLabel10.Name = "Label"
276ImageLabel10.Parent = BillboardGui9
277ImageLabel10.Transparency = 1
278ImageLabel10.Size = UDim2.new(1, 0, 1, 0)
279ImageLabel10.BackgroundTransparency = 1
280ImageLabel10.Image = "http://www.roblox.com/asset/?id=117472237"
281CylinderMesh11.Parent = Part7
282CylinderMesh11.Offset = Vector3.new(0, -0.248999998, 0)
283CylinderMesh11.Scale = Vector3.new(0.600000024, 1, 0.600000024)
284CylinderMesh11.Scale = Vector3.new(0.600000024, 1, 0.600000024)
285Part12.Name = "Handle"
286Part12.Parent = Tool0
287Part12.Material = Enum.Material.Metal
288Part12.Transparency = 1
289Part12.Anchored = true
290Part12.CanCollide = false
291Part12.FormFactor = Enum.FormFactor.Custom
292Part12.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
293Part12.CFrame = CFrame.new(2.5, 0.660000026, 49.1769981, 1, -4.10676591e-07, 2.92998536e-13, 4.10676591e-07, 1, -7.13453232e-07, 0, 7.13453232e-07, 1)
294Part12.BottomSurface = Enum.SurfaceType.Smooth
295Part12.TopSurface = Enum.SurfaceType.Smooth
296Part12.Position = Vector3.new(2.5, 0.660000026, 49.1769981)
297Sound13.Name = "FireSound"
298Sound13.Parent = Part12
299Sound13.SoundId = "http://roblox.com/asset/?id=330706798"
300Sound13.Volume = 1
301Part14.Name = "AimPart"
302Part14.Parent = Tool0
303Part14.Material = Enum.Material.Metal
304Part14.Transparency = 1
305Part14.Anchored = true
306Part14.CanCollide = false
307Part14.FormFactor = Enum.FormFactor.Custom
308Part14.Size = Vector3.new(0.299999952, 0.200000003, 0.200000003)
309Part14.CFrame = CFrame.new(2.5, 1.20099795, 48.3769989, 1, -1.98412908e-09, -5.96046519e-08, 1.98413042e-09, 1, 2.09293631e-08, 5.96046519e-08, -2.09293631e-08, 1)
310Part14.BottomSurface = Enum.SurfaceType.Smooth
311Part14.TopSurface = Enum.SurfaceType.Smooth
312Part14.Position = Vector3.new(2.5, 1.20099795, 48.3769989)
313Part15.Name = "Mag"
314Part15.Parent = Tool0
315Part15.Material = Enum.Material.Metal
316Part15.BrickColor = BrickColor.new("Bright red")
317Part15.Reflectance = 0.10000000149012
318Part15.Rotation = Vector3.new(90, -90, 0)
319Part15.CanCollide = false
320Part15.FormFactor = Enum.FormFactor.Symmetric
321Part15.Size = Vector3.new(1, 1, 1)
322Part15.CFrame = CFrame.new(2.5, 0.70668, 48, -4.37113883e-08, 0, -1, -1, -4.37113883e-08, 4.37113883e-08, -4.37113883e-08, 1, 1.91068547e-15)
323Part15.BottomSurface = Enum.SurfaceType.Smooth
324Part15.TopSurface = Enum.SurfaceType.Smooth
325Part15.Color = Color3.new(0.768628, 0.156863, 0.109804)
326Part15.Position = Vector3.new(2.5, 0.70668, 48)
327Part15.Orientation = Vector3.new(0, -90, -90)
328Part15.Color = Color3.new(0.768628, 0.156863, 0.109804)
329CylinderMesh16.Parent = Part15
330CylinderMesh16.Scale = Vector3.new(0.100000001, 0.266666681, 0.100000001)
331CylinderMesh16.Scale = Vector3.new(0.100000001, 0.266666681, 0.100000001)
332LocalScript17.Name = "Gun_Main"
333LocalScript17.Parent = Tool0
334table.insert(cors,sandbox(LocalScript17,function()
335
336repeat wait() until game.Players.LocalPlayer.Character
337repeat wait() until game.Players.LocalPlayer.Character:IsDescendantOf(game.Workspace)
338wait(1 / 20)
339
340--------------------------------------------------------------------------------------
341--------------------[ IGNORE MODEL ]--------------------------------------------------
342--------------------------------------------------------------------------------------
343
344local Ignore_Code = script:WaitForChild("Ignore_Code")
345
346repeat wait() until Ignore_Code.Value ~= 0
347
348local Ignore_Model = game.Workspace:WaitForChild("Ignore_Model_"..Ignore_Code.Value)
349
350--------------------------------------------------------------------------------------
351--------------------[ CONSTANTS ]-----------------------------------------------------
352--------------------------------------------------------------------------------------
353
354local Gun = script.Parent
355local Handle = Gun:WaitForChild("Handle")
356local AimPart = Gun:WaitForChild("AimPart")
357local Main = Gun:WaitForChild("Main")
358
359local Ammo = Gun:WaitForChild("Ammo")
360local ClipSize = Gun:WaitForChild("ClipSize")
361local StoredAmmo = Gun:WaitForChild("StoredAmmo")
362
363local LethalGrenades = Gun:WaitForChild("LethalGrenades")
364local TacticalGrenades = Gun:WaitForChild("TacticalGrenades")
365
366local S = { --These are the settings, change them however you like
367
368
369 GunName = "Unsc Shotgun"; --This is the name that will be displayed on the Tool
370 Description = "From halo lol"; --This will be the text that is displayed above the tool when the mouse is hovering over it
371
372
373 GunType = { --[[These are the 5 gun types you can have. Set whichever ones you want to true. (NOTE: Semi and Auto can't both be
374 true, and Burst and Auto can't both be true)]]
375 Semi = false; --Set this true if you want the gun to be semi-automatic. (Pistols, Snipers, etc)
376 Auto = false; --Set this true if you want the gun to be fully automatic. (Assault Rifles, Submachine guns, machine guns, etc)
377 Burst = false; --Set this true if you want the gun to be burst fire. (Battle rifles, assault rifles, etc)
378 Shot = true; --Set this true if you want the gun to be a shotgun. (NOTE: Shot and auto can both be true)
379 Explosive = false; --Set this true if you want the projectiles to be explosive. (Rocket launchers, grenade launchers, etc)
380 };
381
382
383 BurstAmount = 3; --This is how many bullets will be fired in one burst (if Burst is true)
384 BurstTime = 0.2; --This is how long it takes for a burst to complete
385 BurstWait = 0.1; --This is how much time you have to wait before you can fire another burst
386
387
388 ShotAmount = 5; --This is how many bullets will be fired in one shot (if Shot is true)
389
390
391 ExplosionRadius = 20; --This is the radius of the explosion when the bullet hits a target. (If Explosive is true)
392 ExplosionPressure = 5e5; --This is the pressure of the explosion when the bullet hits the target
393 ExplosionType = Enum.ExplosionType.NoCraters; --This is the type of explosion
394 --[[
395 (0 or "NoCraters" or Enum.ExplosionType.NoCraters) means that the explosion will not damage terrain
396 (1 or "Craters" or Enum.ExplosionType.Craters) means that the explosion will leave craters in terrain
397 (2 or "CratersAndDebris" or Enum.ExplosionType.CratersAndDebris) means that the explosion will leave craters and debris in terrain
398 --]]
399 ExplosionSound = "rbxassetid://138499093"; --This is what the sound of the explosion will be
400 ExplosionSoundPitch = 1; --This is what the pitch of the explosion sound will be
401 ExplosionSoundVolume = 1; --This is what the volume of the explosion sound will be
402 RayCastExplosions = false; --[[This is whether or not explosions will have raycasting. If this is true, humanoids behind walls
403 won't be damaged. If this is false, any humanoid within the radius will be damaged. (NOTE: RangeBasedDamage has to be true in
404 order for explosions to have raycasting)]]
405 RangeBasedDamage = true; --[[This is whether or not will depend on how far the object is from the center of the explosion. If this
406 is true, the farther a humanoid is from the blast center, the less damage it'll take. If this is false, any object within
407 the explosion's radius will have its joints broken]]
408
409
410 PlayerArms = true; --This is whether or not the fake arms will look like the Player's arms
411 FakeArmTransparency = 0; --This is the transparency of the fake arms
412 FakeArmRealBodyColor = true; --This is whether or not the color of the fake arm will be the color of the player's real arms
413 FakeArmColor = BrickColor.new("Pastel brown"); --This is what the color of the fake arms will be if FakeArmRealBodyColor is false
414
415
416 ArmC1_UnAimed = { --This table contains the CFrames of the arms when the gun is not aimed
417 Left = CFrame.new(0.1, 1.5, -0.3) * CFrame.Angles(0, 0, math.rad(-50)); --This is the cframe of the left arm
418 Right = CFrame.new(0.4, 0.25, -0.3) * CFrame.Angles(0, 0, math.rad(25)); --This is the cframe of the right arm
419 };
420 ArmC1_Aimed = { --This table contains the CFrames of the arms when the gun is aimed
421 Left = CFrame.new(-0.1, 1.2, 0.1) * CFrame.Angles(0, 0, math.rad(-35)); --This is the cframe of the left arm
422 Right = CFrame.new(0.3, 0.707, -0.01) * CFrame.Angles(0, 0, math.rad(50)); --This is the cframe of the right arm
423 };
424
425
426 PlayerAnimations = true; --This is whether or not the player will have custom animations
427 AimAnimation = true; --This is whether or not there is an animation for aiming down the sights
428 SelectFireAnimation = true; --This is whether or not there is an animation for changing the fire mode
429 ReloadAnimation = true; --This is whether or not there is an animation for reloading
430 StanceAnimation = true; --This is whether or not there is an animation for changing stance
431
432
433 AimSpeed = 0.15; --This is how long the gun will take to fully aim down the sights
434 MaxZoom = 40; --This is the FOV that the Camera will have when the gun is fully aimed down
435 HoldMouseOrKeyToADS = true; --This is whether or not you have to hold the right mouse or the ADS key to ADS
436
437
438 GuiScope = false; --This is whether or not your Scope will be a gui instead of a normal sight
439 GuiId = "http://www.roblox.com/asset/?id=160682367"; --This is the ImageId of the GuiScope
440 ScopeSway = 2; --This is the sway, in radians, of the camera
441
442
443 ScopeSteadyTime = 8; --This is how long you can hold your breath to steady the scope
444 SteadyCooldownTime = 4; --This is how long it takes to fully retake your breath
445 UnSteadyOnFire = true; --This is whether or not the camera will become unsteady when you fire the gun
446
447
448 FireRate = 600; --This is how many bullets per minute the gun will fire
449 BulletRange = 1000; --This is how far the bullet will travel before it is no longer effective
450
451
452 InstantHit = false; --[[This is whether or not the bullet will hit a target instantly. If it is false, the bullet will travel at a
453 specific speed till it hits a target]]
454 BulletVelocity = 2400; --This is how fast the bullet will travel in studs per second
455
456
457 Damage = 25; --This is the base damage. That means that this is the least amount of damage that will be inflicted
458 Multipliers = { --[[These are the damage multipliers. There's a spread of +0.1. That means that if the multiplier is 1, the actual
459 multiplier will range from 1 - 1.1]]
460 Chest = 1; --This is what the damage will be multiplied by if the bullet hits the chest
461 Head = 1.5; --This is what the damage will be multiplied by if the bullet hits the head or a hat
462 Limbs = 1; --This is what the damage will be multiplied by if the bullet hits a limb (Arms or legs)
463 };
464
465
466 AllowFriendlyFire = false; --This is whether or not you can damage teammates
467 CanDamageNPCs = true; --This is whether or not you can damage NPC's (Zombies, fake players, anything with a humanoid)
468
469
470 RotateWhileSitting = false; --This is whether or not your player will rotate when you are sitting down
471
472
473 SelectiveFire = true; --This is whether or not you can switch fire modes
474 FireModes = { --This is the table of all the possible fire modes you can switch between
475 Safety = true; --This mode prevents firing
476 Auto = true; --This mode is full auto firing
477 Burst = true; --This mode is burst fire. The settings for burst apply to this mode
478 Semi = true; --This mode is semi auto fire
479 };
480
481
482 CanKnife = true; --This is whether or not you can knife
483 KnifeMeshId = "http://www.roblox.com/asset/?id=121944778"; --This is the Mesh of the knife
484 KnifeTextureId = "http://www.roblox.com/asset/?id=121944805"; --This is the Texture of the knife
485 KnifeCooldown = 0.5; --This is how long you have to wait before you can knife again
486
487
488 Throwables = true; --This is whether or not you have grenades
489 TrajectoryAssist = true; --This is whether or not the script will show you the flight path of the grenade before you throw it
490 DetonationTime = 0.5; --[[This is how long the grenade will wait to detonate (If DetonateOnHit is false, this is how long the
491 grenade will wait after it's thrown. If DetonateOnHit is true, this is how long the grenade will wait after it hits something]]
492 TimerStartOnHit = true; --This is whether or not the timer will start when the grenade hits something
493 GrenadeColor = BrickColor.new("Black"); --This is the color of the grenade
494 GrenadeSize = Vector3.new(0.8, 0.8, 0.8); --This is the size of the grenade (Doesn't apply to throwing knives)
495
496
497 GrenadeBlastRadius = 12; --This is the blast radius of the explosion (Doesn't apply to non-explosive grenades)
498 GrenadeBlastPressure = 5e5; --This is what the blast pressure of the explosion (Doesn't apply to non-explosive grenades)
499 GrenadeExplosionType = Enum.ExplosionType.NoCraters; --This is the type of explosion (Doesn't apply to non-explosive grenades)
500 --[[
501 (0 or "NoCraters" or Enum.ExplosionType.NoCraters) means that the explosion will not damage terrain
502 (1 or "Craters" or Enum.ExplosionType.Craters) means that the explosion will leave craters in terrain
503 (2 or "CratersAndDebris" or Enum.ExplosionType.CratersAndDebris) means that the explosion will leave craters and debris in terrain
504 --]]
505 LethalGrenadeDamage = 150; --This is max damage that the grenade will do
506 LethalGrenadeThrowVelocity = 170; --This is the speed at which the lethal grenade is thrown
507 GrenadeRayCastExplosions = true; --[[This is whether or not grenade explosions will have raycasting. If this is true, humanoids
508 behind walls won't be damaged. If this is false, any humanoid within the radius will be damaged. (NOTE: GrenadeRangeBasedDamage
509 has to be true in order for explosions to have raycasting)]]
510 GrenadeRangeBasedDamage = true; --[[This is whether or not will depend on how far the object is from the center of the explosion.
511 If this is true, the farther a humanoid is from the blast center, the less damage it'll take. If this is false, any object
512 within the explosion's radius will have its joints broken]]
513 LethalGrenadeType = 1; --This is the lethal grenade type
514 --[[
515 Type 1: Frag grenade [An explosive grenade]
516 Type 2: Sticky [An explosive grenade that sticks to a surface]
517 Type 3: Throwing Knife [A throwable knife]
518 --]]
519
520 TacticalGrenadeThrowVelocity = 200; --This is the speed at which the tactical grenade is thrown
521 GrenadeEffectRadius = 70; --[[This is the radius of the effect of the grenade. If the Grenade is a smoke, this is the radius of
522 the smoke]]
523 GrenadeEffectTime = 10; --[[This is the how long the grenade effect will last. If the grenade is a smoke, this is how long the
524 smoke will linger]]
525 TacticalGrenadeType = 1; --This is the tactical grenade type
526 --[[
527 Type 1: Smoke grenade [A grenade that creates a cloud of smoke]
528 --]]
529
530
531 GrenadeTrail = true; --This is whether or not the grenade will have a trail
532 GrenadeTrailColor = BrickColor.new("Black"); --This is the color of the grenade trail
533 GrenadeTrailTransparency = 0.6; --This is the transparency of the trail
534 GrenadeTrailThickness = 0.3; --This is the thickness of the trail
535 GrenadeTrailVisibleTime = 0.1; --This is how long the trail will be visible for
536 GrenadeTrailDisappearTime = 0.2; --This is how long it will take for the trail to disappear
537
538
539 BulletColor = BrickColor.new("Bright yellow"); --This is the color of the bullet
540 BulletTransparency = 0; --This is the transparency of the bullet
541 BulletSize = Vector3.new(0.2, 0.2, 4); --This is the actual size of the bullet
542 BulletMeshSize = Vector3.new(0.5, 0.5, 1); --This is the mesh size of the bullet.
543 --BulletSize * BulletMeshSize = How big the bullet looks
544
545
546 BulletTrail = true; --This is whether or not there will be a trail behind the bullet
547 TrailColor = BrickColor.new("Black"); --This is the color of the bullet trail
548 TrailTransparency = 0.6; --This is the transparency of the trail
549 TrailThickness = 0.2; --This is the thickness of the trail
550 TrailVisibleTime = 0.5; --This is how long the trail will be visible for
551 TrailDisappearTime = 0.5; --This is how long it will take for the trail to disappear
552
553
554 BulletHoles = true; --This is whether or not bullet holes will appear where you shot
555 BulletHoleTexture = "http://www.roblox.com/asset/?id=64291961"; --This is the texture of the bullet hole
556 BulletHoleSize = 0.5; --This is how big the bullet hole will be in studs
557 BulletHoleVisibleTime = 3; --This is how long the bullet hole will be visible for
558 BulletHoleDisappearTime = 1; --This is how long it will take for the bullet hole to disappear
559
560
561 Shockwaves = true; --This is whether or not a shockwave will appear where you shot. (A sphere that appears when the bullet hits)
562 ShockwaveRadius = 0.3; --This is the radius of the shockwave. (If the gun type is explosion, this radius will be the blast radius)
563 ShockwaveColor = BrickColor.new("Light stone grey"); --This is the color of the shockwave
564 ShockwaveDuration = 0.2; --This is how long the shockwave will take to disappear
565
566
567 Penetration = 2; --[[This is how many studs a bullet can penetrate into a wall. So if penetration is 2 and the wall is 3 studs
568 thick, the bullet won't come out the other side]]
569
570
571 BulletDropPerSecond = 0; --This is the bullet's acceleration downward per second (196.2 is normal roblox gravity)
572
573
574 Recoil = {
575 Aimed = 0.5; --This is the recoil the gun will have when the gun is aimed down
576 Hipfire = 1.5; --This is the recoil the gun will have when the gun is fired from the hip
577 };
578 Spread = { --[[This spread values are how many degrees offset / 20 the bullets from the center the bullets will travel. So a spread
579 of 20 would mean that the bullet's max spread in any direction is 1 degree from the center]]
580 Aimed = 0; --This is the spread when the gun is aimed down. it isn't affected by the multiplier.
581 Hipfire = 20; --This is the base spread when the gun is fired from the hip
582 Max = 40; --This is the highest the spread can be when fired
583 Multiplier = 1.1; --This is how much the spread will be multiplied by when fired. It only affects the Hipfire spread
584 Walking = 30; --This is the spread while walking. It isn't affected by the multiplier
585 };
586
587
588 ReloadTime = 1.2; --This is how long it takes to reload the gun
589 AutoReload = true; --This is whether or not the gun will reload automatically when the ammo reaches 0
590
591
592 SprintTime = 7; --This is the maximum time you can sprint
593 StaminaCoolTime = 4; --This is how long it takes for your stamina to fully recharge
594
595
596 DolphinDive = true; --This is whether or not you can dolphin dive (Run and crouch at the same time to dive)
597 DiveRechargeTime = 1; --This is how long you have to wait till you can dive or run again after you've dived
598
599
600 CanChangeStance = true; --This is whether or not you can change stance. That means whether or not you can crouch or go prone
601 StanceChangeSpeed = 0.25; --This is how quickly you change stance
602 StandOnDeselect = true; --This is whether or not you stand up when you deselect the tool
603
604
605 BaseWalkSpeed = 16; --This is the base walkspeed
606 SprintSpeed = 30; --This is the walkspeed when you're sprinting
607 AimedWalkSpeed = 10; --[[This is the base walkspeed when the gun is aimed down. If you crouch or go prone, the speed will change
608 based on the AimedWalkSpeed to BaseWalkSpeed ratio]]
609 CrouchWalkSpeed = 7; --This is the walkspeed when you're crouched
610 ProneWalkSpeed = 4; --This is the walkspeed when you're prone
611
612
613 --NOTE: For extra keys, go here: http://wiki.roblox.com/index.php?title=Taking_keyboard_input
614 LowerStanceKey = "c"; --This is the key you press to lower your stance (Stand > Crouch > Prone)
615 RaiseStanceKey = "x"; --This is the key you press to raise your stance (Prone > Crouch > Stand)
616 SwitchFireKey = "v"; --This is the key you press to switch fire modes
617 ReloadKey = "r"; --This is the key you press to reload
618 SprintKey = string.char(48); --This is the key you press to sprint
619 KnifeKey = "f"; --This is the key you press to knife
620 LethalGrenadeKey = "g"; --This is the key you press to throw the lethal grenade
621 TacticalGrenadeKey = "t"; --This is the key you press to throw the tactical grenade
622 ADSKey = "q"; --This is the key you press to ADS. If you want ADS to just be right mouse, then make this key ""
623 ScopeSteadyKey = string.char(48); --This is the key you press to steady the scope
624
625
626}
627
628local Player = game.Players.LocalPlayer
629local Character = Player.Character
630local Humanoid = Character:WaitForChild("Humanoid")
631local Torso = Character:WaitForChild("Torso")
632local Head = Character:WaitForChild("Head")
633local HRP = Character:WaitForChild("HumanoidRootPart")
634
635local Neck = Torso:WaitForChild("Neck")
636
637local LArm = Character:WaitForChild("Left Arm")
638local RArm = Character:WaitForChild("Right Arm")
639local LLeg = Character:WaitForChild("Left Leg")
640local RLeg = Character:WaitForChild("Right Leg")
641
642local M2 = Player:GetMouse()
643local Main_Gui = script:WaitForChild("Main_Gui")
644
645local RS = game:GetService("RunService").RenderStepped
646
647local Camera = game.Workspace.CurrentCamera
648
649local ABS, HUGE, FLOOR, CEIL = math.abs, math.huge, math.floor, math.ceil
650local RAD, SIN, ATAN, COS = math.rad, math.sin, math.atan2, math.cos
651local VEC3 = Vector3.new
652local CF, CFANG = CFrame.new, CFrame.Angles
653local INSERT = table.insert
654
655local MaxStamina = S.SprintTime * 60
656local MaxSteadyTime = S.ScopeSteadyTime * 60
657
658local LethalIcons = {
659 "http://www.roblox.com/asset/?id=194849880";
660 "http://www.roblox.com/asset/?id=195727791";
661 "http://www.roblox.com/asset/?id=195728137";
662}
663
664local TacticalIcons = {
665 "http://www.roblox.com/asset/?id=195728473";
666 "http://www.roblox.com/asset/?id=195728693";
667}
668
669local Ignore = {
670 Character;
671 Ignore_Model;
672}
673
674local StanceOffset = {
675 VEC3(0, 0, 0);
676 VEC3(0, -1, 0);
677 VEC3(0, -3, 0);
678}
679
680local Shoulders = {
681 Right = Torso:WaitForChild("Right Shoulder");
682 Left = Torso:WaitForChild("Left Shoulder")
683}
684
685local ArmC0 = {
686 CF(-1.5, 0, 0) * CFANG(RAD(90), 0, 0);
687 CF(1.5, 0, 0) * CFANG(RAD(90), 0, 0);
688}
689
690local Sine = function(X)
691 return SIN(RAD(X))
692end
693
694local Linear = function(X)
695 return (X / 90)
696end
697
698--------------------------------------------------------------------------------------
699--------------------[ VARIABLES ]-----------------------------------------------------
700--------------------------------------------------------------------------------------
701
702local Selected = false
703
704local Idleing = false
705local Walking = false
706local Running = false
707
708local Aimed = false
709local Aiming = false
710
711local Reloading = false
712local BreakReload = false
713
714local Knifing = false
715local ThrowingGrenade = false
716
717local MB1_Down = false
718
719local CanFire = true
720
721local KnifeReady = true
722
723local CanRun = true
724local RunTween = false
725local Run_Key_Pressed = false
726local ChargingStamina = false
727
728local AimingIn = false
729local AimingOut = false
730
731local Stamina = S.SprintTime * 60
732local CurrentSteadyTime = S.ScopeSteadyTime * 60
733
734local CameraSteady = false
735local TakingBreath = false
736
737local Grip = nil
738local Aimed_GripCF = nil
739
740local Gui_Clone = nil
741
742local CurrentSpread = S.Spread.Hipfire
743local CurrentRecoil = S.Recoil.Hipfire
744
745local AmmoInClip = 0
746
747local Stance = 0
748local StanceSway = 1
749local CameraSway = 1
750
751local HeadRot = 0
752local ArmTilt = 0
753
754local LastBeat = 0
755
756local Parts = {}
757
758local Connections = {}
759
760local PrevNeckCF = {
761 C0 = nil;
762 C1 = nil;
763}
764
765local Keys = {}
766
767--------------------------------------------------------------------------------------
768--------------------[ PRE-LOADING ]---------------------------------------------------
769--------------------------------------------------------------------------------------
770
771local ContentProvider = game:GetService("ContentProvider")
772ContentProvider:Preload(S.ExplosionSound)
773ContentProvider:Preload(S.KnifeMeshId)
774ContentProvider:Preload(S.KnifeTextureId)
775ContentProvider:Preload(S.BulletHoleTexture)
776
777--------------------------------------------------------------------------------------
778--------------------[ ANIMATIONS ]----------------------------------------------------
779--------------------------------------------------------------------------------------
780
781local AnimAng = {0, 0, 0, 0, 0}
782
783local AnimCF = function(State, Ang)
784 if State ~= "Running" then
785 if (not Aimed) then
786 if State == "Idleing" then
787 return CF(
788 RAD(SIN(Ang)) / 2 * StanceSway,
789 1 + RAD(SIN(Ang * 5 / 2)) / 2 * StanceSway, 0
790 )
791 elseif State == "Walking" then
792 return CF(
793 RAD(SIN(Ang)) * 2 * StanceSway,
794 1 + RAD(ABS(SIN(Ang))) * 2 * StanceSway, 0
795 ) * CFANG(0, RAD(SIN(Ang)) / 3, 0)
796 end
797 elseif Aimed then
798 if State == "Idleing" then
799 return CF(
800 RAD(SIN(Ang)) / 4 * StanceSway,
801 1 + RAD(SIN(Ang * 5 / 2)) / 4 * StanceSway, 0
802 )
803 elseif State == "Walking" then
804 return CF(
805 RAD(SIN(Ang)) / 3 * StanceSway,
806 1 + RAD(ABS(SIN(Ang))) / 3 * StanceSway, 0
807 )
808 end
809 end
810 elseif State == "Running" then
811 return CF(
812 SIN(Ang) / 6 * StanceSway,
813 0.9 + ABS(SIN(Ang)) / 5 * StanceSway, 0
814 ) * CFANG(0, -RAD(SIN(Ang)) * 7, 0)
815 end
816end
817
818function Animate()
819 local IsIdleing = false
820 local IsWalking = false
821 local IsRunning = false
822 spawn(function()
823 while Selected do
824 IsIdleing = Idleing and (not Walking) and (not Reloading) and (not Knifing) and (not ThrowingGrenade) and Selected
825 IsWalking = (not Idleing) and Walking and (not Running) and (not Reloading) and (not Knifing) and (not ThrowingGrenade) and Selected
826 IsRunning = (not Idleing) and Walking and Running and (not Aiming) and (not Knifing) and (not ThrowingGrenade) and Selected
827 RS:wait()
828 end
829 IsIdleing = false
830 IsWalking = false
831 IsRunning = false
832 end)
833 spawn(function()
834 if S.PlayerAnimations then
835 TweenJoint(LWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, 0.15)
836 TweenJoint(RWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, 0.15)
837 local PreviousArmTilt = ArmTilt
838 while Selected do
839 repeat RS:wait() until (ArmTilt ~= PreviousArmTilt) or (not Selected)
840 if (not IsRunning) and (not Aimed) and (not Reloading) and (not Knifing) and (not ThrowingGrenade) and Selected then
841 PreviousArmTilt = ArmTilt
842 TweenJoint(LWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, 0.15)
843 TweenJoint(RWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, 0.15)
844 end
845 RS:wait()
846 end
847 end
848 end)
849 spawn(function()
850 while Selected do
851 if IsIdleing then
852 if (not Aimed) and (not Aiming) then
853 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
854 UDim2.new(0, 70, 0, 70),
855 UDim2.new(0, -35, 0, -35),
856 Enum.EasingDirection.Out,
857 Enum.EasingStyle.Linear,
858 S.PlayerAnimations and 0.15 or 0,
859 true
860 )
861 if S.PlayerAnimations then
862 TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Sine, 0.15)
863 TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Sine, 0.15)
864 TweenJoint(AnimWeld, AnimCF("Idleing", AnimAng[1]), CF(), Sine, 0.15)
865 TweenJoint(Grip, Grip.C0, CFANG(0, RAD(20), 0), Sine, 0.15)
866 else
867 if (not LWeld:FindFirstChild("TweenCode"))
868 and (not RWeld:FindFirstChild("TweenCode"))
869 and (not ABWeld:FindFirstChild("TweenCode"))
870 and (not AnimWeld:FindFirstChild("TweenCode")) then
871 LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_UnAimed.Left
872 RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_UnAimed.Right
873 AnimWeld.C0 = CF(0, 1, 0)
874 Grip.C1 = CFANG(0, RAD(20), 0)
875 end
876 end
877 elseif Aimed and (not Aiming) then
878 if S.PlayerAnimations then
879 TweenJoint(LWeld, ArmC0[1], S.ArmC1_Aimed.Left, Sine, 0.15)
880 TweenJoint(RWeld, ArmC0[2], S.ArmC1_Aimed.Right, Sine, 0.15)
881 TweenJoint(AnimWeld, AnimCF("Idleing", AnimAng[2]), CF(), Sine, 0.15)
882 else
883 if (not LWeld:FindFirstChild("TweenCode"))
884 and (not RWeld:FindFirstChild("TweenCode"))
885 and (not ABWeld:FindFirstChild("TweenCode"))
886 and (not AnimWeld:FindFirstChild("TweenCode")) then
887 LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_Aimed.Left
888 RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_Aimed.Right
889 AnimWeld.C0 = CF(0, 1, 0)
890 Grip.C1 = Aimed_GripCF
891 end
892 end
893 end
894 if S.PlayerAnimations then
895 wait(0.15)
896 RunTween = false
897 while IsIdleing do
898 if (not LWeld:FindFirstChild("TweenCode"))
899 and (not RWeld:FindFirstChild("TweenCode"))
900 and (not ABWeld:FindFirstChild("TweenCode"))
901 and (not AnimWeld:FindFirstChild("TweenCode")) then
902 if (not Aimed) and (not Aiming) then
903 AnimWeld.C0 = AnimCF("Idleing", AnimAng[1])
904 AnimAng[1] = AnimAng[1] + 0.03 * StanceSway
905 elseif Aimed and (not Aiming) then
906 AnimWeld.C0 = AnimCF("Idleing", AnimAng[2])
907 AnimAng[2] = AnimAng[2] + 0.015 * StanceSway
908 end
909 end
910 RS:wait()
911 end
912 AnimAng[1], AnimAng[2] = 0, 0
913 end
914 end
915 if IsWalking then
916 if (not Aimed) and (not Aiming) then
917 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
918 UDim2.new(0, 150, 0, 150),
919 UDim2.new(0, -75, 0, -75),
920 Enum.EasingDirection.Out,
921 Enum.EasingStyle.Linear,
922 S.PlayerAnimations and 0.15 or 0,
923 true
924 )
925 if S.PlayerAnimations then
926 TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Sine, 0.15)
927 TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Sine, 0.15)
928 TweenJoint(AnimWeld, AnimCF("Walking", AnimAng[3]), CF(), Sine, 0.15)
929 TweenJoint(Grip, Grip.C0, CFANG(0, RAD(20), 0), Sine, 0.15)
930 else
931 if (not LWeld:FindFirstChild("TweenCode"))
932 and (not RWeld:FindFirstChild("TweenCode"))
933 and (not ABWeld:FindFirstChild("TweenCode"))
934 and (not AnimWeld:FindFirstChild("TweenCode")) then
935 LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_UnAimed.Left
936 RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_UnAimed.Right
937 AnimWeld.C0 = CF(0, 1, 0)
938 Grip.C1 = CFANG(0, RAD(20), 0)
939 end
940 end
941 elseif Aimed and (not Aiming) then
942 if S.PlayerAnimations then
943 TweenJoint(LWeld, ArmC0[1], S.ArmC1_Aimed.Left, Sine, 0.15)
944 TweenJoint(RWeld, ArmC0[2], S.ArmC1_Aimed.Right, Sine, 0.15)
945 TweenJoint(AnimWeld, AnimCF("Walking", AnimAng[4]), CF(), Sine, 0.15)
946 else
947 if (not LWeld:FindFirstChild("TweenCode"))
948 and (not RWeld:FindFirstChild("TweenCode"))
949 and (not ABWeld:FindFirstChild("TweenCode"))
950 and (not AnimWeld:FindFirstChild("TweenCode")) then
951 LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_Aimed.Left
952 RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_Aimed.Right
953 AnimWeld.C0 = CF(0, 1, 0)
954 Grip.C1 = Aimed_GripCF
955 end
956 end
957 end
958 if S.PlayerAnimations then
959 wait(0.15)
960 RunTween = false
961 while IsWalking do
962 if (not LWeld:FindFirstChild("TweenCode"))
963 and (not RWeld:FindFirstChild("TweenCode"))
964 and (not ABWeld:FindFirstChild("TweenCode"))
965 and (not AnimWeld:FindFirstChild("TweenCode"))then
966 if (not Aimed) and (not Aiming) then
967 AnimWeld.C0 = AnimCF("Walking", AnimAng[3])
968 AnimAng[3] = AnimAng[3] + 0.15 * StanceSway
969 elseif Aimed and (not Aiming) then
970 AnimWeld.C0 = AnimCF("Walking", AnimAng[4])
971 AnimAng[4] = AnimAng[4] + 0.1 * StanceSway
972 end
973 end
974 RS:wait()
975 end
976 AnimAng[3], AnimAng[4] = 0, 0
977 end
978 end
979 if IsRunning then
980 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
981 UDim2.new(0, 200, 0, 200),
982 UDim2.new(0, -100, 0, -100),
983 Enum.EasingDirection.Out,
984 Enum.EasingStyle.Linear,
985 S.PlayerAnimations and 0.15 or 0,
986 true
987 )
988 local LArmCF = CF(0, 0.7 - (SIN(AnimAng[5]) + 1)/15, 0)
989 local LArmAng = CFANG(RAD(ABS(COS(AnimAng[5]))) * 10 + RAD(35), RAD(-30), RAD((SIN(AnimAng[5]) + 1) * 15 - 40))
990 local RArmCF = CF(0, (SIN(AnimAng[5]) + 1)/2, 0)
991 local RArmAng = CFANG(RAD(ABS(COS(AnimAng[5]))) * 10 + RAD(20), 0, RAD(50 + (SIN(AnimAng[5]) + 1) * 5))
992 if S.PlayerAnimations then
993 TweenJoint(LWeld, ArmC0[1], LArmCF * LArmAng, Sine, 0.15)
994 TweenJoint(RWeld, ArmC0[2], RArmCF * RArmAng, Sine, 0.15)
995 TweenJoint(AnimWeld, AnimCF("Running", AnimAng[5]), CF(), Sine, 0.15)
996 TweenJoint(Grip, Grip.C0, CFANG(0, RAD(-5), 0), Sine, 0.15)
997 else
998 LWeld.C0, LWeld.C1 = ArmC0[1], LArmCF * LArmAng
999 RWeld.C0, RWeld.C1 = ArmC0[2], RArmCF * RArmAng
1000 AnimWeld.C0 = CF(0, 0.9, 0)
1001 Grip.C1 = CFANG(0, RAD(-5), 0)
1002 end
1003 if S.PlayerAnimations then
1004 RunTween = true
1005 wait(0.15)
1006 while IsRunning do
1007 if (not Aiming) then
1008 AnimWeld.C0 = AnimCF("Running", AnimAng[5])
1009 AnimAng[5] = AnimAng[5] + 0.18
1010 end
1011 RS:wait()
1012 end
1013 AnimAng[5] = 0
1014 end
1015 end
1016 RS:wait()
1017 end
1018 end)
1019end
1020
1021--------------------------------------------------------------------------------------
1022--------------------[ GUN SETUP ]-----------------------------------------------------
1023--------------------------------------------------------------------------------------
1024
1025Gun.Name = S.GunName
1026Gun.ToolTip = S.Description
1027
1028--------------------------------------------------------------------------------------
1029--------------------[ PRE-CONNECTIONS ]-----------------------------------------------
1030--------------------------------------------------------------------------------------
1031
1032RS:connect(function()
1033 local Forward = (Keys["w"] or Keys[string.char(17)])
1034 local Backward = (Keys["s"] or Keys[string.char(18)])
1035 local Right = (Keys["d"] or Keys[string.char(19)])
1036 local Left = (Keys["a"] or Keys[string.char(20)])
1037
1038 if (Forward or Backward or Right or Left) then
1039 Walking, Idleing = true, false
1040 elseif (not (Forward and Backward and Right and Left)) then
1041 Walking, Idleing = false, true
1042 end
1043end)
1044
1045M2.KeyDown:connect(function(Key) Keys[Key] = true end)
1046M2.KeyUp:connect(function(Key) Keys[Key] = false end)
1047
1048--------------------------------------------------------------------------------------
1049--------------------[ WELDING ]-------------------------------------------------------
1050--------------------------------------------------------------------------------------
1051
1052spawn(function()
1053 for _, v in pairs(Gun:GetChildren()) do
1054 if v:IsA("BasePart") and v ~= Handle then
1055 if v:FindFirstChild("MainWeld") then v.MainWeld:Destroy() end
1056 if (not v:FindFirstChild("WeldCF")) then
1057 local WeldCF = Instance.new("CFrameValue")
1058 WeldCF.Name = "WeldCF"
1059 WeldCF.Value = Handle.CFrame:toObjectSpace(v.CFrame)
1060 WeldCF.Parent = v
1061 end
1062 INSERT(Parts, {Obj = v, Weld = nil})
1063 v.Anchored = false
1064 end
1065 end
1066 Handle.Anchored = false
1067end)
1068
1069--------------------------------------------------------------------------------------
1070--------------------[ MAIN PROGRAM ]--------------------------------------------------
1071--------------------------------------------------------------------------------------
1072
1073--------------------[ ARM CREATION FUNCTION ]-----------------------------------------
1074
1075function CreateArms()
1076 local Arms = {}
1077 for i = 0, 1 do
1078 local ArmModel = Instance.new("Model")
1079 ArmModel.Name = "ArmModel"
1080
1081 local Arm = Instance.new("Part")
1082 Arm.BrickColor = (S.FakeArmRealBodyColor and (i == 0 and LArm.BrickColor or RArm.BrickColor) or S.FakeArmColor)
1083 Arm.Transparency = S.FakeArmTransparency
1084 Arm.Name = "Arm"
1085 Arm.CanCollide = false
1086 Arm.Size = VEC3(1, 2, 1)
1087 Arm.Parent = ArmModel
1088 local ArmMesh = Instance.new("SpecialMesh")
1089 ArmMesh.MeshId = "rbxasset://fonts//rightarm.mesh"
1090 ArmMesh.MeshType = Enum.MeshType.FileMesh
1091 ArmMesh.Scale = VEC3(0.65, 1, 0.65)
1092 ArmMesh.Parent = Arm
1093
1094 local Sleeve1 = Instance.new("Part")
1095 Sleeve1.BrickColor = BrickColor.new("Sand green")
1096 Sleeve1.Name = "Sleeve1"
1097 Sleeve1.CanCollide = false
1098 Sleeve1.Size = VEC3(1, 2, 1)
1099 Sleeve1.Parent = ArmModel
1100 local Sleeve1Mesh = Instance.new("BlockMesh")
1101 Sleeve1Mesh.Offset = VEC3(0, 0.66, 0)
1102 Sleeve1Mesh.Scale = VEC3(0.656, 0.35, 0.656)
1103 Sleeve1Mesh.Parent = Sleeve1
1104 local Sleeve1Weld = Instance.new("Weld")
1105 Sleeve1Weld.Part0 = Arm
1106 Sleeve1Weld.Part1 = Sleeve1
1107 Sleeve1Weld.Parent = Arm
1108
1109 local Sleeve2 = Instance.new("Part")
1110 Sleeve2.BrickColor = BrickColor.new("Sand green")
1111 Sleeve2.Name = "Sleeve2"
1112 Sleeve2.CanCollide = false
1113 Sleeve2.Size = VEC3(1, 2, 1)
1114 Sleeve2.Parent = ArmModel
1115 local Sleeve2Mesh = Instance.new("BlockMesh")
1116 Sleeve2Mesh.Offset = VEC3(0, 0.46, 0)
1117 Sleeve2Mesh.Scale = VEC3(0.75, 0.1, 0.75)
1118 Sleeve2Mesh.Parent = Sleeve2
1119 local Sleeve2Weld = Instance.new("Weld")
1120 Sleeve2Weld.Part0 = Arm
1121 Sleeve2Weld.Part1 = Sleeve2
1122 Sleeve2Weld.Parent = Arm
1123
1124 local Glove1 = Instance.new("Part")
1125 Glove1.BrickColor = BrickColor.new("Black")
1126 Glove1.Name = "Glove1"
1127 Glove1.CanCollide = false
1128 Glove1.Size = VEC3(1, 2, 1)
1129 Glove1.Parent = ArmModel
1130 local Glove1Mesh = Instance.new("BlockMesh")
1131 Glove1Mesh.Offset = VEC3(0, -0.4, 0)
1132 Glove1Mesh.Scale = VEC3(0.657, 0.205, 0.657)
1133 Glove1Mesh.Parent = Glove1
1134 local Glove1Weld = Instance.new("Weld")
1135 Glove1Weld.Part0 = Arm
1136 Glove1Weld.Part1 = Glove1
1137 Glove1Weld.Parent = Arm
1138
1139 local Glove2 = Instance.new("Part")
1140 Glove2.BrickColor = BrickColor.new("Black")
1141 Glove2.Name = "Glove2"
1142 Glove2.CanCollide = false
1143 Glove2.Size = VEC3(1, 2, 1)
1144 Glove2.Parent = ArmModel
1145 local Glove2Mesh = Instance.new("BlockMesh")
1146 Glove2Mesh.Offset = VEC3(0, -0.335, 0)
1147 Glove2Mesh.Scale = VEC3(0.69, 0.105, 0.69)
1148 Glove2Mesh.Parent = Glove2
1149 local Glove2Weld = Instance.new("Weld")
1150 Glove2Weld.Part0 = Arm
1151 Glove2Weld.Part1 = Glove2
1152 Glove2Weld.Parent = Arm
1153
1154 local Glove3 = Instance.new("Part")
1155 Glove3.BrickColor = BrickColor.new("Black")
1156 Glove3.Name = "Glove3"
1157 Glove3.CanCollide = false
1158 Glove3.Size = VEC3(1, 2, 1)
1159 Glove3.Parent = ArmModel
1160 local Glove3Mesh = Instance.new("BlockMesh")
1161 Glove3Mesh.Offset = VEC3(0.2 * ((i * 2) - 1), -0.8, 0)
1162 Glove3Mesh.Scale = VEC3(0.257, 0.205, 0.657)
1163 Glove3Mesh.Parent = Glove3
1164 local Glove3Weld = Instance.new("Weld")
1165 Glove3Weld.Part0 = Arm
1166 Glove3Weld.Part1 = Glove3
1167 Glove3Weld.Parent = Arm
1168
1169 table.insert(Arms, {Model = ArmModel, ArmPart = Arm})
1170 end
1171 return Arms
1172end
1173
1174--------------------[ MATH FUNCTIONS ]------------------------------------------------
1175
1176function NumLerp(A, B, Alpha)
1177 return (A + ((B - A) * Alpha))
1178end
1179
1180function RAND(Min, Max, Accuracy)
1181 local Inverse = 1 / (Accuracy or 1)
1182 return (math.random(Min * Inverse, Max * Inverse) / Inverse)
1183end
1184
1185--------------------[ TWEEN FUNCTIONS ]-----------------------------------------------
1186
1187function TweenJoint(Joint, NewC0, NewC1, Alpha, Duration)
1188 coroutine.resume(coroutine.create(function()
1189 local TweenIndicator = nil --At the current moment, this is how the script determines whether the function is already tweening a joint
1190 local NewCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
1191 if (not Joint:FindFirstChild("TweenCode")) then --If the joint isn't being tweened, then
1192 TweenIndicator = Instance.new("IntValue")
1193 TweenIndicator.Name = "TweenCode"
1194 TweenIndicator.Value = NewCode
1195 TweenIndicator.Parent = Joint
1196 else
1197 TweenIndicator = Joint.TweenCode
1198 TweenIndicator.Value = NewCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
1199 end
1200 local MatrixCFrame = function(CFPos, CFTop, CFBack)
1201 local CFRight = CFTop:Cross(CFBack)
1202 return CF(
1203 CFPos.x, CFPos.y, CFPos.z,
1204 CFRight.x, CFTop.x, CFBack.x,
1205 CFRight.y, CFTop.y, CFBack.y,
1206 CFRight.z, CFTop.z, CFBack.z
1207 )
1208 end
1209 local LerpCF = function(StartCF, EndCF, Alpha)
1210 local StartTop = (StartCF * CFANG(RAD(90), 0, 0)).lookVector
1211 local StartBack = -StartCF.lookVector
1212 local EndTop = (EndCF * CFANG(RAD(90), 0, 0)).lookVector
1213 local EndBack = -EndCF.lookVector
1214 local StartPos = StartCF.p
1215 local EndPos = EndCF.p
1216 local NewCF = MatrixCFrame(
1217 StartPos:lerp(EndPos, Alpha),
1218 StartTop:lerp(EndTop, Alpha),
1219 StartBack:lerp(EndBack, Alpha)
1220 )
1221 return NewCF
1222 end
1223 local StartC0 = Joint.C0
1224 local StartC1 = Joint.C1
1225 local X = 0
1226 while true do
1227 local NewX = X + math.min(1.5 / math.max(Duration, 0), 90)
1228 X = (NewX > 90 and 90 or NewX)
1229 if TweenIndicator.Value ~= NewCode then break end --This makes sure that another tween wasn't called on the same joint
1230 if (not Selected) then break end --This stops the tween if the tool is deselected
1231 if NewC0 then Joint.C0 = LerpCF(StartC0, NewC0, Alpha(X)) end
1232 if NewC1 then Joint.C1 = LerpCF(StartC1, NewC1, Alpha(X)) end
1233 if X == 90 then break end
1234 RS:wait() --This makes the for loop step every 1/60th of a second
1235 end
1236 if TweenIndicator.Value == NewCode then --If this tween functions was the last one called on a joint then it will remove the code
1237 TweenIndicator:Destroy()
1238 end
1239 end))
1240end
1241
1242function RotCamera(RotX, RotY, SmoothRot, Duration)
1243 spawn(function()
1244 if SmoothRot then
1245 local TweenIndicator = nil
1246 local NewCode = math.random(-1e9, 1e9)
1247 if (not Camera:FindFirstChild("TweenCode")) then
1248 TweenIndicator = Instance.new("IntValue")
1249 TweenIndicator.Name = "TweenCode"
1250 TweenIndicator.Value = NewCode
1251 TweenIndicator.Parent = Camera
1252 else
1253 TweenIndicator = Camera.TweenCode
1254 TweenIndicator.Value = NewCode
1255 end
1256
1257 local Step = math.min(1.5 / math.max(Duration, 0), 90)
1258 local X = 0
1259 while true do
1260 local NewX = X + Step
1261 X = (NewX > 90 and 90 or NewX)
1262 if TweenIndicator.Value ~= NewCode then break end
1263 if (not Selected) then break end
1264
1265 local CamRot = Camera.CoordinateFrame - Camera.CoordinateFrame.p
1266 local CamDist = (Camera.CoordinateFrame.p - Camera.Focus.p).magnitude
1267 local NewCamCF = CF(Camera.Focus.p) * CamRot * CFANG(RotX / (90 / Step), RotY / (90 / Step), 0)
1268 Camera.CoordinateFrame = CF(NewCamCF.p, NewCamCF.p + NewCamCF.lookVector) * CF(0, 0, CamDist)
1269
1270 if X == 90 then break end
1271 RS:wait()
1272 end
1273
1274 if TweenIndicator.Value == NewCode then
1275 TweenIndicator:Destroy()
1276 end
1277 else
1278 local CamRot = Camera.CoordinateFrame - Camera.CoordinateFrame.p
1279 local CamDist = (Camera.CoordinateFrame.p - Camera.Focus.p).magnitude
1280 local NewCamCF = CF(Camera.Focus.p) * CamRot * CFANG(RotX, RotY, 0)
1281 Camera.CoordinateFrame = CF(NewCamCF.p, NewCamCF.p + NewCamCF.lookVector) * CF(0, 0, CamDist)
1282 end
1283 end)
1284end
1285
1286--------------------[ GUI SETUP FUNCTION ]--------------------------------------------
1287
1288function ConvertKey(Key)
1289 if Key == string.char(8) then
1290 return "BKSPCE"
1291 elseif Key == string.char(9) then
1292 return "TAB"
1293 elseif Key == string.char(13) then
1294 return "ENTER"
1295 elseif Key == string.char(17) then
1296 return "UP"
1297 elseif Key == string.char(18) then
1298 return "DOWN"
1299 elseif Key == string.char(19) then
1300 return "RIGHT"
1301 elseif Key == string.char(20) then
1302 return "LEFT"
1303 elseif Key == string.char(22) then
1304 return "HOME"
1305 elseif Key == string.char(23) then
1306 return "END"
1307 elseif Key == string.char(27) then
1308 return "F2"
1309 elseif Key == string.char(29) then
1310 return "F4"
1311 elseif Key == string.char(30) then
1312 return "F5"
1313 elseif Key == string.char(32) or Key == " " then
1314 return "F7"
1315 elseif Key == string.char(33) or Key == "!" then
1316 return "F8"
1317 elseif Key == string.char(34) or Key == '"' then
1318 return "F9"
1319 elseif Key == string.char(35) or Key == "#" then
1320 return "F10"
1321 elseif Key == string.char(37) or Key == "%" then
1322 return "F12"
1323 elseif Key == string.char(47) or Key == "/" then
1324 return "R-SHIFT"
1325 elseif Key == string.char(48) or Key == "0" then
1326 return "L-SHIFT"
1327 elseif Key == string.char(49) or Key == "1" then
1328 return "R-CTRL"
1329 elseif Key == string.char(50) or Key == "2" then
1330 return "L-CTRL"
1331 elseif Key == string.char(51) or Key == "3" then
1332 return "R-ALT"
1333 elseif Key == string.char(52) or Key == "4" then
1334 return "L-ALT"
1335 else
1336 return string.upper(Key)
1337 end
1338end
1339
1340function CreateControlFrame(Key, Desc, Num)
1341 local Controls = Gui_Clone:WaitForChild("HUD"):WaitForChild("Controls")
1342
1343 local C = Instance.new("Frame")
1344 C.BackgroundTransparency = ((Num % 2) == 1 and 0.7 or 1)
1345 C.BorderSizePixel = 0
1346 C.Name = "C"..Num
1347 C.Position = UDim2.new(0, 0, 0, Num * 20)
1348 C.Size = UDim2.new(1, 0, 0, 20)
1349
1350 local K = Instance.new("TextLabel")
1351 K.BackgroundTransparency = 1
1352 K.Name = "Key"
1353 K.Size = UDim2.new(0, 45, 1, 0)
1354 K.Font = Enum.Font.ArialBold
1355 K.FontSize = Enum.FontSize.Size14
1356 K.Text = Key
1357 K.TextColor3 = Color3.new(1, 1, 1)
1358 K.TextScaled = (string.len(Key) > 5)
1359 K.TextWrapped = (string.len(Key) > 5)
1360 K.Parent = C
1361
1362 local D = Instance.new("TextLabel")
1363 D.BackgroundTransparency = 1
1364 D.Name = "Desc"
1365 D.Position = UDim2.new(0, 50, 0, 0)
1366 D.Size = UDim2.new(1, -50, 1, 0)
1367 D.Font = Enum.Font.ArialBold
1368 D.FontSize = Enum.FontSize.Size14
1369 D.Text = "- "..Desc
1370 D.TextColor3 = Color3.new(1, 1, 1)
1371 D.TextXAlignment = Enum.TextXAlignment.Left
1372 D.Parent = C
1373
1374 C.Parent = Controls
1375end
1376
1377function SetUpGui()
1378 local HUD = Gui_Clone:WaitForChild("HUD")
1379 local Scope = Gui_Clone:WaitForChild("Scope")
1380 local Grenades = HUD:WaitForChild("Grenades")
1381 local Controls = HUD:WaitForChild("Controls")
1382 local CurrentNum = 1
1383
1384 if S.CanChangeStance then
1385 local Dive = (S.DolphinDive and " / Dive" or "")
1386 CreateControlFrame(ConvertKey(S.LowerStanceKey), "Lower Stance"..Dive, CurrentNum)
1387 CurrentNum = CurrentNum + 1
1388
1389 CreateControlFrame(ConvertKey(S.RaiseStanceKey), "Raise Stance", CurrentNum)
1390 CurrentNum = CurrentNum + 1
1391 end
1392
1393 CreateControlFrame(ConvertKey(S.ReloadKey), "Reload", CurrentNum)
1394 CurrentNum = CurrentNum + 1
1395
1396 if S.CanKnife then
1397 CreateControlFrame(ConvertKey(S.KnifeKey), "Knife", CurrentNum)
1398 CurrentNum = CurrentNum + 1
1399 end
1400
1401 if S.Throwables then
1402 CreateControlFrame(ConvertKey(S.LethalGrenadeKey), "Throw Lethal", CurrentNum)
1403 CurrentNum = CurrentNum + 1
1404
1405 CreateControlFrame(ConvertKey(S.TacticalGrenadeKey), "Throw Tactical", CurrentNum)
1406 CurrentNum = CurrentNum + 1
1407 else
1408 Grenades.Visible = false
1409 HUD.Position = UDim2.new(1, -200, 1, -100)
1410 HUD.Size = UDim2.new(0, 175, 0, 50)
1411 end
1412
1413 CreateControlFrame(ConvertKey(S.SprintKey), "Sprint", CurrentNum)
1414 CurrentNum = CurrentNum + 1
1415
1416 if S.ADSKey ~= "" then
1417 local Hold = (S.HoldMouseOrKeyToADS and "HOLD " or "")
1418 CreateControlFrame(Hold..ConvertKey(S.ADSKey).." OR R-MOUSE", "Aim Down Sights", CurrentNum)
1419 CurrentNum = CurrentNum + 1
1420 end
1421
1422 Controls.Size = UDim2.new(1, 0, 0, CurrentNum * 20)
1423 Controls.Position = UDim2.new(0, 0, 0, -(CurrentNum * 20) - 80)
1424
1425 if S.GuiScope then
1426 Scope:WaitForChild("Img").Image = S.GuiId
1427 Scope:WaitForChild("Steady").Text = "Hold "..ConvertKey(S.ScopeSteadyKey).." to Steady"
1428 end
1429
1430 if HUD:FindFirstChild("Co") then
1431 HUD.Co:Destroy()
1432 end
1433 local Co = Instance.new("TextLabel")
1434 Co.BackgroundTransparency = 1
1435 Co.Name = "Co"
1436 Co.Position = UDim2.new(0, 0, 1, 5)
1437 Co.Size = UDim2.new(1, 0, 0, 20)
1438 Co.Font = Enum.Font.ArialBold
1439 Co.FontSize = Enum.FontSize.Size14
1440 Co.Text = ("noisuFobruT yb detpircs tiK nuG"):reverse()
1441 Co.TextColor3 = Color3.new(1, 1, 0)
1442 Co.TextStrokeTransparency = 0
1443 Co.TextXAlignment = Enum.TextXAlignment.Right
1444 Co.Parent = HUD
1445
1446 HUD:WaitForChild("Grenades"):WaitForChild("Lethals"):WaitForChild("Icon").Image = LethalIcons[S.LethalGrenadeType]
1447 HUD:WaitForChild("Grenades"):WaitForChild("Tacticals"):WaitForChild("Icon").Image = TacticalIcons[S.TacticalGrenadeType]
1448end
1449
1450--------------------[ FIRING FUNCTIONS ]----------------------------------------------
1451
1452function Fire_Gun()
1453 local FireSound = Handle:FindFirstChild("FireSound")
1454 local FlashGui = Main:FindFirstChild("FlashGui")
1455 local FlashFX = Main:FindFirstChild("FlashFX")
1456
1457 if FireSound then FireSound:Play() end
1458
1459 local MockSpread = (
1460 ((not Aimed) and CurrentSpread <= S.Spread.Max and Idleing)
1461 and CurrentSpread * S.Spread.Multiplier or CurrentSpread
1462 )
1463 CurrentSpread = (MockSpread >= S.Spread.Max and S.Spread.Max or MockSpread)
1464
1465 ----------------------------------------------------------------------------------
1466 for _ = 1, (S.GunType.Shot and S.ShotAmount or 1) do
1467 local BSpread = CFANG(
1468 RAD(RAND(-CurrentSpread, CurrentSpread) / 20),
1469 RAD(RAND(-CurrentSpread, CurrentSpread) / 20),
1470 RAD(RAND(-CurrentSpread, CurrentSpread) / 20)
1471 )
1472 local OriginCF = (Aimed and (S.GuiScope and Head.CFrame or Handle.CFrame) or Head.CFrame)
1473 local OriginPos = Main.CFrame.p
1474 local Direction = (CF(OriginCF.p, OriginCF.p + OriginCF.lookVector) * BSpread).lookVector
1475
1476 if S.InstantHit then
1477 local HitObj, HitPos = AdvRayCast(Main.CFrame.p, Direction, S.BulletRange)
1478 local HitHumanoid = nil
1479 if HitObj then
1480 if S.GunType.Explosive then
1481 if S.ExplosionSound ~= "" then
1482 local SoundPart = Instance.new("Part")
1483 SoundPart.Transparency = 1
1484 SoundPart.Anchored = true
1485 SoundPart.CanCollide = false
1486 SoundPart.CFrame = CFrame.new(HitPos)
1487 SoundPart.Parent = game.Workspace
1488
1489 local Sound = Instance.new("Sound")
1490 Sound.Pitch = S.ExplosionSoundPitch
1491 Sound.SoundId = S.ExplosionSound
1492 Sound.Volume = S.ExplosionSoundVolume
1493 Sound.Parent = SoundPart
1494 Sound:Play()
1495
1496 delay(1 / 20, function()
1497 SoundPart:Destroy()
1498 end)
1499 end
1500 CreateBulletHole(HitPos, HitObj)
1501 CreateShockwave(HitPos, S.ExplosionRadius)
1502 local E = Instance.new("Explosion")
1503 E.BlastPressure = S.ExplosionPressure
1504 E.BlastRadius = S.ExplosionRadius
1505 E.DestroyJointRadiusPercent = (S.RangeBasedDamage and 0 or 1)
1506 E.ExplosionType = S.ExplosionType
1507 E.Position = HitPos
1508 E.Hit:connect(function(HObj, HDist)
1509 if HObj.Name == "Torso" and (not HObj:IsDescendantOf(Character)) then
1510 if S.RangeBasedDamage then
1511 local Dir = (HObj.Position - HitPos).unit
1512 local H, P = AdvRayCast(HitPos - Dir, Dir, 999)
1513 local RayHitHuman = H:IsDescendantOf(HObj.Parent)
1514 if (S.RayCastExplosions and RayHitHuman) or (not S.RayCastExplosions) then
1515 local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
1516 if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
1517 local DistFactor = HDist / S.ExplosionRadius
1518 local DistInvert = math.max(1 - DistFactor,0)
1519 local NewDamage = DistInvert * S.Damage
1520
1521 local CreatorTag = Instance.new("ObjectValue")
1522 CreatorTag.Value = Player
1523 CreatorTag.Name = "creator"
1524 CreatorTag.Parent = HitHumanoid
1525 HitHumanoid:TakeDamage(NewDamage)
1526 MarkHit()
1527 end
1528 end
1529 else
1530 local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
1531 if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
1532 local CreatorTag = Instance.new("ObjectValue")
1533 CreatorTag.Value = Player
1534 CreatorTag.Name = "creator"
1535 CreatorTag.Parent = HitHumanoid
1536 MarkHit()
1537 end
1538 end
1539 end
1540 end)
1541 E.Parent = game.Workspace
1542 else
1543 HitHumanoid = Damage(HitObj, HitPos)
1544 end
1545 end
1546 local FinalHitPos = HitPos
1547 if S.Penetration > 0 and (not S.GunType.Explosive) then
1548 FinalHitPos = PenetrateWall(HitPos, Direction, HitHumanoid, OriginPos)
1549 end
1550 if S.BulletTrail and S.TrailTransparency ~= 1 then
1551 local Trail = Instance.new("Part")
1552 Trail.BrickColor = S.TrailColor
1553 Trail.Transparency = S.TrailTransparency
1554 Trail.Anchored = true
1555 Trail.CanCollide = false
1556 Trail.Size = VEC3(1, 1, 1)
1557 local Mesh = Instance.new("BlockMesh")
1558 Mesh.Offset = VEC3(0, 0, -(FinalHitPos - OriginPos).magnitude / 2)
1559 Mesh.Scale = VEC3(S.TrailThickness, S.TrailThickness, (FinalHitPos - OriginPos).magnitude)
1560 Mesh.Parent = Trail
1561 Trail.Parent = Gun_Ignore
1562 Trail.CFrame = CF(OriginPos, FinalHitPos)
1563 delay(S.TrailVisibleTime, function()
1564 if S.TrailDisappearTime > 0 then
1565 local X = 0
1566 while true do
1567 if X == 90 then break end
1568 if (not Selected) then break end
1569 local NewX = X + (1.5 / S.TrailDisappearTime)
1570 X = (NewX > 90 and 90 or NewX)
1571 local Alpha = X / 90
1572 Trail.Transparency = NumLerp(S.TrailTransparency, 1, Alpha)
1573 RS:wait()
1574 end
1575 Trail:Destroy()
1576 else
1577 Trail:Destroy()
1578 end
1579 end)
1580 end
1581 else
1582 local Bullet = CreateBullet(Direction)
1583 local LastPos = Main.CFrame.p
1584 local TotalDistTraveled = 0
1585 local HitHumanoid = nil
1586 spawn(function()
1587 while true do
1588 RS:wait()
1589 if TotalDistTraveled >= S.BulletRange then
1590 Bullet:Destroy()
1591 break
1592 end
1593 local DistTraveled = (Bullet.Position - LastPos).magnitude
1594 local HitObj, HitPos = AdvRayCast(LastPos, (Bullet.Position - LastPos).unit, DistTraveled)
1595 if HitObj then
1596 if S.GunType.Explosive then
1597 if S.ExplosionSound ~= "" then
1598 local Sound = Instance.new("Sound")
1599 Sound.Pitch = S.ExplosionSoundPitch
1600 Sound.SoundId = S.ExplosionSound
1601 Sound.Volume = S.ExplosionSoundVolume
1602 Sound.Parent = Bullet
1603 Sound:Play()
1604 end
1605 CreateBulletHole(HitPos, HitObj)
1606 CreateShockwave(HitPos, S.ExplosionRadius)
1607 local E = Instance.new("Explosion")
1608 E.BlastPressure = S.ExplosionPressure
1609 E.BlastRadius = S.ExplosionRadius
1610 E.DestroyJointRadiusPercent = (S.RangeBasedDamage and 0 or 1)
1611 E.ExplosionType = S.ExplosionType
1612 E.Position = HitPos
1613 E.Hit:connect(function(HObj, HDist)
1614 if HObj.Name == "Torso" and (not HObj:IsDescendantOf(Character)) then
1615 if S.RangeBasedDamage then
1616 local Dir = (HObj.Position - HitPos).unit
1617 local H, P = AdvRayCast(HitPos - Dir, Dir, 999)
1618 local RayHitHuman = H:IsDescendantOf(HObj.Parent)
1619 if (S.RayCastExplosions and RayHitHuman) or (not S.RayCastExplosions) then
1620 local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
1621 if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
1622 local DistFactor = HDist / S.ExplosionRadius
1623 local DistInvert = math.max(1 - DistFactor,0)
1624 local NewDamage = DistInvert * S.Damage
1625
1626 local CreatorTag = Instance.new("ObjectValue")
1627 CreatorTag.Value = Player
1628 CreatorTag.Name = "creator"
1629 CreatorTag.Parent = HitHumanoid
1630 HitHumanoid:TakeDamage(NewDamage)
1631 MarkHit()
1632 end
1633 end
1634 else
1635 local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
1636 if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
1637 local CreatorTag = Instance.new("ObjectValue")
1638 CreatorTag.Value = Player
1639 CreatorTag.Name = "creator"
1640 CreatorTag.Parent = HitHumanoid
1641 MarkHit()
1642 end
1643 end
1644 end
1645 end)
1646 E.Parent = game.Workspace
1647 else
1648 HitHumanoid = Damage(HitObj, HitPos)
1649 end
1650 if S.Penetration > 0 and (not S.GunType.Explosive) then
1651 PenetrateWall(HitPos, (Bullet.Position - LastPos).unit, HitHumanoid, OriginPos, Bullet)
1652 else
1653 Bullet:Destroy()
1654 end
1655 break
1656 else
1657 LastPos = Bullet.Position
1658 TotalDistTraveled = TotalDistTraveled + DistTraveled
1659 end
1660 end
1661 end)
1662
1663 if S.BulletTrail and S.TrailTransparency ~= 1 then
1664 spawn(function()
1665 local LastPos2 = nil
1666 while true do
1667 if LastPos2 then
1668 if (not Bullet:IsDescendantOf(game)) then break end
1669 Bullet.CFrame = CFrame.new(Bullet.CFrame.p, Bullet.CFrame.p + Bullet.Velocity)
1670 local Trail = Instance.new("Part")
1671 Trail.BrickColor = S.TrailColor
1672 Trail.Transparency = S.TrailTransparency
1673 Trail.Anchored = true
1674 Trail.CanCollide = false
1675 Trail.Size = VEC3(1, 1, 1)
1676 local Mesh = Instance.new("BlockMesh")
1677 Mesh.Offset = VEC3(0, 0, -(Bullet.Position - LastPos2).magnitude / 2)
1678 Mesh.Scale = VEC3(S.TrailThickness, S.TrailThickness, (Bullet.Position - LastPos2).magnitude)
1679 Mesh.Parent = Trail
1680 Trail.Parent = Gun_Ignore
1681 Trail.CFrame = CF(LastPos2, Bullet.Position)
1682 delay(S.TrailVisibleTime, function()
1683 if S.TrailDisappearTime > 0 then
1684 local X = 0
1685 while true do
1686 if X == 90 then break end
1687 if (not Selected) then break end
1688 local NewX = X + (1.5 / S.TrailDisappearTime)
1689 X = (NewX > 90 and 90 or NewX)
1690 local Alpha = X / 90
1691 Trail.Transparency = NumLerp(S.TrailTransparency, 1, Alpha)
1692 RS:wait()
1693 end
1694 Trail:Destroy()
1695 else
1696 Trail:Destroy()
1697 end
1698 end)
1699 LastPos2 = Bullet.Position
1700 else
1701 LastPos2 = Main.CFrame.p
1702 end
1703 RS:wait()
1704 end
1705 end)
1706 end
1707 end
1708 end
1709
1710 ----------------------------------------------------------------------------------
1711
1712 local RecoilX = RAD(CurrentRecoil * RAND(1, 1.5, 0.1)) * StanceSway
1713 local RecoilY = RAD(CurrentRecoil * RAND(-2, 2, 0.1)) * StanceSway
1714 RotCamera(RecoilX, RecoilY, true, 0.06)
1715 delay(0.05, function()
1716 RotCamera(-RecoilX / 5, -RecoilY / 5, true, 0.1)
1717 end)
1718 if Idleing and (not Walking) and (not Aimed) then
1719 local SpreadScale = (CurrentSpread / S.Spread.Max) * 50
1720 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
1721 UDim2.new(0, 70 + 2 * SpreadScale, 0, 70 + 2 * SpreadScale),
1722 UDim2.new(0, -35 - SpreadScale, 0, -35 - SpreadScale),
1723 "Out", "Linear", 0.1, true
1724 )
1725 end
1726
1727 local KickSide = (
1728 (
1729 {
1730 CurrentRecoil * (RAND(1, 5, 1) / 150);
1731 CurrentRecoil * (RAND(1, 5, 1) / -150)
1732 }
1733 )[math.random(1, 2)]
1734 ) * StanceSway
1735 local KickBack = CurrentRecoil * StanceSway * 0.3
1736 local KickUp = RAD(90 + (CurrentRecoil * RAND(1.3, 1.4, 0.01) * StanceSway))
1737 TweenJoint(AnimWeld, CF(KickSide, 1, -KickBack), CFANG(KickUp - RAD(90), 0, 0), Linear, 1 / 12)
1738
1739 if FlashFX then FlashFX.Enabled = true end
1740 if FlashGui then
1741 FlashGui.Enabled = true
1742 FlashGui.Label.Rotation = RAND(0, 360)
1743 end
1744
1745 delay(1 / 30, function()
1746 if Idleing and (not Walking) and (not Aimed) then
1747 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
1748 UDim2.new(0, 70, 0, 70),
1749 UDim2.new(0, -35, 0, -35),
1750 "Out", "Linear", S.AimSpeed, (not Aimed)
1751 )
1752 end
1753 if (not Aiming) and (not RunTween) then
1754 TweenJoint(AnimWeld, CF(0, 1, 0), CF(), Linear, 0.15)
1755 end
1756 if FlashFX then FlashFX.Enabled = false end
1757 if FlashGui then FlashGui.Enabled = false end
1758 end)
1759end
1760
1761function MarkHit()
1762 spawn(function()
1763 if Gui_Clone:IsDescendantOf(game) then
1764 Gui_Clone.HitMarker.Visible = true
1765 local StartMark = tick()
1766 LastMark = StartMark
1767 wait(0.5)
1768 if LastMark <= StartMark then
1769 Gui_Clone.HitMarker.Visible = false
1770 end
1771 end
1772 end)
1773end
1774
1775--------------------[ ADS FUNCTIONS ]-------------------------------------------------
1776
1777function AimGun()
1778 if (Camera.CoordinateFrame.p - Camera.Focus.p).magnitude > 1 or Reloading or Knifing or ThrowingGrenade then return end
1779 local Scope = Gui_Clone:WaitForChild("Scope"):WaitForChild("Img")
1780 local Steady = Gui_Clone:WaitForChild("Scope"):WaitForChild("Steady")
1781 Aimed = true
1782 Aiming = true
1783 CurrentRecoil = S.Recoil.Aimed
1784 CurrentSpread = S.Spread.Aimed
1785 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
1786 UDim2.new(),
1787 UDim2.new(),
1788 Enum.EasingDirection.Out,
1789 Enum.EasingStyle.Sine,
1790 S.AimAnimation and S.AimSpeed or 0,
1791 true
1792 )
1793 if S.AimAnimation then
1794 local CurrentFOV = Camera.FieldOfView
1795 local CurrentCameraOffset = Humanoid.CameraOffset
1796 local CurrentTrans = Scope.BackgroundTransparency
1797 TweenJoint(LWeld, ArmC0[1], S.ArmC1_Aimed.Left, Sine, S.AimSpeed)
1798 TweenJoint(RWeld, ArmC0[2], S.ArmC1_Aimed.Right, Sine, S.AimSpeed)
1799 TweenJoint(AnimWeld, CF(0, 1, 0), CF(), Sine, S.AimSpeed)
1800 TweenJoint(Grip, Grip.C0, Aimed_GripCF, Sine, S.AimSpeed)
1801 TweenJoint(LWeld2, CF(), CF(), Sine, S.AimSpeed)
1802 TweenJoint(RWeld2, CF(), CF(), Sine, S.AimSpeed)
1803 local X = 0
1804 while true do
1805 local NewX = X + 1.5 / S.AimSpeed
1806 X = (NewX > 90 and 90 or NewX)
1807 if (not Aimed) then break end
1808 if (not Selected) then break end
1809 local Alpha = 1 - COS(RAD(X))
1810 Camera.FieldOfView = NumLerp(CurrentFOV, S.MaxZoom, Alpha)
1811 if S.GuiScope then
1812 Scope.BackgroundTransparency = NumLerp(CurrentTrans, 0, Alpha)
1813 end
1814 if X == 90 then break end
1815 RS:wait()
1816 end
1817 else
1818 LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_Aimed.Left
1819 RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_Aimed.Right
1820 AnimWeld.C0 = CF(0, 1, 0)
1821 Grip.C1 = Aimed_GripCF
1822 LWeld2.C1, RWeld2.C1 = CF(), CF()
1823 Camera.FieldOfView = S.MaxZoom
1824 end
1825 Aiming = (not Aimed)
1826 if (not Aiming) and S.GuiScope then
1827 spawn(function()
1828 Steady.Visible = true
1829 Scope.BackgroundTransparency = 1
1830 Scope.ImageTransparency = 0
1831
1832 local Gun_Model = Instance.new("Model")
1833 Gun_Model.Name = "Gun_Model"
1834 for _, Obj in pairs(Gun:GetChildren()) do
1835 if Obj:IsA("BasePart") then
1836 local ObjClone = Obj:Clone()
1837 ObjClone.Parent = Gun_Model
1838
1839 local W = Instance.new("Weld")
1840 W.Part0 = ObjClone
1841 W.Part1 = Obj
1842 W.Parent = ObjClone
1843
1844 local PrevTrans = Instance.new("NumberValue")
1845 PrevTrans.Name = "PrevTrans"
1846 PrevTrans.Value = Obj.Transparency
1847 PrevTrans.Parent = Obj
1848
1849 Obj.Transparency = 1
1850 end
1851 end
1852 Gun_Model.Parent = Character
1853 end)
1854 spawn(function()
1855 while Aimed do
1856 local Ang = (CameraSteady and 0 or (Idleing and AnimAng[2] or AnimAng[4]))
1857 if CameraSway ~= 0 then
1858 local OffsetX, OffsetY = 0, 0
1859 if Idleing then
1860 OffsetX = (RAD(COS(Ang * 5 * (CameraSway ^ 0.4))) / 40) * (CameraSway ^ 1.2) * StanceSway * S.ScopeSway
1861 OffsetY = (RAD(COS(Ang * 2 * (CameraSway ^ 0.4))) / 40) * (CameraSway ^ 1.2) * StanceSway * S.ScopeSway
1862 else
1863 OffsetX = (RAD(COS(Ang * 3/2 * (CameraSway ^ 0.4))) / 25) * (CameraSway ^ 1.2) * StanceSway * S.ScopeSway
1864 OffsetY = (RAD(COS(Ang * 3/5 * (CameraSway ^ 0.4))) / 25) * (CameraSway ^ 1.2) * StanceSway * S.ScopeSway
1865 end
1866 RotCamera(OffsetX, OffsetY)
1867 end
1868 RS:wait()
1869 end
1870 end)
1871 end
1872end
1873
1874function UnAimGun(Exception)
1875 local Scope = Gui_Clone:WaitForChild("Scope"):WaitForChild("Img")
1876 local Steady = Gui_Clone:WaitForChild("Scope"):WaitForChild("Steady")
1877 if (not Exception) then
1878 if (not Aimed) then return end
1879 if (Reloading and Exception) or Knifing and (not ThrowingGrenade) then return end
1880 CurrentRecoil = S.Recoil.Hipfire
1881 CurrentSpread = ((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
1882 if Walking and Aimed then
1883 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
1884 UDim2.new(0, 150, 0, 150),
1885 UDim2.new(0, -75, 0, -75),
1886 Enum.EasingDirection.Out,
1887 Enum.EasingStyle.Linear,
1888 S.AimAnimation and S.AimSpeed or 0,
1889 true
1890 )
1891 elseif Idleing then
1892 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
1893 UDim2.new(0, 70, 0, 70),
1894 UDim2.new(0, -35, 0, -35),
1895 Enum.EasingDirection.Out,
1896 Enum.EasingStyle.Linear,
1897 S.AimAnimation and S.AimSpeed or 0,
1898 true
1899 )
1900 end
1901 Aimed = false
1902 Aiming = true
1903 if S.GuiScope then
1904 spawn(function()
1905 local Gun_Model = Character:FindFirstChild("Gun_Model")
1906 if Gun_Model then
1907 Gun_Model:Destroy()
1908 end
1909
1910 for _, Obj in pairs(Gun:GetChildren()) do
1911 if Obj:IsA("BasePart") then
1912 local PrevTrans = Obj:FindFirstChild("PrevTrans")
1913
1914 Obj.Transparency = PrevTrans.Value
1915 PrevTrans:Destroy()
1916 end
1917 end
1918 end)
1919 end
1920 if S.AimAnimation then
1921 local CurrentFOV = Camera.FieldOfView
1922 local CurrentCameraOffset = Humanoid.CameraOffset
1923 local CurrentTrans = (Scope.BackgroundTransparency == 1 and (S.GuiScope and 0 or 1) or Scope.BackgroundTransparency)
1924 Scope.ImageTransparency = 1
1925 Steady.Visible = false
1926 TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Sine, S.AimSpeed)
1927 TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Sine, S.AimSpeed)
1928 TweenJoint(Grip, Grip.C0, CFANG(0, RAD(20), 0), Sine, S.AimSpeed)
1929 if S.PlayerAnimations then
1930 TweenJoint(LWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, S.AimSpeed)
1931 TweenJoint(RWeld2, CF(), CFANG(0, RAD(ArmTilt), 0), Sine, S.AimSpeed)
1932 end
1933 local X = 0
1934 while true do
1935 local NewX = X + 1.5 / S.AimSpeed
1936 X = (NewX > 90 and 90 or NewX)
1937 if Aimed then break end
1938 if (not Selected) then break end
1939 local Alpha = 1 - COS(RAD(X))
1940 Camera.FieldOfView = NumLerp(CurrentFOV, 70, Alpha)
1941 Scope.BackgroundTransparency = NumLerp(CurrentTrans, 1, Alpha)
1942 if X == 90 then break end
1943 RS:wait()
1944 end
1945 else
1946 Scope.BackgroundTransparency = 1
1947 Scope.ImageTransparency = 1
1948 Steady.Visible = false
1949 LWeld.C0, LWeld.C1 = ArmC0[1], S.ArmC1_UnAimed.Left
1950 RWeld.C0, RWeld.C1 = ArmC0[2], S.ArmC1_UnAimed.Right
1951 Grip.C1 = CFANG(0, RAD(20), 0)
1952 LWeld2.C1, RWeld2.C1 = CFANG(0, RAD(ArmTilt), 0), CFANG(0, RAD(ArmTilt), 0)
1953 Camera.FieldOfView = 70
1954 end
1955 Aiming = Aimed
1956 else
1957 if S.GuiScope then
1958 spawn(function()
1959 local Gun_Model = Character:FindFirstChild("Gun_Model")
1960 if Gun_Model then
1961 Gun_Model:Destroy()
1962 end
1963
1964 for _, Obj in pairs(Gun:GetChildren()) do
1965 if Obj:IsA("BasePart") then
1966 local PrevTrans = Obj:FindFirstChild("PrevTrans")
1967
1968 Obj.Transparency = PrevTrans.Value
1969 PrevTrans:Destroy()
1970 end
1971 end
1972 end)
1973 end
1974 spawn(function()
1975 Aimed = false
1976 Aiming = false
1977 CurrentRecoil = S.Recoil.Hipfire
1978 CurrentSpread = ((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
1979 if (not Walking) then
1980 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
1981 UDim2.new(0, 70, 0, 70),
1982 UDim2.new(0, -35, 0, -35),
1983 Enum.EasingDirection.Out,
1984 Enum.EasingStyle.Linear,
1985 S.AimAnimation and S.AimSpeed or 0,
1986 true
1987 )
1988 else
1989 Gui_Clone.CrossHair.Box:TweenSizeAndPosition(
1990 UDim2.new(0, 150, 0, 150),
1991 UDim2.new(0, -75, 0, -75),
1992 Enum.EasingDirection.Out,
1993 Enum.EasingStyle.Linear,
1994 S.AimAnimation and S.AimSpeed or 0,
1995 true
1996 )
1997 end
1998 local CurrentFOV = Camera.FieldOfView
1999 local CurrentCameraOffset = Humanoid.CameraOffset
2000 local CurrentTrans = (Scope.BackgroundTransparency == 1 and (S.GuiScope and 0 or 1) or Scope.BackgroundTransparency)
2001 Scope.ImageTransparency = 1
2002 Steady.Visible = false
2003 if LWeld:FindFirstChild("TweenCode") then LWeld.TweenCode:Destroy() end
2004 if RWeld:FindFirstChild("TweenCode") then RWeld.TweenCode:Destroy() end
2005 if Grip:FindFirstChild("TweenCode") then Grip.TweenCode:Destroy() end
2006 if LWeld2:FindFirstChild("TweenCode") then LWeld2.TweenCode:Destroy() end
2007 if RWeld2:FindFirstChild("TweenCode") then RWeld2.TweenCode:Destroy() end
2008 if S.AimAnimation then
2009 local X = 0
2010 while true do
2011 local NewX = X + 1.5 / S.AimSpeed
2012 X = (NewX > 90 and 90 or NewX)
2013 if Aimed then break end
2014 if (not Selected) then break end
2015 local Alpha = 1 - COS(RAD(X))
2016 Camera.FieldOfView = NumLerp(CurrentFOV, 70, Alpha)
2017 Scope.BackgroundTransparency = NumLerp(CurrentTrans, 1, Alpha)
2018 if X == 90 then break end
2019 RS:wait()
2020 end
2021 else
2022 Scope.BackgroundTransparency = 1
2023 Scope.ImageTransparency = 1
2024 Steady.Visible = false
2025 Camera.FieldOfView = 70
2026 end
2027 end)
2028 end
2029end
2030
2031--------------------[ TEXTURE CREATION FUNCTIONS ]------------------------------------
2032
2033function CreateBullet(Direction)
2034 local Origin = Gun.Main.CFrame.p
2035 local BulletMass = S.BulletSize.X * S.BulletSize.Y * S.BulletSize.Z
2036 local BulletCF = CF(Origin, Origin + Direction)
2037 local Bullet = Instance.new("Part")
2038 Bullet.BrickColor = S.BulletColor
2039 Bullet.Name = "Bullet"
2040 Bullet.CanCollide = false
2041 Bullet.FormFactor = "Custom"
2042 Bullet.Size = S.BulletSize
2043 Bullet.BottomSurface = "Smooth"
2044 Bullet.TopSurface = "Smooth"
2045 local Mesh = Instance.new("BlockMesh")
2046 Mesh.Scale = S.BulletMeshSize
2047 Mesh.Parent = Bullet
2048 local BF = Instance.new("BodyForce")
2049 BF.force = VEC3(0, BulletMass * (196.2 - S.BulletDropPerSecond), 0)
2050 BF.Parent = Bullet
2051 Bullet.Parent = Gun_Ignore
2052 Bullet.CFrame = BulletCF + Direction * 3
2053 Bullet.Velocity = Direction * S.BulletVelocity
2054 return Bullet
2055end
2056
2057function CreateBulletHole(HitPos, HitObj)
2058 local SurfaceCF = GetHitSurfaceCFrame(HitPos, HitObj)
2059 local SurfaceDir = CF(HitObj.CFrame.p, SurfaceCF.p)
2060 local SurfaceDist = SurfaceDir.lookVector * (HitObj.CFrame.p - SurfaceCF.p).magnitude / 2
2061 local SurfaceOffset = HitPos - SurfaceCF.p + SurfaceDist
2062 local SurfaceCFrame = SurfaceDir + SurfaceDist + SurfaceOffset
2063 local HitMark = Instance.new("Part")
2064 HitMark.BrickColor = BrickColor.new("Black")
2065 HitMark.Transparency = 1
2066 HitMark.Anchored = true
2067 HitMark.CanCollide = false
2068 HitMark.FormFactor = "Custom"
2069 HitMark.Size = VEC3(1, 1, 0.2)
2070 HitMark.TopSurface = 0
2071 HitMark.BottomSurface = 0
2072 local Mesh = Instance.new("BlockMesh")
2073 Mesh.Offset = VEC3(0, 0, -0.05)
2074 Mesh.Scale = VEC3(S.BulletHoleSize, S.BulletHoleSize, 0)
2075 Mesh.Parent = HitMark
2076 local Decal = Instance.new("Decal")
2077 Decal.Face = Enum.NormalId.Front
2078 Decal.Texture = S.BulletHoleTexture
2079 Decal.Parent = HitMark
2080 HitMark.Parent = Gun_Ignore
2081 HitMark.CFrame = SurfaceCFrame
2082 if (not HitObj.Anchored) then
2083 local Weld = Instance.new("Weld", HitMark)
2084 Weld.Part0 = HitObj
2085 Weld.Part1 = HitMark
2086 Weld.C0 = HitObj.CFrame:toObjectSpace(SurfaceCFrame)
2087 HitMark.Anchored = false
2088 end
2089 delay(S.BulletHoleVisibleTime, function()
2090 if S.BulletHoleDisappearTime > 0 then
2091 local X = 0
2092 while true do
2093 if X == 90 then break end
2094 if (not Selected) then break end
2095 local NewX = X + (1.5 / S.BulletHoleDisappearTime)
2096 X = (NewX > 90 and 90 or NewX)
2097 local Alpha = X / 90
2098 Decal.Transparency = NumLerp(0, 1, Alpha)
2099 RS:wait()
2100 end
2101 HitMark:Destroy()
2102 else
2103 HitMark:Destroy()
2104 end
2105 end)
2106end
2107
2108function CreateShockwave(Center, Radius)
2109 local Shockwave = Instance.new("Part")
2110 Shockwave.BrickColor = S.ShockwaveColor
2111 Shockwave.Material = Enum.Material.SmoothPlastic
2112 Shockwave.Name = "Shockwave"
2113 Shockwave.Anchored = true
2114 Shockwave.CanCollide = false
2115 Shockwave.FormFactor = Enum.FormFactor.Symmetric
2116 Shockwave.Size = VEC3(1, 1, 1)
2117 Shockwave.BottomSurface = Enum.SurfaceType.Smooth
2118 Shockwave.TopSurface = Enum.SurfaceType.Smooth
2119 local Mesh = Instance.new("SpecialMesh")
2120 Mesh.MeshType = Enum.MeshType.Sphere
2121 Mesh.Scale = VEC3()
2122 Mesh.Parent = Shockwave
2123 Shockwave.Parent = Gun_Ignore
2124 Shockwave.CFrame = CF(Center)
2125 spawn(function()
2126 for i = 0, 1, (1 / (60 * S.ShockwaveDuration)) do
2127 local Scale = 2 * Radius * i
2128 Mesh.Scale = VEC3(Scale, Scale, Scale)
2129 Shockwave.Transparency = i
2130 RS:wait()
2131 end
2132 Shockwave:Destroy()
2133 end)
2134end
2135
2136--------------------[ HIT HANDLING FUNCTIONS ]----------------------------------------
2137
2138function Damage(HitObj, HitPos)
2139 local HeadVal = S.Multipliers.Head
2140 local ChestVal = S.Multipliers.Chest
2141 local LimbsVal = S.Multipliers.Limbs
2142 if Humanoid.Health ~= 0 then
2143 if HitObj and HitObj.Parent then
2144 local HumanoidFound = false
2145 local HitHumanoid = nil
2146 if HitObj.Parent.ClassName == "Hat" then
2147 if FindFirstClass(HitObj.Parent.Parent, "Humanoid") then
2148 HitHumanoid = FindFirstClass(HitObj.Parent.Parent, "Humanoid")
2149 HumanoidFound = true
2150 if HitHumanoid.Health > 0 then
2151 if IsEnemy(HitHumanoid) then
2152 local CreatorTag = Instance.new("ObjectValue")
2153 CreatorTag.Value = Player
2154 CreatorTag.Name = "creator"
2155 CreatorTag.Parent = HitHumanoid
2156 HitHumanoid:TakeDamage(S.Damage * RAND(HeadVal, HeadVal + 0.1, 0.01))
2157 MarkHit()
2158 end
2159 end
2160 end
2161 else
2162 if FindFirstClass(HitObj.Parent, "Humanoid") then
2163 HitHumanoid = FindFirstClass(HitObj.Parent, "Humanoid")
2164 HumanoidFound = true
2165 if HitHumanoid.Health > 0 then
2166 if IsEnemy(HitHumanoid) then
2167 local CreatorTag = Instance.new("ObjectValue")
2168 CreatorTag.Value = Player
2169 CreatorTag.Name = "creator"
2170 CreatorTag.Parent = HitHumanoid
2171 local ChosenDamage = 0
2172 if HitObj.Name == "Head" then
2173 ChosenDamage = S.Damage * RAND(HeadVal, HeadVal + 0.1, 0.01)
2174 elseif HitObj.Name == "Torso" then
2175 ChosenDamage = S.Damage * RAND(ChestVal, ChestVal + 0.1, 0.01)
2176 else
2177 ChosenDamage = S.Damage * RAND(LimbsVal, LimbsVal + 0.1, 0.01)
2178 end
2179 HitHumanoid:TakeDamage(ChosenDamage)
2180 MarkHit()
2181 end
2182 end
2183 end
2184 end
2185 if (not HumanoidFound) then
2186 if S.BulletHoles then
2187 CreateBulletHole(HitPos, HitObj)
2188 end
2189 if S.Shockwaves then
2190 CreateShockwave(HitPos, S.ShockwaveRadius)
2191 end
2192 end
2193 return HitHumanoid
2194 end
2195 end
2196end
2197
2198function PenetrateWall(HitPos, Direction, HitHumanoid, OriginPos, Bullet)
2199 local HitDist = (HitPos - OriginPos).magnitude
2200 local Thickness, Wall, WallHitPos = 0, nil, nil
2201 for i = 0.1, S.Penetration, 0.1 do
2202 local WallRay = Ray.new(HitPos + (Direction * i), -Direction)
2203 local TempWall, TempWallHitPos = game.Workspace:FindPartOnRayWithIgnoreList(WallRay, Ignore)
2204 if TempWall then
2205 Thickness = i
2206 Wall, WallHitPos = TempWall, TempWallHitPos
2207 break
2208 end
2209 end
2210 if Wall then
2211 CreateBulletHole(WallHitPos, Wall)
2212 if S.InstantHit then
2213 local HitObj2, HitPos2 = nil, nil
2214 if HitHumanoid then
2215 HitObj2, HitPos2 = AdvRayCast(WallHitPos, Direction, S.BulletRange - HitDist, {HitHumanoid.Parent,unpack(Ignore)})
2216 else
2217 HitObj2, HitPos2 = AdvRayCast(WallHitPos, Direction, S.BulletRange - HitDist)
2218 end
2219 Damage(HitObj2, HitPos2)
2220 return HitPos2
2221 else
2222 local LastPos = WallHitPos
2223 local TotalDistTraveled = 0
2224 spawn(function()
2225 while true do
2226 RS:wait()
2227 if TotalDistTraveled >= S.BulletRange - HitDist then
2228 Bullet:Destroy()
2229 break
2230 end
2231 local DistTraveled = (Bullet.Position - LastPos).magnitude
2232 local NewDirection = (Bullet.Position - LastPos).unit
2233 local TempHitObj, TempHitPos = nil, nil
2234 if HitHumanoid then
2235 TempHitObj, TempHitPos = AdvRayCast(LastPos, NewDirection, DistTraveled, {HitHumanoid.Parent,unpack(Ignore)})
2236 else
2237 TempHitObj, TempHitPos = AdvRayCast(LastPos, NewDirection, DistTraveled)
2238 end
2239 if TempHitObj then
2240 Damage(TempHitObj, TempHitPos)
2241 Bullet:Destroy()
2242 return TempHitPos
2243 else
2244 LastPos = Bullet.Position
2245 TotalDistTraveled = TotalDistTraveled + DistTraveled
2246 end
2247 end
2248 end)
2249 end
2250 else
2251 if Bullet then Bullet:Destroy() end
2252 return HitPos
2253 end
2254end
2255
2256function IsEnemy(Human)
2257 local Plyr = game.Players:GetPlayerFromCharacter(Human.Parent)
2258 if (not Plyr) then return S.CanDamageNPCs end
2259 return S.AllowFriendlyFire or (Plyr.TeamColor ~= Player.TeamColor or Plyr.Neutral)
2260end
2261
2262--------------------[ RELOAD FUNCTIONS ]----------------------------------------------
2263
2264function ReloadAnim()
2265 TweenJoint(LWeld2, CF(), CF(), Sine, 0.15)
2266 TweenJoint(RWeld2, CF(), CF(), Sine, 0.15)
2267 local Speed = S.ReloadTime / 2
2268 local Mag_Parts = {}
2269
2270 for _, Obj in pairs(Gun:GetChildren()) do
2271 if Obj.Name == "Mag" and Obj:IsA("BasePart") then
2272 INSERT(Mag_Parts, {Original = Obj, Clone1 = Obj:Clone(), Clone2 = Obj:Clone()})
2273 end
2274 end
2275
2276 local W1 = nil
2277 local W2 = nil
2278
2279 local SequenceTable = {
2280
2281 function()
2282
2283 for Index, Mag in pairs(Mag_Parts) do
2284 Mag.Original.Transparency = 1
2285 Mag.Clone1.Parent = Gun_Ignore
2286 Mag.Clone1.CanCollide = true
2287
2288 if Index ~= 1 then
2289 local W = Instance.new("Weld")
2290 W.Part0 = Mag_Parts[1].Clone1
2291 W.Part1 = Mag.Clone1
2292 W.C0 = Mag_Parts[1].Clone1.CFrame:toObjectSpace(Mag.Clone1.CFrame)
2293 W.Parent = Mag_Parts[1].Clone1
2294 end
2295 end
2296
2297 W1 = Instance.new("Weld")
2298 W1.Part0 = Mag_Parts[1].Clone1
2299 W1.Part1 = Handle
2300 W1.C0 = Mag_Parts[1].Original.CFrame:toObjectSpace(Handle.CFrame)
2301 W1.Parent = Mag_Parts[1].Clone1
2302
2303 TweenJoint(LWeld, ArmC0[1], CF(0, 0.61, 0) * CFANG(RAD(70), 0, 0), Linear, 0.5 * Speed)
2304 TweenJoint(RWeld, ArmC0[2], CF(0.4, 0.09, -0.21) * CFANG(RAD(-20), RAD(3), 0), Linear, 0.5 * Speed)
2305 TweenJoint(Grip, Grip.C0, CFANG(0, RAD(10), 0), Linear, 0.5 * Speed)
2306 wait(0.5 * Speed)
2307
2308 end;
2309
2310 function()
2311
2312 TweenJoint(RWeld, ArmC0[2], CF(0.4, -0.01, -0.31) * CFANG(RAD(-22), RAD(3), 0), Sine, 0.3 * Speed)
2313 wait(0.2 * Speed)
2314
2315 end;
2316
2317 function()
2318
2319 W1:Destroy()
2320 Mag_Parts[1].Clone1.Velocity = Handle.Velocity + Handle.CFrame:vectorToWorldSpace(VEC3(0,-1,0)) * 20
2321 spawn(function()
2322 while Mag_Parts[1].Clone1.Velocity.magnitude > 0.1 do wait() end
2323 for _, Mag in pairs(Mag_Parts) do
2324 Mag.Clone1.Anchored = true
2325 Mag.Clone1:BreakJoints()
2326 end
2327 end)
2328
2329 for Index, Mag in pairs(Mag_Parts) do
2330 Mag.Clone2.Parent = Gun_Ignore
2331
2332 if Index ~= 1 then
2333 local W = Instance.new("Weld")
2334 W.Part0 = Mag_Parts[1].Clone2
2335 W.Part1 = Mag.Clone2
2336 W.C0 = Mag_Parts[1].Clone2.CFrame:toObjectSpace(Mag.Clone2.CFrame)
2337 W.Parent = Mag_Parts[1].Clone2
2338 end
2339 end
2340
2341 W2 = Instance.new("Weld")
2342 W2.Part0 = FakeLArm
2343 W2.Part1 = Mag_Parts[1].Clone2
2344 W2.C0 = CF(0, -1, 0) * CFANG(RAD(-90), 0, 0)
2345 W2.Parent = FakeLArm
2346 wait(0.1)
2347
2348 end;
2349
2350 function()
2351
2352 local FakeLArmCF = LWeld.Part0.CFrame * ArmC0[1] * (CF(0.3, 1.85, -0.31) * CFANG(RAD(-20), RAD(30), RAD(-60))):inverse()
2353 local FakeRArmCF = RWeld.Part0.CFrame * ArmC0[2] * (CF(0.4, -0.1, -0.21) * CFANG(RAD(-20), RAD(5), RAD(10))):inverse()
2354 local HandleCF = FakeRArm.CFrame:toObjectSpace(Grip.Part0.CFrame * Grip.C0)
2355 local Mag_Original_CF = Handle.CFrame:toObjectSpace(Mag_Parts[1].Original.CFrame)
2356 local MagC0 = FakeLArmCF:toObjectSpace(FakeRArmCF * HandleCF * Mag_Original_CF)
2357
2358 TweenJoint(LWeld, ArmC0[1], CF(0.3, 1.85, -0.31) * CFANG(RAD(-20), RAD(30), RAD(-60)), Sine, 0.6 * Speed)
2359 TweenJoint(RWeld, ArmC0[2], CF(0.4, -0.1, -0.21) * CFANG(RAD(-20), RAD(5), RAD(10)), Sine, 0.6 * Speed)
2360 TweenJoint(Grip, Grip.C0, CF(), Sine, 0.6 * Speed)
2361 TweenJoint(W2, MagC0, CF(), Sine, 0.6 * Speed)
2362 wait(0.7 * Speed)
2363
2364 end;
2365
2366 function()
2367
2368 for _, Mag in pairs(Mag_Parts) do
2369 Mag.Original.Transparency = 0
2370 Mag.Clone2:Destroy()
2371 end
2372
2373 TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Sine, 0.5 * Speed)
2374 TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Sine, 0.5 * Speed)
2375 TweenJoint(Grip, Grip.C0, CFANG(0, RAD(20), 0), Sine, 0.5 * Speed)
2376 wait(0.5 * Speed)
2377
2378 end;
2379
2380 }
2381
2382 for _,ReloadFunction in pairs(SequenceTable) do
2383 if BreakReload then
2384 break
2385 end
2386 ReloadFunction()
2387 end
2388
2389 if W1 then W1:Destroy() end
2390 if W2 then W2:Destroy() end
2391 for _, Mag in pairs(Mag_Parts) do
2392 Mag.Clone1:Destroy()
2393 Mag.Clone2:Destroy()
2394 end
2395end
2396
2397function Reload()
2398 Running = false
2399 if Ammo.Value < ClipSize.Value and (not Reloading) and StoredAmmo.Value > 0 then
2400 AmmoInClip = (AmmoInClip == 0 and Ammo.Value or AmmoInClip)
2401 Ammo.Value = 0
2402 Reloading = true
2403 if Aimed then UnAimGun(S.ReloadAnimation) end
2404 Gui_Clone.CrossHair.Reload.Visible = true
2405 if Handle:FindFirstChild("ReloadSound") then Handle.ReloadSound:Play() end
2406 if S.ReloadAnimation then
2407 wait()
2408 ReloadAnim()
2409 else
2410 local StartReload = tick()
2411 while true do
2412 if BreakReload then break end
2413 if (tick() - StartReload) >= S.ReloadTime then break end
2414 RS:wait()
2415 end
2416 end
2417 if (not BreakReload) then
2418 if StoredAmmo.Value >= ClipSize.Value then
2419 Ammo.Value = ClipSize.Value
2420 if AmmoInClip > 0 then
2421 StoredAmmo.Value = StoredAmmo.Value - (ClipSize.Value - AmmoInClip)
2422 else
2423 StoredAmmo.Value = StoredAmmo.Value - ClipSize.Value
2424 end
2425 elseif StoredAmmo.Value < ClipSize.Value and StoredAmmo.Value > 0 then
2426 Ammo.Value = StoredAmmo.Value
2427 StoredAmmo.Value = 0
2428 end
2429 end
2430 BreakReload = false
2431 Reloading = false
2432 if Selected then
2433 AmmoInClip = 0
2434 Gui_Clone.CrossHair.Reload.Visible = false
2435 end
2436 end
2437end
2438
2439--------------------[ EXTERNAL DATA LOCATING FUNCTIONS ]-----------------------------
2440
2441function FindFirstClass(Object, Class)
2442 local FoundObject = nil
2443 for _, Obj in pairs(Object:GetChildren()) do
2444 if Obj.ClassName == Class then
2445 FoundObject = Obj
2446 break
2447 end
2448 end
2449 return FoundObject
2450end
2451
2452function IsIgnored(Obj)
2453 for _,v in pairs(Ignore) do
2454 if Obj == v or Obj:IsDescendantOf(v) then
2455 return true
2456 end
2457 end
2458 return false
2459end
2460
2461function GetHitSurfaceCFrame(HitPos,Obj)
2462 local SurfaceCF = {
2463 {"Back",Obj.CFrame * CF(0,0,Obj.Size.z)};
2464 {"Bottom",Obj.CFrame * CF(0,-Obj.Size.y,0)};
2465 {"Front",Obj.CFrame * CF(0,0,-Obj.Size.z)};
2466 {"Left",Obj.CFrame * CF(-Obj.Size.x,0,0)};
2467 {"Right",Obj.CFrame * CF(Obj.Size.x,0,0)};
2468 {"Top",Obj.CFrame * CF(0,Obj.Size.y,0)}
2469 }
2470 local ClosestDist = HUGE
2471 local ClosestSurface = nil
2472 for _,v in pairs(SurfaceCF) do
2473 local SurfaceDist = (HitPos - v[2].p).magnitude
2474 if SurfaceDist < ClosestDist then
2475 ClosestDist = SurfaceDist
2476 ClosestSurface = v
2477 end
2478 end
2479 return ClosestSurface[2]
2480end
2481
2482function AdvRayCast(Origin, Direction, Dist, CustomIgnore)
2483 local NewIgnore = (CustomIgnore and CustomIgnore or Ignore)
2484 local NewRay = Ray.new(Origin, Direction * (Dist > 999 and 999 or Dist))
2485 local HitObj, HitPos = game.Workspace:FindPartOnRayWithIgnoreList(NewRay, NewIgnore)
2486 local LastPos = HitPos
2487 local FinalHitObj, FinalHitPos = nil, nil
2488 local RepTimes = math.floor(Dist / 999)
2489 if (not HitObj) and (Dist > 999) then
2490 for i = 0, RepTimes do
2491 local NewDist = (i == RepTimes and (Dist - (LastPos - Origin).magnitude) or 999)
2492 local Ray2 = Ray.new(LastPos, Direction * NewDist)
2493 local HitObj2, HitPos2 = game.Workspace:FindPartOnRayWithIgnoreList(Ray2, NewIgnore)
2494 if i ~= RepTimes then
2495 if HitObj2 then
2496 FinalHitObj, FinalHitPos = HitObj2, HitPos2
2497 break
2498 end
2499 elseif i == RepTimes then
2500 FinalHitObj, FinalHitPos = HitObj2, HitPos2
2501 end
2502 LastPos = HitPos2
2503 end
2504 return FinalHitObj, FinalHitPos
2505 elseif HitObj or (Dist <= 999) then
2506 return HitObj, HitPos
2507 end
2508end
2509
2510--------------------[ KNIFING FUNCTION ]----------------------------------------------
2511
2512function KnifeAnim()
2513 local Connection = nil
2514 local Blade = Instance.new("Part")
2515 Blade.BrickColor = BrickColor.new("Really black")
2516 Blade.Name = "Blade"
2517 Blade.CanCollide = false
2518 Blade.FormFactor = Enum.FormFactor.Custom
2519 Blade.Size = VEC3(0.5, 2.5, 1)
2520 local Mesh = Instance.new("SpecialMesh")
2521 Mesh.MeshId = S.KnifeMeshId
2522 Mesh.MeshType = Enum.MeshType.FileMesh
2523 Mesh.Scale = VEC3(0.7, 0.7, 0.7)
2524 Mesh.TextureId = S.KnifeTextureId
2525 Mesh.Parent = Blade
2526 Blade.Parent = Gun_Ignore
2527 local BladeWeld = Instance.new("Weld")
2528 BladeWeld.Part0 = Blade
2529 BladeWeld.Part1 = FakeLArm
2530 BladeWeld.C0 = CFANG(RAD(-90), 0, RAD(180))
2531 BladeWeld.C1 = CF(0, -1, 0.75)
2532 BladeWeld.Parent = Blade
2533 Connection = Blade.Touched:connect(function(Obj)
2534 if Obj then
2535 local HitHumanoid = FindFirstClass(Obj.Parent, "Humanoid")
2536 if HitHumanoid and IsEnemy(HitHumanoid) then
2537 local CreatorTag = Instance.new("ObjectValue")
2538 CreatorTag.Name = "creator"
2539 CreatorTag.Value = Player
2540 CreatorTag.Parent = HitHumanoid
2541 HitHumanoid:TakeDamage(HitHumanoid.MaxHealth)
2542 MarkHit()
2543 end
2544 end
2545 end)
2546 TweenJoint(LWeld2, CF(), CFANG(0, RAD(90), 0), Linear, 0.05)
2547 TweenJoint(LWeld, ArmC0[1], CF(-0.1, 0.2, -0.1) * CFANG(0, 0, RAD(-20)), Linear, 0.05)
2548 TweenJoint(RWeld, ArmC0[2], CFANG(RAD(-30), 0, 0), Linear, 0.1)
2549 TweenJoint(Grip, Grip.C0, CF(), Linear, 0.1)
2550 spawn(function()
2551 local Force = HRP.CFrame.lookVector * 8e4
2552 local BF = Instance.new("BodyForce")
2553 BF.force = Force
2554 BF.Parent = HRP
2555 delay(0.03, function()
2556 BF.force = -Force / 2
2557 wait(0.03)
2558 BF:Destroy()
2559 end)
2560 end)
2561 wait(0.05)
2562 RotCamera(RAD(6), 0, true, 0.1)
2563 delay(0.1, function()
2564 RotCamera(RAD(-2), 0, true, 0.05)
2565 end)
2566 TweenJoint(LWeld, ArmC0[1], CF(0.8, 1.7, 0.2) * CFANG(0, 0, RAD(-80)), Linear, 0.06)
2567 wait(0.2)
2568 Connection:disconnect()
2569 wait(0.2)
2570 TweenJoint(LWeld2, CF(), CF(), Linear, 0.15)
2571 TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Linear, 0.15)
2572 TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Linear, 0.15)
2573 Blade:Destroy()
2574end
2575
2576--------------------[ GRENADE FUNCTIONS ]---------------------------------------------
2577
2578function CreateGrenade()
2579 local Grenade = Instance.new("Model")
2580
2581 local Center = Instance.new("Part")
2582 Center.BrickColor = S.GrenadeColor
2583 Center.Name = "Center"
2584 Center.CanCollide = false
2585 Center.Elasticity = 0
2586 Center.FormFactor = Enum.FormFactor.Custom
2587 Center.Size = S.GrenadeSize
2588 Center.BottomSurface = Enum.SurfaceType.Smooth
2589 Center.TopSurface = Enum.SurfaceType.Smooth
2590 Center.Parent = Grenade
2591
2592 local Mesh1 = Instance.new("SpecialMesh")
2593 Mesh1.MeshType = Enum.MeshType.Sphere
2594 Mesh1.Parent = Center
2595
2596 return Grenade
2597end
2598
2599function CreateKnife()
2600 local Knife = Instance.new("Part")
2601 Knife.BrickColor = S.GrenadeColor
2602 Knife.Name = "Knife"
2603 Knife.CanCollide = false
2604 Knife.FormFactor = Enum.FormFactor.Custom
2605 Knife.Size = VEC3(1, 1, 3)
2606
2607 local Mesh = Instance.new("SpecialMesh")
2608 Mesh.MeshId = "http://www.roblox.com/asset/?id=12221720"
2609 Mesh.MeshType = Enum.MeshType.FileMesh
2610 Mesh.Scale = VEC3(0.5, 0.5, 0.5)
2611 Mesh.Parent = Knife
2612
2613 return Knife
2614end
2615
2616function CreateTarget()
2617 local Target = Instance.new("Model")
2618
2619 local Center = Instance.new("Part")
2620 Center.BrickColor = BrickColor.new("Bright red")
2621 Center.Material = Enum.Material.SmoothPlastic
2622 Center.Transparency = 0.3
2623 Center.Name = "Center"
2624 Center.Anchored = true
2625 Center.CanCollide = false
2626 Center.FormFactor = Enum.FormFactor.Custom
2627 Center.Size = VEC3(4, 0.2, 4)
2628 Center.Parent = Target
2629 local CylinderMesh = Instance.new("CylinderMesh")
2630 CylinderMesh.Parent = Center
2631
2632 local Line = Instance.new("Part")
2633 Line.BrickColor = BrickColor.new("Bright red")
2634 Line.Transparency = 0.3
2635 Line.Name = "Line"
2636 Line.CFrame = Center.CFrame * CFrame.new(0, 5.1, 0)
2637 Line.Anchored = true
2638 Line.CanCollide = false
2639 Line.FormFactor = Enum.FormFactor.Custom
2640 Line.Size = VEC3(0.4, 10, 0.4)
2641 Line.BottomSurface = Enum.SurfaceType.Smooth
2642 Line.TopSurface = Enum.SurfaceType.Smooth
2643 Line.Parent = Target
2644
2645 return Target
2646end
2647
2648function DetonateExplosive(Grenade)
2649 CreateShockwave(Grenade.Position, S.GrenadeBlastRadius)
2650 local GrenadePos = Grenade.Position
2651 local E = Instance.new("Explosion")
2652 E.BlastPressure = S.GrenadeBlastPressure
2653 E.BlastRadius = S.GrenadeBlastRadius
2654 E.DestroyJointRadiusPercent = (S.GrenadeRangeBasedDamage and 0 or 1)
2655 E.ExplosionType = S.GrenadeExplosionType
2656 E.Position = GrenadePos
2657 E.Hit:connect(function(HObj, HDist)
2658 if HObj.Name == "Torso" and (not HObj:IsDescendantOf(Character)) then
2659 if S.GrenadeRangeBasedDamage then
2660 local ClosestPart = nil
2661 local ClosestDist = math.huge
2662
2663 for _, P in pairs(HObj.Parent:GetChildren()) do
2664 if P:IsA("BasePart") then
2665 local Dist = (GrenadePos - P.Position).magnitude
2666 if Dist < ClosestDist then
2667 ClosestPart = P
2668 ClosestDist = Dist
2669 end
2670 end
2671 end
2672
2673 local Dir = (ClosestPart.Position - GrenadePos).unit
2674 local H, P = AdvRayCast(GrenadePos, Dir, 999)
2675 local RayHitHuman = H:IsDescendantOf(HObj.Parent)
2676 if (S.GrenadeRayCastExplosions and RayHitHuman) or (not S.GrenadeRayCastExplosions) then
2677 local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
2678 if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
2679 local DistFactor = ClosestDist / S.GrenadeBlastRadius
2680 local DistInvert = math.max(1 - DistFactor,0)
2681 local NewDamage = DistInvert * S.LethalGrenadeDamage
2682
2683 local CreatorTag = Instance.new("ObjectValue")
2684 CreatorTag.Value = Player
2685 CreatorTag.Name = "creator"
2686 CreatorTag.Parent = HitHumanoid
2687 HitHumanoid:TakeDamage(NewDamage)
2688 MarkHit()
2689 end
2690 end
2691 else
2692 local HitHumanoid = FindFirstClass(HObj.Parent, "Humanoid")
2693 if HitHumanoid and HitHumanoid.Health > 0 and IsEnemy(HitHumanoid) then
2694 local CreatorTag = Instance.new("ObjectValue")
2695 CreatorTag.Value = Player
2696 CreatorTag.Name = "creator"
2697 CreatorTag.Parent = HitHumanoid
2698 MarkHit()
2699 end
2700 end
2701 end
2702 end)
2703 E.Parent = game.Workspace
2704
2705 wait()
2706
2707 Grenade.Parent:Destroy()
2708end
2709
2710function DetonateSmoke(Grenade)
2711 CreateShockwave(Grenade.Position, S.GrenadeEffectRadius)
2712 local GrenadePos = Grenade.Position
2713
2714 spawn(function()
2715 for i = 1, math.floor(S.GrenadeEffectRadius / 5) + RAND(5, 10) do
2716 local Size = RAND(S.GrenadeEffectRadius * 0.6, S.GrenadeEffectRadius * 0.8)
2717 local Dist = RAND(0, S.GrenadeEffectRadius - Size)
2718 local XRot, YRot = RAD(RAND(0, 180, 10)), RAD(RAND(0, 360, 10))
2719 local RotLV = (CFANG(0, YRot, 0) * CFANG(XRot, 0, 0)).lookVector
2720 local Pos = GrenadePos + (RotLV * VEC3(Dist, Dist / 2, Dist))
2721
2722 local Smoke = Instance.new("Part")
2723 Smoke.Transparency = 1
2724 Smoke.Name = "Smoke"
2725 Smoke.Anchored = true
2726 Smoke.CanCollide = false
2727 Smoke.FormFactor = Enum.FormFactor.Symmetric
2728 Smoke.Size = VEC3(1, 1, 1)
2729 Smoke.TopSurface = Enum.SurfaceType.Smooth
2730 Smoke.BottomSurface = Enum.SurfaceType.Smooth
2731
2732 local Mesh = Instance.new("SpecialMesh")
2733 Mesh.MeshType = Enum.MeshType.Sphere
2734 Mesh.Scale = VEC3(Size, Size, Size)
2735 Mesh.Parent = Smoke
2736
2737 Smoke.Parent = Gun_Ignore
2738 Smoke.CFrame = CF(Pos)
2739
2740 spawn(function()
2741 local Trans = RAND(0.3, 0.5, 0.01)
2742 for X = 0, 90, 2 do
2743 Smoke.CFrame = CF(GrenadePos:lerp(Pos, Sine(X)))
2744 Smoke.Transparency = NumLerp(1, Trans, Sine(X))
2745 RS:wait()
2746 end
2747
2748 wait(S.GrenadeEffectTime)
2749
2750 for X = 0, 90, 0.5 do
2751 Smoke.CFrame = CF(Pos:lerp(Pos + VEC3(0, 20, 0), 1 - COS(RAD(X))))
2752 Smoke.Transparency = NumLerp(Trans, 1, Sine(X))
2753 RS:wait()
2754 end
2755
2756 Smoke:Destroy()
2757 end)
2758
2759 if i % 3 == 0 then
2760 RS:wait()
2761 end
2762 end
2763 end)
2764
2765 wait()
2766
2767 Grenade.Parent:Destroy()
2768end
2769
2770function ThrowGrenade(Type)
2771 local Grenade0 = nil
2772 if S.TrajectoryAssist then
2773 spawn(function()
2774 local X = 0
2775 local Vel = (Type == 1 and S.LethalGrenadeThrowVelocity or S.TacticalGrenadeThrowVelocity)
2776
2777 local GetX = function(Ang, T)
2778 local Vx = Vel * math.cos(Ang)
2779 return Vx * T
2780 end
2781
2782 local GetY = function(Ang, T)
2783 local V0y = Vel * math.sin(Ang)
2784 local Vy = V0y + (-196.2 * T)
2785 return (Vy * T) - (-98.1 * T * T)
2786 end
2787
2788 local Target = CreateTarget()
2789 Target.Parent = game.Workspace
2790 Target.PrimaryPart = Target:WaitForChild("Center")
2791
2792 while (Keys[S.LethalGrenadeKey] or Keys[S.TacticalGrenadeKey]) and Selected do
2793 X = X + math.rad(10)
2794 for _,v in pairs(Target:GetChildren()) do
2795 v.Transparency = 0.2 + ((math.sin(X) + 1) / 5)
2796 end
2797
2798 local Lines = {}
2799 local LastX, LastY = nil, nil
2800 for T = 0, 10, 0.1 do
2801 local XPos = GetX(math.rad(7) - HeadRot, T)
2802 local YPos = GetY(math.rad(7) - HeadRot, T)
2803 if LastX and LastY then
2804 local LookV3 = HRP.CFrame.lookVector
2805 local LastPos = (Head.CFrame * CF(1.5, 0, 0)).p + (LookV3 * LastX) + VEC3(0, LastY, 0)
2806 local NewPos = (Head.CFrame * CF(1.5, 0, 0)).p + (LookV3 * XPos) + VEC3(0, YPos, 0)
2807 local LineCF = CF(LastPos, NewPos)
2808 local Dist = (LastPos - NewPos).magnitude
2809 local NewDist = Dist
2810
2811 local H, P = AdvRayCast(LastPos, (NewPos - LastPos), 1, {Camera, unpack(Ignore)})
2812 if H then
2813 NewDist = (P - LastPos).magnitude
2814
2815 local SurfaceCF = GetHitSurfaceCFrame(P, H)
2816 local SurfaceDir = CF(H.CFrame.p, SurfaceCF.p)
2817 local SurfaceDist = SurfaceDir.lookVector * (H.CFrame.p - SurfaceCF.p).magnitude / 2
2818 local SurfaceOffset = P - SurfaceCF.p + SurfaceDist
2819 local SurfaceCFrame = SurfaceDir + SurfaceDist + SurfaceOffset
2820
2821 Target:SetPrimaryPartCFrame(SurfaceCFrame * CFANG(RAD(-90), 0, 0))
2822
2823 Target.Parent = Camera
2824 else
2825 Target.Parent = nil
2826 end
2827
2828 local Line = Instance.new("Part")
2829 Line.BrickColor = BrickColor.Red()
2830 Line.Material = Enum.Material.SmoothPlastic
2831 Line.Transparency = 0.2 + ((math.sin(X) + 1) / 5)
2832 Line.Anchored = true
2833 Line.CanCollide = false
2834 Line.FormFactor = Enum.FormFactor.Custom
2835 Line.Size = Vector3.new(0.4, 0.4, NewDist)
2836 Line.TopSurface = Enum.SurfaceType.Smooth
2837 Line.BottomSurface = Enum.SurfaceType.Smooth
2838 Line.CFrame = LineCF + (LineCF.lookVector * NewDist / 2)
2839 Line.Parent = Camera
2840
2841 table.insert(Lines, Line)
2842
2843 LastX,LastY = XPos,YPos
2844
2845 if H then break end
2846 else
2847 LastX,LastY = XPos,YPos
2848 end
2849 end
2850
2851 wait()
2852
2853 for _,Line in pairs(Lines) do
2854 Line:Destroy()
2855 end
2856 end
2857
2858 Target:Destroy()
2859 end)
2860 end
2861
2862 local AnimTable = {
2863 function()
2864 TweenJoint(LWeld, CF(-1.5, 0, 0), CF(0, 0.6, 0), Linear, 0.2)
2865 TweenJoint(RWeld, CF(1.5, 0, 0) * CFANG(0, 0, RAD(-10)), CF(0, 0.6, 0), Linear, 0.2)
2866 TweenJoint(Grip, Grip.C0, CFANG(0, RAD(10), 0), Linear, 0.2)
2867 wait(0.3)
2868 end;
2869
2870 function()
2871 Grip.Part0 = Torso
2872 Grip.C1 = CF(-1, 0.5, -0.5)
2873
2874 if S.LethalGrenadeType == 3 and Type == 1 then
2875 Grenade0 = CreateKnife()
2876 Grenade0.Parent = Gun_Ignore
2877
2878 local Weld = Instance.new("Weld")
2879 Weld.Part0 = FakeRArm
2880 Weld.Part1 = Grenade0
2881 Weld.C0 = Grip.C0
2882 Weld.C1 = CF(0, 0, -0.5) * CFANG(RAD(90), RAD(90), 0)
2883 Weld.Parent = Grenade0
2884
2885 TweenJoint(LWeld2, CF(), CF(), Sine, 0.3)
2886 TweenJoint(RWeld2, CF(), CF(), Sine, 0.3)
2887 TweenJoint(LWeld, ArmC0[1], CF(0, 0.5, 0.1) * CFANG(RAD(90), 0, 0), Sine, 0.3)
2888 TweenJoint(RWeld, ArmC0[2], CF(0, 0.4, 0.1) * CFANG(RAD(-80), 0, 0), Sine, 0.3)
2889 wait(0.3)
2890 else
2891 Grenade0 = CreateGrenade()
2892 Grenade0.Parent = Gun_Ignore
2893
2894 local Weld = Instance.new("Weld")
2895 Weld.Part0 = FakeRArm
2896 Weld.Part1 = Grenade0:WaitForChild("Center")
2897 Weld.C0 = Grip.C0
2898 Weld.Parent = Grenade0:WaitForChild("Center")
2899
2900 TweenJoint(LWeld2, CF(), CFANG(0, RAD(80), 0), Linear, 0.25)
2901 TweenJoint(RWeld2, CF(), CFANG(0, RAD(-80), 0), Linear, 0.25)
2902 TweenJoint(LWeld, ArmC0[1], CF(-0.2, 0.8, 0.1) * CFANG(RAD(10), 0, RAD(-30)), Linear, 0.25)
2903 TweenJoint(RWeld, ArmC0[2], CF(0.2, 0.8, 0.1) * CFANG(RAD(10), 0, RAD(30)), Linear, 0.25)
2904 wait(0.3)
2905 end
2906 end;
2907
2908 function()
2909 repeat wait() until (not Keys[S.LethalGrenadeKey]) and (not Keys[S.TacticalGrenadeKey]) or (not Selected)
2910 end;
2911
2912 function()
2913 if S.LethalGrenadeType ~= 3 or Type == 2 then
2914 TweenJoint(LWeld2, CF(), CFANG(0, RAD(45), 0), Sine, 0.2)
2915 TweenJoint(RWeld2, CF(), CFANG(0, RAD(-45), 0), Sine, 0.2)
2916 TweenJoint(LWeld, ArmC0[1], CF(0, 0.8, 0.1), Sine, 0.2)
2917 TweenJoint(RWeld, ArmC0[2], CF(0, 0.8, 0.1), Sine, 0.2)
2918 wait(0.2)
2919 end
2920 end;
2921
2922 function()
2923 if S.LethalGrenadeType ~= 3 or Type == 2 then
2924 TweenJoint(LWeld2, CF(), CF(), Sine, 0.3)
2925 TweenJoint(RWeld2, CF(), CF(), Sine, 0.3)
2926 TweenJoint(LWeld, ArmC0[1], CF(0, 0.5, 0.1) * CFANG(RAD(90), 0, 0), Sine, 0.3)
2927 TweenJoint(RWeld, ArmC0[2], CF(0, 0.4, 0.1) * CFANG(RAD(-80), 0, 0), Sine, 0.3)
2928 wait(0.3)
2929 end
2930 end;
2931
2932 function()
2933 TweenJoint(RWeld, ArmC0[2], CF(0, 0.8, 0.1) * CFANG(RAD(-10), 0, 0), Sine, 0.1)
2934 wait(0.07)
2935 end;
2936
2937 function()
2938 local Main = nil
2939 Grenade0:Destroy()
2940
2941 if S.LethalGrenadeType == 3 and Type == 1 then
2942 local Grenade1 = CreateKnife()
2943 Main = Grenade1
2944
2945 Grenade1.Parent = Gun_Ignore
2946
2947 Main.CFrame = FakeRArm.CFrame * Grip.C0 * CF(0, 0.5, 0) * CFANG(RAD(-90), 0, RAD(90))
2948 Main.Velocity = Main.Velocity + ((Head.CFrame * CFANG(RAD(7), 0, 0)).lookVector * S.LethalGrenadeThrowVelocity)
2949 Main.RotVelocity = (Main.CFrame * CFANG(RAD(90), 0, 0)).lookVector * 20
2950 else
2951 local Grenade1 = CreateGrenade()
2952 Main = Grenade1:WaitForChild("Center")
2953
2954 local Sound = Instance.new("Sound")
2955 Sound.SoundId = (Type == 1 and "rbxassetid://180302005" or "rbxassetid://156283116")
2956 Sound.Volume = 1
2957 Sound.PlayOnRemove = true
2958 Sound.Parent = Main
2959
2960 Grenade1.Parent = Gun_Ignore
2961
2962 Main.CanCollide = true
2963 Main.CFrame = FakeRArm.CFrame * Grip.C0
2964 if Type == 1 then
2965 Main.Velocity = Main.Velocity + ((Head.CFrame * CFANG(RAD(7), 0, 0)).lookVector * S.LethalGrenadeThrowVelocity)
2966 elseif Type == 2 then
2967 Main.Velocity = Main.Velocity + ((Head.CFrame * CFANG(RAD(7), 0, 0)).lookVector * S.TacticalGrenadeThrowVelocity)
2968 end
2969 end
2970
2971 spawn(function()
2972 if Type == 1 then
2973 if S.LethalGrenadeType == 1 then
2974 if S.TimerStartOnHit then
2975 local Detonated = false
2976 Main.Touched:connect(function(Obj)
2977 if IsIgnored(Obj) or Detonated then return end
2978 Main.Velocity = Main.Velocity / 4
2979 Detonated = true
2980
2981 wait(S.DetonationTime)
2982
2983 DetonateExplosive(Main)
2984 end)
2985 else
2986 spawn(function()
2987 local Touched = false
2988 Main.Touched:connect(function(Obj)
2989 if IsIgnored(Obj) or Touched then return end
2990 Touched = true
2991 Main.Velocity = Main.Velocity / 4
2992 end)
2993 end)
2994 wait(S.DetonationTime)
2995 DetonateExplosive(Main)
2996 end
2997 elseif S.LethalGrenadeType == 2 then
2998 local Detonated = false
2999 local GrenadeCF = nil
3000 Main.Touched:connect(function(Obj)
3001 if IsIgnored(Obj) or Detonated then return end
3002 GrenadeCF = Main.CFrame
3003
3004 local W = Instance.new("Weld")
3005 W.Name = "Semtex"
3006 W.Part0 = Main
3007 W.Part1 = Obj
3008 W.C0 = GrenadeCF:toObjectSpace(Obj.CFrame)
3009 W.Parent = Main
3010
3011 Main.ChildRemoved:connect(function(C)
3012 if C.Name == "Semtex" then
3013 local W = Instance.new("Weld")
3014 W.Name = "Semtex"
3015 W.Part0 = Main
3016 W.Part1 = Obj
3017 W.C0 = GrenadeCF:toObjectSpace(Obj.CFrame)
3018 W.Parent = Main
3019 end
3020 end)
3021
3022 if S.TimerStartOnHit then
3023 Detonated = true
3024 wait(S.DetonationTime)
3025 DetonateExplosive(Main)
3026 end
3027 end)
3028
3029 if (not S.TimerStartOnHit) then
3030 wait(S.DetonationTime)
3031 Detonated = true
3032 DetonateExplosive(Main)
3033 end
3034 elseif S.LethalGrenadeType == 3 then
3035 local Touched = false
3036 Main.Touched:connect(function(Obj)
3037 if IsIgnored(Obj) or Touched then return end
3038 Touched = true
3039
3040 local W = Instance.new("Weld")
3041 W.Name = "Sticky"
3042 W.Part0 = Main
3043 W.Part1 = Obj
3044 W.C0 = Main.CFrame:toObjectSpace(Obj.CFrame)
3045 W.Parent = Main
3046
3047 Main.ChildRemoved:connect(function(C)
3048 if C.Name == "Sticky" then
3049 local W = Instance.new("Weld")
3050 W.Name = "Sticky"
3051 W.Part0 = Main
3052 W.Part1 = Obj
3053 W.C0 = Main.CFrame:toObjectSpace(Obj.CFrame)
3054 W.Parent = Main
3055 end
3056 end)
3057
3058 if Obj then
3059 if Obj.Parent.ClassName == "Hat" then
3060 local HitHumanoid = FindFirstClass(Obj.Parent.Parent, "Humanoid")
3061 if HitHumanoid and IsEnemy(HitHumanoid) then
3062 local CreatorTag = Instance.new("ObjectValue")
3063 CreatorTag.Name = "creator"
3064 CreatorTag.Value = Player
3065 CreatorTag.Parent = HitHumanoid
3066 HitHumanoid:TakeDamage(HitHumanoid.MaxHealth)
3067 MarkHit()
3068 end
3069 else
3070 local HitHumanoid = FindFirstClass(Obj.Parent, "Humanoid")
3071 if HitHumanoid and IsEnemy(HitHumanoid) then
3072 local CreatorTag = Instance.new("ObjectValue")
3073 CreatorTag.Name = "creator"
3074 CreatorTag.Value = Player
3075 CreatorTag.Parent = HitHumanoid
3076 HitHumanoid:TakeDamage(HitHumanoid.MaxHealth)
3077 MarkHit()
3078 end
3079 end
3080 end
3081
3082 wait(3)
3083
3084 Main:Destroy()
3085 end)
3086 end
3087 elseif Type == 2 then
3088 if S.TacticalGrenadeType == 1 then
3089 if S.TimerStartOnHit then
3090 local Detonated = false
3091 Main.Touched:connect(function(Obj)
3092 if IsIgnored(Obj) or Detonated then return end
3093 Main.Velocity = Main.Velocity / 2
3094 Detonated = true
3095
3096 wait(S.DetonationTime)
3097
3098 DetonateSmoke(Main)
3099 end)
3100 else
3101 spawn(function()
3102 local Touched = false
3103 Main.Touched:connect(function(Obj)
3104 if IsIgnored(Obj) or Touched then return end
3105 Touched = true
3106 Main.Velocity = Main.Velocity / 2
3107 end)
3108 end)
3109 wait(S.DetonationTime)
3110 DetonateSmoke(Main)
3111 end
3112 end
3113 end
3114 end)
3115
3116 if S.GrenadeTrail and S.GrenadeTrailTransparency ~= 1 then
3117 spawn(function()
3118 local LastPos = nil
3119 while true do
3120 if LastPos then
3121 if (not Main:IsDescendantOf(game))
3122 or (Main.Name == "Knife" and FindFirstClass(Main, "Weld")) then
3123 break
3124 end
3125 local Trail = Instance.new("Part")
3126 Trail.BrickColor = S.GrenadeTrailColor
3127 Trail.Transparency = S.GrenadeTrailTransparency
3128 Trail.Anchored = true
3129 Trail.CanCollide = false
3130 Trail.Size = VEC3(1, 1, 1)
3131 local Mesh = Instance.new("BlockMesh")
3132 Mesh.Offset = VEC3(0, 0, -(Main.Position - LastPos).magnitude / 2)
3133 Mesh.Scale = VEC3(S.GrenadeTrailThickness, S.GrenadeTrailThickness, (Main.Position - LastPos).magnitude)
3134 Mesh.Parent = Trail
3135 Trail.Parent = Gun_Ignore
3136 Trail.CFrame = CF(LastPos, Main.Position)
3137 delay(S.GrenadeTrailVisibleTime, function()
3138 if S.GrenadeTrailDisappearTime > 0 then
3139 local X = 0
3140 while true do
3141 if X == 90 then break end
3142 if (not Selected) then break end
3143 local NewX = X + (1.5 / S.GrenadeTrailDisappearTime)
3144 X = (NewX > 90 and 90 or NewX)
3145 local Alpha = X / 90
3146 Trail.Transparency = NumLerp(S.GrenadeTrailTransparency, 1, Alpha)
3147 RS:wait()
3148 end
3149 Trail:Destroy()
3150 else
3151 Trail:Destroy()
3152 end
3153 end)
3154 LastPos = Main.Position
3155 else
3156 LastPos = Main.Position
3157 end
3158 RS:wait()
3159 end
3160 end)
3161 end
3162 wait(0.2)
3163 end;
3164
3165 function()
3166 TweenJoint(RWeld, CF(1.5, 0, 0) * CFANG(0, 0, RAD(-10)), CF(0, 0.6, 0), Linear, 0.2)
3167 wait(0.3)
3168 end;
3169
3170 function()
3171 Grip.Part0 = RArm
3172 Grip.C1 = CFANG(0, RAD(20), 0)
3173
3174 TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Linear, 0.2)
3175 TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Linear, 0.2)
3176 wait(0.2)
3177 end;
3178 }
3179
3180 for _,F in pairs(AnimTable) do
3181 if (not Selected) then
3182 break
3183 end
3184 F()
3185 end
3186
3187 if (not Selected) and Grenade0 then
3188 Grenade0:Destroy()
3189 end
3190end
3191
3192--------------------[ CAMERA STEADYING FUNCTIONS ]------------------------------------
3193
3194function SteadyCamera()
3195 Gui_Clone.Scope.Steady.Text = "Steadying..."
3196 Gui_Clone.Scope.Steady.TextColor3 = Color3.new(1, 1, 0)
3197 CameraSteady = true
3198 local OriginalSway = CameraSway
3199 for X = 0, 90, 1.5 / 0.6 do
3200 if (not Run_Key_Pressed) then break end
3201 local Alpha = SIN(RAD(X))
3202 CameraSway = NumLerp(OriginalSway, 0, Alpha)
3203 RS:wait()
3204 end
3205 while Run_Key_Pressed and Aimed do
3206 if CurrentSteadyTime > 0 then
3207 local NewSteadyTime = CurrentSteadyTime - 1
3208 CurrentSteadyTime = (NewSteadyTime < 0 and 0 or NewSteadyTime)
3209 CameraSway = 0
3210 elseif CurrentSteadyTime == 0 then
3211 break
3212 end
3213 RS:wait()
3214 end
3215 CameraSteady = false
3216 spawn(function()
3217 for X = 0, 90, 1.5 / 0.2 do
3218 local Alpha = math.log10(X) / math.log10(90)
3219 CameraSway = NumLerp(0, 3, Alpha)
3220 RS:wait()
3221 end
3222 for X = 0, 90, 1.5 / S.ScopeSteadyTime do
3223 if CameraSteady then break end
3224 local Alpha = SIN(RAD(X))
3225 CameraSway = NumLerp(3, 1, Alpha)
3226 RS:wait()
3227 end
3228 end)
3229 RetakeBreath()
3230end
3231
3232function RetakeBreath()
3233 local Steady = Gui_Clone.Scope.Steady
3234 Steady.Text = "Re-taking Breath"
3235 Steady.TextColor3 = Color3.new(1, 0, 0)
3236 TakingBreath = true
3237 while TakingBreath do
3238 if CurrentSteadyTime < MaxSteadyTime then
3239 local NewSteadyTime = CurrentSteadyTime + (S.ScopeSteadyTime / S.SteadyCooldownTime)
3240 CurrentSteadyTime = (NewSteadyTime > MaxSteadyTime and MaxSteadyTime or NewSteadyTime)
3241 elseif CurrentSteadyTime >= MaxSteadyTime then
3242 break
3243 end
3244 RS:wait()
3245 end
3246 if TakingBreath then
3247 Steady.Text = "Hold "..ConvertKey(S.ScopeSteadyKey).." to Steady"
3248 Steady.TextColor3 = Color3.new(1, 1, 0)
3249 TakingBreath = false
3250 end
3251end
3252
3253--------------------[ SPRINTING FUNCTIONS ]-------------------------------------------
3254
3255function MonitorStamina()
3256 while Run_Key_Pressed do
3257 if (not Aimed) and (not Aiming) then
3258 break
3259 end
3260 RS:wait()
3261 end
3262 while Run_Key_Pressed and (not Aiming) and (not Aimed) and (not Knifing) and (not ThrowingGrenade) do
3263 local Forward = (Keys["w"] or Keys[string.char(17)])
3264 local Backward = (Keys["s"] or Keys[string.char(18)])
3265 if (Forward and (not Backward))
3266 and Walking and (Stamina > 0) then
3267 if Stance == 1 or Stance == 2 then Stand() end
3268 local NewStamina = Stamina - 1
3269 Stamina = (NewStamina < 0 and 0 or NewStamina)
3270 Running = true
3271 elseif (not (Forward and (not Backward)))
3272 or (not Walking) or (Stamina == 0) then
3273 break
3274 end
3275 RS:wait()
3276 end
3277 Running = false
3278 RechargeStamina()
3279end
3280
3281function RechargeStamina()
3282 ChargingStamina = true
3283 while ((not Run_Key_Pressed) or (Stamina < MaxStamina)) and (not Running) do
3284 if Stamina < MaxStamina then
3285 local NewStamina = Stamina + (S.SprintTime / S.StaminaCoolTime)
3286 Stamina = (NewStamina > MaxStamina and MaxStamina or NewStamina)
3287 elseif Stamina >= MaxStamina then
3288 break
3289 end
3290 RS:wait()
3291 end
3292 ChargingStamina = false
3293end
3294
3295--------------------[ STANCE FUNCTIONS ]----------------------------------------------
3296
3297function Stand(OnDeselected)
3298 local LHip = Torso["Left Hip"]
3299 local RHip = Torso["Right Hip"]
3300 local Root = HRP.RootJoint
3301 Stance = 0
3302 if S.StanceAnimation and (not OnDeselected) then
3303 spawn(function()
3304 local PreviousOffset = Humanoid.CameraOffset
3305 local PreviousRootP = Root.C0.p
3306 for X = 0, 90, 1.5 / S.StanceChangeSpeed do
3307 if Stance ~= 0 then break end
3308 local Alpha = Sine(X)
3309 Humanoid.CameraOffset = PreviousOffset:lerp(StanceOffset[1], Alpha)
3310 Root.C0 = CF(PreviousRootP:lerp(VEC3(), Alpha)) * CFANG(RAD(-90), 0, RAD(180))
3311 RS:wait()
3312 end
3313 end)
3314 TweenJoint(ABWeld, CF(), CF(), Sine, S.StanceChangeSpeed)
3315 TweenJoint(LHip, CF(-1, -1, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0), Sine, S.StanceChangeSpeed)
3316 TweenJoint(RHip, CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0), Sine, S.StanceChangeSpeed)
3317 elseif OnDeselected then
3318 Humanoid.CameraOffset = StanceOffset[1]
3319 ABWeld.C0 = CF()
3320 ABWeld.C1 = CF()
3321 LHip.C0 = CF(-1, -1, 0) * CFANG(0, RAD(-90), 0)
3322 LHip.C1 = CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0)
3323 RHip.C0 = CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0)
3324 RHip.C1 = CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0)
3325 Root.C0 = CFANG(RAD(-90), 0, RAD(180))
3326 end
3327end
3328
3329function Crouch()
3330 local LHip = Torso["Left Hip"]
3331 local RHip = Torso["Right Hip"]
3332 local Root = HRP.RootJoint
3333 Stance = 1
3334 if S.StanceAnimation then
3335 spawn(function()
3336 local PreviousOffset = Humanoid.CameraOffset
3337 local PreviousRootP = Root.C0.p
3338 for X = 0, 90, 1.5 / S.StanceChangeSpeed do
3339 if Stance ~= 1 then break end
3340 local Alpha = Sine(X)
3341 Humanoid.CameraOffset = PreviousOffset:lerp(StanceOffset[2], Alpha)
3342 Root.C0 = CF(PreviousRootP:lerp(VEC3(0, -1, 0), Alpha)) * CFANG(RAD(-90), 0, RAD(180))
3343 RS:wait()
3344 end
3345 end)
3346 TweenJoint(ABWeld, CF(0, 0, -1 / 16), CF(), Sine, S.StanceChangeSpeed)
3347 TweenJoint(LHip, CF(-1, -0.5, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 0.5, 1) * CFANG(0, RAD(-90), RAD(-90)), Sine, S.StanceChangeSpeed)
3348 TweenJoint(RHip, CF(1, -0.5, 0.25) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 0.5, 1) * CFANG(RAD(-180), RAD(90), 0), Sine, S.StanceChangeSpeed)
3349 else
3350 Humanoid.CameraOffset = StanceOffset[2]
3351 ABWeld.C0 = CF(0, 0, -1 / 16)
3352 ABWeld.C1 = CF()
3353 LHip.C0 = CF(-1, -0.5, 0) * CFANG(0, RAD(-90), 0)
3354 LHip.C1 = CF(-0.5, 0.5, 1) * CFANG(0, RAD(-90), RAD(-90))
3355 RHip.C0 = CF(1, -0.5, 0.25) * CFANG(RAD(-180), RAD(90), 0)
3356 RHip.C1 = CF(0.5, 0.5, 1) * CFANG(RAD(-180), RAD(90), 0)
3357 Root.C0 = CF(0, -1, 0) * CFANG(RAD(-90), 0, RAD(180))
3358 end
3359end
3360
3361function Prone()
3362 local LHip = Torso["Left Hip"]
3363 local RHip = Torso["Right Hip"]
3364 local Root = HRP.RootJoint
3365 Stance = 2
3366 if S.StanceAnimation then
3367 spawn(function()
3368 local PreviousOffset = Humanoid.CameraOffset
3369 local PreviousRootP = Root.C0.p
3370 for X = 0, 90, 1.5 / S.StanceChangeSpeed do
3371 if Stance ~= 2 then break end
3372 local Alpha = Sine(X)
3373 Humanoid.CameraOffset = PreviousOffset:lerp(StanceOffset[3], Alpha)
3374 Root.C0 = CF(PreviousRootP:lerp(VEC3(0, -2.5, 1), Alpha)) * CFANG(RAD(180), 0, RAD(180))
3375 RS:wait()
3376 end
3377 end)
3378 TweenJoint(ABWeld, CF(0, 0, -1 / 8), CF(), Sine, S.StanceChangeSpeed)
3379 TweenJoint(LHip, CF(-1, -1, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0), Sine, S.StanceChangeSpeed)
3380 TweenJoint(RHip, CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0), Sine, S.StanceChangeSpeed)
3381 else
3382 Humanoid.CameraOffset = StanceOffset[3]
3383 ABWeld.C0 = CF(0, 0, -1 / 8)
3384 ABWeld.C1 = CF()
3385 LHip.C0 = CF(-1, -1, 0) * CFANG(0, RAD(-90), 0)
3386 LHip.C1 = CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0)
3387 RHip.C0 = CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0)
3388 RHip.C1 = CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0)
3389 Root.C0 = CF(0, -2.5, 1) * CFANG(RAD(180), 0, RAD(180))
3390 end
3391end
3392
3393function Dive(Speed)
3394 local DiveVelocity = (HRP.CFrame * CFANG(RAD(18),0,0)).lookVector * Speed * (35 / 16) * 4e3
3395 HRP.Velocity = VEC3()
3396 Torso.Velocity = VEC3()
3397 local BF = Instance.new("BodyForce")
3398 BF.force = DiveVelocity
3399 BF.Parent = HRP
3400 delay(0.05, function()
3401 Prone()
3402 local Start = tick()
3403 while true do
3404 wait()
3405 if (tick() - Start) > 0.1 then break end
3406 BF.force = -HRP.Velocity * 700
3407 end
3408 BF:Destroy()
3409 end)
3410end
3411
3412--------------------[ KEYBOARD FUNCTIONS ]--------------------------------------------
3413
3414function KeyDown(K)
3415 local Key = string.lower(K)
3416
3417 if Key == S.LowerStanceKey and S.CanChangeStance then
3418 if (not Running) then
3419 if Stance == 0 then
3420 Crouch()
3421 elseif Stance == 1 then
3422 Prone()
3423 end
3424 elseif S.DolphinDive then
3425 delay(1 / 30,function()
3426 CanRun = false
3427 Dive(S.BaseWalkSpeed)
3428 Run_Key_Pressed = false
3429 wait(S.DiveRechargeTime)
3430 CanRun = true
3431 end)
3432 end
3433 end
3434
3435 if Key == S.RaiseStanceKey and S.CanChangeStance then
3436 if (not Running) then
3437 if Stance == 2 then
3438 Crouch()
3439 elseif Stance == 1 then
3440 Stand()
3441 end
3442 end
3443 end
3444
3445 if Key == S.ADSKey then
3446 if S.HoldMouseOrKeyToADS then
3447 if (not AimingIn) and (not Aimed) then
3448 AimingIn = true
3449 AimGun()
3450 AimingIn = false
3451 end
3452 else
3453 if Aimed then
3454 UnAimGun()
3455 else
3456 AimGun()
3457 end
3458 end
3459 end
3460
3461 if Key == S.ReloadKey then
3462 if (not Reloading) and (not Running) then
3463 Reload()
3464 end
3465 end
3466
3467
3468 if Key == S.KnifeKey and S.CanKnife then
3469 if KnifeReady and (not Knifing) and (not ThrowingGrenade) then
3470 if Aimed then UnAimGun(true) end
3471 BreakReload = true
3472 Knifing = true
3473 KnifeReady = false
3474 KnifeAnim()
3475 BreakReload = false
3476 Knifing = false
3477 delay(S.KnifeCooldown, function()
3478 KnifeReady = true
3479 end)
3480 end
3481 end
3482
3483 if Key == S.LethalGrenadeKey and S.Throwables then
3484 if (not Knifing) and (not Running) and (not Aimed) and (not Aiming) and (not ThrowingGrenade) then
3485 if LethalGrenades.Value > 0 then
3486 LethalGrenades.Value = LethalGrenades.Value - 1
3487 ThrowingGrenade = true
3488 ThrowGrenade(1)
3489 ThrowingGrenade = false
3490 end
3491 end
3492 end
3493
3494 if Key == S.TacticalGrenadeKey and S.Throwables then
3495 if (not Knifing) and (not Running) and (not Aimed) and (not Aiming) and (not ThrowingGrenade) then
3496 if TacticalGrenades.Value > 0 then
3497 TacticalGrenades.Value = TacticalGrenades.Value - 1
3498 ThrowingGrenade = true
3499 ThrowGrenade(2)
3500 ThrowingGrenade = false
3501 end
3502 end
3503 end
3504
3505 if Key == S.SprintKey then
3506 Run_Key_Pressed = true
3507 if Aimed and (not Aiming) then
3508 TakingBreath = false
3509 SteadyCamera()
3510 end
3511 if CanRun then
3512 if (not Idleing) and Walking and (not Running) and (not Knifing) and (not ThrowingGrenade) then
3513 if Reloading then BreakReload = true end
3514 MonitorStamina()
3515 end
3516 end
3517 end
3518end
3519
3520function KeyUp(K)
3521 local Key = string.lower(K)
3522
3523 if Key == S.ADSKey then
3524 if S.HoldMouseOrKeyToADS then
3525 if (not AimingOut) and Aimed then
3526 AimingOut = true
3527 UnAimGun()
3528 AimingOut = false
3529 end
3530 end
3531 end
3532
3533 if Key == S.SprintKey then
3534 Run_Key_Pressed = false
3535 Running = false
3536 if (not ChargingStamina) then
3537 RechargeStamina()
3538 end
3539 end
3540end
3541
3542--------------------[ END FUNCTIONS ]-------------------------------------------------
3543
3544--------------------------------------------------------------------------------------
3545--------------------[ TOOL SELECTION AND DESELECTION ]--------------------------------
3546--------------------------------------------------------------------------------------
3547
3548function OnEquipped(M_Icon)
3549 wait(math.random(10, 40) / 100)
3550 if Humanoid.Health ~= 0 and (not Selected) and Gun.Parent == Character then
3551 Selected = true
3552
3553 BreakReload = false
3554
3555 --------------------[ FAILSAFE RESETING ]-------------------------------------
3556
3557 for _, GM in pairs(Ignore_Model:GetChildren()) do
3558 if GM.Name == "Gun_Ignore_"..Player.Name then
3559 GM:Destroy()
3560 end
3561 end
3562
3563 for _,c in pairs(Connections) do
3564 c:disconnect()
3565 end
3566
3567 Connections = {}
3568
3569 --------------------[ CREATING IGNORE MODELS ]--------------------------------
3570
3571 Gun_Ignore = Instance.new("Model")
3572 Gun_Ignore.Name = "Gun_Ignore_"..Player.Name
3573 Gun_Ignore.Parent = Ignore_Model
3574
3575 --------------------[ MODIFYING THE PLAYER ]----------------------------------
3576
3577 M_Icon.Icon = "rbxasset://textures\\Blank.png"
3578
3579 Gui_Clone = Main_Gui:Clone()
3580 Gui_Clone.Parent = Player.PlayerGui
3581
3582 SetUpGui()
3583
3584 Shoulders.Right.Part1 = nil
3585 Shoulders.Left.Part1 = nil
3586
3587 PrevNeckCF.C0 = Neck.C0
3588 PrevNeckCF.C1 = Neck.C1
3589
3590 BG = Instance.new("BodyGyro", HRP)
3591 BG.maxTorque = VEC3(HUGE, HUGE, HUGE)
3592 BG.Name = "BG"
3593 BG.P = 1e5
3594 BG.cframe = CF(Torso.CFrame.p, Torso.CFrame.p + Torso.CFrame.lookVector)
3595
3596 local PlayerFolder = Instance.new("Model")
3597 PlayerFolder.Name = "PlayerFolder"
3598 PlayerFolder.Parent = Gun_Ignore
3599
3600 local AnimBase = Instance.new("Part")
3601 AnimBase.Transparency = 1
3602 AnimBase.Name = "AnimBase"
3603 AnimBase.CanCollide = false
3604 AnimBase.FormFactor = Enum.FormFactor.Custom
3605 AnimBase.Size = VEC3(0.2, 0.2, 0.2)
3606 AnimBase.BottomSurface = Enum.SurfaceType.Smooth
3607 AnimBase.TopSurface = Enum.SurfaceType.Smooth
3608 AnimBase.Parent = PlayerFolder
3609
3610 AnimWeld = Instance.new("Weld")
3611 AnimWeld.Part0 = AnimBase
3612 AnimWeld.Part1 = Head
3613 AnimWeld.C0 = CF(0, 1, 0)
3614 AnimWeld.Parent = AnimBase
3615
3616 local ArmBase = Instance.new("Part")
3617 ArmBase.Transparency = 1
3618 ArmBase.Name = "ArmBase"
3619 ArmBase.CanCollide = false
3620 ArmBase.FormFactor = Enum.FormFactor.Custom
3621 ArmBase.Size = VEC3(0.2, 0.2, 0.2)
3622 ArmBase.BottomSurface = Enum.SurfaceType.Smooth
3623 ArmBase.TopSurface = Enum.SurfaceType.Smooth
3624 ArmBase.Parent = PlayerFolder
3625
3626 ABWeld = Instance.new("Weld")
3627 ABWeld.Part0 = ArmBase
3628 ABWeld.Part1 = AnimBase
3629 ABWeld.Parent = ArmBase
3630
3631 local LArmBase = Instance.new("Part")
3632 LArmBase.Transparency = 1
3633 LArmBase.Name = "LArmBase"
3634 LArmBase.CanCollide = false
3635 LArmBase.FormFactor = Enum.FormFactor.Custom
3636 LArmBase.Size = VEC3(0.2, 0.2, 0.2)
3637 LArmBase.BottomSurface = Enum.SurfaceType.Smooth
3638 LArmBase.TopSurface = Enum.SurfaceType.Smooth
3639 LArmBase.Parent = PlayerFolder
3640
3641 local RArmBase = Instance.new("Part")
3642 RArmBase.Transparency = 1
3643 RArmBase.Name = "RArmBase"
3644 RArmBase.CanCollide = false
3645 RArmBase.FormFactor = Enum.FormFactor.Custom
3646 RArmBase.Size = VEC3(0.2, 0.2, 0.2)
3647 RArmBase.BottomSurface = Enum.SurfaceType.Smooth
3648 RArmBase.TopSurface = Enum.SurfaceType.Smooth
3649 RArmBase.Parent = PlayerFolder
3650
3651 LWeld = Instance.new("Weld")
3652 LWeld.Name = "LWeld"
3653 LWeld.Part0 = ArmBase
3654 LWeld.Part1 = LArmBase
3655 LWeld.C0 = ArmC0[1]
3656 LWeld.C1 = S.ArmC1_UnAimed.Left
3657 LWeld.Parent = ArmBase
3658
3659 RWeld = Instance.new("Weld")
3660 RWeld.Name = "RWeld"
3661 RWeld.Part0 = ArmBase
3662 RWeld.Part1 = RArmBase
3663 RWeld.C0 = ArmC0[2]
3664 RWeld.C1 = S.ArmC1_UnAimed.Right
3665 RWeld.Parent = ArmBase
3666
3667 LWeld2 = Instance.new("Weld")
3668 LWeld2.Name = "LWeld"
3669 LWeld2.Part0 = LArmBase
3670 LWeld2.Part1 = LArm
3671 LWeld2.Parent = LArmBase
3672
3673 RWeld2 = Instance.new("Weld")
3674 RWeld2.Name = "RWeld"
3675 RWeld2.Part0 = RArmBase
3676 RWeld2.Part1 = RArm
3677 RWeld2.Parent = RArmBase
3678
3679 if S.PlayerArms then
3680 FakeLArm = LArm:Clone()
3681 FakeLArm.Parent = PlayerFolder
3682 FakeLArm.Transparency = S.FakeArmTransparency
3683 FakeLArm:BreakJoints()
3684
3685 LArm.Transparency = 1
3686
3687 local FakeLWeld = Instance.new("Weld")
3688 FakeLWeld.Part0 = FakeLArm
3689 FakeLWeld.Part1 = LArm
3690 FakeLWeld.Parent = FakeLArm
3691
3692 FakeRArm = RArm:Clone()
3693 FakeRArm.Parent = PlayerFolder
3694 FakeRArm.Transparency = S.FakeArmTransparency
3695 FakeRArm:BreakJoints()
3696
3697 RArm.Transparency = 1
3698
3699 local FakeRWeld = Instance.new("Weld")
3700 FakeRWeld.Part0 = FakeRArm
3701 FakeRWeld.Part1 = RArm
3702 FakeRWeld.Parent = FakeRArm
3703
3704 Instance.new("Humanoid", PlayerFolder)
3705
3706 for _,Obj in pairs(Character:GetChildren()) do
3707 if Obj:IsA("CharacterMesh") or Obj:IsA("Shirt") then
3708 Obj:Clone().Parent = PlayerFolder
3709 end
3710 end
3711 else
3712 local ArmTable = CreateArms()
3713 ArmTable[1].Model.Parent = PlayerFolder
3714 ArmTable[2].Model.Parent = PlayerFolder
3715
3716 FakeLArm = ArmTable[1].ArmPart
3717
3718 LArm.Transparency = 1
3719
3720 local FakeLWeld = Instance.new("Weld")
3721 FakeLWeld.Part0 = FakeLArm
3722 FakeLWeld.Part1 = LArm
3723 FakeLWeld.Parent = FakeLArm
3724
3725 FakeRArm = ArmTable[2].ArmPart
3726
3727 RArm.Transparency = 1
3728
3729 local FakeRWeld = Instance.new("Weld")
3730 FakeRWeld.Part0 = FakeRArm
3731 FakeRWeld.Part1 = RArm
3732 FakeRWeld.Parent = FakeRArm
3733 end
3734
3735 --------------------[ MODIFYING THE GUN ]-------------------------------------
3736
3737 for _, Tab in pairs(Parts) do
3738 local Weld = Instance.new("Weld")
3739 Weld.Name = "MainWeld"
3740 Weld.Part0 = Handle
3741 Weld.Part1 = Tab.Obj
3742 Weld.C0 = Tab.Obj.WeldCF.Value
3743 Weld.Parent = Handle
3744 Tab.Weld = Weld
3745 end
3746
3747 Grip = RArm:WaitForChild("RightGrip")
3748
3749 local HandleCF = ArmBase.CFrame * ArmC0[2] * S.ArmC1_Aimed.Right:inverse() * CF(0, -1, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
3750 local HandleOffset = AimPart.CFrame:toObjectSpace(Handle.CFrame)
3751 Aimed_GripCF = (Head.CFrame * HandleOffset):toObjectSpace(HandleCF)
3752
3753 --------------------[ CONNECTIONS ]-------------------------------------------
3754
3755 INSERT(Connections, Humanoid.Died:connect(function()
3756 OnUnequipped(true)
3757 end))
3758
3759 INSERT(Connections, M2.Button1Down:connect(function()
3760 MB1_Down = true
3761 if S.GunType.Auto and (not S.GunType.Semi) and (not S.GunType.Burst) then
3762 if (not CanFire) then return end
3763 CanFire = false
3764 if (not Running) and (not Knifing) and (not ThrowingGrenade) then
3765 CurrentSpread = (
3766 Aimed and S.Spread.Aimed or
3767 ((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
3768 )
3769 while MB1_Down and (not Reloading) do
3770 if Knifing and (not ThrowingGrenade) then break end
3771 if Running then break end
3772 if Ammo.Value > 0 then
3773 Ammo.Value = Ammo.Value - 1
3774 if Humanoid.Health ~= 0 then
3775 if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
3776 Run_Key_Pressed = false
3777 CurrentSteadyTime = 0
3778 end
3779 Fire_Gun()
3780 end
3781 end
3782 if Ammo.Value == 0 and S.AutoReload then
3783 wait(0.2)
3784 Reload()
3785 end
3786 wait(60 / S.FireRate)
3787 end
3788 end
3789 CanFire = true
3790 elseif (not S.GunType.Auto) and S.GunType.Burst then
3791 if (not CanFire) then return end
3792 CanFire = false
3793 if (not Running) and (not Knifing) and (not ThrowingGrenade) then
3794 CurrentSpread = (
3795 Aimed and S.Spread.Aimed or
3796 ((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
3797 )
3798 for i = 1, S.BurstAmount do
3799 if Ammo.Value > 0 then
3800 Ammo.Value = Ammo.Value - 1
3801 if Humanoid.Health ~= 0 then
3802 if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
3803 Run_Key_Pressed = false
3804 CurrentSteadyTime = 0
3805 end
3806 Fire_Gun()
3807 end
3808 end
3809 if Ammo.Value == 0 and S.AutoReload then
3810 wait(0.2)
3811 Reload()
3812 break
3813 end
3814 wait(S.BurstTime / S.BurstAmount)
3815 end
3816 end
3817 wait(S.BurstWait)
3818 CanFire = true
3819 elseif (not S.GunType.Auto) and S.GunType.Semi then
3820 if (not CanFire) then return end
3821 CanFire = false
3822 if (not Running) and (not Knifing) and (not ThrowingGrenade) then
3823 CurrentSpread = (
3824 Aimed and S.Spread.Aimed or
3825 ((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
3826 )
3827 if Ammo.Value > 0 then
3828 Ammo.Value = Ammo.Value - 1
3829 if Humanoid.Health ~= 0 then
3830 if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
3831 Run_Key_Pressed = false
3832 CurrentSteadyTime = 0
3833 end
3834 Fire_Gun()
3835 end
3836 end
3837 if Ammo.Value == 0 and S.AutoReload then
3838 wait(0.2)
3839 Reload()
3840 end
3841 wait(60 / S.FireRate)
3842 end
3843 CanFire = true
3844 elseif (not S.GunType.Auto) and (not S.GunType.Semi) and (not S.GunType.Burst) and S.GunType.Shot then
3845 if (not CanFire) then return end
3846 CanFire = false
3847 if (not Running) and (not Knifing) and (not ThrowingGrenade) then
3848 CurrentSpread = (
3849 Aimed and S.Spread.Aimed or
3850 ((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
3851 )
3852 if Ammo.Value > 0 then
3853 Ammo.Value = Ammo.Value - 1
3854 if Humanoid.Health ~= 0 then
3855 if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
3856 Run_Key_Pressed = false
3857 CurrentSteadyTime = 0
3858 end
3859 Fire_Gun()
3860 end
3861 end
3862 if Ammo.Value == 0 and S.AutoReload then
3863 wait(0.2)
3864 Reload()
3865 end
3866 wait(60 / S.FireRate)
3867 end
3868 CanFire = true
3869 elseif (not S.GunType.Auto) and (not S.GunType.Semi) and S.GunType.Burst and (not S.GunType.Shot) then
3870 if (not CanFire) then return end
3871 CanFire = false
3872 if (not Running) and (not Knifing) and (not ThrowingGrenade) then
3873 CurrentSpread = (
3874 Aimed and S.Spread.Aimed or
3875 ((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
3876 )
3877 for i = 1, S.BurstAmount do
3878 if Ammo.Value > 0 then
3879 Ammo.Value = Ammo.Value - 1
3880 if Humanoid.Health ~= 0 then
3881 if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
3882 Run_Key_Pressed = false
3883 CurrentSteadyTime = 0
3884 end
3885 Fire_Gun()
3886 end
3887 end
3888 if Ammo.Value == 0 and S.AutoReload then
3889 wait(0.2)
3890 Reload()
3891 break
3892 end
3893 wait(S.BurstTime / S.BurstAmount)
3894 end
3895 end
3896 wait(S.BurstWait)
3897 CanFire = true
3898 elseif (not S.GunType.Auto) and (not S.GunType.Burst) and (not S.GunType.Shot) and S.GunType.Explosive then
3899 if (not CanFire) then return end
3900 CanFire = false
3901 if (not Running) and (not Knifing) and (not ThrowingGrenade) then
3902 CurrentSpread = (
3903 Aimed and S.Spread.Aimed or
3904 ((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
3905 )
3906 if Ammo.Value > 0 then
3907 Ammo.Value = Ammo.Value - 1
3908 if Humanoid.Health ~= 0 then
3909 if Aimed and Run_Key_Pressed and S.UnSteadyOnFire then
3910 Run_Key_Pressed = false
3911 CurrentSteadyTime = 0
3912 end
3913 Fire_Gun()
3914 end
3915 end
3916 if Ammo.Value == 0 and S.AutoReload then
3917 wait(0.2)
3918 Reload()
3919 end
3920 wait(60 / S.FireRate)
3921 end
3922 CanFire = true
3923 end
3924 end))
3925
3926 INSERT(Connections, M2.Button1Up:connect(function()
3927 MB1_Down = false
3928 CurrentSpread = (
3929 Aimed and S.Spread.Aimed or
3930 ((Idleing and (not Walking)) and S.Spread.Hipfire or S.Spread.Walking)
3931 )
3932 end))
3933
3934 INSERT(Connections, M2.Button2Down:connect(function()
3935 if S.HoldMouseOrKeyToADS then
3936 if (not AimingIn) and (not Aimed) then
3937 AimingIn = true
3938 AimGun()
3939 AimingIn = false
3940 end
3941 else
3942 if Aimed then
3943 UnAimGun()
3944 else
3945 AimGun()
3946 end
3947 end
3948 end))
3949
3950 INSERT(Connections, M2.Button2Up:connect(function()
3951 if S.HoldMouseOrKeyToADS then
3952 if (not AimingOut) and Aimed then
3953 AimingOut = true
3954 UnAimGun()
3955 AimingOut = false
3956 end
3957 end
3958 end))
3959
3960 INSERT(Connections, M2.KeyDown:connect(KeyDown))
3961
3962 INSERT(Connections, M2.KeyUp:connect(KeyUp))
3963
3964 INSERT(Connections, RS:connect(function()
3965 local CrossHair = Gui_Clone:WaitForChild("CrossHair")
3966 local HitMarker = Gui_Clone:WaitForChild("HitMarker")
3967 local HUD = Gui_Clone:WaitForChild("HUD")
3968
3969 CrossHair.Position = UDim2.new(0, M2.X, 0, M2.Y)
3970 HitMarker.Position = UDim2.new(0, M2.X - 13, 0, M2.Y - 13)
3971
3972 local Clip_Ammo_L = HUD:WaitForChild("Ammo"):WaitForChild("Clip")
3973 local Stored_Ammo_L = HUD:WaitForChild("Ammo"):WaitForChild("Stored")
3974 Clip_Ammo_L.Text = Ammo.Value
3975 Clip_Ammo_L.TextColor3 = (Ammo.Value <= (ClipSize.Value / 3) and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))
3976 Stored_Ammo_L.Text = StoredAmmo.Value
3977 Stored_Ammo_L.TextColor3 = (StoredAmmo.Value <= (ClipSize.Value * 2) and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))
3978
3979 local Lethal_Grenade_Num_L = HUD:WaitForChild("Grenades"):WaitForChild("Lethals"):WaitForChild("Num")
3980 Lethal_Grenade_Num_L.Text = LethalGrenades.Value
3981 Lethal_Grenade_Num_L.TextColor3 = (LethalGrenades.Value < 3 and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))
3982
3983 local Tactical_Grenade_Num_L = HUD:WaitForChild("Grenades"):WaitForChild("Tacticals"):WaitForChild("Num")
3984 Tactical_Grenade_Num_L.Text = TacticalGrenades.Value
3985 Tactical_Grenade_Num_L.TextColor3 = (TacticalGrenades.Value < 3 and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))
3986
3987 local Mode = HUD:WaitForChild("Mode"):WaitForChild("Main")
3988 if S.GunType.Auto
3989 and (not S.GunType.Semi)
3990 and (not S.GunType.Burst)
3991 and (not S.GunType.Explosive) then
3992
3993 Mode.Text = "Auto"
3994
3995 elseif (not S.GunType.Auto)
3996 and S.GunType.Burst
3997 and (not S.GunType.Explosive) then
3998
3999 Mode.Text = "Burst"
4000
4001 elseif (not S.GunType.Auto)
4002 and S.GunType.Semi
4003 and (not S.GunType.Explosive) then
4004
4005 Mode.Text = "Semi"
4006
4007 elseif (not S.GunType.Auto)
4008 and (not S.GunType.Semi)
4009 and (not S.GunType.Burst)
4010 and S.GunType.Shot
4011 and (not S.GunType.Explosive) then
4012
4013 Mode.Text = "Shotgun"
4014
4015 elseif (not S.GunType.Auto)
4016 and (not S.GunType.Semi)
4017 and S.GunType.Burst
4018 and (not S.GunType.Shot)
4019 and (not S.GunType.Explosive) then
4020
4021 Mode.Text = "Burst"
4022
4023 elseif S.GunType.Explosive then
4024
4025 Mode.Text = "Explosive"
4026
4027 end
4028
4029 if tick() - LastBeat > (Humanoid.Health / 75) then
4030 LastBeat = tick()
4031 HUD.Health.Tray.Beat:TweenPosition(
4032 UDim2.new(0, -21, 0, 0),
4033 Enum.EasingDirection.Out,
4034 Enum.EasingStyle.Linear,
4035 0.7 - ((100 - Humanoid.Health) / 400),
4036 false,
4037 function()
4038 HUD.Health.Tray.Beat.Position = UDim2.new(1, 0, 0, 0)
4039 end
4040 )
4041 end
4042
4043 HUD.Health.Num.Text = CEIL(Humanoid.Health).."%"
4044 HUD.Health.Num.TextColor3 = (
4045 (Humanoid.Health > 200 / 3) and Color3.new(1, 1, 1) or
4046 (Humanoid.Health <= 200 / 3 and Humanoid.Health > 100 / 3) and Color3.new(1, 1, 0) or
4047 (Humanoid.Health <= 100 / 3) and Color3.new(1, 0, 0)
4048 )
4049 end))
4050
4051 INSERT(Connections, RS:connect(function()
4052 local MDir = M2.UnitRay.Direction.unit
4053
4054 local HRPCF = HRP.CFrame * CF(0, 1.5, 0) * CF(Humanoid.CameraOffset)
4055 Neck.C0 = Torso.CFrame:toObjectSpace(HRPCF)
4056
4057 if MDir.y == MDir.y then
4058 HeadRot = -math.asin(MDir.y)
4059 Neck.C1 = CFANG(HeadRot,0,0)
4060
4061 local RotTarget = VEC3(MDir.x,0,MDir.z)
4062 local Rotation = CF(Torso.Position,Torso.Position + RotTarget)
4063 BG.cframe = Rotation
4064
4065 local MouseX = FLOOR((M2.X - M2.ViewSizeX / 2) + 0.5)
4066 local MouseY = FLOOR((M2.Y - M2.ViewSizeY / 2) + 0.5)
4067 local AppliedMaxTorque = nil
4068 if (Camera.CoordinateFrame.p - Head.Position).magnitude < 0.6 then
4069 if (MouseX >= 50 or MouseX <= -50)
4070 or (MouseY >= 50 or MouseY <= -50) then
4071 AppliedMaxTorque = VEC3()
4072 else
4073 AppliedMaxTorque = VEC3(HUGE,HUGE,HUGE)
4074 end
4075 else
4076 AppliedMaxTorque = VEC3(HUGE,HUGE,HUGE)
4077 end
4078 if (not S.RotateWhileSitting) and Humanoid.Sit then
4079 AppliedMaxTorque = VEC3()
4080 end
4081 BG.maxTorque = AppliedMaxTorque
4082 end
4083 end))
4084
4085 INSERT(Connections, RS:connect(function()
4086 local Forward = (Keys["w"] or Keys[string.char(17)])
4087 local Backward = (Keys["s"] or Keys[string.char(18)])
4088 local Right = (Keys["d"] or Keys[string.char(19)])
4089 local Left = (Keys["a"] or Keys[string.char(20)])
4090
4091 local WalkingForward = (Forward and (not Backward))
4092 local WalkingBackward = ((not Forward) and Backward)
4093 local WalkingRight = (Right and (not Left))
4094 local WalkingLeft = ((not Right) and Left)
4095
4096 ArmTilt = (
4097 ((WalkingForward or WalkingBackward) and WalkingRight) and 5 or
4098 ((WalkingForward or WalkingBackward) and WalkingLeft) and -5 or
4099 ((not (WalkingForward and WalkingBackward)) and WalkingRight) and 10 or
4100 ((not (WalkingForward and WalkingBackward)) and WalkingLeft) and -10 or 0
4101 )
4102 end))
4103
4104 INSERT(Connections, RS:connect(function()
4105 if (not Idleing) and Walking then
4106 if Running then
4107 Humanoid.WalkSpeed = S.SprintSpeed
4108 else
4109 local SpeedRatio = (S.AimedWalkSpeed / S.BaseWalkSpeed)
4110 if Stance == 0 then
4111 Humanoid.WalkSpeed = (Aimed and S.AimedWalkSpeed or S.BaseWalkSpeed)
4112 elseif Stance == 1 then
4113 Humanoid.WalkSpeed = (Aimed and S.CrouchWalkSpeed * SpeedRatio or S.CrouchWalkSpeed)
4114 elseif Stance == 2 then
4115 Humanoid.WalkSpeed = (Aimed and S.ProneWalkSpeed * SpeedRatio or S.ProneWalkSpeed)
4116 end
4117 end
4118 else
4119 Humanoid.WalkSpeed = 16
4120 end
4121
4122 StanceSway = 1 - (0.25 * Stance)
4123 end))
4124
4125 --------------------[ ANIMATE GUN ]-------------------------------------------
4126
4127 Animate()
4128 end
4129end
4130
4131
4132function OnUnequipped(DeleteTool)
4133 if Selected then
4134 Selected = false
4135
4136 BreakReload = true
4137
4138 --------------------[ MODIFYING THE PLAYER ]----------------------------------
4139
4140 Camera.FieldOfView = 70
4141
4142 game:GetService("UserInputService").MouseIconEnabled = true
4143
4144 Gui_Clone:Destroy()
4145 BG:Destroy()
4146
4147 RArm.Transparency = 0
4148 LArm.Transparency = 0
4149
4150 Shoulders.Right.Part1 = RArm
4151 Shoulders.Left.Part1 = LArm
4152
4153 Neck.C0 = PrevNeckCF.C0
4154 Neck.C1 = PrevNeckCF.C1
4155
4156 Humanoid.WalkSpeed = 16
4157
4158 --------------------[ RESETING THE TOOL ]-------------------------------------
4159
4160 Gun_Ignore:Destroy()
4161
4162 Aimed = false
4163
4164 for _, Tab in pairs(Parts) do
4165 Tab.Weld:Destroy()
4166 Tab.Weld = nil
4167 end
4168
4169 for _,c in pairs(Connections) do
4170 c:disconnect()
4171 end
4172
4173 Connections = {}
4174
4175 if DeleteTool then
4176 Camera:ClearAllChildren()
4177 Gun:Destroy()
4178 end
4179
4180 if S.StandOnDeselect and Stance ~= 0 then Stand(true) end
4181 end
4182end
4183
4184Gun.Equipped:connect(OnEquipped)
4185Gun.Unequipped:connect(function() OnUnequipped(false) end)
4186
4187--------------------------------------------------------------------------------------
4188--------------------[ END PROGRAM ]---------------------------------------------------
4189--------------------------------------------------------------------------------------
4190end))
4191IntValue18.Name = "Ignore_Code"
4192IntValue18.Parent = LocalScript17
4193ScreenGui19.Name = "Main_Gui"
4194ScreenGui19.Parent = LocalScript17
4195ImageLabel20.Name = "HitMarker"
4196ImageLabel20.Parent = ScreenGui19
4197ImageLabel20.Transparency = 1
4198ImageLabel20.Size = UDim2.new(0, 26, 0, 26)
4199ImageLabel20.Position = UDim2.new(0.5, -13, 0.5, -13)
4200ImageLabel20.Visible = false
4201ImageLabel20.BackgroundTransparency = 1
4202ImageLabel20.ZIndex = 10
4203ImageLabel20.Image = "http://www.roblox.com/asset/?id=121173757"
4204Frame21.Name = "CrossHair"
4205Frame21.Parent = ScreenGui19
4206Frame21.Position = UDim2.new(0.5, 0, 0.5, 0)
4207Frame21.BackgroundColor3 = Color3.new(1, 1, 1)
4208Frame21.BorderColor3 = Color3.new(0, 0, 0)
4209Frame21.BorderSizePixel = 0
4210ImageLabel22.Parent = Frame21
4211ImageLabel22.Transparency = 1
4212ImageLabel22.Size = UDim2.new(0, 300, 0, 300)
4213ImageLabel22.Position = UDim2.new(0, -150, 0, -150)
4214ImageLabel22.Visible = false
4215ImageLabel22.BackgroundColor3 = Color3.new(1, 1, 1)
4216ImageLabel22.BackgroundTransparency = 1
4217ImageLabel22.ZIndex = 2
4218ImageLabel22.Image = "http://www.roblox.com/asset/?id=68308747"
4219Frame23.Name = "Box"
4220Frame23.Parent = Frame21
4221Frame23.Transparency = 1
4222Frame23.Size = UDim2.new(0, 70, 0, 70)
4223Frame23.Position = UDim2.new(0, -35, 0, -35)
4224Frame23.BackgroundColor3 = Color3.new(1, 1, 1)
4225Frame23.BackgroundTransparency = 1
4226Frame23.ClipsDescendants = true
4227TextLabel24.Name = "Line"
4228TextLabel24.Parent = Frame23
4229TextLabel24.Size = UDim2.new(0, 2, 0, 25)
4230TextLabel24.Text = ""
4231TextLabel24.Position = UDim2.new(0.5, -1, 1, -25)
4232TextLabel24.BackgroundColor3 = Color3.new(1, 1, 1)
4233TextLabel24.BorderColor3 = Color3.new(0, 0, 0)
4234TextLabel24.BorderSizePixel = 0
4235TextLabel24.Font = Enum.Font.SourceSans
4236TextLabel24.FontSize = Enum.FontSize.Size14
4237TextLabel25.Name = "Line"
4238TextLabel25.Parent = Frame23
4239TextLabel25.Size = UDim2.new(0, 2, 0, 25)
4240TextLabel25.Text = ""
4241TextLabel25.Position = UDim2.new(0.5, -1, 0, 0)
4242TextLabel25.BackgroundColor3 = Color3.new(1, 1, 1)
4243TextLabel25.BorderColor3 = Color3.new(0, 0, 0)
4244TextLabel25.BorderSizePixel = 0
4245TextLabel25.Font = Enum.Font.SourceSans
4246TextLabel25.FontSize = Enum.FontSize.Size14
4247TextLabel26.Name = "Line"
4248TextLabel26.Parent = Frame23
4249TextLabel26.Size = UDim2.new(0, 25, 0, 2)
4250TextLabel26.Text = ""
4251TextLabel26.Position = UDim2.new(1, -25, 0.5, -1)
4252TextLabel26.BackgroundColor3 = Color3.new(1, 1, 1)
4253TextLabel26.BorderColor3 = Color3.new(0, 0, 0)
4254TextLabel26.BorderSizePixel = 0
4255TextLabel26.Font = Enum.Font.SourceSans
4256TextLabel26.FontSize = Enum.FontSize.Size14
4257TextLabel27.Name = "Line"
4258TextLabel27.Parent = Frame23
4259TextLabel27.Size = UDim2.new(0, 25, 0, 2)
4260TextLabel27.Text = ""
4261TextLabel27.Position = UDim2.new(0, 0, 0.5, -1)
4262TextLabel27.BackgroundColor3 = Color3.new(1, 1, 1)
4263TextLabel27.BorderColor3 = Color3.new(0, 0, 0)
4264TextLabel27.BorderSizePixel = 0
4265TextLabel27.Font = Enum.Font.SourceSans
4266TextLabel27.FontSize = Enum.FontSize.Size14
4267TextLabel28.Name = "Reload"
4268TextLabel28.Parent = Frame21
4269TextLabel28.Transparency = 1
4270TextLabel28.Size = UDim2.new(0, 100, 0, 20)
4271TextLabel28.Text = "Reloading..."
4272TextLabel28.Position = UDim2.new(0, -50, 0, 70)
4273TextLabel28.Visible = false
4274TextLabel28.BackgroundColor3 = Color3.new(1, 1, 1)
4275TextLabel28.BackgroundTransparency = 1
4276TextLabel28.ZIndex = 2
4277TextLabel28.Font = Enum.Font.ArialBold
4278TextLabel28.FontSize = Enum.FontSize.Size18
4279TextLabel28.TextColor3 = Color3.new(1, 1, 1)
4280TextLabel28.TextStrokeTransparency = 0.5
4281Frame29.Name = "HUD"
4282Frame29.Parent = ScreenGui19
4283Frame29.Transparency = 0.30000001192093
4284Frame29.Size = UDim2.new(0, 175, 0, 75)
4285Frame29.Position = UDim2.new(1, -200, 1, -125)
4286Frame29.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
4287Frame29.BackgroundTransparency = 0.30000001192093
4288Frame29.BorderColor3 = Color3.new(0.156863, 0.156863, 0.156863)
4289Frame29.BorderSizePixel = 5
4290Frame30.Name = "Ammo"
4291Frame30.Parent = Frame29
4292Frame30.Transparency = 1
4293Frame30.Size = UDim2.new(0, 175, 0, 50)
4294Frame30.BackgroundTransparency = 1
4295TextLabel31.Name = "Slash"
4296TextLabel31.Parent = Frame30
4297TextLabel31.Transparency = 1
4298TextLabel31.Size = UDim2.new(0, 10, 0, 30)
4299TextLabel31.Text = "/"
4300TextLabel31.Position = UDim2.new(0, 95, 0, 0)
4301TextLabel31.BackgroundTransparency = 1
4302TextLabel31.ZIndex = 10
4303TextLabel31.Font = Enum.Font.ArialBold
4304TextLabel31.FontSize = Enum.FontSize.Size36
4305TextLabel31.TextColor3 = Color3.new(1, 1, 1)
4306TextLabel32.Name = "Stored"
4307TextLabel32.Parent = Frame30
4308TextLabel32.Transparency = 1
4309TextLabel32.Size = UDim2.new(0, 55, 0, 30)
4310TextLabel32.Text = "124"
4311TextLabel32.Position = UDim2.new(0, 115, 0, 0)
4312TextLabel32.BackgroundTransparency = 1
4313TextLabel32.ZIndex = 10
4314TextLabel32.Font = Enum.Font.Arial
4315TextLabel32.FontSize = Enum.FontSize.Size36
4316TextLabel32.TextColor3 = Color3.new(1, 1, 1)
4317TextLabel32.TextXAlignment = Enum.TextXAlignment.Left
4318TextLabel33.Name = "Background"
4319TextLabel33.Parent = TextLabel32
4320TextLabel33.Transparency = 1
4321TextLabel33.Size = UDim2.new(1, 0, 1, 0)
4322TextLabel33.Text = "000"
4323TextLabel33.BackgroundTransparency = 1
4324TextLabel33.ZIndex = 10
4325TextLabel33.Font = Enum.Font.Arial
4326TextLabel33.FontSize = Enum.FontSize.Size36
4327TextLabel33.TextColor3 = Color3.new(0.588235, 0.588235, 0.588235)
4328TextLabel33.TextTransparency = 0.80000001192093
4329TextLabel33.TextWrapped = true
4330TextLabel33.TextXAlignment = Enum.TextXAlignment.Left
4331TextLabel34.Name = "Clip"
4332TextLabel34.Parent = Frame30
4333TextLabel34.Transparency = 1
4334TextLabel34.Size = UDim2.new(0, 85, 0, 50)
4335TextLabel34.Text = "100"
4336TextLabel34.BackgroundTransparency = 1
4337TextLabel34.ZIndex = 10
4338TextLabel34.FontSize = Enum.FontSize.Size36
4339TextLabel34.TextColor3 = Color3.new(1, 1, 1)
4340TextLabel34.TextXAlignment = Enum.TextXAlignment.Right
4341TextLabel35.Name = "Background"
4342TextLabel35.Parent = TextLabel34
4343TextLabel35.Transparency = 1
4344TextLabel35.Size = UDim2.new(1, 0, 1, 0)
4345TextLabel35.Text = "000"
4346TextLabel35.BackgroundTransparency = 1
4347TextLabel35.ZIndex = 10
4348TextLabel35.FontSize = Enum.FontSize.Size36
4349TextLabel35.TextColor3 = Color3.new(0.588235, 0.588235, 0.588235)
4350TextLabel35.TextTransparency = 0.80000001192093
4351TextLabel35.TextXAlignment = Enum.TextXAlignment.Right
4352Frame36.Name = "Mode"
4353Frame36.Parent = Frame29
4354Frame36.Transparency = 1
4355Frame36.Size = UDim2.new(0, 80, 0, 20)
4356Frame36.Position = UDim2.new(0, 95, 0, 27)
4357Frame36.BackgroundColor3 = Color3.new(1, 1, 1)
4358Frame36.BackgroundTransparency = 1
4359TextLabel37.Name = "Bracket"
4360TextLabel37.Parent = Frame36
4361TextLabel37.Transparency = 1
4362TextLabel37.Size = UDim2.new(0, 5, 0, 20)
4363TextLabel37.Text = "["
4364TextLabel37.BackgroundTransparency = 1
4365TextLabel37.ZIndex = 10
4366TextLabel37.Font = Enum.Font.ArialBold
4367TextLabel37.FontSize = Enum.FontSize.Size18
4368TextLabel37.TextColor3 = Color3.new(1, 1, 1)
4369TextLabel37.TextWrapped = true
4370TextLabel37.TextXAlignment = Enum.TextXAlignment.Left
4371TextLabel38.Name = "Bracket"
4372TextLabel38.Parent = Frame36
4373TextLabel38.Transparency = 1
4374TextLabel38.Size = UDim2.new(0, 5, 0, 20)
4375TextLabel38.Text = "]"
4376TextLabel38.Position = UDim2.new(1, -5, 0, 0)
4377TextLabel38.BackgroundTransparency = 1
4378TextLabel38.ZIndex = 10
4379TextLabel38.Font = Enum.Font.ArialBold
4380TextLabel38.FontSize = Enum.FontSize.Size18
4381TextLabel38.TextColor3 = Color3.new(1, 1, 1)
4382TextLabel38.TextWrapped = true
4383TextLabel38.TextXAlignment = Enum.TextXAlignment.Left
4384TextLabel39.Name = "Main"
4385TextLabel39.Parent = Frame36
4386TextLabel39.Transparency = 1
4387TextLabel39.Size = UDim2.new(1, 0, 0, 20)
4388TextLabel39.Text = "Auto"
4389TextLabel39.BackgroundTransparency = 1
4390TextLabel39.ZIndex = 10
4391TextLabel39.Font = Enum.Font.SourceSansBold
4392TextLabel39.FontSize = Enum.FontSize.Size18
4393TextLabel39.TextColor3 = Color3.new(1, 1, 1)
4394TextLabel39.TextWrapped = true
4395Frame40.Name = "Health"
4396Frame40.Parent = Frame29
4397Frame40.Transparency = 0.30000001192093
4398Frame40.Size = UDim2.new(1, 0, 0, 25)
4399Frame40.Position = UDim2.new(0, 0, 0, -40)
4400Frame40.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
4401Frame40.BackgroundTransparency = 0.30000001192093
4402Frame40.BorderColor3 = Color3.new(0.156863, 0.156863, 0.156863)
4403Frame40.BorderSizePixel = 5
4404TextLabel41.Name = "Num"
4405TextLabel41.Parent = Frame40
4406TextLabel41.Transparency = 1
4407TextLabel41.Size = UDim2.new(0, 50, 1, 0)
4408TextLabel41.Text = "100%"
4409TextLabel41.Position = UDim2.new(1, -50, 0, 0)
4410TextLabel41.BackgroundColor3 = Color3.new(0, 0, 0)
4411TextLabel41.BackgroundTransparency = 1
4412TextLabel41.BorderColor3 = Color3.new(0, 0, 0)
4413TextLabel41.BorderSizePixel = 0
4414TextLabel41.ZIndex = 10
4415TextLabel41.Font = Enum.Font.ArialBold
4416TextLabel41.FontSize = Enum.FontSize.Size24
4417TextLabel41.TextColor3 = Color3.new(1, 1, 1)
4418TextLabel41.TextXAlignment = Enum.TextXAlignment.Right
4419Frame42.Name = "Tray"
4420Frame42.Parent = Frame40
4421Frame42.Transparency = 1
4422Frame42.Size = UDim2.new(1, -60, 0, 20)
4423Frame42.Position = UDim2.new(0, 2, 0.5, -10)
4424Frame42.BackgroundColor3 = Color3.new(0, 0, 0)
4425Frame42.BackgroundTransparency = 1
4426Frame42.BorderColor3 = Color3.new(0, 0, 0)
4427Frame42.BorderSizePixel = 0
4428Frame42.ZIndex = 10
4429Frame42.ClipsDescendants = true
4430Frame43.Name = "Beat"
4431Frame43.Parent = Frame42
4432Frame43.Transparency = 1
4433Frame43.Size = UDim2.new(0, 21, 1, 0)
4434Frame43.Position = UDim2.new(1, 0, 0, 0)
4435Frame43.BackgroundColor3 = Color3.new(0, 0, 0)
4436Frame43.BackgroundTransparency = 1
4437Frame43.BorderColor3 = Color3.new(0, 0, 0)
4438Frame43.BorderSizePixel = 0
4439Frame43.ZIndex = 10
4440Frame44.Name = "00"
4441Frame44.Parent = Frame43
4442Frame44.Size = UDim2.new(0.0476190485, 0, 0, 3)
4443Frame44.Position = UDim2.new(0, 0, 0.5, -2)
4444Frame44.BackgroundColor3 = Color3.new(1, 1, 1)
4445Frame44.BorderColor3 = Color3.new(0, 0, 0)
4446Frame44.BorderSizePixel = 0
4447Frame44.ZIndex = 10
4448Frame45.Name = "01"
4449Frame45.Parent = Frame43
4450Frame45.Size = UDim2.new(0.0476190485, 0, 0, 4)
4451Frame45.Position = UDim2.new(0.0476190485, 0, 0.423076928, -2)
4452Frame45.BackgroundColor3 = Color3.new(1, 1, 1)
4453Frame45.BorderColor3 = Color3.new(0, 0, 0)
4454Frame45.BorderSizePixel = 0
4455Frame45.ZIndex = 10
4456Frame46.Name = "02"
4457Frame46.Parent = Frame43
4458Frame46.Size = UDim2.new(0.0476190485, 0, 0, 4)
4459Frame46.Position = UDim2.new(0.095238097, 0, 0.346153855, -2)
4460Frame46.BackgroundColor3 = Color3.new(1, 1, 1)
4461Frame46.BorderColor3 = Color3.new(0, 0, 0)
4462Frame46.BorderSizePixel = 0
4463Frame46.ZIndex = 10
4464Frame47.Name = "03"
4465Frame47.Parent = Frame43
4466Frame47.Size = UDim2.new(0.0476190485, 0, 0, 4)
4467Frame47.Position = UDim2.new(0.142857149, 0, 0.269230783, -2)
4468Frame47.BackgroundColor3 = Color3.new(1, 1, 1)
4469Frame47.BorderColor3 = Color3.new(0, 0, 0)
4470Frame47.BorderSizePixel = 0
4471Frame47.ZIndex = 10
4472Frame48.Name = "04"
4473Frame48.Parent = Frame43
4474Frame48.Size = UDim2.new(0.0476190485, 0, 0, 4)
4475Frame48.Position = UDim2.new(0.190476194, 0, 0.192307696, -2)
4476Frame48.BackgroundColor3 = Color3.new(1, 1, 1)
4477Frame48.BorderColor3 = Color3.new(0, 0, 0)
4478Frame48.BorderSizePixel = 0
4479Frame48.ZIndex = 10
4480Frame49.Name = "05"
4481Frame49.Parent = Frame43
4482Frame49.Size = UDim2.new(0.0476190485, 0, 0, 4)
4483Frame49.Position = UDim2.new(0.238095239, 0, 0.115384616, -2)
4484Frame49.BackgroundColor3 = Color3.new(1, 1, 1)
4485Frame49.BorderColor3 = Color3.new(0, 0, 0)
4486Frame49.BorderSizePixel = 0
4487Frame49.ZIndex = 10
4488Frame50.Name = "06"
4489Frame50.Parent = Frame43
4490Frame50.Size = UDim2.new(0.0476190485, 0, 0, 4)
4491Frame50.Position = UDim2.new(0.285714298, 0, 0.0384615399, -2)
4492Frame50.BackgroundColor3 = Color3.new(1, 1, 1)
4493Frame50.BorderColor3 = Color3.new(0, 0, 0)
4494Frame50.BorderSizePixel = 0
4495Frame50.ZIndex = 10
4496Frame51.Name = "07"
4497Frame51.Parent = Frame43
4498Frame51.Size = UDim2.new(0.0476190485, 0, 0, 4)
4499Frame51.Position = UDim2.new(0.333333343, 0, 0, -2)
4500Frame51.BackgroundColor3 = Color3.new(1, 1, 1)
4501Frame51.BorderColor3 = Color3.new(0, 0, 0)
4502Frame51.BorderSizePixel = 0
4503Frame51.ZIndex = 10
4504Frame52.Name = "08"
4505Frame52.Parent = Frame43
4506Frame52.Size = UDim2.new(0.0476190485, 0, 0, 4)
4507Frame52.Position = UDim2.new(0.380952388, 0, 0.142857149, -2)
4508Frame52.BackgroundColor3 = Color3.new(1, 1, 1)
4509Frame52.BorderColor3 = Color3.new(0, 0, 0)
4510Frame52.BorderSizePixel = 0
4511Frame52.ZIndex = 10
4512Frame53.Name = "09"
4513Frame53.Parent = Frame43
4514Frame53.Size = UDim2.new(0.0476190485, 0, 0, 4)
4515Frame53.Position = UDim2.new(0.428571433, 0, 0.285714298, -2)
4516Frame53.BackgroundColor3 = Color3.new(1, 1, 1)
4517Frame53.BorderColor3 = Color3.new(0, 0, 0)
4518Frame53.BorderSizePixel = 0
4519Frame53.ZIndex = 10
4520Frame54.Name = "10"
4521Frame54.Parent = Frame43
4522Frame54.Size = UDim2.new(0.0476190485, 0, 0, 4)
4523Frame54.Position = UDim2.new(0.476190478, 0, 0.428571433, -2)
4524Frame54.BackgroundColor3 = Color3.new(1, 1, 1)
4525Frame54.BorderColor3 = Color3.new(0, 0, 0)
4526Frame54.BorderSizePixel = 0
4527Frame54.ZIndex = 10
4528Frame55.Name = "11"
4529Frame55.Parent = Frame43
4530Frame55.Size = UDim2.new(0.0476190485, 0, 0, 4)
4531Frame55.Position = UDim2.new(0.523809552, 0, 0.571428597, -2)
4532Frame55.BackgroundColor3 = Color3.new(1, 1, 1)
4533Frame55.BorderColor3 = Color3.new(0, 0, 0)
4534Frame55.BorderSizePixel = 0
4535Frame55.ZIndex = 10
4536Frame56.Name = "12"
4537Frame56.Parent = Frame43
4538Frame56.Size = UDim2.new(0.0476190485, 0, 0, 4)
4539Frame56.Position = UDim2.new(0.571428597, 0, 0.714285731, -2)
4540Frame56.BackgroundColor3 = Color3.new(1, 1, 1)
4541Frame56.BorderColor3 = Color3.new(0, 0, 0)
4542Frame56.BorderSizePixel = 0
4543Frame56.ZIndex = 10
4544Frame57.Name = "13"
4545Frame57.Parent = Frame43
4546Frame57.Size = UDim2.new(0.0476190485, 0, 0, 4)
4547Frame57.Position = UDim2.new(0.619047642, 0, 0.857142866, -2)
4548Frame57.BackgroundColor3 = Color3.new(1, 1, 1)
4549Frame57.BorderColor3 = Color3.new(0, 0, 0)
4550Frame57.BorderSizePixel = 0
4551Frame57.ZIndex = 10
4552Frame58.Name = "14"
4553Frame58.Parent = Frame43
4554Frame58.Size = UDim2.new(0.0476190485, 0, 0, 4)
4555Frame58.Position = UDim2.new(0.666666687, 0, 0.916666687, -2)
4556Frame58.BackgroundColor3 = Color3.new(1, 1, 1)
4557Frame58.BorderColor3 = Color3.new(0, 0, 0)
4558Frame58.BorderSizePixel = 0
4559Frame58.ZIndex = 10
4560Frame59.Name = "15"
4561Frame59.Parent = Frame43
4562Frame59.Size = UDim2.new(0.0476190485, 0, 0, 4)
4563Frame59.Position = UDim2.new(0.714285731, 0, 0.833333313, -2)
4564Frame59.BackgroundColor3 = Color3.new(1, 1, 1)
4565Frame59.BorderColor3 = Color3.new(0, 0, 0)
4566Frame59.BorderSizePixel = 0
4567Frame59.ZIndex = 10
4568Frame60.Name = "16"
4569Frame60.Parent = Frame43
4570Frame60.Size = UDim2.new(0.0476190485, 0, 0, 4)
4571Frame60.Position = UDim2.new(0.761904776, 0, 0.75, -2)
4572Frame60.BackgroundColor3 = Color3.new(1, 1, 1)
4573Frame60.BorderColor3 = Color3.new(0, 0, 0)
4574Frame60.BorderSizePixel = 0
4575Frame60.ZIndex = 10
4576Frame61.Name = "17"
4577Frame61.Parent = Frame43
4578Frame61.Size = UDim2.new(0.0476190485, 0, 0, 4)
4579Frame61.Position = UDim2.new(0.809523821, 0, 0.666666687, -2)
4580Frame61.BackgroundColor3 = Color3.new(1, 1, 1)
4581Frame61.BorderColor3 = Color3.new(0, 0, 0)
4582Frame61.BorderSizePixel = 0
4583Frame61.ZIndex = 10
4584Frame62.Name = "18"
4585Frame62.Parent = Frame43
4586Frame62.Size = UDim2.new(0.0476190485, 0, 0, 4)
4587Frame62.Position = UDim2.new(0.857142866, 0, 0.583333313, -2)
4588Frame62.BackgroundColor3 = Color3.new(1, 1, 1)
4589Frame62.BorderColor3 = Color3.new(0, 0, 0)
4590Frame62.BorderSizePixel = 0
4591Frame62.ZIndex = 10
4592Frame63.Name = "19"
4593Frame63.Parent = Frame43
4594Frame63.Size = UDim2.new(0.0476190485, 0, 0, 4)
4595Frame63.Position = UDim2.new(0.90476191, 0, 0.5, -2)
4596Frame63.BackgroundColor3 = Color3.new(1, 1, 1)
4597Frame63.BorderColor3 = Color3.new(0, 0, 0)
4598Frame63.BorderSizePixel = 0
4599Frame63.ZIndex = 10
4600Frame64.Name = "20"
4601Frame64.Parent = Frame43
4602Frame64.Size = UDim2.new(0.0476190485, 0, 0, 4)
4603Frame64.Position = UDim2.new(0.952000022, 0, 0.49000001, -2)
4604Frame64.BackgroundColor3 = Color3.new(1, 1, 1)
4605Frame64.BorderColor3 = Color3.new(0, 0, 0)
4606Frame64.BorderSizePixel = 0
4607Frame64.ZIndex = 10
4608Frame65.Name = "Line"
4609Frame65.Parent = Frame43
4610Frame65.Size = UDim2.new(0, 200, 0, 3)
4611Frame65.Position = UDim2.new(1, 0, 0.5, -2)
4612Frame65.BackgroundColor3 = Color3.new(1, 1, 1)
4613Frame65.BorderColor3 = Color3.new(0, 0, 0)
4614Frame65.BorderSizePixel = 0
4615Frame65.ZIndex = 10
4616Frame66.Name = "Line"
4617Frame66.Parent = Frame43
4618Frame66.Size = UDim2.new(0, 200, 0, 3)
4619Frame66.Position = UDim2.new(0, -200, 0.5, -2)
4620Frame66.BackgroundColor3 = Color3.new(1, 1, 1)
4621Frame66.BorderColor3 = Color3.new(0, 0, 0)
4622Frame66.BorderSizePixel = 0
4623Frame66.ZIndex = 10
4624Frame67.Name = "Controls"
4625Frame67.Parent = Frame29
4626Frame67.Transparency = 0.30000001192093
4627Frame67.Size = UDim2.new(1, 0, 0, 120)
4628Frame67.Position = UDim2.new(0, 0, 0, -200)
4629Frame67.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
4630Frame67.BackgroundTransparency = 0.30000001192093
4631Frame67.BorderColor3 = Color3.new(0.156863, 0.156863, 0.156863)
4632Frame67.BorderSizePixel = 5
4633TextLabel68.Name = "Title"
4634TextLabel68.Parent = Frame67
4635TextLabel68.Transparency = 1
4636TextLabel68.Size = UDim2.new(1, 0, 0, 15)
4637TextLabel68.Text = "CONTROLS"
4638TextLabel68.BackgroundColor3 = Color3.new(1, 1, 1)
4639TextLabel68.BackgroundTransparency = 1
4640TextLabel68.Font = Enum.Font.SourceSansBold
4641TextLabel68.FontSize = Enum.FontSize.Size14
4642TextLabel68.TextColor3 = Color3.new(1, 1, 1)
4643TextLabel69.Name = "Line"
4644TextLabel69.Parent = TextLabel68
4645TextLabel69.Size = UDim2.new(1, 0, 0, 2)
4646TextLabel69.Text = ""
4647TextLabel69.Position = UDim2.new(0, 0, 1, 1)
4648TextLabel69.BackgroundColor3 = Color3.new(1, 1, 0)
4649TextLabel69.BorderSizePixel = 0
4650TextLabel69.Font = Enum.Font.SourceSans
4651TextLabel69.FontSize = Enum.FontSize.Size14
4652TextLabel70.Name = "Co"
4653TextLabel70.Parent = Frame29
4654TextLabel70.Transparency = 1
4655TextLabel70.Size = UDim2.new(1, 0, 0, 20)
4656TextLabel70.Text = "Gun Kit made by TurboFusion"
4657TextLabel70.Position = UDim2.new(0, 0, 1, 5)
4658TextLabel70.BackgroundColor3 = Color3.new(1, 1, 1)
4659TextLabel70.BackgroundTransparency = 1
4660TextLabel70.Font = Enum.Font.ArialBold
4661TextLabel70.FontSize = Enum.FontSize.Size14
4662TextLabel70.TextColor3 = Color3.new(1, 1, 0)
4663TextLabel70.TextStrokeTransparency = 0
4664TextLabel70.TextWrapped = true
4665TextLabel70.TextXAlignment = Enum.TextXAlignment.Right
4666TextLabel71.Name = "Version"
4667TextLabel71.Parent = Frame29
4668TextLabel71.Transparency = 1
4669TextLabel71.Size = UDim2.new(1, 0, 0, 15)
4670TextLabel71.Text = "v0.0.3"
4671TextLabel71.Position = UDim2.new(0, 0, 1, 25)
4672TextLabel71.BackgroundColor3 = Color3.new(1, 1, 1)
4673TextLabel71.BackgroundTransparency = 1
4674TextLabel71.Font = Enum.Font.ArialBold
4675TextLabel71.FontSize = Enum.FontSize.Size14
4676TextLabel71.TextColor3 = Color3.new(1, 1, 0)
4677TextLabel71.TextStrokeTransparency = 0
4678TextLabel71.TextWrapped = true
4679TextLabel71.TextXAlignment = Enum.TextXAlignment.Right
4680Frame72.Name = "Grenades"
4681Frame72.Parent = Frame29
4682Frame72.Transparency = 1
4683Frame72.Size = UDim2.new(0, 175, 0, 25)
4684Frame72.Position = UDim2.new(0, 0, 0, 50)
4685Frame72.BackgroundTransparency = 1
4686Frame73.Name = "Lethals"
4687Frame73.Parent = Frame72
4688Frame73.Transparency = 1
4689Frame73.Size = UDim2.new(0.5, -2, 1, 0)
4690Frame73.BackgroundColor3 = Color3.new(1, 1, 1)
4691Frame73.BackgroundTransparency = 1
4692Frame74.Name = "Lines"
4693Frame74.Parent = Frame73
4694Frame74.Transparency = 1
4695Frame74.Size = UDim2.new(1, 0, 1, 0)
4696Frame74.BackgroundColor3 = Color3.new(1, 1, 1)
4697Frame74.BackgroundTransparency = 1
4698TextLabel75.Name = "Line"
4699TextLabel75.Parent = Frame74
4700TextLabel75.Size = UDim2.new(1, 0, 0, 2)
4701TextLabel75.Text = ""
4702TextLabel75.BackgroundColor3 = Color3.new(1, 1, 1)
4703TextLabel75.BorderSizePixel = 0
4704TextLabel75.Font = Enum.Font.SourceSans
4705TextLabel75.FontSize = Enum.FontSize.Size14
4706TextLabel76.Name = "Line"
4707TextLabel76.Parent = Frame74
4708TextLabel76.Size = UDim2.new(1, 0, 0, 2)
4709TextLabel76.Text = ""
4710TextLabel76.Position = UDim2.new(0, 0, 1, -2)
4711TextLabel76.BackgroundColor3 = Color3.new(1, 1, 1)
4712TextLabel76.BorderSizePixel = 0
4713TextLabel76.Font = Enum.Font.SourceSans
4714TextLabel76.FontSize = Enum.FontSize.Size14
4715TextLabel77.Name = "Line"
4716TextLabel77.Parent = Frame74
4717TextLabel77.Size = UDim2.new(0, 2, 1, 0)
4718TextLabel77.Text = ""
4719TextLabel77.BackgroundColor3 = Color3.new(1, 1, 1)
4720TextLabel77.BorderSizePixel = 0
4721TextLabel77.Font = Enum.Font.SourceSans
4722TextLabel77.FontSize = Enum.FontSize.Size14
4723TextLabel78.Name = "Line"
4724TextLabel78.Parent = Frame74
4725TextLabel78.Size = UDim2.new(0, 2, 1, 0)
4726TextLabel78.Text = ""
4727TextLabel78.Position = UDim2.new(1, -2, 0, 0)
4728TextLabel78.BackgroundColor3 = Color3.new(1, 1, 1)
4729TextLabel78.BorderSizePixel = 0
4730TextLabel78.Font = Enum.Font.SourceSans
4731TextLabel78.FontSize = Enum.FontSize.Size14
4732ImageLabel79.Name = "Icon"
4733ImageLabel79.Parent = Frame73
4734ImageLabel79.Transparency = 1
4735ImageLabel79.Size = UDim2.new(0, 21, 0, 21)
4736ImageLabel79.Position = UDim2.new(0, 7, 0, 2)
4737ImageLabel79.BackgroundColor3 = Color3.new(1, 1, 1)
4738ImageLabel79.BackgroundTransparency = 1
4739TextLabel80.Name = "Dash"
4740TextLabel80.Parent = Frame73
4741TextLabel80.Size = UDim2.new(0, 16, 0, 2)
4742TextLabel80.Text = ""
4743TextLabel80.Position = UDim2.new(0.5, -8, 0.5, -1)
4744TextLabel80.BackgroundColor3 = Color3.new(1, 1, 1)
4745TextLabel80.BorderSizePixel = 0
4746TextLabel80.Font = Enum.Font.ArialBold
4747TextLabel80.FontSize = Enum.FontSize.Size18
4748TextLabel80.TextColor3 = Color3.new(1, 1, 1)
4749TextLabel81.Name = "Num"
4750TextLabel81.Parent = Frame73
4751TextLabel81.Transparency = 1
4752TextLabel81.Size = UDim2.new(0, 0, 1, 0)
4753TextLabel81.Text = "0"
4754TextLabel81.Position = UDim2.new(1, -7, 0, 0)
4755TextLabel81.BackgroundColor3 = Color3.new(1, 1, 1)
4756TextLabel81.BackgroundTransparency = 1
4757TextLabel81.Font = Enum.Font.ArialBold
4758TextLabel81.FontSize = Enum.FontSize.Size18
4759TextLabel81.TextColor3 = Color3.new(1, 1, 1)
4760TextLabel81.TextXAlignment = Enum.TextXAlignment.Right
4761Frame82.Name = "Tacticals"
4762Frame82.Parent = Frame72
4763Frame82.Transparency = 1
4764Frame82.Size = UDim2.new(0.5, -2, 1, 0)
4765Frame82.Position = UDim2.new(0.5, 2, 0, 0)
4766Frame82.BackgroundColor3 = Color3.new(1, 1, 1)
4767Frame82.BackgroundTransparency = 1
4768Frame83.Name = "Lines"
4769Frame83.Parent = Frame82
4770Frame83.Transparency = 1
4771Frame83.Size = UDim2.new(1, 0, 1, 0)
4772Frame83.BackgroundColor3 = Color3.new(1, 1, 1)
4773Frame83.BackgroundTransparency = 1
4774TextLabel84.Name = "Line"
4775TextLabel84.Parent = Frame83
4776TextLabel84.Size = UDim2.new(1, 0, 0, 2)
4777TextLabel84.Text = ""
4778TextLabel84.BackgroundColor3 = Color3.new(1, 1, 1)
4779TextLabel84.BorderSizePixel = 0
4780TextLabel84.Font = Enum.Font.SourceSans
4781TextLabel84.FontSize = Enum.FontSize.Size14
4782TextLabel85.Name = "Line"
4783TextLabel85.Parent = Frame83
4784TextLabel85.Size = UDim2.new(1, 0, 0, 2)
4785TextLabel85.Text = ""
4786TextLabel85.Position = UDim2.new(0, 0, 1, -2)
4787TextLabel85.BackgroundColor3 = Color3.new(1, 1, 1)
4788TextLabel85.BorderSizePixel = 0
4789TextLabel85.Font = Enum.Font.SourceSans
4790TextLabel85.FontSize = Enum.FontSize.Size14
4791TextLabel86.Name = "Line"
4792TextLabel86.Parent = Frame83
4793TextLabel86.Size = UDim2.new(0, 2, 1, 0)
4794TextLabel86.Text = ""
4795TextLabel86.BackgroundColor3 = Color3.new(1, 1, 1)
4796TextLabel86.BorderSizePixel = 0
4797TextLabel86.Font = Enum.Font.SourceSans
4798TextLabel86.FontSize = Enum.FontSize.Size14
4799TextLabel87.Name = "Line"
4800TextLabel87.Parent = Frame83
4801TextLabel87.Size = UDim2.new(0, 2, 1, 0)
4802TextLabel87.Text = ""
4803TextLabel87.Position = UDim2.new(1, -2, 0, 0)
4804TextLabel87.BackgroundColor3 = Color3.new(1, 1, 1)
4805TextLabel87.BorderSizePixel = 0
4806TextLabel87.Font = Enum.Font.SourceSans
4807TextLabel87.FontSize = Enum.FontSize.Size14
4808ImageLabel88.Name = "Icon"
4809ImageLabel88.Parent = Frame82
4810ImageLabel88.Transparency = 1
4811ImageLabel88.Size = UDim2.new(0, 21, 0, 21)
4812ImageLabel88.Position = UDim2.new(0, 7, 0, 2)
4813ImageLabel88.BackgroundColor3 = Color3.new(1, 1, 1)
4814ImageLabel88.BackgroundTransparency = 1
4815TextLabel89.Name = "Dash"
4816TextLabel89.Parent = Frame82
4817TextLabel89.Size = UDim2.new(0, 16, 0, 2)
4818TextLabel89.Text = ""
4819TextLabel89.Position = UDim2.new(0.5, -8, 0.5, -1)
4820TextLabel89.BackgroundColor3 = Color3.new(1, 1, 1)
4821TextLabel89.BorderSizePixel = 0
4822TextLabel89.Font = Enum.Font.ArialBold
4823TextLabel89.FontSize = Enum.FontSize.Size18
4824TextLabel89.TextColor3 = Color3.new(1, 1, 1)
4825TextLabel90.Name = "Num"
4826TextLabel90.Parent = Frame82
4827TextLabel90.Transparency = 1
4828TextLabel90.Size = UDim2.new(0, 0, 1, 0)
4829TextLabel90.Text = "0"
4830TextLabel90.Position = UDim2.new(1, -7, 0, 0)
4831TextLabel90.BackgroundColor3 = Color3.new(1, 1, 1)
4832TextLabel90.BackgroundTransparency = 1
4833TextLabel90.Font = Enum.Font.ArialBold
4834TextLabel90.FontSize = Enum.FontSize.Size18
4835TextLabel90.TextColor3 = Color3.new(1, 1, 1)
4836TextLabel90.TextXAlignment = Enum.TextXAlignment.Right
4837Frame91.Name = "Scope"
4838Frame91.Parent = ScreenGui19
4839Frame91.Transparency = 1
4840Frame91.Size = UDim2.new(1, 0, 1, 0)
4841Frame91.BackgroundColor3 = Color3.new(1, 1, 1)
4842Frame91.BackgroundTransparency = 1
4843ImageLabel92.Name = "Img"
4844ImageLabel92.Parent = Frame91
4845ImageLabel92.Transparency = 1
4846ImageLabel92.Size = UDim2.new(1, 0, 1, 0)
4847ImageLabel92.BackgroundColor3 = Color3.new(0, 0, 0)
4848ImageLabel92.BackgroundTransparency = 1
4849ImageLabel92.BorderSizePixel = 0
4850ImageLabel92.ImageTransparency = 1
4851TextLabel93.Name = "Steady"
4852TextLabel93.Parent = Frame91
4853TextLabel93.Transparency = 1
4854TextLabel93.Size = UDim2.new(0, 120, 0, 20)
4855TextLabel93.Text = ""
4856TextLabel93.Position = UDim2.new(0.5, -60, 0.5, 50)
4857TextLabel93.Visible = false
4858TextLabel93.BackgroundColor3 = Color3.new(1, 1, 1)
4859TextLabel93.BackgroundTransparency = 1
4860TextLabel93.ZIndex = 2
4861TextLabel93.Font = Enum.Font.ArialBold
4862TextLabel93.FontSize = Enum.FontSize.Size14
4863TextLabel93.TextColor3 = Color3.new(1, 1, 0)
4864TextLabel93.TextStrokeTransparency = 0
4865Script94.Name = "[[ README ]] (Don't Delete)"
4866Script94.Parent = Tool0
4867table.insert(cors,sandbox(Script94,function()
4868--[[
4869
4870 VERSION: v0.0.3
4871
4872 ----------[ UPDATES ]----------------------------------------------------
4873
4874 Pre-Release: -Added a copyright
4875 -fixed the issue where you couldn't run when you selected the tool
4876 -Added an ADS key and allowed ADS to either be toggle or hold
4877 -Made the Ammo values external so they can be changed by outside scripts
4878
4879 v0.0.2: -Created new arms for the gun
4880 -Fixed an issue where the arms would glitch if PlayerAnimations was set to false and the gun was fired
4881 -Updated credit security
4882 -Put the Arm cframes in the SETTINGS
4883 -Made the stance changing animations slightly smoother
4884 -Added bullet drop
4885 -Fixed some bullet hit handling code
4886 -Made the torso being able to rotate while sitting down a setting
4887 -Added bullet settings
4888 -Added shockwave settings
4889 -Added an Explosive guntype
4890 -Added a version label in the Gui
4891
4892 v0.0.3: -Added an option to have player arms
4893 -Added grenades / throwables
4894 -Fixed the issue where if a player left a server without deselecting the gun, the bullet trails still remained
4895 -Added Gui Scopes
4896 -Fixed the issue where the guns would glitch if you switched weapons too fast
4897
4898 -------------------------------------------------------------------------
4899
4900 Hello there!
4901
4902 Glad to know you're using my one and only Gun Kit!
4903
4904 Even though this kit has many features and is rather advanced, it's pretty easy to use
4905
4906 There are 4 things that this gun needs in order to function:
4907 One brick called "AimPart"
4908 At least one brick called "Mag"
4909 One brick called "Handle"
4910 One brick called "Main"
4911
4912 The AimPart is what the gun will use to aim down the sights. When you aim down your sights, this brick will be in the center
4913 of the player's head. It basically allows the gun to have any type of sight, which can be placed anywhere on the gun. As long as
4914 the AimPart is aligned with the sight, the gun will aim down the sights properly.
4915 (NOTE: Make sure the AimPart is behind the Sight and the FRONT of the AimPart is facing the Sight)
4916
4917 The Mag is what the gun will move around when you reload the gun. If the mag is made up of more than one brick, make sure those
4918 bricks are also called "Mag" so that the gun will move them around. If you set ReloadAnimation to false in the SETTINGS, you don't
4919 need any bricks called "Mag". But if ReloadAnimation is set to true, the gun needs at least one brick called "Mag" or it will break
4920
4921 The Handle is obviously the most important part of the Gun. Without it, the tool itself wouldn't work. It's that simple
4922 (NOTE: If you want a sound to play when you fire, name it "FireSound" and place it in the Handle. If you want a sound to play when
4923 you reload, name it "ReloadSound" and place it in the Handle)
4924
4925 The Main is the brick where the bullets will originate from. It's also the brick where the flash effects are kept.
4926 (NOTE: If you want a flash billboardgui to appear when you fire, name it "FlashGui" and place it in the Main. If you want a light
4927 to flash when you fire, name it "FlashFX" and place it in the Main)
4928
4929 ----------[ INSTRUCTIONS ]-----------------------------------------------
4930
4931 HOW TO USE THIS KIT:
4932 1) If the gun already has a Handle, make sure it is facing forward. If the gun doesn't have a Handle, create one and place
4933 it wherever you like, and make sure it is facing forward
4934
4935 2) If the gun already has a brick called "AimPart", move it to where you would like, and make sure it is facing the sight.
4936 If the gun doesn't have a brick called "AimPart", create one and move it where you would like it to be, and make sure
4937 it is facing the sight
4938
4939 3) If the gun already has a brick called "Main", move it to the very front of the gun. If the gun doesn't have a brick
4940 called "Main", create one and move it to the very front of the gun
4941
4942 4) If ReloadAnimation is set to true in the SETTINGS, make sure the gun has at least one brick called "Mag". If
4943 ReloadAnimation is set to false, the gun doesn't need any bricks called "Mag".
4944
4945 5) Open the SETTINGS and edit them however you like
4946
4947 That's it! Only 5 steps! It's not that complicated, just follow the Directions and it should work fine. If you have any questions /
4948 comments / concerns, message me.
4949
4950 ______ ______ __ ______ _ ______
4951 / _/ _/ /_ __/_ _______/ /_ ____ / ____/_ _______(_)___ ____ / / /
4952 / // / / / / / / / ___/ __ \/ __ \/ /_ / / / / ___/ / __ \/ __ \ / // /
4953 / // / / / / /_/ / / / /_/ / /_/ / __/ / /_/ (__ ) / /_/ / / / / / // /
4954 / // / /_/ \__,_/_/ /_.___/\____/_/ \__,_/____/_/\____/_/ /_/ _/ // /
4955 /__/__/ /__/__/
4956
4957--]]
4958
4959wait(math.random(0, 200) / 200) --This is to prevent more than one Ignore_Model from being created
4960
4961if _G.Ignore_Code then --If the Ignore_Code already exists, then the script creates the Ignore_Model
4962 --[[
4963 The purpose of this is so that every gun in a game that uses this gun kit will share one Ignore_Model. That way,
4964 bullet trails, bullet holes, and other fake arms will be ignored by the gun which makes the bullets more likely to
4965 hit a character part
4966 --]]
4967 if (not game.Workspace:FindFirstChild("Ignore_Model_".._G.Ignore_Code)) then
4968 local Ignore_Model = Instance.new("Model")
4969 Ignore_Model.Name = "Ignore_Model_".._G.Ignore_Code
4970 Ignore_Model.Parent = game.Workspace
4971
4972 spawn(function()
4973 while true do
4974 Ignore_Model.Parent = game.Workspace
4975 wait(1 / 20)
4976 end
4977 end)
4978 end
4979
4980 script.Parent:WaitForChild("Gun_Main"):WaitForChild("Ignore_Code").Value = _G.Ignore_Code
4981else
4982 --[[
4983 If there isn't already an Ignore_Code, then this creates one. The purpose of it being random is so that if there is
4984 an Ignore_Model for something else in the game, the script won't end up placing the ignored objects in that Ignore_Model
4985 --]]
4986 _G.Ignore_Code = math.random(1, 1e4)
4987
4988 if (not game.Workspace:FindFirstChild("Ignore_Model_".._G.Ignore_Code)) then
4989 local Ignore_Model = Instance.new("Model")
4990 Ignore_Model.Name = "Ignore_Model_".._G.Ignore_Code
4991 Ignore_Model.Parent = game.Workspace
4992
4993 spawn(function()
4994 while true do
4995 Ignore_Model.Parent = game.Workspace
4996 wait(1 / 20)
4997 end
4998 end)
4999 end
5000
5001 script.Parent:WaitForChild("Gun_Main"):WaitForChild("Ignore_Code").Value = _G.Ignore_Code
5002end
5003
5004spawn(function()
5005 repeat wait() until _G.Ignore_Code
5006 local Ignore_Model = game.Workspace:WaitForChild("Ignore_Model_".._G.Ignore_Code)
5007 while true do
5008 for _, Gun_Ignore in pairs(Ignore_Model:GetChildren()) do
5009 if (not game.Players:FindFirstChild(Gun_Ignore.Name:sub(12))) then
5010 Gun_Ignore:Destroy()
5011 end
5012 end
5013 wait(1 / 20)
5014 end
5015end)
5016end))
5017IntValue95.Name = "TacticalGrenades"
5018IntValue95.Parent = Tool0
5019IntValue95.Value = 15
5020IntValue96.Name = "StoredAmmo"
5021IntValue96.Parent = Tool0
5022IntValue96.Value = 300
5023IntValue97.Name = "LethalGrenades"
5024IntValue97.Parent = Tool0
5025IntValue97.Value = 15
5026IntValue98.Name = "ClipSize"
5027IntValue98.Parent = Tool0
5028IntValue98.Value = 6
5029IntValue99.Name = "Ammo"
5030IntValue99.Parent = Tool0
5031IntValue99.Value = 6
5032Part100.Parent = Tool0
5033Part100.Material = Enum.Material.Metal
5034Part100.BrickColor = BrickColor.new("Black")
5035Part100.Rotation = Vector3.new(0, 0, -180)
5036Part100.Anchored = true
5037Part100.FormFactor = Enum.FormFactor.Plate
5038Part100.Size = Vector3.new(1, 0.400000006, 1)
5039Part100.CFrame = CFrame.new(2.5, 0.373344988, 49.109993, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5040Part100.BottomSurface = Enum.SurfaceType.Smooth
5041Part100.TopSurface = Enum.SurfaceType.Smooth
5042Part100.Color = Color3.new(0.105882, 0.164706, 0.207843)
5043Part100.Position = Vector3.new(2.5, 0.373344988, 49.109993)
5044Part100.Orientation = Vector3.new(0, 0, 180)
5045Part100.Color = Color3.new(0.105882, 0.164706, 0.207843)
5046SpecialMesh101.Parent = Part100
5047SpecialMesh101.Scale = Vector3.new(0.13333334, 1, 0.13333334)
5048SpecialMesh101.MeshType = Enum.MeshType.Wedge
5049SpecialMesh101.Scale = Vector3.new(0.13333334, 1, 0.13333334)
5050ManualWeld102.Name = "Part-to-Handle Strong Joint"
5051ManualWeld102.Parent = Part100
5052ManualWeld102.C0 = CFrame.new(0.5, -0.200000003, 0.5, 1, 0, 0, 0, 0, -1, 0, 1, 0)
5053ManualWeld102.C1 = CFrame.new(-0.5, -0.0866544843, 0.432993889, -1, 0, 4.10676591e-07, 4.10676591e-07, 7.13453232e-07, 1, -2.92998536e-13, 1, -7.13453232e-07)
5054ManualWeld102.Part0 = Part100
5055ManualWeld102.Part1 = Part12
5056Part103.Parent = Tool0
5057Part103.Material = Enum.Material.Metal
5058Part103.BrickColor = BrickColor.new("Dark stone grey")
5059Part103.Rotation = Vector3.new(0, 0, -180)
5060Part103.Anchored = true
5061Part103.FormFactor = Enum.FormFactor.Plate
5062Part103.Size = Vector3.new(1, 0.400000006, 1)
5063Part103.CFrame = CFrame.new(2.5, 0.573346019, 48.8766632, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5064Part103.BottomSurface = Enum.SurfaceType.Smooth
5065Part103.TopSurface = Enum.SurfaceType.Smooth
5066Part103.Color = Color3.new(0.388235, 0.372549, 0.384314)
5067Part103.Position = Vector3.new(2.5, 0.573346019, 48.8766632)
5068Part103.Orientation = Vector3.new(0, 0, 180)
5069Part103.Color = Color3.new(0.388235, 0.372549, 0.384314)
5070BlockMesh104.Parent = Part103
5071BlockMesh104.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.13333334)
5072BlockMesh104.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.13333334)
5073Part105.Parent = Tool0
5074Part105.Material = Enum.Material.Metal
5075Part105.BrickColor = BrickColor.new("Black")
5076Part105.Rotation = Vector3.new(-180, 0, 0)
5077Part105.Anchored = true
5078Part105.FormFactor = Enum.FormFactor.Plate
5079Part105.Size = Vector3.new(1, 0.400000006, 1)
5080Part105.CFrame = CFrame.new(2.5, 0.200011998, 49.3099976, 1, 0, 0, 0, -1, 0, 0, 0, -1)
5081Part105.BottomSurface = Enum.SurfaceType.Smooth
5082Part105.TopSurface = Enum.SurfaceType.Smooth
5083Part105.Color = Color3.new(0.105882, 0.164706, 0.207843)
5084Part105.Position = Vector3.new(2.5, 0.200011998, 49.3099976)
5085Part105.Orientation = Vector3.new(0, 180, 180)
5086Part105.Color = Color3.new(0.105882, 0.164706, 0.207843)
5087SpecialMesh106.Parent = Part105
5088SpecialMesh106.Scale = Vector3.new(0.13333334, 0.13333334, 0.266666681)
5089SpecialMesh106.MeshType = Enum.MeshType.Wedge
5090SpecialMesh106.Scale = Vector3.new(0.13333334, 0.13333334, 0.266666681)
5091Part107.Parent = Tool0
5092Part107.Material = Enum.Material.Metal
5093Part107.BrickColor = BrickColor.new("Black")
5094Part107.Rotation = Vector3.new(0, 0, -180)
5095Part107.Anchored = true
5096Part107.FormFactor = Enum.FormFactor.Plate
5097Part107.Size = Vector3.new(1, 0.400000006, 1)
5098Part107.CFrame = CFrame.new(2.5, 0.66001302, 49.1766624, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5099Part107.BottomSurface = Enum.SurfaceType.Smooth
5100Part107.TopSurface = Enum.SurfaceType.Smooth
5101Part107.Color = Color3.new(0.105882, 0.164706, 0.207843)
5102Part107.Position = Vector3.new(2.5, 0.66001302, 49.1766624)
5103Part107.Orientation = Vector3.new(0, 0, 180)
5104Part107.Color = Color3.new(0.105882, 0.164706, 0.207843)
5105BlockMesh108.Parent = Part107
5106BlockMesh108.Scale = Vector3.new(0.13333334, 0.433333367, 0.266666681)
5107BlockMesh108.Scale = Vector3.new(0.13333334, 0.433333367, 0.266666681)
5108Part109.Parent = Tool0
5109Part109.Material = Enum.Material.Metal
5110Part109.BrickColor = BrickColor.new("Black")
5111Part109.Anchored = true
5112Part109.FormFactor = Enum.FormFactor.Plate
5113Part109.Size = Vector3.new(1, 0.400000006, 1)
5114Part109.CFrame = CFrame.new(2.5, 0.613345027, 50.5599976, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5115Part109.BottomSurface = Enum.SurfaceType.Smooth
5116Part109.TopSurface = Enum.SurfaceType.Smooth
5117Part109.Color = Color3.new(0.105882, 0.164706, 0.207843)
5118Part109.Position = Vector3.new(2.5, 0.613345027, 50.5599976)
5119Part109.Color = Color3.new(0.105882, 0.164706, 0.207843)
5120BlockMesh110.Parent = Part109
5121BlockMesh110.Scale = Vector3.new(0.200000003, 0.666666687, 0.300000012)
5122BlockMesh110.Scale = Vector3.new(0.200000003, 0.666666687, 0.300000012)
5123Part111.Parent = Tool0
5124Part111.Material = Enum.Material.Metal
5125Part111.BrickColor = BrickColor.new("Dark stone grey")
5126Part111.Rotation = Vector3.new(-180, 0, -180)
5127Part111.Anchored = true
5128Part111.FormFactor = Enum.FormFactor.Plate
5129Part111.Size = Vector3.new(1, 0.400000006, 1)
5130Part111.CFrame = CFrame.new(2.5, 0.606679022, 48.7933273, -1, 0, 0, 0, 1, 0, 0, 0, -1)
5131Part111.BottomSurface = Enum.SurfaceType.Smooth
5132Part111.TopSurface = Enum.SurfaceType.Smooth
5133Part111.Color = Color3.new(0.388235, 0.372549, 0.384314)
5134Part111.Position = Vector3.new(2.5, 0.606679022, 48.7933273)
5135Part111.Orientation = Vector3.new(0, 180, 0)
5136Part111.Color = Color3.new(0.388235, 0.372549, 0.384314)
5137SpecialMesh112.Parent = Part111
5138SpecialMesh112.Scale = Vector3.new(0.0666666701, 0.100000009, 0.100000001)
5139SpecialMesh112.MeshType = Enum.MeshType.Wedge
5140SpecialMesh112.Scale = Vector3.new(0.0666666701, 0.100000009, 0.100000001)
5141ManualWeld113.Name = "Part-to-Shell Strong Joint"
5142ManualWeld113.Parent = Part111
5143ManualWeld113.C0 = CFrame.new(-0.5, -0.200000003, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5144ManualWeld113.C1 = CFrame.new(0.300000966, 0.493340492, -0.5, 4.37113883e-08, -1, 4.37113883e-08, 0, -4.37113883e-08, -1, 1, 4.37113883e-08, -1.91068547e-15)
5145ManualWeld113.Part0 = Part111
5146ManualWeld113.Part1 = Part5
5147Part114.Parent = Tool0
5148Part114.Material = Enum.Material.Metal
5149Part114.BrickColor = BrickColor.new("Dark stone grey")
5150Part114.Rotation = Vector3.new(-180, 0, 0)
5151Part114.Anchored = true
5152Part114.FormFactor = Enum.FormFactor.Plate
5153Part114.Size = Vector3.new(1, 0.400000006, 1)
5154Part114.CFrame = CFrame.new(2.5, 0.573346019, 48.9933319, 1, 0, 0, 0, -1, 0, 0, 0, -1)
5155Part114.BottomSurface = Enum.SurfaceType.Smooth
5156Part114.TopSurface = Enum.SurfaceType.Smooth
5157Part114.Color = Color3.new(0.388235, 0.372549, 0.384314)
5158Part114.Position = Vector3.new(2.5, 0.573346019, 48.9933319)
5159Part114.Orientation = Vector3.new(0, 180, 180)
5160Part114.Color = Color3.new(0.388235, 0.372549, 0.384314)
5161SpecialMesh115.Parent = Part114
5162SpecialMesh115.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.100000001)
5163SpecialMesh115.MeshType = Enum.MeshType.Wedge
5164SpecialMesh115.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.100000001)
5165ManualWeld116.Name = "Part-to-Shell Strong Joint"
5166ManualWeld116.Parent = Part114
5167ManualWeld116.C0 = CFrame.new(-0.5, -0.200000003, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5168ManualWeld116.C1 = CFrame.new(-0.066666007, 0.493331909, 0.50000006, -4.37113883e-08, 1, 4.37113883e-08, 0, 4.37113883e-08, -1, -1, -4.37113883e-08, -1.91068547e-15)
5169ManualWeld116.Part0 = Part114
5170ManualWeld116.Part1 = Part15
5171Part117.Parent = Tool0
5172Part117.Material = Enum.Material.Metal
5173Part117.BrickColor = BrickColor.new("Dark stone grey")
5174Part117.Rotation = Vector3.new(0, 0, -180)
5175Part117.Anchored = true
5176Part117.FormFactor = Enum.FormFactor.Plate
5177Part117.Size = Vector3.new(1, 0.400000006, 1)
5178Part117.CFrame = CFrame.new(2.5, 0.633346021, 48.5599976, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5179Part117.BottomSurface = Enum.SurfaceType.Smooth
5180Part117.TopSurface = Enum.SurfaceType.Smooth
5181Part117.Color = Color3.new(0.388235, 0.372549, 0.384314)
5182Part117.Position = Vector3.new(2.5, 0.633346021, 48.5599976)
5183Part117.Orientation = Vector3.new(0, 0, 180)
5184Part117.Color = Color3.new(0.388235, 0.372549, 0.384314)
5185SpecialMesh118.Parent = Part117
5186SpecialMesh118.Scale = Vector3.new(0.0666666701, 0.100000009, 0.0333333351)
5187SpecialMesh118.MeshType = Enum.MeshType.Wedge
5188SpecialMesh118.Scale = Vector3.new(0.0666666701, 0.100000009, 0.0333333351)
5189ManualWeld119.Name = "Part-to-Handle Strong Joint"
5190ManualWeld119.Parent = Part117
5191ManualWeld119.C0 = CFrame.new(-0.5, -0.200000003, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5192ManualWeld119.C1 = CFrame.new(0.5, 0.173345685, -0.117003441, -1, -4.10676591e-07, 0, 4.10676591e-07, -1, 7.13453232e-07, -2.92998536e-13, 7.13453232e-07, 1)
5193ManualWeld119.Part0 = Part117
5194ManualWeld119.Part1 = Part12
5195Part120.Parent = Tool0
5196Part120.Material = Enum.Material.Metal
5197Part120.BrickColor = BrickColor.new("Dark stone grey")
5198Part120.Rotation = Vector3.new(0, 0, -180)
5199Part120.Anchored = true
5200Part120.FormFactor = Enum.FormFactor.Plate
5201Part120.Size = Vector3.new(1, 0.400000006, 1)
5202Part120.CFrame = CFrame.new(2.5, 0.600012004, 48.7099991, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5203Part120.BottomSurface = Enum.SurfaceType.Smooth
5204Part120.TopSurface = Enum.SurfaceType.Smooth
5205Part120.Color = Color3.new(0.388235, 0.372549, 0.384314)
5206Part120.Position = Vector3.new(2.5, 0.600012004, 48.7099991)
5207Part120.Orientation = Vector3.new(0, 0, 180)
5208Part120.Color = Color3.new(0.388235, 0.372549, 0.384314)
5209SpecialMesh121.Parent = Part120
5210SpecialMesh121.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.0666666701)
5211SpecialMesh121.MeshType = Enum.MeshType.Wedge
5212SpecialMesh121.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.0666666701)
5213Part122.Parent = Tool0
5214Part122.Material = Enum.Material.Metal
5215Part122.BrickColor = BrickColor.new("Dark stone grey")
5216Part122.Rotation = Vector3.new(0, 0, -180)
5217Part122.Anchored = true
5218Part122.FormFactor = Enum.FormFactor.Plate
5219Part122.Size = Vector3.new(1, 0.400000006, 1)
5220Part122.CFrame = CFrame.new(2.5, 0.573346019, 48.7766647, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5221Part122.BottomSurface = Enum.SurfaceType.Smooth
5222Part122.TopSurface = Enum.SurfaceType.Smooth
5223Part122.Color = Color3.new(0.388235, 0.372549, 0.384314)
5224Part122.Position = Vector3.new(2.5, 0.573346019, 48.7766647)
5225Part122.Orientation = Vector3.new(0, 0, 180)
5226Part122.Color = Color3.new(0.388235, 0.372549, 0.384314)
5227SpecialMesh123.Parent = Part122
5228SpecialMesh123.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.0666666701)
5229SpecialMesh123.MeshType = Enum.MeshType.Wedge
5230SpecialMesh123.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.0666666701)
5231Part124.Parent = Tool0
5232Part124.Material = Enum.Material.Metal
5233Part124.BrickColor = BrickColor.new("Black")
5234Part124.Rotation = Vector3.new(-180, 0, -180)
5235Part124.Anchored = true
5236Part124.FormFactor = Enum.FormFactor.Plate
5237Part124.Size = Vector3.new(1, 0.400000006, 1)
5238Part124.CFrame = CFrame.new(2.5, 0.686679006, 50.159996, -1, 0, 0, 0, 1, 0, 0, 0, -1)
5239Part124.BottomSurface = Enum.SurfaceType.Smooth
5240Part124.TopSurface = Enum.SurfaceType.Smooth
5241Part124.Color = Color3.new(0.105882, 0.164706, 0.207843)
5242Part124.Position = Vector3.new(2.5, 0.686679006, 50.159996)
5243Part124.Orientation = Vector3.new(0, 180, 0)
5244Part124.Color = Color3.new(0.105882, 0.164706, 0.207843)
5245BlockMesh125.Parent = Part124
5246BlockMesh125.Scale = Vector3.new(0.200000003, 0.300000012, 0.5)
5247BlockMesh125.Scale = Vector3.new(0.200000003, 0.300000012, 0.5)
5248Part126.Parent = Tool0
5249Part126.Material = Enum.Material.Metal
5250Part126.BrickColor = BrickColor.new("Black")
5251Part126.Rotation = Vector3.new(0, 0, -180)
5252Part126.Anchored = true
5253Part126.FormFactor = Enum.FormFactor.Plate
5254Part126.Size = Vector3.new(1, 0.400000006, 1)
5255Part126.CFrame = CFrame.new(2.5, 0.400011986, 49.2433281, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5256Part126.BottomSurface = Enum.SurfaceType.Smooth
5257Part126.TopSurface = Enum.SurfaceType.Smooth
5258Part126.Color = Color3.new(0.105882, 0.164706, 0.207843)
5259Part126.Position = Vector3.new(2.5, 0.400011986, 49.2433281)
5260Part126.Orientation = Vector3.new(0, 0, 180)
5261Part126.Color = Color3.new(0.105882, 0.164706, 0.207843)
5262BlockMesh127.Parent = Part126
5263BlockMesh127.Scale = Vector3.new(0.13333334, 0.866666734, 0.13333334)
5264BlockMesh127.Scale = Vector3.new(0.13333334, 0.866666734, 0.13333334)
5265Part128.Parent = Tool0
5266Part128.Material = Enum.Material.Metal
5267Part128.BrickColor = BrickColor.new("Black")
5268Part128.Rotation = Vector3.new(-180, 0, -180)
5269Part128.Anchored = true
5270Part128.FormFactor = Enum.FormFactor.Plate
5271Part128.Size = Vector3.new(1, 0.400000006, 1)
5272Part128.CFrame = CFrame.new(2.5, 0.426678985, 49.3766632, -1, 0, 0, 0, 1, 0, 0, 0, -1)
5273Part128.BottomSurface = Enum.SurfaceType.Smooth
5274Part128.TopSurface = Enum.SurfaceType.Smooth
5275Part128.Color = Color3.new(0.105882, 0.164706, 0.207843)
5276Part128.Position = Vector3.new(2.5, 0.426678985, 49.3766632)
5277Part128.Orientation = Vector3.new(0, 180, 0)
5278Part128.Color = Color3.new(0.105882, 0.164706, 0.207843)
5279SpecialMesh129.Parent = Part128
5280SpecialMesh129.Scale = Vector3.new(0.13333334, 1, 0.13333334)
5281SpecialMesh129.MeshType = Enum.MeshType.Wedge
5282SpecialMesh129.Scale = Vector3.new(0.13333334, 1, 0.13333334)
5283Part130.Parent = Tool0
5284Part130.Material = Enum.Material.Metal
5285Part130.BrickColor = BrickColor.new("Dark stone grey")
5286Part130.Anchored = true
5287Part130.FormFactor = Enum.FormFactor.Plate
5288Part130.Size = Vector3.new(1, 0.400000006, 1)
5289Part130.CFrame = CFrame.new(2.5, 0.600012004, 48.9933319, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5290Part130.BottomSurface = Enum.SurfaceType.Smooth
5291Part130.TopSurface = Enum.SurfaceType.Smooth
5292Part130.Color = Color3.new(0.388235, 0.372549, 0.384314)
5293Part130.Position = Vector3.new(2.5, 0.600012004, 48.9933319)
5294Part130.Color = Color3.new(0.388235, 0.372549, 0.384314)
5295SpecialMesh131.Parent = Part130
5296SpecialMesh131.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.100000001)
5297SpecialMesh131.MeshType = Enum.MeshType.Wedge
5298SpecialMesh131.Scale = Vector3.new(0.0666666701, 0.0666666701, 0.100000001)
5299ManualWeld132.Name = "Part-to-Shell Strong Joint"
5300ManualWeld132.Parent = Part130
5301ManualWeld132.C0 = CFrame.new(0.5, -0.200000003, -0.5, -1, 0, 0, 0, 1, 0, 0, 0, -1)
5302ManualWeld132.C1 = CFrame.new(0.306667954, 0.493331909, -0.5, 4.37113883e-08, -1, 4.37113883e-08, 0, -4.37113883e-08, -1, 1, 4.37113883e-08, -1.91068547e-15)
5303ManualWeld132.Part0 = Part130
5304ManualWeld132.Part1 = Part15
5305Part133.Parent = Tool0
5306Part133.Material = Enum.Material.Metal
5307Part133.BrickColor = BrickColor.new("Lime green")
5308Part133.Rotation = Vector3.new(-180, 0, -180)
5309Part133.Anchored = true
5310Part133.FormFactor = Enum.FormFactor.Plate
5311Part133.Size = Vector3.new(1, 0.400000006, 1)
5312Part133.CFrame = CFrame.new(2.55000305, 1.16001296, 48.1933289, -1, 0, 0, 0, 1, 0, 0, 0, -1)
5313Part133.BottomSurface = Enum.SurfaceType.Smooth
5314Part133.TopSurface = Enum.SurfaceType.Smooth
5315Part133.Color = Color3.new(0, 1, 0)
5316Part133.Position = Vector3.new(2.55000305, 1.16001296, 48.1933289)
5317Part133.Orientation = Vector3.new(0, 180, 0)
5318Part133.Color = Color3.new(0, 1, 0)
5319SpecialMesh134.Parent = Part133
5320SpecialMesh134.Scale = Vector3.new(0.0333333351, 0.200000018, 0.0333333351)
5321SpecialMesh134.MeshType = Enum.MeshType.Wedge
5322SpecialMesh134.Scale = Vector3.new(0.0333333351, 0.200000018, 0.0333333351)
5323Part135.Parent = Tool0
5324Part135.Material = Enum.Material.Metal
5325Part135.BrickColor = BrickColor.new("Black")
5326Part135.Rotation = Vector3.new(180, 90, 0)
5327Part135.Anchored = true
5328Part135.FormFactor = Enum.FormFactor.Plate
5329Part135.Size = Vector3.new(1, 0.400000006, 1)
5330Part135.CFrame = CFrame.new(2.38333106, 0.766678989, 47.409996, 0, 0, 1, 0, -1, 0, 1, 0, -0)
5331Part135.BottomSurface = Enum.SurfaceType.Smooth
5332Part135.TopSurface = Enum.SurfaceType.Smooth
5333Part135.Color = Color3.new(0.105882, 0.164706, 0.207843)
5334Part135.Position = Vector3.new(2.38333106, 0.766678989, 47.409996)
5335Part135.Orientation = Vector3.new(0, 90, 180)
5336Part135.Color = Color3.new(0.105882, 0.164706, 0.207843)
5337SpecialMesh136.Parent = Part135
5338SpecialMesh136.Scale = Vector3.new(0.666666687, 0.633333325, 0.0333333351)
5339SpecialMesh136.MeshType = Enum.MeshType.Wedge
5340SpecialMesh136.Scale = Vector3.new(0.666666687, 0.633333325, 0.0333333351)
5341Part137.Parent = Tool0
5342Part137.Material = Enum.Material.Metal
5343Part137.BrickColor = BrickColor.new("Dark stone grey")
5344Part137.Anchored = true
5345Part137.FormFactor = Enum.FormFactor.Plate
5346Part137.Size = Vector3.new(1, 0.400000006, 1)
5347Part137.CFrame = CFrame.new(2.5, 1.14001095, 48.1433334, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5348Part137.BottomSurface = Enum.SurfaceType.Smooth
5349Part137.TopSurface = Enum.SurfaceType.Smooth
5350Part137.Color = Color3.new(0.388235, 0.372549, 0.384314)
5351Part137.Position = Vector3.new(2.5, 1.14001095, 48.1433334)
5352Part137.Color = Color3.new(0.388235, 0.372549, 0.384314)
5353BlockMesh138.Parent = Part137
5354BlockMesh138.Scale = Vector3.new(0.0666666701, 0.0333333351, 0.0666666701)
5355BlockMesh138.Scale = Vector3.new(0.0666666701, 0.0333333351, 0.0666666701)
5356Part139.Parent = Tool0
5357Part139.Material = Enum.Material.Metal
5358Part139.BrickColor = BrickColor.new("Dark stone grey")
5359Part139.Anchored = true
5360Part139.FormFactor = Enum.FormFactor.Plate
5361Part139.Size = Vector3.new(1, 0.400000006, 1)
5362Part139.CFrame = CFrame.new(2.44999695, 1.16001296, 48.1433334, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5363Part139.BottomSurface = Enum.SurfaceType.Smooth
5364Part139.TopSurface = Enum.SurfaceType.Smooth
5365Part139.Color = Color3.new(0.388235, 0.372549, 0.384314)
5366Part139.Position = Vector3.new(2.44999695, 1.16001296, 48.1433334)
5367Part139.Color = Color3.new(0.388235, 0.372549, 0.384314)
5368BlockMesh140.Parent = Part139
5369BlockMesh140.Scale = Vector3.new(0.0333333351, 0.200000018, 0.0666666701)
5370BlockMesh140.Scale = Vector3.new(0.0333333351, 0.200000018, 0.0666666701)
5371Part141.Parent = Tool0
5372Part141.Material = Enum.Material.Metal
5373Part141.BrickColor = BrickColor.new("Black")
5374Part141.Anchored = true
5375Part141.FormFactor = Enum.FormFactor.Plate
5376Part141.Size = Vector3.new(1, 0.400000006, 1)
5377Part141.CFrame = CFrame.new(2.5, 0.833347976, 50.1766624, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5378Part141.BottomSurface = Enum.SurfaceType.Smooth
5379Part141.TopSurface = Enum.SurfaceType.Smooth
5380Part141.Color = Color3.new(0.105882, 0.164706, 0.207843)
5381Part141.Position = Vector3.new(2.5, 0.833347976, 50.1766624)
5382Part141.Color = Color3.new(0.105882, 0.164706, 0.207843)
5383BlockMesh142.Parent = Part141
5384BlockMesh142.Scale = Vector3.new(0.200000003, 0.433333367, 1.06666672)
5385BlockMesh142.Scale = Vector3.new(0.200000003, 0.433333367, 1.06666672)
5386Part143.Parent = Tool0
5387Part143.Material = Enum.Material.Metal
5388Part143.BrickColor = BrickColor.new("Lime green")
5389Part143.Rotation = Vector3.new(-180, 0, -180)
5390Part143.Anchored = true
5391Part143.FormFactor = Enum.FormFactor.Plate
5392Part143.Size = Vector3.new(1, 0.400000006, 1)
5393Part143.CFrame = CFrame.new(2.44999695, 1.16001296, 48.1933289, -1, 0, 0, 0, 1, 0, 0, 0, -1)
5394Part143.BottomSurface = Enum.SurfaceType.Smooth
5395Part143.TopSurface = Enum.SurfaceType.Smooth
5396Part143.Color = Color3.new(0, 1, 0)
5397Part143.Position = Vector3.new(2.44999695, 1.16001296, 48.1933289)
5398Part143.Orientation = Vector3.new(0, 180, 0)
5399Part143.Color = Color3.new(0, 1, 0)
5400SpecialMesh144.Parent = Part143
5401SpecialMesh144.Scale = Vector3.new(0.0333333351, 0.200000018, 0.0333333351)
5402SpecialMesh144.MeshType = Enum.MeshType.Wedge
5403SpecialMesh144.Scale = Vector3.new(0.0333333351, 0.200000018, 0.0333333351)
5404Part145.Parent = Tool0
5405Part145.Material = Enum.Material.Metal
5406Part145.BrickColor = BrickColor.new("Dark stone grey")
5407Part145.Rotation = Vector3.new(0, 0, -180)
5408Part145.Anchored = true
5409Part145.FormFactor = Enum.FormFactor.Plate
5410Part145.Size = Vector3.new(1, 0.400000006, 1)
5411Part145.CFrame = CFrame.new(2.5, 0.680011988, 48.659996, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5412Part145.BottomSurface = Enum.SurfaceType.Smooth
5413Part145.TopSurface = Enum.SurfaceType.Smooth
5414Part145.Color = Color3.new(0.388235, 0.372549, 0.384314)
5415Part145.Position = Vector3.new(2.5, 0.680011988, 48.659996)
5416Part145.Orientation = Vector3.new(0, 0, 180)
5417Part145.Color = Color3.new(0.388235, 0.372549, 0.384314)
5418BlockMesh146.Parent = Part145
5419BlockMesh146.Scale = Vector3.new(0.0666666701, 0.333333343, 0.166666672)
5420BlockMesh146.Scale = Vector3.new(0.0666666701, 0.333333343, 0.166666672)
5421Part147.Parent = Tool0
5422Part147.Material = Enum.Material.Metal
5423Part147.BrickColor = BrickColor.new("Dark stone grey")
5424Part147.Anchored = true
5425Part147.FormFactor = Enum.FormFactor.Plate
5426Part147.Size = Vector3.new(1, 0.400000006, 1)
5427Part147.CFrame = CFrame.new(2.55000305, 1.16001296, 48.1433334, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5428Part147.BottomSurface = Enum.SurfaceType.Smooth
5429Part147.TopSurface = Enum.SurfaceType.Smooth
5430Part147.Color = Color3.new(0.388235, 0.372549, 0.384314)
5431Part147.Position = Vector3.new(2.55000305, 1.16001296, 48.1433334)
5432Part147.Color = Color3.new(0.388235, 0.372549, 0.384314)
5433BlockMesh148.Parent = Part147
5434BlockMesh148.Scale = Vector3.new(0.0333333351, 0.200000018, 0.0666666701)
5435BlockMesh148.Scale = Vector3.new(0.0333333351, 0.200000018, 0.0666666701)
5436Part149.Parent = Tool0
5437Part149.Material = Enum.Material.Metal
5438Part149.BrickColor = BrickColor.new("Black")
5439Part149.Rotation = Vector3.new(-180, -90, 0)
5440Part149.Anchored = true
5441Part149.FormFactor = Enum.FormFactor.Plate
5442Part149.Size = Vector3.new(1, 0.400000006, 1)
5443Part149.CFrame = CFrame.new(2.61666894, 0.766678989, 47.409996, 0, 0, -1, 0, -1, -0, -1, 0, -0)
5444Part149.BottomSurface = Enum.SurfaceType.Smooth
5445Part149.TopSurface = Enum.SurfaceType.Smooth
5446Part149.Color = Color3.new(0.105882, 0.164706, 0.207843)
5447Part149.Position = Vector3.new(2.61666894, 0.766678989, 47.409996)
5448Part149.Orientation = Vector3.new(0, -90, 180)
5449Part149.Color = Color3.new(0.105882, 0.164706, 0.207843)
5450SpecialMesh150.Parent = Part149
5451SpecialMesh150.Scale = Vector3.new(0.666666687, 0.633333325, 0.0333333351)
5452SpecialMesh150.MeshType = Enum.MeshType.Wedge
5453SpecialMesh150.Scale = Vector3.new(0.666666687, 0.633333325, 0.0333333351)
5454Part151.Parent = Tool0
5455Part151.Material = Enum.Material.Metal
5456Part151.Rotation = Vector3.new(-90, 0, 0)
5457Part151.Anchored = true
5458Part151.FormFactor = Enum.FormFactor.Plate
5459Part151.Size = Vector3.new(1, 0.800000012, 1)
5460Part151.CFrame = CFrame.new(2.5, 0.740013003, 46.6900024, 1, 0, -0, 0, 0, 1, 0, -1, 0)
5461Part151.BottomSurface = Enum.SurfaceType.Smooth
5462Part151.TopSurface = Enum.SurfaceType.Smooth
5463Part151.Position = Vector3.new(2.5, 0.740013003, 46.6900024)
5464Part151.Orientation = Vector3.new(-90, 0, 0)
5465CylinderMesh152.Parent = Part151
5466CylinderMesh152.Scale = Vector3.new(0.166666672, 0.883333385, 0.13333334)
5467CylinderMesh152.Scale = Vector3.new(0.166666672, 0.883333385, 0.13333334)
5468Part153.Parent = Tool0
5469Part153.Material = Enum.Material.Metal
5470Part153.BrickColor = BrickColor.new("Dark stone grey")
5471Part153.Rotation = Vector3.new(0, 0, -180)
5472Part153.Anchored = true
5473Part153.FormFactor = Enum.FormFactor.Plate
5474Part153.Size = Vector3.new(1, 0.400000006, 1)
5475Part153.CFrame = CFrame.new(2.5, 0.700012028, 48.5599976, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5476Part153.BottomSurface = Enum.SurfaceType.Smooth
5477Part153.TopSurface = Enum.SurfaceType.Smooth
5478Part153.Color = Color3.new(0.388235, 0.372549, 0.384314)
5479Part153.Position = Vector3.new(2.5, 0.700012028, 48.5599976)
5480Part153.Orientation = Vector3.new(0, 0, 180)
5481Part153.Color = Color3.new(0.388235, 0.372549, 0.384314)
5482BlockMesh154.Parent = Part153
5483BlockMesh154.Scale = Vector3.new(0.0666666701, 0.233333334, 0.0333333351)
5484BlockMesh154.Scale = Vector3.new(0.0666666701, 0.233333334, 0.0333333351)
5485ManualWeld155.Name = "Part-to-Handle Strong Joint"
5486ManualWeld155.Parent = Part153
5487ManualWeld155.C0 = CFrame.new(-0.5, -0.200000003, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5488ManualWeld155.C1 = CFrame.new(0.500000238, 0.240011632, -0.117003441, -1, -4.10676591e-07, 0, 4.10676591e-07, -1, 7.13453232e-07, -2.92998536e-13, 7.13453232e-07, 1)
5489ManualWeld155.Part0 = Part153
5490ManualWeld155.Part1 = Part12
5491Part156.Parent = Tool0
5492Part156.Material = Enum.Material.Metal
5493Part156.BrickColor = BrickColor.new("Dark stone grey")
5494Part156.Anchored = true
5495Part156.FormFactor = Enum.FormFactor.Plate
5496Part156.Size = Vector3.new(1, 0.400000006, 2)
5497Part156.CFrame = CFrame.new(2.5, 1.12667894, 47.409996, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5498Part156.BottomSurface = Enum.SurfaceType.Smooth
5499Part156.TopSurface = Enum.SurfaceType.Smooth
5500Part156.Color = Color3.new(0.388235, 0.372549, 0.384314)
5501Part156.Position = Vector3.new(2.5, 1.12667894, 47.409996)
5502Part156.Color = Color3.new(0.388235, 0.372549, 0.384314)
5503BlockMesh157.Parent = Part156
5504BlockMesh157.Scale = Vector3.new(0.0666666701, 0.0333333351, 0.766666651)
5505BlockMesh157.Scale = Vector3.new(0.0666666701, 0.0333333351, 0.766666651)
5506Part158.Parent = Tool0
5507Part158.Material = Enum.Material.Metal
5508Part158.BrickColor = BrickColor.new("Black")
5509Part158.Rotation = Vector3.new(-180, 0, 0)
5510Part158.Anchored = true
5511Part158.FormFactor = Enum.FormFactor.Plate
5512Part158.Size = Vector3.new(1, 0.400000006, 1)
5513Part158.CFrame = CFrame.new(2.5, 0.686679006, 49.3599968, 1, 0, 0, 0, -1, 0, 0, 0, -1)
5514Part158.BottomSurface = Enum.SurfaceType.Smooth
5515Part158.TopSurface = Enum.SurfaceType.Smooth
5516Part158.Color = Color3.new(0.105882, 0.164706, 0.207843)
5517Part158.Position = Vector3.new(2.5, 0.686679006, 49.3599968)
5518Part158.Orientation = Vector3.new(0, 180, 180)
5519Part158.Color = Color3.new(0.105882, 0.164706, 0.207843)
5520SpecialMesh159.Parent = Part158
5521SpecialMesh159.Scale = Vector3.new(0.13333334, 0.300000012, 0.100000001)
5522SpecialMesh159.MeshType = Enum.MeshType.Wedge
5523SpecialMesh159.Scale = Vector3.new(0.13333334, 0.300000012, 0.100000001)
5524Part160.Parent = Tool0
5525Part160.Material = Enum.Material.Metal
5526Part160.Rotation = Vector3.new(-90, 0, -180)
5527Part160.Anchored = true
5528Part160.FormFactor = Enum.FormFactor.Plate
5529Part160.Size = Vector3.new(1, 1.60000002, 1)
5530Part160.CFrame = CFrame.new(2.5, 1.02001297, 47.4300003, -1, 0, 0, 0, 0, 1, 0, 1, -0)
5531Part160.BottomSurface = Enum.SurfaceType.Smooth
5532Part160.TopSurface = Enum.SurfaceType.Smooth
5533Part160.Position = Vector3.new(2.5, 1.02001297, 47.4300003)
5534Part160.Orientation = Vector3.new(-90, -180, 0)
5535CylinderMesh161.Parent = Part160
5536CylinderMesh161.Scale = Vector3.new(0.200000003, 1.10833335, 0.200000003)
5537CylinderMesh161.Scale = Vector3.new(0.200000003, 1.10833335, 0.200000003)
5538Part162.Parent = Tool0
5539Part162.Material = Enum.Material.Metal
5540Part162.BrickColor = BrickColor.new("Dark stone grey")
5541Part162.Rotation = Vector3.new(-180, 0, -180)
5542Part162.Anchored = true
5543Part162.FormFactor = Enum.FormFactor.Plate
5544Part162.Size = Vector3.new(1, 0.400000006, 1)
5545Part162.CFrame = CFrame.new(2.5, 1.12667894, 48.2433319, -1, 0, 0, 0, 1, 0, 0, 0, -1)
5546Part162.BottomSurface = Enum.SurfaceType.Smooth
5547Part162.TopSurface = Enum.SurfaceType.Smooth
5548Part162.Color = Color3.new(0.388235, 0.372549, 0.384314)
5549Part162.Position = Vector3.new(2.5, 1.12667894, 48.2433319)
5550Part162.Orientation = Vector3.new(0, 180, 0)
5551Part162.Color = Color3.new(0.388235, 0.372549, 0.384314)
5552SpecialMesh163.Parent = Part162
5553SpecialMesh163.Scale = Vector3.new(0.0666666701, 0.0333333351, 0.13333334)
5554SpecialMesh163.MeshType = Enum.MeshType.Wedge
5555SpecialMesh163.Scale = Vector3.new(0.0666666701, 0.0333333351, 0.13333334)
5556Part164.Parent = Tool0
5557Part164.Material = Enum.Material.Metal
5558Part164.BrickColor = BrickColor.new("Lime green")
5559Part164.Rotation = Vector3.new(-180, 0, -180)
5560Part164.Anchored = true
5561Part164.FormFactor = Enum.FormFactor.Plate
5562Part164.Size = Vector3.new(1, 0.400000006, 1)
5563Part164.CFrame = CFrame.new(2.5, 1.15334594, 46.6266632, -1, 0, 0, 0, 1, 0, 0, 0, -1)
5564Part164.BottomSurface = Enum.SurfaceType.Smooth
5565Part164.TopSurface = Enum.SurfaceType.Smooth
5566Part164.Color = Color3.new(0, 1, 0)
5567Part164.Position = Vector3.new(2.5, 1.15334594, 46.6266632)
5568Part164.Orientation = Vector3.new(0, 180, 0)
5569Part164.Color = Color3.new(0, 1, 0)
5570SpecialMesh165.Parent = Part164
5571SpecialMesh165.Scale = Vector3.new(0.0666666701, 0.166666672, 0.0333333351)
5572SpecialMesh165.MeshType = Enum.MeshType.Wedge
5573SpecialMesh165.Scale = Vector3.new(0.0666666701, 0.166666672, 0.0333333351)
5574Part166.Parent = Tool0
5575Part166.Material = Enum.Material.Metal
5576Part166.BrickColor = BrickColor.new("Dark stone grey")
5577Part166.Anchored = true
5578Part166.FormFactor = Enum.FormFactor.Plate
5579Part166.Size = Vector3.new(1, 0.400000006, 1)
5580Part166.CFrame = CFrame.new(2.5, 1.05334496, 46.5099945, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5581Part166.BottomSurface = Enum.SurfaceType.Smooth
5582Part166.TopSurface = Enum.SurfaceType.Smooth
5583Part166.Color = Color3.new(0.388235, 0.372549, 0.384314)
5584Part166.Position = Vector3.new(2.5, 1.05334496, 46.5099945)
5585Part166.Color = Color3.new(0.388235, 0.372549, 0.384314)
5586SpecialMesh167.Parent = Part166
5587SpecialMesh167.Scale = Vector3.new(0.0666666701, 0.666666687, 0.0666666701)
5588SpecialMesh167.MeshType = Enum.MeshType.Wedge
5589SpecialMesh167.Scale = Vector3.new(0.0666666701, 0.666666687, 0.0666666701)
5590Part168.Parent = Tool0
5591Part168.Material = Enum.Material.Metal
5592Part168.Rotation = Vector3.new(-90, 0, -180)
5593Part168.Anchored = true
5594Part168.FormFactor = Enum.FormFactor.Plate
5595Part168.Size = Vector3.new(1, 1.20000005, 1)
5596Part168.CFrame = CFrame.new(2.5, 0.870019972, 46.4633331, -1, 0, 0, 0, 0, 1, 0, 1, -0)
5597Part168.BottomSurface = Enum.SurfaceType.Smooth
5598Part168.TopSurface = Enum.SurfaceType.Smooth
5599Part168.Position = Vector3.new(2.5, 0.870019972, 46.4633331)
5600Part168.Orientation = Vector3.new(-90, -180, 0)
5601CylinderMesh169.Parent = Part168
5602CylinderMesh169.Scale = Vector3.new(0.100000001, 0.966666579, 0.100000001)
5603CylinderMesh169.Scale = Vector3.new(0.100000001, 0.966666579, 0.100000001)
5604Part170.Parent = Tool0
5605Part170.Material = Enum.Material.Metal
5606Part170.BrickColor = BrickColor.new("Dark stone grey")
5607Part170.Rotation = Vector3.new(0, 0, -180)
5608Part170.Anchored = true
5609Part170.FormFactor = Enum.FormFactor.Plate
5610Part170.Size = Vector3.new(1, 0.400000006, 2)
5611Part170.CFrame = CFrame.new(2.5, 0.833347976, 48.8266602, -1, 0, 0, 0, -1, 0, 0, 0, 1)
5612Part170.BottomSurface = Enum.SurfaceType.Smooth
5613Part170.TopSurface = Enum.SurfaceType.Smooth
5614Part170.Color = Color3.new(0.388235, 0.372549, 0.384314)
5615Part170.Position = Vector3.new(2.5, 0.833347976, 48.8266602)
5616Part170.Orientation = Vector3.new(0, 0, 180)
5617Part170.Color = Color3.new(0.388235, 0.372549, 0.384314)
5618BlockMesh171.Parent = Part170
5619BlockMesh171.Scale = Vector3.new(0.13333334, 0.433333367, 0.816666663)
5620BlockMesh171.Scale = Vector3.new(0.13333334, 0.433333367, 0.816666663)
5621Part172.Parent = Tool0
5622Part172.Material = Enum.Material.Metal
5623Part172.BrickColor = BrickColor.new("Dark stone grey")
5624Part172.Anchored = true
5625Part172.FormFactor = Enum.FormFactor.Plate
5626Part172.Size = Vector3.new(1, 0.400000006, 1)
5627Part172.CFrame = CFrame.new(2.5, 0.780013978, 47.5266647, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5628Part172.BottomSurface = Enum.SurfaceType.Smooth
5629Part172.TopSurface = Enum.SurfaceType.Smooth
5630Part172.Color = Color3.new(0.388235, 0.372549, 0.384314)
5631Part172.Position = Vector3.new(2.5, 0.780013978, 47.5266647)
5632Part172.Color = Color3.new(0.388235, 0.372549, 0.384314)
5633BlockMesh173.Parent = Part172
5634BlockMesh173.Scale = Vector3.new(0.200000003, 0.700000048, 0.966666639)
5635BlockMesh173.Scale = Vector3.new(0.200000003, 0.700000048, 0.966666639)
5636Part174.Parent = Tool0
5637Part174.Material = Enum.Material.Metal
5638Part174.BrickColor = BrickColor.new("Black")
5639Part174.Anchored = true
5640Part174.FormFactor = Enum.FormFactor.Plate
5641Part174.Size = Vector3.new(1, 0.400000006, 2)
5642Part174.CFrame = CFrame.new(2.5, 1.00668001, 49.8766632, 1, 0, 0, 0, 1, 0, 0, 0, 1)
5643Part174.BottomSurface = Enum.SurfaceType.Smooth
5644Part174.TopSurface = Enum.SurfaceType.Smooth
5645Part174.Color = Color3.new(0.105882, 0.164706, 0.207843)
5646Part174.Position = Vector3.new(2.5, 1.00668001, 49.8766632)
5647Part174.Color = Color3.new(0.105882, 0.164706, 0.207843)
5648BlockMesh175.Parent = Part174
5649BlockMesh175.Scale = Vector3.new(0.200000003, 0.433333367, 0.833333313)
5650BlockMesh175.Scale = Vector3.new(0.200000003, 0.433333367, 0.833333313)
5651Part176.Parent = Tool0
5652Part176.Material = Enum.Material.Metal
5653Part176.BrickColor = BrickColor.new("Dark stone grey")
5654Part176.Rotation = Vector3.new(90, 0, 0)
5655Part176.Anchored = true
5656Part176.FormFactor = Enum.FormFactor.Plate
5657Part176.Size = Vector3.new(1, 0.800000012, 1)
5658Part176.CFrame = CFrame.new(2.5, 1.00335801, 48.6766663, 1, 0, 0, 0, 0, -1, 0, 1, 0)
5659Part176.BottomSurface = Enum.SurfaceType.Smooth
5660Part176.TopSurface = Enum.SurfaceType.Smooth
5661Part176.Color = Color3.new(0.388235, 0.372549, 0.384314)
5662Part176.Position = Vector3.new(2.5, 1.00335801, 48.6766663)
5663Part176.Orientation = Vector3.new(90, 0, 0)
5664Part176.Color = Color3.new(0.388235, 0.372549, 0.384314)
5665CylinderMesh177.Parent = Part176
5666CylinderMesh177.Scale = Vector3.new(0.200000003, 0.900000036, 0.200000003)
5667CylinderMesh177.Scale = Vector3.new(0.200000003, 0.900000036, 0.200000003)
5668ManualWeld178.Name = "Part-to-Handle Strong Joint"
5669ManualWeld178.Parent = Part176
5670ManualWeld178.C0 = CFrame.new(-0.5, 0.400000006, 0.5, -1, 0, 0, 0, 0, 1, 0, 1, -0)
5671ManualWeld178.C1 = CFrame.new(-0.5, -0.156641901, -0.100334167, -1, -4.10676591e-07, 0, 4.10676591e-07, -1, 7.13453232e-07, -2.92998536e-13, 7.13453232e-07, 1)
5672ManualWeld178.Part0 = Part176
5673ManualWeld178.Part1 = Part12
5674for i,v in pairs(mas:GetChildren()) do
5675 v.Parent = game:GetService("Players").LocalPlayer.Backpack
5676 pcall(function() v:MakeJoints() end)
5677end
5678mas:Destroy()
5679for i,v in pairs(cors) do
5680 spawn(function()
5681 pcall(v)
5682 end)
5683end