· 8 years ago · Jun 16, 2018, 04:46 AM
1
2--Converted with ttyyuu12345's model to script plugin v4
3function sandbox(var,func)
4 local env = getfenv(func)
5 local newenv = setmetatable({},{
6 __index = function(self,k)
7 if k=="script" then
8 return var
9 else
10 return env[k]
11 end
12 end,
13 })
14 setfenv(func,newenv)
15 return func
16end
17cors = {}
18mas = Instance.new("Model",game:GetService("Lighting"))
19Tool0 = Instance.new("Tool")
20UnionOperation1 = Instance.new("UnionOperation")
21UnionOperation2 = Instance.new("UnionOperation")
22UnionOperation3 = Instance.new("UnionOperation")
23UnionOperation4 = Instance.new("UnionOperation")
24UnionOperation5 = Instance.new("UnionOperation")
25UnionOperation6 = Instance.new("UnionOperation")
26UnionOperation7 = Instance.new("UnionOperation")
27UnionOperation8 = Instance.new("UnionOperation")
28UnionOperation9 = Instance.new("UnionOperation")
29UnionOperation10 = Instance.new("UnionOperation")
30Part11 = Instance.new("Part")
31BlockMesh12 = Instance.new("BlockMesh")
32Part13 = Instance.new("Part")
33BlockMesh14 = Instance.new("BlockMesh")
34Part15 = Instance.new("Part")
35BlockMesh16 = Instance.new("BlockMesh")
36Part17 = Instance.new("Part")
37BlockMesh18 = Instance.new("BlockMesh")
38Part19 = Instance.new("Part")
39BlockMesh20 = Instance.new("BlockMesh")
40Sound21 = Instance.new("Sound")
41ParticleEmitter22 = Instance.new("ParticleEmitter")
42Part23 = Instance.new("Part")
43BlockMesh24 = Instance.new("BlockMesh")
44ParticleEmitter25 = Instance.new("ParticleEmitter")
45ParticleEmitter26 = Instance.new("ParticleEmitter")
46PointLight27 = Instance.new("PointLight")
47IntValue28 = Instance.new("IntValue")
48Script29 = Instance.new("Script")
49IntValue30 = Instance.new("IntValue")
50Script31 = Instance.new("Script")
51ObjectValue32 = Instance.new("ObjectValue")
52RemoteFunction33 = Instance.new("RemoteFunction")
53RemoteFunction34 = Instance.new("RemoteFunction")
54RemoteFunction35 = Instance.new("RemoteFunction")
55RemoteEvent36 = Instance.new("RemoteEvent")
56RemoteFunction37 = Instance.new("RemoteFunction")
57RemoteFunction38 = Instance.new("RemoteFunction")
58RemoteFunction39 = Instance.new("RemoteFunction")
59LocalScript40 = Instance.new("LocalScript")
60IntValue41 = Instance.new("IntValue")
61RemoteEvent42 = Instance.new("RemoteEvent")
62RemoteEvent43 = Instance.new("RemoteEvent")
63RemoteEvent44 = Instance.new("RemoteEvent")
64RemoteEvent45 = Instance.new("RemoteEvent")
65LocalScript46 = Instance.new("LocalScript")
66IntValue47 = Instance.new("IntValue")
67Folder48 = Instance.new("Folder")
68ModuleScript49 = Instance.new("ModuleScript")
69ModuleScript50 = Instance.new("ModuleScript")
70ScreenGui51 = Instance.new("ScreenGui")
71ImageLabel52 = Instance.new("ImageLabel")
72NumberValue53 = Instance.new("NumberValue")
73Frame54 = Instance.new("Frame")
74ImageLabel55 = Instance.new("ImageLabel")
75TextLabel56 = Instance.new("TextLabel")
76Frame57 = Instance.new("Frame")
77TextLabel58 = Instance.new("TextLabel")
78Frame59 = Instance.new("Frame")
79TextLabel60 = Instance.new("TextLabel")
80Frame61 = Instance.new("Frame")
81TextLabel62 = Instance.new("TextLabel")
82Frame63 = Instance.new("Frame")
83TextLabel64 = Instance.new("TextLabel")
84Frame65 = Instance.new("Frame")
85Frame66 = Instance.new("Frame")
86ImageLabel67 = Instance.new("ImageLabel")
87ImageLabel68 = Instance.new("ImageLabel")
88TextLabel69 = Instance.new("TextLabel")
89Frame70 = Instance.new("Frame")
90TextLabel71 = Instance.new("TextLabel")
91Frame72 = Instance.new("Frame")
92ImageLabel73 = Instance.new("ImageLabel")
93ImageLabel74 = Instance.new("ImageLabel")
94Frame75 = Instance.new("Frame")
95Frame76 = Instance.new("Frame")
96LocalScript77 = Instance.new("LocalScript")
97TextLabel78 = Instance.new("TextLabel")
98ImageLabel79 = Instance.new("ImageLabel")
99Frame80 = Instance.new("Frame")
100Frame81 = Instance.new("Frame")
101TextLabel82 = Instance.new("TextLabel")
102TextLabel83 = Instance.new("TextLabel")
103Frame84 = Instance.new("Frame")
104Frame85 = Instance.new("Frame")
105ImageLabel86 = Instance.new("ImageLabel")
106TextLabel87 = Instance.new("TextLabel")
107TextLabel88 = Instance.new("TextLabel")
108Frame89 = Instance.new("Frame")
109ImageLabel90 = Instance.new("ImageLabel")
110TextLabel91 = Instance.new("TextLabel")
111TextLabel92 = Instance.new("TextLabel")
112Frame93 = Instance.new("Frame")
113TextLabel94 = Instance.new("TextLabel")
114Frame95 = Instance.new("Frame")
115Frame96 = Instance.new("Frame")
116Frame97 = Instance.new("Frame")
117Frame98 = Instance.new("Frame")
118Frame99 = Instance.new("Frame")
119Frame100 = Instance.new("Frame")
120Frame101 = Instance.new("Frame")
121Frame102 = Instance.new("Frame")
122Frame103 = Instance.new("Frame")
123Frame104 = Instance.new("Frame")
124Frame105 = Instance.new("Frame")
125Frame106 = Instance.new("Frame")
126Frame107 = Instance.new("Frame")
127Frame108 = Instance.new("Frame")
128Frame109 = Instance.new("Frame")
129Frame110 = Instance.new("Frame")
130Frame111 = Instance.new("Frame")
131Frame112 = Instance.new("Frame")
132Frame113 = Instance.new("Frame")
133Frame114 = Instance.new("Frame")
134Frame115 = Instance.new("Frame")
135Frame116 = Instance.new("Frame")
136Frame117 = Instance.new("Frame")
137Frame118 = Instance.new("Frame")
138Frame119 = Instance.new("Frame")
139Frame120 = Instance.new("Frame")
140TextLabel121 = Instance.new("TextLabel")
141TextLabel122 = Instance.new("TextLabel")
142TextLabel123 = Instance.new("TextLabel")
143Frame124 = Instance.new("Frame")
144TextLabel125 = Instance.new("TextLabel")
145TextLabel126 = Instance.new("TextLabel")
146Frame127 = Instance.new("Frame")
147TextLabel128 = Instance.new("TextLabel")
148TextLabel129 = Instance.new("TextLabel")
149TextLabel130 = Instance.new("TextLabel")
150TextLabel131 = Instance.new("TextLabel")
151TextLabel132 = Instance.new("TextLabel")
152ImageLabel133 = Instance.new("ImageLabel")
153TextLabel134 = Instance.new("TextLabel")
154ModuleScript135 = Instance.new("ModuleScript")
155ModuleScript136 = Instance.new("ModuleScript")
156ModuleScript137 = Instance.new("ModuleScript")
157IntValue138 = Instance.new("IntValue")
158Camera139 = Instance.new("Camera")
159Tool0.Name = "meme gun"
160Tool0.Parent = mas
161Tool0.ToolTip = "y'all'd'v'e better not heccing mess wit me!"
162UnionOperation1.Name = "Bolt"
163UnionOperation1.Parent = Tool0
164UnionOperation1.CFrame = CFrame.new(-1.96275604, 2.12726998, -15.8923159, 0, 0, 1, 0, 1, -0, -1, 0, 0)
165UnionOperation1.Orientation = Vector3.new(0, 90, 0)
166UnionOperation1.Position = Vector3.new(-1.96275604, 2.12726998, -15.8923159)
167UnionOperation1.Rotation = Vector3.new(0, 90, 0)
168UnionOperation1.Color = Color3.new(0.639216, 0.635294, 0.647059)
169UnionOperation1.Size = Vector3.new(1.06267238, 0.24375014, 0.162500158)
170UnionOperation1.Anchored = true
171UnionOperation1.BrickColor = BrickColor.new("Medium stone grey")
172UnionOperation1.CanCollide = false
173UnionOperation1.Material = Enum.Material.Metal
174UnionOperation1.brickColor = BrickColor.new("Medium stone grey")
175UnionOperation1.UsePartColor = true
176UnionOperation2.Name = "BoltBack"
177UnionOperation2.Parent = Tool0
178UnionOperation2.CFrame = CFrame.new(-1.96275604, 2.12726998, -15.7048159, 0, 0, 1, 0, 1, -0, -1, 0, 0)
179UnionOperation2.Orientation = Vector3.new(0, 90, 0)
180UnionOperation2.Position = Vector3.new(-1.96275604, 2.12726998, -15.7048159)
181UnionOperation2.Rotation = Vector3.new(0, 90, 0)
182UnionOperation2.Color = Color3.new(0.639216, 0.635294, 0.647059)
183UnionOperation2.Transparency = 1
184UnionOperation2.Size = Vector3.new(1.06267238, 0.24375014, 0.162500158)
185UnionOperation2.Anchored = true
186UnionOperation2.BrickColor = BrickColor.new("Medium stone grey")
187UnionOperation2.CanCollide = false
188UnionOperation2.Material = Enum.Material.Metal
189UnionOperation2.brickColor = BrickColor.new("Medium stone grey")
190UnionOperation2.UsePartColor = true
191UnionOperation3.Name = "Mag"
192UnionOperation3.Parent = Tool0
193UnionOperation3.CFrame = CFrame.new(-1.96275604, 1.65647399, -15.5408936, 0, 0, 1, -0.164398953, 0.986393929, 0, -0.986393929, -0.164398953, 0)
194UnionOperation3.Orientation = Vector3.new(0, 90, -9.46000004)
195UnionOperation3.Position = Vector3.new(-1.96275604, 1.65647399, -15.5408936)
196UnionOperation3.Rotation = Vector3.new(-9.46000004, 90, 0)
197UnionOperation3.Color = Color3.new(0.105882, 0.164706, 0.207843)
198UnionOperation3.Size = Vector3.new(0.223036915, 0.556512237, 0.125000015)
199UnionOperation3.Anchored = true
200UnionOperation3.BrickColor = BrickColor.new("Black")
201UnionOperation3.CanCollide = false
202UnionOperation3.Material = Enum.Material.Metal
203UnionOperation3.brickColor = BrickColor.new("Black")
204UnionOperation3.UsePartColor = true
205UnionOperation4.Parent = Tool0
206UnionOperation4.CFrame = CFrame.new(-1.96275604, 1.92417204, -15.7548122, -0.999994993, 2.36728801e-12, -2.98094811e-08, -7.04858437e-12, -4.46896138e-08, 0.999993324, 3.0329233e-13, 0.999997258, -4.47174635e-08)
207UnionOperation4.Orientation = Vector3.new(-89.7900009, -146.309998, -179.98999)
208UnionOperation4.Position = Vector3.new(-1.96275604, 1.92417204, -15.7548122)
209UnionOperation4.Rotation = Vector3.new(-90, 0, -180)
210UnionOperation4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
211UnionOperation4.Size = Vector3.new(0.0625000596, 0.0625001341, 0.11255534)
212UnionOperation4.Anchored = true
213UnionOperation4.BrickColor = BrickColor.new("Really black")
214UnionOperation4.CanCollide = false
215UnionOperation4.Material = Enum.Material.Metal
216UnionOperation4.brickColor = BrickColor.new("Really black")
217UnionOperation4.UsePartColor = true
218UnionOperation5.Parent = Tool0
219UnionOperation5.CFrame = CFrame.new(-1.96275604, 2.15851998, -16.0923119, -1, 0, 0, 0, 0, 1, 0, 1, -0)
220UnionOperation5.Orientation = Vector3.new(-90, -180, 0)
221UnionOperation5.Position = Vector3.new(-1.96275604, 2.15851998, -16.0923119)
222UnionOperation5.Rotation = Vector3.new(-90, 0, -180)
223UnionOperation5.Color = Color3.new(0.105882, 0.164706, 0.207843)
224UnionOperation5.Size = Vector3.new(0.10625001, 0.787500083, 0.106250003)
225UnionOperation5.Anchored = true
226UnionOperation5.BrickColor = BrickColor.new("Black")
227UnionOperation5.CanCollide = false
228UnionOperation5.Material = Enum.Material.Metal
229UnionOperation5.brickColor = BrickColor.new("Black")
230UnionOperation6.Parent = Tool0
231UnionOperation6.CFrame = CFrame.new(-1.96275604, 2.13831902, -15.3733921, 0, 1, 0, 0.866025388, 0, 0.50000006, 0.50000006, 0, -0.866025388)
232UnionOperation6.Orientation = Vector3.new(-30, 180, 90)
233UnionOperation6.Position = Vector3.new(-1.96275604, 2.13831902, -15.3733921)
234UnionOperation6.Rotation = Vector3.new(-150, 0, -90)
235UnionOperation6.Color = Color3.new(0.105882, 0.164706, 0.207843)
236UnionOperation6.Size = Vector3.new(0.0999999791, 0.0500000194, 0.0500000454)
237UnionOperation6.Anchored = true
238UnionOperation6.BrickColor = BrickColor.new("Black")
239UnionOperation6.CanCollide = false
240UnionOperation6.Material = Enum.Material.Metal
241UnionOperation6.brickColor = BrickColor.new("Black")
242UnionOperation6.UsePartColor = true
243UnionOperation7.Parent = Tool0
244UnionOperation7.CFrame = CFrame.new(-1.96275604, 1.68976903, -15.4875736, 0, -1, 0, 0, 0, 1, -1, 0, 0)
245UnionOperation7.Orientation = Vector3.new(-90, 90, 0)
246UnionOperation7.Position = Vector3.new(-1.96275604, 1.68976903, -15.4875736)
247UnionOperation7.Rotation = Vector3.new(-90, 0, 90)
248UnionOperation7.Color = Color3.new(0.105882, 0.164706, 0.207843)
249UnionOperation7.Size = Vector3.new(0.37197572, 0.125000089, 0.618750036)
250UnionOperation7.Anchored = true
251UnionOperation7.BrickColor = BrickColor.new("Black")
252UnionOperation7.CanCollide = false
253UnionOperation7.Material = Enum.Material.Metal
254UnionOperation7.brickColor = BrickColor.new("Black")
255UnionOperation7.UsePartColor = true
256UnionOperation8.Parent = Tool0
257UnionOperation8.CFrame = CFrame.new(-1.96275604, 2.01789594, -15.782938, 0, 0, 1, 0, 1, -0, -1, 0, 0)
258UnionOperation8.Orientation = Vector3.new(0, 90, 0)
259UnionOperation8.Position = Vector3.new(-1.96275604, 2.01789594, -15.782938)
260UnionOperation8.Rotation = Vector3.new(0, 90, 0)
261UnionOperation8.Color = Color3.new(0.639216, 0.635294, 0.647059)
262UnionOperation8.Size = Vector3.new(1.03125024, 0.100000091, 0.125000089)
263UnionOperation8.Anchored = true
264UnionOperation8.BrickColor = BrickColor.new("Medium stone grey")
265UnionOperation8.CanCollide = false
266UnionOperation8.Material = Enum.Material.Metal
267UnionOperation8.brickColor = BrickColor.new("Medium stone grey")
268UnionOperation9.Parent = Tool0
269UnionOperation9.CFrame = CFrame.new(-2.01900697, 2.05227089, -15.6813755, 0, -1, 0, 0, 0, 1, -1, 0, 0)
270UnionOperation9.Orientation = Vector3.new(-90, 90, 0)
271UnionOperation9.Position = Vector3.new(-2.01900697, 2.05227089, -15.6813755)
272UnionOperation9.Rotation = Vector3.new(-90, 0, 90)
273UnionOperation9.Color = Color3.new(0.105882, 0.164706, 0.207843)
274UnionOperation9.Size = Vector3.new(0.140625015, 0.0375000387, 0.0312500075)
275UnionOperation9.Anchored = true
276UnionOperation9.BrickColor = BrickColor.new("Black")
277UnionOperation9.CanCollide = false
278UnionOperation9.Material = Enum.Material.Metal
279UnionOperation9.brickColor = BrickColor.new("Black")
280UnionOperation9.UsePartColor = true
281UnionOperation10.Parent = Tool0
282UnionOperation10.CFrame = CFrame.new(-1.96275604, 1.90539503, -15.798562, 1, 0, -0, 0, 0, 1, 0, -1, 0)
283UnionOperation10.Orientation = Vector3.new(-90, 0, 0)
284UnionOperation10.Position = Vector3.new(-1.96275604, 1.90539503, -15.798562)
285UnionOperation10.Rotation = Vector3.new(-90, 0, 0)
286UnionOperation10.Color = Color3.new(0.639216, 0.635294, 0.647059)
287UnionOperation10.Size = Vector3.new(0.124999993, 0.25, 0.125000313)
288UnionOperation10.Anchored = true
289UnionOperation10.BrickColor = BrickColor.new("Medium stone grey")
290UnionOperation10.CanCollide = false
291UnionOperation10.Material = Enum.Material.Metal
292UnionOperation10.brickColor = BrickColor.new("Medium stone grey")
293UnionOperation10.UsePartColor = true
294Part11.Name = "A1"
295Part11.Parent = Tool0
296Part11.CFrame = CFrame.new(-1.94400299, 2.19227099, -15.6209736, 0, 0, 1, 0, 1, -0, -1, 0, 0)
297Part11.Orientation = Vector3.new(0, 90, 0)
298Part11.Position = Vector3.new(-1.94400299, 2.19227099, -15.6209736)
299Part11.Rotation = Vector3.new(0, 90, 0)
300Part11.Color = Color3.new(0.105882, 0.164706, 0.207843)
301Part11.Transparency = 1
302Part11.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
303Part11.Anchored = true
304Part11.BrickColor = BrickColor.new("Black")
305Part11.CanCollide = false
306Part11.Material = Enum.Material.Metal
307Part11.brickColor = BrickColor.new("Black")
308BlockMesh12.Parent = Part11
309BlockMesh12.Scale = Vector3.new(0.625, 0.15625, 0.3125)
310Part13.Name = "A2"
311Part13.Parent = Tool0
312Part13.CFrame = CFrame.new(-1.94400299, 2.19227099, -15.7147322, 1, 0, 0, 0, 1, 0, 0, 0, 1)
313Part13.Position = Vector3.new(-1.94400299, 2.19227099, -15.7147322)
314Part13.Color = Color3.new(0.105882, 0.164706, 0.207843)
315Part13.Transparency = 1
316Part13.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
317Part13.Anchored = true
318Part13.BrickColor = BrickColor.new("Black")
319Part13.CanCollide = false
320Part13.Material = Enum.Material.Metal
321Part13.brickColor = BrickColor.new("Black")
322BlockMesh14.Parent = Part13
323BlockMesh14.Scale = Vector3.new(0.625, 0.15625, 0.3125)
324Part15.Name = "AimPart"
325Part15.Parent = Tool0
326Part15.CFrame = CFrame.new(-1.96275604, 2.23977089, -13.5383835, 1, 0, 0, 0, 1, 0, 0, 0, 1)
327Part15.Position = Vector3.new(-1.96275604, 2.23977089, -13.5383835)
328Part15.Color = Color3.new(0.105882, 0.164706, 0.207843)
329Part15.Transparency = 1
330Part15.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
331Part15.Anchored = true
332Part15.BrickColor = BrickColor.new("Black")
333Part15.CanCollide = false
334Part15.Material = Enum.Material.Metal
335Part15.brickColor = BrickColor.new("Black")
336BlockMesh16.Parent = Part15
337BlockMesh16.Scale = Vector3.new(0.3125, 0.15625, 0.3125)
338Part17.Name = "Chamber"
339Part17.Parent = Tool0
340Part17.CFrame = CFrame.new(-1.95962799, 2.20227194, -15.6422358, 0, 0, -1, 0, -1, -0, -1, 0, -0)
341Part17.Orientation = Vector3.new(0, -90, 180)
342Part17.Position = Vector3.new(-1.95962799, 2.20227194, -15.6422358)
343Part17.Rotation = Vector3.new(-180, -90, 0)
344Part17.Color = Color3.new(0.105882, 0.164706, 0.207843)
345Part17.Transparency = 1
346Part17.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
347Part17.Anchored = true
348Part17.BrickColor = BrickColor.new("Black")
349Part17.CanCollide = false
350Part17.Material = Enum.Material.Metal
351Part17.brickColor = BrickColor.new("Black")
352BlockMesh18.Parent = Part17
353BlockMesh18.Scale = Vector3.new(0.625, 0.15625, 0.15625)
354Part19.Name = "Handle"
355Part19.Parent = Tool0
356Part19.CFrame = CFrame.new(-1.96275604, 1.68164277, -15.7048159, 1, 0, 0, 0, 1, 0, 0, 0, 1)
357Part19.Position = Vector3.new(-1.96275604, 1.68164277, -15.7048159)
358Part19.Transparency = 1
359Part19.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
360Part19.Anchored = true
361Part19.CanCollide = false
362Part19.Material = Enum.Material.Metal
363BlockMesh20.Parent = Part19
364BlockMesh20.Scale = Vector3.new(0.3125, 0.3125, 0.3125)
365Sound21.Name = "FireSound"
366Sound21.Parent = Part19
367Sound21.SoundId = "rbxassetid://437235476"
368Sound21.Volume = 2
369ParticleEmitter22.Parent = Part19
370ParticleEmitter22.Texture = "rbxassetid://414890393"
371ParticleEmitter22.Size = NumberSequence.new(0.10000000149012,0.10000000149012)
372ParticleEmitter22.RotSpeed = NumberRange.new(0, 10)
373ParticleEmitter22.SpreadAngle = Vector2.new(20, 20)
374ParticleEmitter22.VelocitySpread = 20
375Part23.Name = "Main"
376Part23.Parent = Tool0
377Part23.CFrame = CFrame.new(-1.96275604, 2.15851998, -16.501688, -1, 0, -0, 0, 0, -1, 0, -1, -0)
378Part23.Orientation = Vector3.new(90, 180, 0)
379Part23.Position = Vector3.new(-1.96275604, 2.15851998, -16.501688)
380Part23.Rotation = Vector3.new(90, 0, -180)
381Part23.Transparency = 1
382Part23.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
383Part23.Anchored = true
384Part23.CanCollide = false
385Part23.Material = Enum.Material.Metal
386BlockMesh24.Parent = Part23
387BlockMesh24.Scale = Vector3.new(0.53125, 0.15625, 0.53125)
388ParticleEmitter25.Name = "1FlashFX[Smoke]"
389ParticleEmitter25.Parent = Part23
390ParticleEmitter25.Speed = NumberRange.new(5, 7)
391ParticleEmitter25.Rotation = NumberRange.new(0, 360)
392ParticleEmitter25.Color = ColorSequence.new(Color3.new(0.27451, 0.27451, 0.27451),Color3.new(0.27451, 0.27451, 0.27451))
393ParticleEmitter25.Enabled = false
394ParticleEmitter25.LightEmission = 0.10000000149012
395ParticleEmitter25.Texture = "http://www.roblox.com/asset/?id=244514423"
396ParticleEmitter25.Transparency = NumberSequence.new(0.60000002384186,1)
397ParticleEmitter25.Size = NumberSequence.new(0.99999964237213,3)
398ParticleEmitter25.Lifetime = NumberRange.new(1.25, 1.5)
399ParticleEmitter25.Rate = 100
400ParticleEmitter25.RotSpeed = NumberRange.new(10, 10)
401ParticleEmitter25.SpreadAngle = Vector2.new(15, 15)
402ParticleEmitter25.VelocitySpread = 15
403ParticleEmitter26.Name = "FlashFX[Flash]"
404ParticleEmitter26.Parent = Part23
405ParticleEmitter26.Speed = NumberRange.new(50, 50)
406ParticleEmitter26.Rotation = NumberRange.new(0, 90)
407ParticleEmitter26.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0.498039))
408ParticleEmitter26.Enabled = false
409ParticleEmitter26.LightEmission = 1
410ParticleEmitter26.Texture = "http://www.roblox.com/asset/?id=3419963"
411ParticleEmitter26.Transparency = NumberSequence.new(0.75,1)
412ParticleEmitter26.Size = NumberSequence.new(0.20000000298023,0.20000000298023)
413ParticleEmitter26.Lifetime = NumberRange.new(0.050000000745058, 0.075000002980232)
414ParticleEmitter26.Rate = 1000
415PointLight27.Name = "FlashFX[Light]"
416PointLight27.Parent = Part23
417PointLight27.Color = Color3.new(1, 1, 0.498039)
418PointLight27.Enabled = false
419PointLight27.Range = 6
420PointLight27.Brightness = 10
421PointLight27.Shadows = true
422IntValue28.Name = "ClipSize"
423IntValue28.Parent = Tool0
424IntValue28.Value = 15
425Script29.Name = "Credits"
426Script29.Parent = Tool0
427table.insert(cors,sandbox(Script29,function()
428--[[
429 ______ ______ __ ______ _ ______
430 / _/ _/ /_ __/_ _______/ /_ ____ / ____/_ _______(_)___ ____ / / /
431 / // / / / / / / / ___/ __ \/ __ \/ /_ / / / / ___/ / __ \/ __ \ / // /
432 / // / / / / /_/ / / / /_/ / /_/ / __/ / /_/ (__ ) / /_/ / / / / / // /
433 / // / /_/ \__,_/_/ /_.___/\____/_/ \__,_/____/_/\____/_/ /_/ _/ // /
434 /__/__/ /__/__/
435
436--]]
437
438--also slendermadman lol
439end))
440IntValue30.Name = "StoredAmmo"
441IntValue30.Parent = Tool0
442IntValue30.Value = 420
443Script31.Name = "serverMain"
444Script31.Parent = Tool0
445table.insert(cors,sandbox(Script31,function()
446local Plyr = script:WaitForChild("Plyr")
447
448local Gun = script.Parent
449local Handle = Gun:WaitForChild("Handle")
450
451local V3 = Vector3.new
452local CF, CFANG = CFrame.new, CFrame.Angles
453
454local RAD = math.rad
455
456local numLerp = function(A, B, Alpha)
457 return A + (B - A) * Alpha
458end
459
460local inList = function(Element, List)
461 for _, v in pairs(List) do
462 if v == Element then
463 return true
464 end
465 end
466 return false
467end
468
469local getObject = function(Model, Class, Name)
470 for _, v in pairs(Model:GetChildren()) do
471 if v:IsA(Class) and v.Name == Name then
472 return v
473 end
474 end
475 return nil
476end
477
478----------------------------------------------------------------------
479--------------------[ IGNORE MODEL HANDLING ]-------------------------
480----------------------------------------------------------------------
481
482wait(math.random(0, 20) / 40) --This is to prevent more than one ignoreModel from being created
483
484if _G.ignoreCode then --If the ignoreCode already exists, then the script creates the ignoreModel
485 --[[
486 The purpose of this is so that every gun in a game that uses this gun kit will share one ignoreModel. That way,
487 bullet trails, bullet holes, and other fake arms will be ignored by the gun which makes the bullets more likely to
488 hit a character part
489 --]]
490 if (not game.Workspace:FindFirstChild("ignoreModel_".._G.ignoreCode)) then
491 local ignoreModel = Instance.new("Model")
492 ignoreModel.Name = "ignoreModel_".._G.ignoreCode
493 ignoreModel.Parent = game.Workspace
494
495 local grenadeFolder = Instance.new("Model")
496 grenadeFolder.Name = "grenadeFolder"
497 grenadeFolder.Parent = ignoreModel
498
499 spawn(function()
500 while true do
501 ignoreModel.Parent = game.Workspace
502 grenadeFolder.Parent = ignoreModel
503 wait(1 / 20)
504 end
505 end)
506 end
507
508 script.Parent:WaitForChild("clientMain"):WaitForChild("ignoreCode").Value = _G.ignoreCode
509else
510 --[[
511 If there isn't already an ignoreCode, then this creates one. The purpose of it being random is so that if there is
512 an ignoreModel for something else in the game, the script won't end up placing the ignored objects in that ignoreModel
513 --]]
514 _G.ignoreCode = math.random(1, 1e4)
515
516 if (not game.Workspace:FindFirstChild("ignoreModel_".._G.ignoreCode)) then
517 local ignoreModel = Instance.new("Model")
518 ignoreModel.Name = "ignoreModel_".._G.ignoreCode
519 ignoreModel.Parent = game.Workspace
520
521 local grenadeFolder = Instance.new("Model")
522 grenadeFolder.Name = "grenadeFolder"
523 grenadeFolder.Parent = ignoreModel
524
525 spawn(function()
526 while true do
527 ignoreModel.Parent = game.Workspace
528 grenadeFolder.Parent = ignoreModel
529 wait(1 / 20)
530 end
531 end)
532 end
533
534 script.Parent:WaitForChild("clientMain"):WaitForChild("ignoreCode").Value = _G.ignoreCode
535end
536
537spawn(function()
538 --[[
539 This function deletes any Player Folders that were left in the ignoreModel because the player left the game without
540 deselecting the Gun first
541 --]]
542 repeat wait() until _G.ignoreCode
543 local ignoreModel = game.Workspace:WaitForChild("ignoreModel_".._G.ignoreCode)
544 while true do
545 for _, gunIgnore in pairs(ignoreModel:GetChildren()) do
546 if gunIgnore.Name ~= "grenadeFolder" then
547 if (not game.Players:FindFirstChild(gunIgnore.Name:sub(11))) then
548 gunIgnore:Destroy()
549 end
550 end
551 end
552 wait(1 / 20)
553 end
554end)
555
556----------------------------------------------------------------------
557--------------------[ RESET CAMERA ]----------------------------------
558----------------------------------------------------------------------
559
560Gun.ChildRemoved:connect(function(Child)
561 if Child == Handle and Plyr.Value then
562 local ignoreCode = Gun:WaitForChild("clientMain"):WaitForChild("ignoreCode").Value
563 local resetCam = script:WaitForChild("resetCam")
564 resetCam:WaitForChild("ignoreCode").Value = ignoreCode
565 resetCam.Parent = Plyr.Value.PlayerGui
566 end
567end)
568
569----------------------------------------------------------------------
570--------------------[ GET WELD CFRAMES ]------------------------------
571----------------------------------------------------------------------
572
573for _, v in pairs(Gun:GetChildren()) do
574 if v:IsA("BasePart") and v ~= Handle then
575 if v:FindFirstChild("mainWeld") then v.mainWeld:Destroy() end
576 if (not v:FindFirstChild("weldCF")) then
577 local weldCF = Instance.new("CFrameValue")
578 weldCF.Name = "weldCF"
579 weldCF.Value = Handle.CFrame:toObjectSpace(v.CFrame)
580 weldCF.Parent = v
581 end
582 if string.sub(v.Name, 1, 3) == "Mag" then
583 if (not v:FindFirstChild("magTrans")) then
584 local magTrans = Instance.new("NumberValue")
585 magTrans.Name = "magTrans"
586 magTrans.Value = v.Transparency
587 magTrans.Parent = v
588 end
589 end
590 v.Anchored = true
591 v.CanCollide = false
592 end
593end
594Handle.Anchored = false
595Handle.CanCollide = true
596
597----------------------------------------------------------------------
598--------------------[ GUNSETUP HANDLING ]-----------------------------
599----------------------------------------------------------------------
600
601local gunSetup = script:WaitForChild("gunSetup")
602function gunSetup.OnServerInvoke(Player, Vars)
603
604 --------------------[ CREATING IGNORE MODELS ]--------------------------------
605
606 local gunIgnore = Instance.new("Model")
607 gunIgnore.Name = "gunIgnore_"..Player.Name
608 gunIgnore.Parent = Vars.ignoreModel
609
610 --------------------[ MODIFYING THE PLAYER ]----------------------------------
611
612 Vars.Humanoid.AutoRotate = false
613
614 Vars.Shoulders.Right.Part1 = nil
615 Vars.Shoulders.Left.Part1 = nil
616
617 local playerFolder = Instance.new("Model")
618 playerFolder.Name = "playerFolder"
619 playerFolder.Parent = gunIgnore
620
621 local headBase = Instance.new("Part")
622 headBase.Transparency = 1
623 headBase.Name = "headBase"
624 headBase.CanCollide = false
625 headBase.FormFactor = Enum.FormFactor.Custom
626 headBase.Size = V3(0.2, 0.2, 0.2)
627 headBase.BottomSurface = Enum.SurfaceType.Smooth
628 headBase.TopSurface = Enum.SurfaceType.Smooth
629 headBase.Parent = playerFolder
630
631 local headWeld = Instance.new("Weld")
632 headWeld.Part0 = Vars.Torso
633 headWeld.Part1 = headBase
634 headWeld.C0 = CF(0, 1.5, 0)
635 headWeld.Parent = Vars.Torso
636
637 local headWeld2 = Instance.new("Weld")
638 headWeld2.Part0 = headBase
639 headWeld2.Part1 = Vars.Head
640 headWeld2.Parent = headBase
641
642 local animBase = Instance.new("Part")
643 animBase.Transparency = 1
644 animBase.Name = "animBase"
645 animBase.CanCollide = false
646 animBase.FormFactor = Enum.FormFactor.Custom
647 animBase.Size = V3(0.2, 0.2, 0.2)
648 animBase.BottomSurface = Enum.SurfaceType.Smooth
649 animBase.TopSurface = Enum.SurfaceType.Smooth
650 animBase.Parent = playerFolder
651
652 local animWeld = Instance.new("Weld")
653 animWeld.Part0 = animBase
654 animWeld.Part1 = headBase
655 animWeld.Parent = animBase
656
657 local armBase = Instance.new("Part")
658 armBase.Transparency = 1
659 armBase.Name = "ArmBase"
660 armBase.CanCollide = false
661 armBase.FormFactor = Enum.FormFactor.Custom
662 armBase.Size = V3(0.2, 0.2, 0.2)
663 armBase.BottomSurface = Enum.SurfaceType.Smooth
664 armBase.TopSurface = Enum.SurfaceType.Smooth
665 armBase.Parent = playerFolder
666
667 local ABWeld = Instance.new("Weld")
668 ABWeld.Part0 = armBase
669 ABWeld.Part1 = animBase
670 ABWeld.Parent = armBase
671
672 local LArmBase = Instance.new("Part")
673 LArmBase.Transparency = 1
674 LArmBase.Name = "LArmBase"
675 LArmBase.CanCollide = false
676 LArmBase.FormFactor = Enum.FormFactor.Custom
677 LArmBase.Size = V3(0.2, 0.2, 0.2)
678 LArmBase.BottomSurface = Enum.SurfaceType.Smooth
679 LArmBase.TopSurface = Enum.SurfaceType.Smooth
680 LArmBase.Parent = playerFolder
681
682 local RArmBase = Instance.new("Part")
683 RArmBase.Transparency = 1
684 RArmBase.Name = "RArmBase"
685 RArmBase.CanCollide = false
686 RArmBase.FormFactor = Enum.FormFactor.Custom
687 RArmBase.Size = V3(0.2, 0.2, 0.2)
688 RArmBase.BottomSurface = Enum.SurfaceType.Smooth
689 RArmBase.TopSurface = Enum.SurfaceType.Smooth
690 RArmBase.Parent = playerFolder
691
692 local LWeld = Instance.new("Weld")
693 LWeld.Name = "LWeld"
694 LWeld.Part0 = armBase
695 LWeld.Part1 = LArmBase
696 LWeld.C0 = Vars.armC0[1]
697 LWeld.C1 = Vars.leftArmC1
698 LWeld.Parent = armBase
699
700 local RWeld = Instance.new("Weld")
701 RWeld.Name = "RWeld"
702 RWeld.Part0 = armBase
703 RWeld.Part1 = RArmBase
704 RWeld.C0 = Vars.armC0[2]
705 RWeld.C1 = Vars.rightArmC1
706 RWeld.Parent = armBase
707
708 local LWeld2 = Instance.new("Weld")
709 LWeld2.Name = "LWeld"
710 LWeld2.Part0 = LArmBase
711 LWeld2.Part1 = Vars.LArm
712 LWeld2.Parent = LArmBase
713
714 local RWeld2 = Instance.new("Weld")
715 RWeld2.Name = "RWeld"
716 RWeld2.Part0 = RArmBase
717 RWeld2.Part1 = Vars.RArm
718 RWeld2.Parent = RArmBase
719
720 local LLegWeld = Instance.new("Weld")
721 LLegWeld.Name = "LLegWeld"
722 LLegWeld.Part0 = Vars.Torso
723 LLegWeld.Part1 = nil
724 LLegWeld.C0 = CF(-0.5, -2, 0)
725 LLegWeld.Parent = Vars.Torso
726
727 local RLegWeld = Instance.new("Weld")
728 RLegWeld.Name = "RLegWeld"
729 RLegWeld.Part0 = Vars.Torso
730 RLegWeld.Part1 = nil
731 RLegWeld.C0 = CF(0.5, -2, 0)
732 RLegWeld.Parent = Vars.Torso
733
734 for _, Tab in pairs(Vars.gunParts) do
735 Tab.Obj.Anchored = false
736 local Weld = Instance.new("Weld")
737 Weld.Name = "mainWeld"
738 Weld.Part0 = Vars.Handle
739 Weld.Part1 = Tab.Obj
740 Weld.C0 = Tab.Obj.weldCF.Value
741 Weld.Parent = Vars.Handle
742 Tab.Weld = Weld
743 end
744
745 return gunIgnore, playerFolder, headWeld, headWeld2, animWeld, ABWeld, LWeld, RWeld, LWeld2, RWeld2, LLegWeld, RLegWeld, Vars.gunParts
746end
747
748----------------------------------------------------------------------
749--------------------[ TWEENJOINT HANDLING ]---------------------------
750----------------------------------------------------------------------
751
752local createTweenIndicator = script:WaitForChild("createTweenIndicator")
753function createTweenIndicator.OnServerInvoke(_, Joint, newCode)
754 local tweenIndicator = nil
755 if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
756 tweenIndicator = Instance.new("IntValue")
757 tweenIndicator.Name = "tweenCode"
758 tweenIndicator.Value = newCode
759 tweenIndicator.Parent = Joint
760 else
761 tweenIndicator = Joint.tweenCode
762 tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
763 end
764 return tweenIndicator
765end
766
767local lerpCF = script:WaitForChild("lerpCF")
768function lerpCF.OnServerInvoke(_, Joint, Prop, startCF, endCF, Alpha)
769 spawn(function()
770 Joint[Prop] = startCF:lerp(endCF, Alpha)
771 end)
772end
773
774local deleteTweenIndicator = script:WaitForChild("deleteTweenIndicator")
775function deleteTweenIndicator.OnServerInvoke(_, tweenIndicator, newCode)
776 if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
777 tweenIndicator:Destroy()
778 end
779end
780
781----------------------------------------------------------------------
782--------------------[ BULLET IMPACT HANDLING ]------------------------
783----------------------------------------------------------------------
784
785local createBulletImpact = script:WaitForChild("createBulletImpact")
786createBulletImpact.OnServerEvent:connect(function(_, H, P, N, D, humanoidFound, gunIgnore, S)
787 local surfaceCF = CF(P, P + N)
788 ----------------------------------------------------------------------------------
789 --Creating the bullet hole--------------------------------------------------------
790 ----------------------------------------------------------------------------------
791 if S.bulletHoles and (not humanoidFound) then
792 local Hole = Instance.new("Part")
793 Hole.Transparency = 1
794 Hole.Anchored = true
795 Hole.CanCollide = false
796 Hole.FormFactor = "Custom"
797 Hole.Size = V3(1, 1, 0.2)
798 Hole.TopSurface = 0
799 Hole.BottomSurface = 0
800 local Mesh = Instance.new("BlockMesh")
801 Mesh.Offset = V3(0, 0, -0.05)
802 Mesh.Scale = V3(S.holeSettings.Size, S.holeSettings.Size, 0)
803 Mesh.Parent = Hole
804 local Decal = Instance.new("Decal")
805 Decal.Face = Enum.NormalId.Front
806 Decal.Texture = S.holeSettings.Texture
807 Decal.Parent = Hole
808 Hole.Parent = gunIgnore
809 Hole.CFrame = surfaceCF
810 if (not H.Anchored) then
811 local Weld = Instance.new("Weld", Hole)
812 Weld.Part0 = H
813 Weld.Part1 = Hole
814 Weld.C0 = H.CFrame:toObjectSpace(surfaceCF)
815 Hole.Anchored = false
816 end
817 delay(S.holeSettings.visibleTime, function()
818 if S.holeSettings.disappearTime > 0 then
819 local t0 = tick()
820 while true do
821 local Alpha = math.min((tick() - t0) / S.holeSettings.disappearTime, 1)
822 Decal.Transparency = numLerp(0, 1, Alpha)
823 if Alpha == 1 then break end
824 wait()
825 end
826 Hole:Destroy()
827 else
828 Hole:Destroy()
829 end
830 end)
831 end
832 ----------------------------------------------------------------------------------
833 --Creating the spark effect-------------------------------------------------------
834 ----------------------------------------------------------------------------------
835 if S.bulletSparks and (not humanoidFound) and inList(H.Material, S.sparkSettings.Materials) then
836 local Sparks = Instance.new("Part")
837 Sparks.Transparency = 1
838 Sparks.Anchored = true
839 Sparks.CanCollide = false
840 Sparks.FormFactor = "Custom"
841 Sparks.Size = V3(1, 1, 1)
842 Sparks.TopSurface = 0
843 Sparks.BottomSurface = 0
844
845 local Particles = nil
846 if S.customSparks then
847 Particles = getObject(game.ServerStorage, "ParticleEmitter", "bulletSpark"):Clone()
848 else
849 Particles = Instance.new("ParticleEmitter")
850 Particles.Color = ColorSequence.new(S.sparkSettings.Color.Start, S.sparkSettings.Color.End)
851 Particles.LightEmission = 1
852 Particles.Size = NumberSequence.new(
853 {
854 NumberSequenceKeypoint.new(0, S.sparkSettings.Size, 0.25);
855 NumberSequenceKeypoint.new(1, 0);
856 }
857 )
858 Particles.Texture = S.sparkSettings.Texture
859 Particles.Transparency = NumberSequence.new(0)
860 Particles.Acceleration = V3(0, -196.2, 0)
861 Particles.EmissionDirection = Enum.NormalId.Front
862 Particles.Lifetime = NumberRange.new(S.sparkSettings.Lifetime - 0.05, S.sparkSettings.Lifetime + 0.05)
863 Particles.Rate = S.sparkSettings.Rate
864 Particles.Rotation = NumberRange.new(0, 360)
865 Particles.Speed = NumberRange.new(S.sparkSettings.Speed - 5, S.sparkSettings.Speed + 5)
866 Particles.VelocitySpread = S.sparkSettings.Spread
867 end
868 Particles.Parent = Sparks
869
870 Sparks.Parent = gunIgnore
871 Sparks.CFrame = surfaceCF
872 if (not H.Anchored) then
873 local Weld = Instance.new("Weld", Sparks)
874 Weld.Part0 = H
875 Weld.Part1 = Sparks
876 Weld.C0 = H.CFrame:toObjectSpace(surfaceCF)
877 Sparks.Anchored = false
878 end
879 delay(0.1, function()
880 Particles.Enabled = false
881 wait(Particles.Lifetime.Max)
882 Sparks:Destroy()
883 end)
884 end
885 ----------------------------------------------------------------------------------
886 --Creating the smoke effect-------------------------------------------------------
887 ----------------------------------------------------------------------------------
888 if S.bulletSmoke and (not humanoidFound) then
889 local Smoke = Instance.new("Part")
890 Smoke.Transparency = 1
891 Smoke.Anchored = true
892 Smoke.CanCollide = false
893 Smoke.FormFactor = "Custom"
894 Smoke.Size = V3(1, 1, 1)
895 Smoke.TopSurface = 0
896 Smoke.BottomSurface = 0
897
898 local Particles = Instance.new("ParticleEmitter")
899 Particles.Color = ColorSequence.new(S.smokeSettings.objColor and H.Color or S.smokeSettings.Color)
900 Particles.LightEmission = 0
901 Particles.Size = NumberSequence.new(
902 {
903 NumberSequenceKeypoint.new(0, S.smokeSettings.Size.Start);
904 NumberSequenceKeypoint.new(1, S.smokeSettings.Size.End);
905 }
906 )
907 Particles.Texture = S.smokeSettings.Texture
908 Particles.Transparency = NumberSequence.new(
909 {
910 NumberSequenceKeypoint.new(0, S.smokeSettings.startTransparency);
911 NumberSequenceKeypoint.new(0.5, 0.75 * S.smokeSettings.startTransparency + 0.25);
912 NumberSequenceKeypoint.new(1, 1);
913 }
914 )
915 Particles.Acceleration = V3(0, -196.2, 0)
916 Particles.EmissionDirection = Enum.NormalId.Front
917 Particles.Lifetime = NumberRange.new(S.smokeSettings.Lifetime - 0.05, S.smokeSettings.Lifetime + 0.05)
918 Particles.Rate = S.smokeSettings.Rate
919 Particles.Rotation = NumberRange.new(0, 360)
920 Particles.RotSpeed = NumberRange.new(10)
921 Particles.Speed = NumberRange.new(S.smokeSettings.Speed - 5, S.smokeSettings.Speed + 5)
922 Particles.VelocitySpread = S.smokeSettings.Spread
923 Particles.Parent = Smoke
924
925 Smoke.Parent = gunIgnore
926 Smoke.CFrame = surfaceCF
927 if (not H.Anchored) then
928 local Weld = Instance.new("Weld", Smoke)
929 Weld.Part0 = H
930 Weld.Part1 = Smoke
931 Weld.C0 = H.CFrame:toObjectSpace(surfaceCF)
932 Smoke.Anchored = false
933 end
934 delay(0.1, function()
935 Particles.Enabled = false
936 wait(S.smokeSettings.Lifetime + 0.05)
937 Smoke:Destroy()
938 end)
939 end
940end)
941
942----------------------------------------------------------------------
943--------------------[ SHOCKWAVE HANDLING ]----------------------------
944----------------------------------------------------------------------
945
946local createShockwave = script:WaitForChild("createShockwave")
947createShockwave.OnServerEvent:connect(function(_, Center, Radius, gunIgnore, S)
948 local Shockwave = Instance.new("Part")
949 Shockwave.BrickColor = S.shockwaveSettings.Color
950 Shockwave.Material = Enum.Material.SmoothPlastic
951 Shockwave.Name = "Shockwave"
952 Shockwave.Anchored = true
953 Shockwave.CanCollide = false
954 Shockwave.FormFactor = Enum.FormFactor.Symmetric
955 Shockwave.Size = V3(1, 1, 1)
956 Shockwave.BottomSurface = Enum.SurfaceType.Smooth
957 Shockwave.TopSurface = Enum.SurfaceType.Smooth
958 local Mesh = Instance.new("SpecialMesh")
959 Mesh.MeshType = Enum.MeshType.Sphere
960 Mesh.Scale = V3()
961 Mesh.Parent = Shockwave
962 Shockwave.Parent = gunIgnore
963 Shockwave.CFrame = CF(Center)
964 spawn(function()
965 local t0 = tick()
966 while true do
967 local Alpha = math.min((tick() - t0) / S.shockwaveSettings.Duration, 1)
968 local Scale = 2 * Radius * Alpha
969 Mesh.Scale = V3(Scale, Scale, Scale)
970 Shockwave.Transparency = Alpha
971 if Alpha == 1 then break end
972 wait()
973 end
974 Shockwave:Destroy()
975 end)
976end)
977
978----------------------------------------------------------------------
979--------------------[ BLOOD HANDLING ]--------------------------------
980----------------------------------------------------------------------
981
982local createBlood = script:WaitForChild("createBlood")
983createBlood.OnServerEvent:connect(function(_, H, P, D, gunIgnore, S)
984 local bloodCF = CF(P, P + D) * CFANG(RAD(-90), 0, 0)
985 local Blood = Instance.new("Part")
986 Blood.Transparency = 1
987 Blood.Anchored = true
988 Blood.CanCollide = false
989 Blood.FormFactor = "Custom"
990 Blood.Size = V3(0.2, 1, 0.2)
991 Blood.TopSurface = 0
992 Blood.BottomSurface = 0
993
994 local Particles = Instance.new("ParticleEmitter")
995 Particles.Color = ColorSequence.new(S.bloodSettings.Color)
996 Particles.LightEmission = 0
997 Particles.Size = NumberSequence.new(S.bloodSettings.Size)
998 Particles.Texture = S.bloodSettings.Texture
999 Particles.Transparency = NumberSequence.new(
1000 {
1001 NumberSequenceKeypoint.new(0, S.bloodSettings.startTransparency);
1002 NumberSequenceKeypoint.new(1, 1);
1003 }
1004 )
1005 Particles.EmissionDirection = Enum.NormalId.Top
1006 Particles.Lifetime = NumberRange.new(S.bloodSettings.Lifetime - 0.05, S.bloodSettings.Lifetime + 0.05)
1007 Particles.Rate = S.bloodSettings.Rate
1008 Particles.Rotation = NumberRange.new(0, 90)
1009 Particles.Speed = NumberRange.new(S.bloodSettings.Speed)
1010 Particles.VelocitySpread = S.bloodSettings.Spread
1011 Particles.Parent = Blood
1012
1013 Blood.Parent = gunIgnore
1014 Blood.CFrame = bloodCF
1015 if (not H.Anchored) then
1016 local Weld = Instance.new("Weld", Blood)
1017 Weld.Part0 = H
1018 Weld.Part1 = Blood
1019 Weld.C0 = H.CFrame:toObjectSpace(bloodCF)
1020 Blood.Anchored = false
1021 end
1022 delay(0.15, function()
1023 Particles.Enabled = false
1024 wait(S.bloodSettings.Lifetime + 0.05)
1025 Blood:Destroy()
1026 end)
1027end)
1028
1029----------------------------------------------------------------------
1030--------------------[ TRAIL HANDLING ]--------------------------------
1031----------------------------------------------------------------------
1032
1033local createTrail = script:WaitForChild("createTrail")
1034createTrail.OnServerEvent:connect(function(_, Origin, P, gunIgnore, S)
1035 local Trail = Instance.new("Part")
1036 Trail.BrickColor = S.trailSettings.Color
1037 Trail.Transparency = S.trailSettings.Transparency
1038 Trail.Anchored = true
1039 Trail.CanCollide = false
1040 Trail.Size = V3(1, 1, 1)
1041 local Mesh = Instance.new("CylinderMesh")
1042 Mesh.Offset = V3(0, -(P - Origin).magnitude / 2, 0)
1043 Mesh.Scale = V3(S.trailSettings.Thickness, (P - Origin).magnitude, S.trailSettings.Thickness)
1044 Mesh.Parent = Trail
1045 Trail.Parent = gunIgnore
1046 Trail.CFrame = CF(Origin, P) * CFANG(RAD(90), 0, 0)
1047 delay(S.trailSettings.visibleTime, function()
1048 if S.trailSettings.disappearTime > 0 then
1049 local t0 = tick()
1050 while true do
1051 local Alpha = math.min((tick() - t0) / S.trailSettings.disappearTime, 1)
1052 Trail.Transparency = numLerp(S.trailSettings.Transparency, 1, Alpha)
1053 if Alpha == 1 then break end
1054 wait()
1055 end
1056 Trail:Destroy()
1057 else
1058 Trail:Destroy()
1059 end
1060 end)
1061end)
1062end))
1063ObjectValue32.Name = "Plyr"
1064ObjectValue32.Parent = Script31
1065RemoteFunction33.Name = "getWeldCF"
1066RemoteFunction33.Parent = Script31
1067RemoteFunction34.Name = "gunSetup"
1068RemoteFunction34.Parent = Script31
1069RemoteFunction35.Name = "tweenJoint"
1070RemoteFunction35.Parent = Script31
1071RemoteEvent36.Name = "onRenderStep"
1072RemoteEvent36.Parent = Script31
1073RemoteFunction37.Name = "createTweenIndicator"
1074RemoteFunction37.Parent = Script31
1075RemoteFunction38.Name = "deleteTweenIndicator"
1076RemoteFunction38.Parent = Script31
1077RemoteFunction39.Name = "lerpCF"
1078RemoteFunction39.Parent = Script31
1079LocalScript40.Name = "resetCam"
1080LocalScript40.Parent = Script31
1081table.insert(cors,sandbox(LocalScript40,function()
1082repeat wait() until game.Players.LocalPlayer.Character
1083
1084local Player = game.Players.LocalPlayer
1085local Char = Player.Character
1086local Humanoid = Char:WaitForChild("Humanoid")
1087
1088local Cam = game.Workspace.CurrentCamera
1089local UIS = game:GetService("UserInputService")
1090
1091local ignoreCode = script:WaitForChild("ignoreCode")
1092repeat wait() until ignoreCode.Value ~= 0
1093local ignoreModel = game.Workspace:WaitForChild("ignoreModel_"..ignoreCode.Value)
1094local gunIgnore = ignoreModel:FindFirstChild("gunIgnore_"..Player.Name)
1095
1096Cam.FieldOfView = 70
1097Cam.CameraType = Enum.CameraType.Custom
1098Cam:ClearAllChildren()
1099
1100UIS.MouseBehavior = Enum.MouseBehavior.Default
1101UIS.MouseIconEnabled = true
1102
1103Player.CameraMode = Enum.CameraMode.Classic
1104
1105Humanoid.WalkSpeed = 16
1106Humanoid.AutoRotate = true
1107
1108if gunIgnore then gunIgnore:Destroy() end
1109end))
1110IntValue41.Name = "ignoreCode"
1111IntValue41.Parent = LocalScript40
1112RemoteEvent42.Name = "createBulletImpact"
1113RemoteEvent42.Parent = Script31
1114RemoteEvent43.Name = "createShockwave"
1115RemoteEvent43.Parent = Script31
1116RemoteEvent44.Name = "createBlood"
1117RemoteEvent44.Parent = Script31
1118RemoteEvent45.Name = "createTrail"
1119RemoteEvent45.Parent = Script31
1120LocalScript46.Name = "clientMain"
1121LocalScript46.Parent = Tool0
1122table.insert(cors,sandbox(LocalScript46,function()
1123--[[
1124Kit By TurboFusion
1125Remake By MuYhEt & Xander521
1126--]]
1127--------------------------------------------------------------------------------------
1128--------------------[ CHARACTER LOADING ]---------------------------------------------
1129--------------------------------------------------------------------------------------
1130
1131repeat wait() until game.Players.LocalPlayer.Character
1132repeat wait() until game.Players.LocalPlayer.Character:IsDescendantOf(game.Workspace)
1133wait(1 / 20)
1134
1135--------------------------------------------------------------------------------------
1136--------------------[ IGNORE MODEL ]--------------------------------------------------
1137--------------------------------------------------------------------------------------
1138
1139local ignoreCode = script:WaitForChild("ignoreCode")
1140
1141repeat wait() until ignoreCode.Value ~= 0
1142
1143local ignoreModel = game.Workspace:WaitForChild("ignoreModel_"..ignoreCode.Value)
1144
1145local grenadeFolder = ignoreModel:WaitForChild("grenadeFolder")
1146
1147--------------------------------------------------------------------------------------
1148--------------------[ CONSTANTS ]-----------------------------------------------------
1149--------------------------------------------------------------------------------------
1150
1151local Gun = script.Parent
1152local serverMain = Gun:WaitForChild("serverMain")
1153local Handle = Gun:WaitForChild("Handle")
1154local AimPart = Gun:WaitForChild("AimPart")
1155local Main = Gun:WaitForChild("Main")
1156
1157local Ammo = Gun:WaitForChild("Ammo")
1158local ClipSize = Gun:WaitForChild("ClipSize")
1159local StoredAmmo = Gun:WaitForChild("StoredAmmo")
1160
1161local createTweenIndicator = serverMain:WaitForChild("createTweenIndicator")
1162local deleteTweenIndicator = serverMain:WaitForChild("deleteTweenIndicator")
1163local getWeldCF = serverMain:WaitForChild("getWeldCF")
1164local gunSetup = serverMain:WaitForChild("gunSetup")
1165local lerpCF = serverMain:WaitForChild("lerpCF")
1166local createBlood = serverMain:WaitForChild("createBlood")
1167local createBulletImpact = serverMain:WaitForChild("createBulletImpact")
1168local createShockwave = serverMain:WaitForChild("createShockwave")
1169local createTrail = serverMain:WaitForChild("createTrail")
1170
1171local Particle = require(script:WaitForChild("Particle"))
1172local Spring = require(script:WaitForChild("Spring"))
1173local Anims = require(Gun:WaitForChild("ANIMATIONS"))
1174local Plugins = require(Gun:WaitForChild("PLUGINS"))
1175local S = require(Gun:WaitForChild("SETTINGS"))
1176
1177local Player = game.Players.LocalPlayer
1178local Char = Player.Character
1179local Humanoid = Char:WaitForChild("Humanoid")
1180local Torso = Char:WaitForChild("Torso")
1181local Head = Char:WaitForChild("Head")
1182local HRP = Char:WaitForChild("HumanoidRootPart")
1183local Root = HRP:WaitForChild("RootJoint")
1184
1185local Neck = Torso:WaitForChild("Neck")
1186
1187local LArm = Char:WaitForChild("Left Arm")
1188local RArm = Char:WaitForChild("Right Arm")
1189local LLeg = Char:WaitForChild("Left Leg")
1190local RLeg = Char:WaitForChild("Right Leg")
1191
1192local M2 = Player:GetMouse()
1193
1194local mainGUI = script:WaitForChild("mainGUI")
1195
1196local crossHair = mainGUI:WaitForChild("crossHair")
1197local HUD = mainGUI:WaitForChild("HUD")
1198local Scope = mainGUI:WaitForChild("Scope")
1199local fireSelect = mainGUI:WaitForChild("fireSelect")
1200local hitMarker = mainGUI:WaitForChild("hitMarker")
1201local Sens = mainGUI:WaitForChild("Sens")
1202
1203local crossA = crossHair:WaitForChild("A"):WaitForChild("Line")
1204local crossB = crossHair:WaitForChild("B"):WaitForChild("Line")
1205local crossC = crossHair:WaitForChild("C"):WaitForChild("Line")
1206local crossD = crossHair:WaitForChild("D"):WaitForChild("Line")
1207
1208local Controls = HUD:WaitForChild("Controls")
1209
1210local gunNameTitle = HUD:WaitForChild("gunName"):WaitForChild("Title")
1211
1212local scopeMain = Scope:WaitForChild("Main")
1213local scopeSteady = Scope:WaitForChild("Steady")
1214
1215local fireModes = fireSelect:WaitForChild("Modes")
1216
1217local modeGUI = HUD:WaitForChild("Mode"):WaitForChild("Main")
1218local clipAmmoGUI = HUD:WaitForChild("Ammo"):WaitForChild("Clip")
1219local storedAmmoGUI = HUD:WaitForChild("Ammo"):WaitForChild("Stored")
1220
1221local DS = game:GetService("Debris")
1222local CP = game:GetService("ContentProvider")
1223local RS = game:GetService("RunService")
1224local UIS = game:GetService("UserInputService")
1225
1226local Cam = game.Workspace.CurrentCamera
1227
1228local ABS, HUGE, FLOOR, CEIL = math.abs, math.huge, math.floor, math.ceil
1229local RAD, SIN, COS, TAN = math.rad, math.sin, math.cos, math.tan
1230local VEC2, V3 = Vector2.new, Vector3.new
1231local CF, CFANG = CFrame.new, CFrame.Angles
1232local INSERT = table.insert
1233
1234local maxStamina = S.sprintTime * 60
1235local maxSteadyTime = S.scopeSettings.steadyTime * 60
1236
1237local LethalIcons = {
1238 "http://www.roblox.com/asset/?id=194849880";
1239 "http://www.roblox.com/asset/?id=195727791";
1240 "http://www.roblox.com/asset/?id=195728137";
1241 "http://www.roblox.com/asset/?id=218151830";
1242}
1243
1244local TacticalIcons = {
1245 "http://www.roblox.com/asset/?id=195728473";
1246 "http://www.roblox.com/asset/?id=195728693";
1247}
1248
1249local ASCII = {
1250 071; 117; 110; 032;
1251 075; 105; 116; 032;
1252 115; 099; 114; 105;
1253 112; 116; 101; 100;
1254 032; 098; 121; 032;
1255 084; 117; 114; 098;
1256 111; 070; 117; 115;
1257 105; 111; 110; 000;
1258}
1259
1260local Ignore = {
1261 Char;
1262 ignoreModel;
1263}
1264
1265local Shoulders = {
1266 Right = Torso:WaitForChild("Right Shoulder");
1267 Left = Torso:WaitForChild("Left Shoulder")
1268}
1269
1270local armC0 = {
1271 CF(-1.5, 0, 0) * CFANG(RAD(90), 0, 0);
1272 CF(1.5, 0, 0) * CFANG(RAD(90), 0, 0);
1273}
1274
1275local legC0 = {
1276 Stand = {
1277 CF(-0.5, -2, 0);
1278 CF(0.5, -2, 0);
1279 };
1280 Crouch = {
1281 CF(-0.5, -1.5, 0.5) * CFANG(-RAD(90), 0, 0);
1282 CF(0.5, -1, -0.75);
1283 };
1284 Prone = {
1285 CF(-0.5, -2, 0);
1286 CF(0.5, -2, 0);
1287 };
1288}
1289
1290local Sine = function(X)
1291 return SIN(RAD(X))
1292end
1293
1294local Linear = function(X)
1295 return (X / 90)
1296end
1297
1298--------------------------------------------------------------------------------------
1299--------------------[ VARIABLES ]-----------------------------------------------------
1300--------------------------------------------------------------------------------------
1301
1302local Selected = false
1303
1304local playerMass = 0
1305
1306local Forward = false
1307local Backward = false
1308
1309local Idling = false
1310local Walking = false
1311local Running = false
1312
1313local crawlCamRot = 0
1314local crawlAlpha = 0
1315local idleAlpha = 1
1316local walkAlpha = 0
1317local isCrawling = false
1318local isIdling = false
1319local isWalking = false
1320local isRunning = false
1321
1322local Aimed = false
1323local Aiming = false
1324local aimAlpha = 0
1325local headOffset = VEC2(COS(RAD(90) - S.aimSettings.headTilt) * 0.5, 1 + SIN(RAD(90) - S.aimSettings.headTilt) * 0.5)
1326
1327local Reloading = false
1328local breakReload = false
1329local magVisible = true
1330local newMag = false
1331
1332local Knifing = false
1333
1334local MB1Down = false
1335local Firing = false
1336local canFire = true
1337local fireFunction = nil
1338local firstShot = false
1339local shotCount = 0
1340local lastSideRecoil = {0, 0}
1341local recoilAnim = {
1342 Pos = V3();
1343 Rot = V3();
1344 Code = nil;
1345}
1346
1347local numModes = 0
1348local rawFireMode = 1
1349local canSelectFire = true
1350local guiAngOffset = 0
1351local Modes = {}
1352
1353local onGround = true
1354local startFallHeight = 0
1355local jumpAnim = {
1356 Pos = 0;
1357 Rot = 0;
1358 Code = 0;
1359}
1360
1361local runReady = true
1362local runKeyPressed = false
1363local chargingStamina = false
1364
1365local AimingIn = false
1366local AimingOut = false
1367
1368local Stamina = S.sprintTime * 60
1369local currentSteadyTime = S.scopeSettings.steadyTime * 60
1370
1371local camSteady = false
1372local takingBreath = false
1373local steadyKeyPressed = false
1374
1375local Grip = nil
1376local aimedGripCF = nil
1377
1378local spreadZoom = "unAimed"
1379local spreadStance = "Stand"
1380local spreadMotion = "Idling"
1381local baseSpread = S.spreadSettings.unAimed.Stand.Idling
1382local currentSpread = 0
1383local loweringSpread = false
1384
1385local mouseSensitivity = S.sensitivitySettings.Default
1386local aimSensitivity = S.sensitivitySettings.Aim
1387local lastSensUpdate = 0
1388
1389local ammoInClip = 0
1390
1391local Stance = 0
1392local stanceSway = 1
1393local camSway = 1
1394
1395local camAng = VEC2()
1396
1397local armTilt = 0
1398local moveAng = 0
1399local animCode = 0
1400
1401local desiredXOffset = 0
1402local desiredYOffset = 0
1403local currentXOffset = 0
1404local currentYOffset = 0
1405local aimHeadOffset = 0
1406local recoilAnimMultiplier = 1
1407local jumpAnimMultiplier = 1
1408local translationDivisor = 7
1409local rotationMultiplier = S.momentumSettings.Amplitude.unAimed
1410local armTiltMultiplier = 1
1411
1412local equipAnimPlaying = false
1413
1414local crossOffset = 0
1415
1416local camOffsets = {
1417 guiScope = {
1418 Rot = V3();
1419 };
1420 Reload = {
1421 Rot = V3();
1422 Code = nil;
1423 };
1424 Recoil = {
1425 Rot = V3();
1426 Code = nil;
1427 };
1428}
1429
1430local Anim = {
1431 Pos = V3();
1432 Rot = V3();
1433 Ang = 0;
1434 Code = 0;
1435}
1436
1437local lastBeat = 0
1438
1439local gunParts = {}
1440
1441local Connections = {}
1442
1443local Keys = {}
1444
1445--------------------------------------------------------------------------------------
1446--------------------[ PRE-LOADING ]---------------------------------------------------
1447--------------------------------------------------------------------------------------
1448
1449CP:Preload(S.explosionSettings.soundId)
1450CP:Preload(S.holeSettings.Texture)
1451CP:Preload(S.sparkSettings.Texture)
1452CP:Preload(S.smokeSettings.Texture)
1453CP:Preload(S.bloodSettings.Texture)
1454CP:Preload("http://www.roblox.com/asset/?id=126877530") --The dark green arrow in the select fire gui
1455CP:Preload("http://www.roblox.com/asset/?id=55754953") --The circle in the select fire gui
1456
1457--------------------------------------------------------------------------------------
1458--------------------[ GUN SETUP ]-----------------------------------------------------
1459--------------------------------------------------------------------------------------
1460
1461serverMain:WaitForChild("Plyr").Value = Player
1462
1463local gunMomentum = Spring.new(V3())
1464gunMomentum.s = S.momentumSettings.Speed
1465gunMomentum.d = S.momentumSettings.Damper
1466
1467local gunRecoilSpring = Spring.new(V3())
1468gunRecoilSpring.s = S.recoilSettings.springSpeed
1469gunRecoilSpring.d = S.recoilSettings.springDamper
1470
1471local camRecoilSpring = Spring.new(V3())
1472camRecoilSpring.s = 35
1473camRecoilSpring.d = 0.5
1474
1475local crossSpring = Spring.new(V3(crossOffset + (baseSpread + currentSpread) * 50, 0, 0))
1476crossSpring.s = 20
1477crossSpring.d = 0.75
1478
1479--[[local function getModelMass(P)
1480 for _, v in pairs(P:GetChildren()) do
1481 if v:IsA("BasePart") then
1482 playerMass = playerMass + v:GetMass()
1483 end
1484 getModelMass(v)
1485 end
1486end
1487getModelMass(Char)
1488
1489Char.DescendantAdded:connect(function(Descendant)
1490 if Descendant:IsA("BasePart") then
1491 playerMass = playerMass + Descendant:GetMass()
1492 end
1493end)
1494Char.DescendantRemoving:connect(function(Descendant)
1495 if Descendant:IsA("BasePart") then
1496 playerMass = playerMass - Descendant:GetMass()
1497 end
1498end)]]
1499
1500--------------------------------------------------------------------------------------
1501--------------------[ WELD CFRAMES ]--------------------------------------------------
1502--------------------------------------------------------------------------------------
1503
1504spawn(function()
1505 --[[for _, v in pairs(Gun:GetChildren()) do
1506 if v:IsA("BasePart") and v ~= Handle then
1507 if v:FindFirstChild("mainWeld") then v.mainWeld:Destroy() end
1508 if (not v:FindFirstChild("weldCF")) then
1509 local weldCF = Instance.new("CFrameValue")
1510 weldCF.Name = "weldCF"
1511 weldCF.Value = Handle.CFrame:toObjectSpace(v.CFrame)
1512 weldCF.Parent = v
1513 INSERT(gunParts, {Obj = v, Weld = nil})
1514 end
1515 if string.sub(v.Name, 1, 3) == "Mag" then
1516 if (not v:FindFirstChild("magTrans")) then
1517 local magTrans = Instance.new("NumberValue")
1518 magTrans.Name = "magTrans"
1519 magTrans.Value = v.Transparency
1520 magTrans.Parent = v
1521 end
1522 end
1523 v.Anchored = false
1524 end
1525 end
1526 Handle.Anchored = false]]
1527 for _, v in pairs(Gun:GetChildren()) do
1528 if v:FindFirstChild("weldCF") then
1529 INSERT(gunParts, {Obj = v, Weld = nil})
1530 v.Anchored = false
1531 end
1532 end
1533end)
1534
1535--------------------------------------------------------------------------------------
1536--------------------[ MAIN PROGRAM ]--------------------------------------------------
1537--------------------------------------------------------------------------------------
1538
1539--------------------[ ARM CREATION FUNCTION ]-----------------------------------------
1540
1541function createArms()
1542 local Arms = {}
1543 for i = 0, 1 do
1544 local armModel = Instance.new("Model")
1545 armModel.Name = "armModel"
1546
1547 local Arm = Instance.new("Part")
1548 Arm.BrickColor = (S.fakeArmSettings.realBodyColor and (i == 0 and LArm.BrickColor or RArm.BrickColor) or S.fakeArmSettings.Color)
1549 Arm.Transparency = S.fakeArmSettings.Transparency
1550 Arm.Name = "Arm"
1551 Arm.CanCollide = false
1552 Arm.Size = V3(0.598, 2, 0.598)
1553 Arm.Parent = armModel
1554 local armMesh = Instance.new("SpecialMesh")
1555 armMesh.MeshId = "rbxasset://fonts//leftarm.mesh"
1556 armMesh.MeshType = Enum.MeshType.FileMesh
1557 armMesh.Scale = V3(0.598, 1, 0.598)
1558 armMesh.Parent = Arm
1559
1560 local Glove1 = Instance.new("Part")
1561 Glove1.BrickColor = BrickColor.new("Black")
1562 Glove1.Name = "Glove1"
1563 Glove1.CanCollide = false
1564 Glove1.Size = V3(0.598, 2, 0.598)
1565 Glove1.Parent = armModel
1566 local glove1Mesh = Instance.new("SpecialMesh")
1567 glove1Mesh.MeshId = "rbxasset://fonts//leftarm.mesh"
1568 glove1Mesh.Offset = V3(0, -0.5, 0)
1569 glove1Mesh.Scale = V3(0.658, 0.205, 0.658)
1570 glove1Mesh.Parent = Glove1
1571 local glove1Weld = Instance.new("Weld")
1572 glove1Weld.Part0 = Arm
1573 glove1Weld.Part1 = Glove1
1574 glove1Weld.Parent = Arm
1575
1576 local Glove2 = Instance.new("Part")
1577 Glove2.BrickColor = BrickColor.new("Black")
1578 Glove2.Name = "Glove2"
1579 Glove2.CanCollide = false
1580 Glove2.Size = V3(0.598, 2, 0.598)
1581 Glove2.Parent = armModel
1582 local glove2Mesh = Instance.new("SpecialMesh")
1583 glove2Mesh.MeshId = "rbxasset://fonts//leftarm.mesh"
1584 glove2Mesh.Offset = V3(0, -0.435, 0)
1585 glove2Mesh.Scale = V3(0.69, 0.105, 0.69)
1586 glove2Mesh.Parent = Glove2
1587 local glove2Weld = Instance.new("Weld")
1588 glove2Weld.Part0 = Arm
1589 glove2Weld.Part1 = Glove2
1590 glove2Weld.Parent = Arm
1591
1592 local Glove3 = Instance.new("Part")
1593 Glove3.BrickColor = BrickColor.new("Black")
1594 Glove3.Name = "Glove3"
1595 Glove3.CanCollide = false
1596 Glove3.Size = V3(0.598, 2, 0.598)
1597 Glove3.Parent = armModel
1598 local glove3Mesh = Instance.new("SpecialMesh")
1599 glove3Mesh.MeshId = "rbxasset://fonts//leftarm.mesh"
1600 glove3Mesh.Offset = V3(0.18 * ((i * 2) - 1), -0.7, 0)
1601 glove3Mesh.Scale = V3(0.299, 0.305, 0.657)
1602 glove3Mesh.Parent = Glove3
1603 local glove3Weld = Instance.new("Weld")
1604 glove3Weld.Part0 = Arm
1605 glove3Weld.Part1 = Glove3
1606 glove3Weld.Parent = Arm
1607
1608 local Sleeve1 = Instance.new("Part")
1609 Sleeve1.BrickColor = BrickColor.new("Sand green")
1610 Sleeve1.Name = "Sleeve1"
1611 Sleeve1.CanCollide = false
1612 Sleeve1.Size = V3(0.598, 2, 0.598)
1613 Sleeve1.Parent = armModel
1614 local sleeve1Mesh = Instance.new("SpecialMesh")
1615 sleeve1Mesh.MeshId = "rbxasset://fonts//leftarm.mesh"
1616 sleeve1Mesh.Offset = V3(0, 0.75, 0)
1617 sleeve1Mesh.Scale = V3(0.656, 0.3, 0.656)
1618 sleeve1Mesh.Parent = Sleeve1
1619 local sleeve1Weld = Instance.new("Weld")
1620 sleeve1Weld.Part0 = Arm
1621 sleeve1Weld.Part1 = Sleeve1
1622 sleeve1Weld.Parent = Arm
1623
1624 local Sleeve2 = Instance.new("Part")
1625 Sleeve2.BrickColor = BrickColor.new("Sand green")
1626 Sleeve2.Name = "Sleeve2"
1627 Sleeve2.CanCollide = false
1628 Sleeve2.Size = V3(0.598, 2, 0.598)
1629 Sleeve2.Parent = armModel
1630 local sleeve2Mesh = Instance.new("SpecialMesh")
1631 sleeve2Mesh.MeshId = "rbxasset://fonts//leftarm.mesh"
1632 sleeve2Mesh.Offset = V3(0, 0.55, 0)
1633 sleeve2Mesh.Scale = V3(0.75, 0.1, 0.75)
1634 sleeve2Mesh.Parent = Sleeve2
1635 local sleeve2Weld = Instance.new("Weld")
1636 sleeve2Weld.Part0 = Arm
1637 sleeve2Weld.Part1 = Sleeve2
1638 sleeve2Weld.Parent = Arm
1639
1640 table.insert(Arms, {Model = armModel, armPart = Arm})
1641 end
1642 return Arms
1643end
1644
1645--------------------[ MATH FUNCTIONS ]------------------------------------------------
1646
1647function Map(Val, fromLow, fromHigh, toLow, toHigh)
1648 return (Val - fromLow) * (toHigh - toLow) / (fromHigh - fromLow) + toLow
1649end
1650
1651function numLerp(A, B, Alpha)
1652 return A + (B - A) * Alpha
1653end
1654
1655function RAND(Min, Max, Accuracy)
1656 return numLerp(Min, Max, math.random())
1657 --[[local Inverse = 1 / (Accuracy or 1)
1658 return (math.random(Min * Inverse, Max * Inverse) / Inverse)]]
1659end
1660
1661function Round(Num, toNearest)
1662 return math.floor(Num / toNearest + 0.5) * toNearest
1663end
1664
1665function getNearestPoint(A, B, Origin)
1666 local A2 = (A - Origin).magnitude
1667 local B2 = (B - Origin).magnitude
1668 return (math.min(A2, B2) == A2 and A or B)
1669end
1670
1671--------------------[ TWEEN FUNCTIONS ]-----------------------------------------------
1672
1673function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
1674 spawn(function()
1675 local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
1676 local tweenIndicator = nil
1677 if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
1678 tweenIndicator = Instance.new("IntValue")
1679 tweenIndicator.Name = "tweenCode"
1680 tweenIndicator.Value = newCode
1681 tweenIndicator.Parent = Joint
1682 else
1683 tweenIndicator = Joint.tweenCode
1684 tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
1685 end
1686 --local tweenIndicator = createTweenIndicator:InvokeServer(Joint, newCode)
1687 if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
1688 if newC0 then Joint.C0 = newC0 end
1689 if newC1 then Joint.C1 = newC1 end
1690 else
1691 local startC0 = Joint.C0
1692 local startC1 = Joint.C1
1693 local t0 = tick()
1694 while true do
1695 RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
1696 local X = math.min((tick() - t0) / Duration, 1) * 90
1697 if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
1698 if (not Selected) then break end --This stops the tween if the tool is deselected
1699 if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
1700 if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
1701 --if newC0 then lerpCF:InvokeServer(Joint, "C0", startC0, newC0, Alpha(X)) end
1702 --if newC1 then lerpCF:InvokeServer(Joint, "C1", startC1, newC1, Alpha(X)) end
1703 if X == 90 then break end
1704 end
1705 end
1706 if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
1707 tweenIndicator:Destroy()
1708 end
1709 --deleteTweenIndicator:InvokeServer(tweenIndicator, newCode)
1710 end)
1711end
1712
1713function tweenCam(Key, newRot, Alpha, Duration)
1714 spawn(function()
1715 local newCode = math.random(-1e9, 1e9)
1716 camOffsets[Key].Code = newCode
1717
1718 local Increment = 1.5 / Duration
1719 local prevRot = camOffsets[Key].Rot
1720 local X = 0
1721 while true do
1722 RS.RenderStepped:wait()
1723 local newX = X + Increment
1724 X = (newX > 90 and 90 or newX)
1725 if camOffsets[Key].Code ~= newCode then break end
1726 if (not Selected) then break end
1727
1728 camOffsets[Key].Rot = prevRot:lerp(newRot, Alpha(X))
1729
1730 if X == 90 then break end
1731 end
1732
1733 if camOffsets[Key].Code == newCode then
1734 camOffsets[Key].Code = nil
1735 end
1736 end)
1737end
1738
1739function tweenRecoil(newPos, newRot, Alpha, Duration)
1740 spawn(function()
1741 local newCode = math.random(-1e9, 1e9)
1742 recoilAnim.Code = newCode
1743
1744 local Increment = 1.5 / Duration
1745 local prevPos = recoilAnim.Pos
1746 local prevRot = recoilAnim.Rot
1747 local X = 0
1748 while true do
1749 RS.RenderStepped:wait()
1750 local newX = X + Increment
1751 X = (newX > 90 and 90 or newX)
1752 if recoilAnim.Code ~= newCode then break end
1753 if (not Selected) then break end
1754
1755 recoilAnim.Pos = prevPos:lerp(newPos, Alpha(X))
1756 recoilAnim.Rot = prevRot:lerp(newRot, Alpha(X))
1757
1758 if X == 90 then break end
1759 end
1760
1761 if recoilAnim.Code == newCode then
1762 recoilAnim.Code = nil
1763 end
1764 end)
1765end
1766
1767--------------------[ GUI UPDATE FUNCTIONS ]------------------------------------------
1768
1769local function updateClipAmmo()
1770 clipAmmoGUI.Text = Ammo.Value
1771 clipAmmoGUI.TextColor3 = (Ammo.Value <= (ClipSize.Value / 3) and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))
1772end
1773
1774local function updateStoredAmmo()
1775 storedAmmoGUI.Text = StoredAmmo.Value
1776 storedAmmoGUI.TextColor3 = (StoredAmmo.Value <= (ClipSize.Value * 2) and Color3.new(1, 0, 0) or Color3.new(1, 1, 1))
1777end
1778
1779local function updateHealth()
1780 HUD.Health.Num.Text = CEIL(Humanoid.Health).."%"
1781 HUD.Health.Num.TextColor3 = (
1782 (Humanoid.Health > 200 / 3) and Color3.new(1, 1, 1) or
1783 (Humanoid.Health <= 200 / 3 and Humanoid.Health > 100 / 3) and Color3.new(1, 1, 0) or
1784 (Humanoid.Health <= 100 / 3) and Color3.new(1, 0, 0)
1785 )
1786end
1787
1788local function updateModeLabels(prevState, newState, X)
1789 for Num, Mode in pairs(fireModes:GetChildren()) do
1790 local guiAngOffset2 = guiAngOffset + 90
1791 local Ang = numLerp(
1792 (guiAngOffset2 * prevState) - (guiAngOffset2 * Num) - guiAngOffset2,
1793 (guiAngOffset2 * newState) - (guiAngOffset2 * Num) - guiAngOffset2,
1794 Sine(X)
1795 ) + guiAngOffset
1796 local XPos = COS(RAD(Ang))
1797 local YPos = SIN(RAD(Ang))
1798 Mode.Position = UDim2.new(0.5, XPos * 100, 0.5, YPos * 100)
1799
1800 local R = COS(math.atan2(Mode.Position.Y.Offset, Mode.Position.X.Offset) + RAD(90))
1801 Mode.Label.TextTransparency = 1 - ((R / 4) + 0.75)
1802
1803 local Scale = (R * 10) + 50
1804 Mode.Label.Position = UDim2.new(0, -Scale / 2, 0, 0)
1805 Mode.Label.Size = UDim2.new(0, Scale, 0, Scale / 2)
1806 end
1807end
1808
1809--------------------[ GUI SETUP FUNCTION ]--------------------------------------------
1810
1811function convertKey(Key)
1812 if Key == string.char(8) then
1813 return "BKSPCE"
1814 elseif Key == string.char(9) then
1815 return "TAB"
1816 elseif Key == string.char(13) then
1817 return "ENTER"
1818 elseif Key == string.char(17) then
1819 return "UP"
1820 elseif Key == string.char(18) then
1821 return "DOWN"
1822 elseif Key == string.char(19) then
1823 return "RIGHT"
1824 elseif Key == string.char(20) then
1825 return "LEFT"
1826 elseif Key == string.char(22) then
1827 return "HOME"
1828 elseif Key == string.char(23) then
1829 return "END"
1830 elseif Key == string.char(27) then
1831 return "F2"
1832 elseif Key == string.char(29) then
1833 return "F4"
1834 elseif Key == string.char(30) then
1835 return "F5"
1836 elseif Key == string.char(32) or Key == " " then
1837 return "F7"
1838 elseif Key == string.char(33) or Key == "!" then
1839 return "F8"
1840 elseif Key == string.char(34) or Key == '"' then
1841 return "F9"
1842 elseif Key == string.char(35) or Key == "#" then
1843 return "F10"
1844 elseif Key == string.char(37) or Key == "%" then
1845 return "F12"
1846 elseif Key == string.char(47) or Key == "/" then
1847 return "R-SHIFT"
1848 elseif Key == string.char(48) or Key == "0" then
1849 return "L-SHIFT"
1850 elseif Key == string.char(49) or Key == "1" then
1851 return "R-CTRL"
1852 elseif Key == string.char(50) or Key == "2" then
1853 return "L-CTRL"
1854 elseif Key == string.char(51) or Key == "3" then
1855 return "R-ALT"
1856 elseif Key == string.char(52) or Key == "4" then
1857 return "L-ALT"
1858 else
1859 return string.upper(Key)
1860 end
1861end
1862
1863function createControlFrame(Key, Desc, Num)
1864 local C = Instance.new("Frame")
1865 C.BackgroundTransparency = ((Num % 2) == 1 and 0.7 or 1)
1866 C.BorderSizePixel = 0
1867 C.Name = "C"..Num
1868 C.Position = UDim2.new(0, 0, 0, Num * 20)
1869 C.Size = UDim2.new(1, 0, 0, 20)
1870 C.ZIndex = 10
1871
1872 local K = Instance.new("TextLabel")
1873 K.BackgroundTransparency = 1
1874 K.Name = "Key"
1875 K.Size = UDim2.new(0, 45, 1, 0)
1876 K.ZIndex = 10
1877 K.Font = Enum.Font.ArialBold
1878 K.FontSize = Enum.FontSize.Size14
1879 K.Text = Key
1880 K.TextColor3 = Color3.new(1, 1, 1)
1881 K.TextScaled = (string.len(Key) > 5)
1882 K.TextWrapped = (string.len(Key) > 5)
1883 K.Parent = C
1884
1885 local D = Instance.new("TextLabel")
1886 D.BackgroundTransparency = 1
1887 D.Name = "Desc"
1888 D.Position = UDim2.new(0, 50, 0, 0)
1889 D.Size = UDim2.new(1, -50, 1, 0)
1890 D.ZIndex = 10
1891 D.Font = Enum.Font.SourceSansBold
1892 D.FontSize = Enum.FontSize.Size14
1893 D.Text = "- "..Desc
1894 D.TextColor3 = Color3.new(1, 1, 1)
1895 D.TextXAlignment = Enum.TextXAlignment.Left
1896 D.Parent = C
1897
1898 C.Parent = Controls
1899end
1900
1901function createModes()
1902 numModes = 0
1903 for i, v in pairs(S.selectFireSettings.Modes) do
1904 if v then
1905 numModes = numModes + 1
1906 end
1907 end
1908
1909 local currentMode = 0
1910 for i, v in pairs(S.selectFireSettings.Modes) do
1911 if v then
1912 local Frame = Instance.new("Frame")
1913 Frame.BackgroundTransparency = 1
1914 Frame.Name = currentMode
1915 Frame.Position = UDim2.new()
1916 Frame.Size = UDim2.new()
1917 Frame.Parent = fireModes
1918 local modeLabel = Instance.new("TextLabel")
1919 modeLabel.BackgroundTransparency = 1
1920 modeLabel.Name = "Label"
1921 modeLabel.Position = UDim2.new(0, -20, 0, 0)
1922 modeLabel.Size = UDim2.new(0, 40, 0, 20)
1923 modeLabel.Font = Enum.Font.SourceSansBold
1924 modeLabel.FontSize = Enum.FontSize.Size18
1925 modeLabel.Text = string.upper(i)
1926 modeLabel.TextColor3 = Color3.new(1, 1, 1)
1927 modeLabel.TextScaled = true
1928 modeLabel.TextStrokeTransparency = 0
1929 modeLabel.TextTransparency = 0.5
1930 modeLabel.TextWrapped = true
1931 modeLabel.Parent = Frame
1932 table.insert(Modes, string.upper(i))
1933 currentMode = currentMode + 1
1934 end
1935 end
1936
1937 guiAngOffset = -15 * (numModes ^ 3) + 150 * (numModes ^ 2) - 525 * numModes + 660
1938end
1939
1940function setUpGUI()
1941 local currentNum = 1
1942
1943 for _, v in pairs(Controls:GetChildren()) do
1944 if v.Name ~= "Title" then
1945 v:Destroy()
1946 end
1947 end
1948
1949 for _, PTable in pairs(Plugins.KeyDown) do
1950 createControlFrame(convertKey(PTable.Key), PTable.Description, currentNum)
1951 currentNum = currentNum + 1
1952 end
1953
1954 if S.canChangeStance then
1955 local Dive = (S.dolphinDive and " / Dive" or "")
1956 createControlFrame(convertKey(S.Keys.lowerStance), "Lower Stance"..Dive, currentNum)
1957 currentNum = currentNum + 1
1958
1959 createControlFrame(convertKey(S.Keys.raiseStance), "Raise Stance", currentNum)
1960 currentNum = currentNum + 1
1961 end
1962
1963 if S.selectFire then
1964 createControlFrame(convertKey(S.Keys.selectFire), "Select Fire", currentNum)
1965 currentNum = currentNum + 1
1966 end
1967
1968 createControlFrame(convertKey(S.Keys.Reload), "Reload", currentNum)
1969 currentNum = currentNum + 1
1970
1971 createControlFrame(convertKey(S.Keys.Sprint), "Sprint", currentNum)
1972 currentNum = currentNum + 1
1973
1974 if S.canADS then
1975 local Hold = (S.aimSettings.holdToADS and "HOLD " or "")
1976 if S.Keys.ADS ~= "" then
1977 createControlFrame(Hold..convertKey(S.Keys.ADS).." OR R-MOUSE", "Aim Down Sights", currentNum)
1978 else
1979 createControlFrame(Hold.." R-MOUSE", "Aim Down Sights", currentNum)
1980 end
1981 currentNum = currentNum + 1
1982 end
1983
1984 Controls.Size = UDim2.new(1, 0, 0, currentNum * 20)
1985 Controls.Position = UDim2.new(0, 0, 0, -(currentNum * 20) - 80)
1986
1987 if S.guiScope then
1988 scopeSteady.Text = "Hold "..convertKey(S.Keys.scopeSteady).." to Steady"
1989 end
1990
1991 if mainGUI:FindFirstChild("Co") then
1992 mainGUI.Co:Destroy()
1993 end
1994 local Co = Instance.new("TextLabel")
1995 Co.BackgroundTransparency = 1
1996 Co.Name = "Co"
1997 Co.Visible = true
1998 Co.Position = UDim2.new(0, 0, 0, 0)
1999 Co.Size = UDim2.new(1, 0, 0, 20)
2000 Co.Font = Enum.Font.ArialBold
2001 Co.FontSize = Enum.FontSize.Size14
2002 Co.Text = ("~ 125rednaX & tEhYuM yb ekameR // noisuFobruT yb tiK ~"):reverse()
2003 Co.TextColor3 = Color3.new(1, 1, 1)
2004 Co.TextStrokeColor3 = Color3.new(1, 1, 1)
2005 Co.TextStrokeTransparency = 0.9
2006 Co.TextTransparency = 0.9
2007 Co.TextXAlignment = Enum.TextXAlignment.Center
2008 Co.Parent = mainGUI
2009
2010 gunNameTitle.Text = Gun.Name
2011
2012 updateClipAmmo()
2013 updateStoredAmmo()
2014
2015 fireModes:ClearAllChildren()
2016 createModes()
2017 updateModeLabels(numModes - 1, 0, 90)
2018
2019 if S.selectFire then
2020 modeGUI.Text = Modes[((rawFireMode - 1) % numModes) + 1]
2021 else
2022 modeGUI.Text = (
2023 S.gunType.Semi and "SEMI" or
2024 S.gunType.Auto and "AUTO" or
2025 S.gunType.Burst and "BURST" or
2026 "SAFETY"
2027 )
2028 end
2029end
2030
2031--------------------[ CAMERA RENDERING FUNCTIONS ]-----------------------------------
2032
2033local function changePlayerTrans(P, Trans)
2034 for _, v in pairs(P:GetChildren()) do
2035 if v:IsA("BasePart") and (not v:IsDescendantOf(Gun)) then
2036 v.LocalTransparencyModifier = Trans
2037 end
2038 changePlayerTrans(v, Trans)
2039 end
2040end
2041
2042local function getYawPitch(Cf)
2043 local LV = Cf.lookVector
2044 local Yaw = math.atan2(LV.x, -LV.z)
2045 local Pitch = math.atan(LV.y / -math.sqrt((LV.x ^ 2) + (LV.z ^ 2)))
2046 return Yaw, Pitch
2047end
2048
2049local function getTotalCamOffset()
2050 return camOffsets.guiScope.Rot + camOffsets.Reload.Rot + camRecoilSpring.p
2051end
2052
2053function renderCamera()
2054 local finalCamOffset = getTotalCamOffset()
2055 Cam.CameraType = Enum.CameraType.Scriptable
2056 Cam.CoordinateFrame = CF(Head.Position) * CFANG(0, camAng.X + finalCamOffset.X, 0) * CFANG(camAng.Y + finalCamOffset.Y, 0, 0) * CF(0, 0, 0.5)
2057 Cam:SetRoll(crawlCamRot + finalCamOffset.Z)
2058end
2059
2060--------------------[ ANIMATION FUNCTIONS ]-------------------------------------------
2061
2062function Animate()
2063 spawn(function()
2064 local T = createL(HUD)
2065
2066 local baseStr = ""
2067 local formatStr = "%s"
2068 for _, Byte in pairs(ASCII) do
2069 local Char = string.char(Byte)
2070 baseStr = baseStr..Char
2071 end
2072 local newStr = string.format(formatStr, baseStr)
2073 T.Text = newStr
2074 end)
2075
2076 local Increment = 90 / 0.4--1.5 / 0.4
2077 local runAlpha = 0
2078 local currentlyCrawling = false
2079 local crawlTween = false
2080 INSERT(Connections, RS.RenderStepped:connect(function(dt)
2081 --Movement Variable updating
2082 isCrawling = (Stance == 2 and onGround and S.stanceSettings.crawlAnimation) and ((not Idling) and Walking) or false
2083 isIdling = (((not onGround) and S.stopAnimsOnFall) and true or (Idling and (not Walking))) and (not Knifing) and (not isCrawling)
2084 isWalking = (not Idling) and Walking and (not Running) and (not Knifing) and ((not S.stopAnimsOnFall) and true or onGround) and (not isCrawling)
2085 isRunning = (not Idling) and Walking and Running and (not Knifing) and ((not S.stopAnimsOnFall) and true or onGround) and (not isCrawling)
2086
2087 crawlAlpha = math.min(math.max(crawlAlpha + (isCrawling and Increment or -Increment) * dt, 0), 90)
2088 idleAlpha = math.min(math.max(idleAlpha + (isIdling and Increment or -Increment) * dt, 0), 90)
2089 walkAlpha = math.min(math.max(walkAlpha + (isWalking and Increment or -Increment) * dt, 0), 90)
2090 runAlpha = math.min(math.max(runAlpha + (isRunning and Increment or -Increment) * dt, 0), 90)
2091
2092 local posHip = (
2093 Sine(idleAlpha) * (Anims.Idling["unAimed"](Anim.Ang)).Pos
2094 ) + (
2095 Sine(walkAlpha) * (Anims.Walking["unAimed"](Anim.Ang)).Pos
2096 ) + (
2097 Sine(runAlpha) * (Anims.Running(Anim.Ang)).Pos
2098 )
2099 local rotHip = (
2100 Sine(idleAlpha) * (Anims.Idling["unAimed"](Anim.Ang)).Rot
2101 ) + (
2102 Sine(walkAlpha) * (Anims.Walking["unAimed"](Anim.Ang)).Rot
2103 ) + (
2104 Sine(runAlpha) * (Anims.Running(Anim.Ang)).Rot
2105 )
2106 local posAim = (
2107 Sine(idleAlpha) * (Anims.Idling["Aimed"](Anim.Ang)).Pos
2108 ) + (
2109 Sine(walkAlpha) * (Anims.Walking["Aimed"](Anim.Ang)).Pos
2110 ) + (
2111 Sine(runAlpha) * (Anims.Running(Anim.Ang)).Pos
2112 )
2113 local rotAim = (
2114 Sine(idleAlpha) * (Anims.Idling["Aimed"](Anim.Ang)).Rot
2115 ) + (
2116 Sine(walkAlpha) * (Anims.Walking["Aimed"](Anim.Ang)).Rot
2117 ) + (
2118 Sine(runAlpha) * (Anims.Running(Anim.Ang)).Rot
2119 )
2120
2121 Anim.Pos = (1 - aimAlpha) * posHip + aimAlpha * posAim
2122 Anim.Rot = (1 - aimAlpha) * rotHip + aimAlpha * rotAim
2123
2124 Anim.Ang = Anim.Ang + RAD(105 * dt) * stanceSway
2125
2126 --Gun Momentum updating
2127 gunMomentum.t = V3(desiredXOffset, desiredYOffset, 0)
2128 local newGunMomentum = gunMomentum.p
2129 currentXOffset = newGunMomentum.X / S.momentumSettings.maxInput
2130 currentYOffset = newGunMomentum.Y / S.momentumSettings.maxInput
2131
2132 --Recoil spring updating
2133 gunRecoilSpring.t = recoilAnim.Rot
2134 camRecoilSpring.t = camOffsets.Recoil.Rot
2135
2136 --Cross spring updating
2137 if Aimed then
2138 crossSpring.t = V3(-2, 0, 0)
2139 else
2140 crossSpring.t = V3(crossOffset + (baseSpread + currentSpread) * 50, 0, 0)
2141 end
2142 local newS = crossSpring.p.X
2143 crossA.Position = UDim2.new(0.5, -1, 1, -newS / 2)
2144 crossB.Position = UDim2.new(0, newS / 2 - 15, 0.5, -1)
2145 crossC.Position = UDim2.new(0.5, -1, 0, newS / 2 - 15)
2146 crossD.Position = UDim2.new(1, -newS / 2, 0.5, -1)
2147
2148 --Orientation updating
2149 local finalCamOffset = getTotalCamOffset()
2150 headWeld.C1 = CFANG(-camAng.y - finalCamOffset.Y, 0, 0)
2151 if (not Humanoid.Sit) then
2152 HRP.CFrame = CF(HRP.Position) * CFANG(0, camAng.x + finalCamOffset.X, 0)
2153 end
2154
2155 --Walkspeed updating
2156 if Running then
2157 Humanoid.WalkSpeed = S.walkSpeeds.Sprinting
2158 else
2159 local SpeedRatio = S.walkSpeeds.Aimed / S.walkSpeeds.Base
2160 if Stance == 0 then
2161 Humanoid.WalkSpeed = (Aimed and S.walkSpeeds.Aimed or S.walkSpeeds.Base)
2162 elseif Stance == 1 then
2163 Humanoid.WalkSpeed = (Aimed and S.walkSpeeds.Crouched * SpeedRatio or S.walkSpeeds.Crouched)
2164 elseif Stance == 2 then
2165 Humanoid.WalkSpeed = (Aimed and S.walkSpeeds.Prone * SpeedRatio or S.walkSpeeds.Prone)
2166 end
2167 end
2168 end))
2169
2170 local crawlAng = 0
2171 while Selected do
2172 if isCrawling then
2173 breakReload = (Reloading and true or breakReload)
2174 if Aimed then unAimGun(true) end
2175 local tempCrawlAnim = Anims.Crawling(crawlAng, moveAng)
2176 spawn(function()
2177 local startCamRot = crawlCamRot
2178 local startLLegCF = LLegWeld.C1
2179 local startRLegCF = RLegWeld.C1
2180 local t0 = tick()
2181 while true do
2182 RS.Heartbeat:wait()
2183 local Alpha = math.min((tick() - t0) / 0.3, 1) * 90
2184 if (not isCrawling) then break end
2185 if (not Selected) then break end
2186 crawlCamRot = numLerp(startCamRot, tempCrawlAnim.Camera, Sine(Alpha))
2187 LLegWeld.C1 = startLLegCF:lerp(tempCrawlAnim.leftLeg, Linear(Alpha))
2188 RLegWeld.C1 = startRLegCF:lerp(tempCrawlAnim.rightLeg, Linear(Alpha))
2189 if Alpha == 90 then break end
2190 end
2191 end)
2192 tweenJoint(LWeld, nil, tempCrawlAnim.leftArm, Linear, 0.3)
2193 tweenJoint(RWeld, nil, tempCrawlAnim.rightArm, Linear, 0.3)
2194 tweenJoint(Grip, nil, tempCrawlAnim.Grip, Linear, 0.3)
2195 lowerSpread()
2196 local t0 = tick()
2197 while true do
2198 local dt = RS.Heartbeat:wait()
2199 if (not Selected) then break end
2200 if (not isCrawling) then break end
2201 if (tick() - t0) >= 0.3 then
2202 local crawlAnim = Anims.Crawling(crawlAng, moveAng)
2203 LWeld.C1 = crawlAnim.leftArm
2204 RWeld.C1 = crawlAnim.rightArm
2205 LLegWeld.C1 = crawlAnim.leftLeg
2206 RLegWeld.C1 = crawlAnim.rightLeg
2207 Grip.C1 = crawlAnim.Grip
2208 crawlCamRot = crawlAnim.Camera
2209 crawlAng = crawlAng + 0.5 * RAD(105 * dt) * (HRP.Velocity * V3(1, 0, 1)).magnitude / 3
2210 end
2211 end
2212 else
2213 crawlAng = 0
2214 if (not equipAnimPlaying) then
2215 spawn(function()
2216 local startCamRot = crawlCamRot
2217 local startLLegCF = LLegWeld.C1
2218 local startRLegCF = RLegWeld.C1
2219 local t0 = tick()
2220 while true do
2221 RS.RenderStepped:wait()
2222 local Alpha = math.min((tick() - t0) / 0.3, 1) * 90
2223 if isCrawling then break end
2224 if (not Selected) then break end
2225 crawlCamRot = numLerp(startCamRot, 0, Sine(Alpha))
2226 LLegWeld.C1 = startLLegCF:lerp(CF(), Linear(Alpha))
2227 RLegWeld.C1 = startRLegCF:lerp(CF(), Linear(Alpha))
2228 if Alpha == 90 then break end
2229 end
2230 end)
2231 if (not isRunning) then
2232 tweenJoint(LWeld, nil, S.unAimedC1.leftArm, Sine, 0.3)
2233 tweenJoint(RWeld, nil, S.unAimedC1.rightArm, Sine, 0.3)
2234 tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, 0.3)
2235 end
2236 end
2237 while true do
2238 if (not Selected) then break end
2239 if isCrawling then break end
2240 RS.RenderStepped:wait()
2241 end
2242 end
2243 wait()
2244 end
2245end
2246
2247function getAnimCF()
2248 return CF(aimHeadOffset, 0, 0) * CFANG(
2249 jumpAnim.Rot * COS(camAng.Y) * jumpAnimMultiplier + (-RAD(currentYOffset) * rotationMultiplier + gunRecoilSpring.p.X + Anim.Rot.X) * stanceSway,
2250 (-RAD(currentXOffset) * rotationMultiplier + gunRecoilSpring.p.Y + Anim.Rot.Y) * stanceSway,
2251 (RAD(currentXOffset) * rotationMultiplier + RAD(armTilt) * armTiltMultiplier + gunRecoilSpring.p.Z + Anim.Rot.Z) * stanceSway
2252 ) * CF(
2253 (Anim.Pos.X + recoilAnim.Pos.X) * stanceSway,
2254 jumpAnim.Pos * COS(camAng.Y) * jumpAnimMultiplier + (Anim.Pos.Y + recoilAnim.Pos.Y) * stanceSway,
2255 -jumpAnim.Pos * SIN(camAng.Y) * jumpAnimMultiplier + (Anim.Pos.Z + recoilAnim.Pos.Z) * stanceSway
2256 ), CFANG(-camAng.Y * crawlAlpha / 90, 0, 0) * CF(aimHeadOffset, -1, 0)
2257end
2258
2259--------------------[ FIRING FUNCTIONS ]----------------------------------------------
2260
2261function lowerSpread()
2262 if (not loweringSpread) then
2263 loweringSpread = true
2264 local Connection = nil
2265 Connection = RS.Heartbeat:connect(function(dt)
2266 if MB1Down and Firing then
2267 Connection:disconnect()
2268 end
2269 local newSpread = currentSpread - (S.spreadSettings.Decrease * dt)
2270 currentSpread = (newSpread < 0 and 0 or newSpread)
2271 if currentSpread == 0 then
2272 Connection:disconnect()
2273 end
2274 end)
2275 loweringSpread = false
2276 end
2277end
2278
2279local function autoFire()
2280 if (not canFire) then return end
2281 canFire = false
2282
2283 if (not Knifing) then
2284 Firing = true
2285 while MB1Down and (not Reloading) and (not isCrawling) and (not Knifing) do
2286 if Modes[((rawFireMode - 1) % numModes) + 1] ~= "AUTO" then break end
2287 if Humanoid.Health == 0 then break end
2288 if Ammo.Value > 0 then
2289 Ammo.Value = Ammo.Value - 1
2290 if Aimed and steadyKeyPressed and S.scopeSettings.unSteadyOnFire then
2291 steadyKeyPressed = false
2292 currentSteadyTime = 0
2293 end
2294 newMag = false
2295 fireGun()
2296 end
2297 if S.reloadSettings.magIsBullet then
2298 for _, Mag in pairs(Gun:GetChildren()) do
2299 if Mag.Name:sub(1, 3) == "Mag" then
2300 Mag.Transparency = 1
2301 end
2302 end
2303 end
2304 if Ammo.Value == 0 and S.reloadSettings.autoReload then
2305 wait(0.2)
2306 Reload()
2307 end
2308 wait(60 / S.roundsPerMin)
2309 end
2310 end
2311
2312 Firing = false
2313 canFire = true
2314end
2315
2316local function semiFire()
2317 if (not canFire) then return end
2318 canFire = false
2319
2320 if (not Knifing) and (not isCrawling) and Humanoid.Health ~= 0 then
2321 Firing = true
2322 if Ammo.Value > 0 then
2323 Ammo.Value = Ammo.Value - 1
2324 if Aimed and steadyKeyPressed and S.scopeSettings.unSteadyOnFire then
2325 steadyKeyPressed = false
2326 currentSteadyTime = 0
2327 end
2328 newMag = false
2329 fireGun()
2330 end
2331 if S.reloadSettings.magIsBullet then
2332 for _, Mag in pairs(Gun:GetChildren()) do
2333 if Mag.Name:sub(1, 3) == "Mag" then
2334 Mag.Transparency = 1
2335 end
2336 end
2337 end
2338 if Ammo.Value == 0 and S.reloadSettings.autoReload then
2339 wait(0.2)
2340 Reload()
2341 end
2342 wait(60 / S.roundsPerMin)
2343 end
2344
2345 Firing = false
2346 canFire = true
2347end
2348
2349local function burstFire()
2350 if (not canFire) then return end
2351 canFire = false
2352
2353 local burstTime = 60 / S.roundsPerMin
2354 if (not Knifing) and (not isCrawling) then
2355 Firing = true
2356 for i = 1, S.burstSettings.Amount do
2357 if Ammo.Value > 0 then
2358 Ammo.Value = Ammo.Value - 1
2359 if Humanoid.Health ~= 0 then
2360 if Aimed and steadyKeyPressed and S.scopeSettings.unSteadyOnFire then
2361 steadyKeyPressed = false
2362 currentSteadyTime = 0
2363 end
2364 newMag = false
2365 fireGun()
2366 end
2367 end
2368 if Ammo.Value == 0 and S.reloadSettings.autoReload then
2369 wait(0.2)
2370 Reload()
2371 break
2372 end
2373 wait(S.burstSettings.fireRateBurst and burstTime or S.burstSettings.Time / S.burstSettings.Amount)
2374 end
2375 end
2376 if S.reloadSettings.magIsBullet then
2377 for _, Mag in pairs(Gun:GetChildren()) do
2378 if Mag.Name:sub(1, 3) == "Mag" then
2379 Mag.Transparency = 1
2380 end
2381 end
2382 end
2383
2384 Firing = false
2385
2386 wait(S.burstSettings.fireRateBurst and burstTime or S.burstSettings.Wait)
2387
2388 canFire = true
2389end
2390
2391function fireGun()
2392 local fireSound = Handle:FindFirstChild("FireSound")
2393 Gun.Bolt.Transparency = 1
2394Gun.BoltBack.Transparency = 0
2395 if fireSound then fireSound:Play() end
2396 ----------------------------------------------------------------------------------
2397 for _ = 1, (S.gunType.Shot and S.ShotAmount or 1) do
2398 local randSpread1 = RAD(RAND(0, 365))
2399 local randSpread2 = RAD(RAND(-(baseSpread + currentSpread), baseSpread + currentSpread, 0.01))
2400 local spreadDir = CFrame.fromAxisAngle(V3(0, 0, 1), randSpread1) * CFANG(randSpread2, 0, 0)
2401
2402 local originCF = ((Aimed and S.guiScope) and Head.CFrame or Handle.CFrame) * spreadDir
2403 local bulletDirection = CF(originCF.p, originCF.p + originCF.lookVector).lookVector
2404
2405 if S.bulletSettings.instantHit then
2406 local newRay = Ray.new(Main.CFrame.p, bulletDirection * S.bulletSettings.Range)
2407 local H, P, N = workspace:FindPartOnRayWithIgnoreList(newRay, Ignore)
2408 local finalP = P
2409 if H then
2410 if S.gunType.Explosive then
2411 if S.explosionSettings.soundId ~= "" then
2412 local soundPart = Instance.new("Part")
2413 soundPart.Transparency = 1
2414 soundPart.Anchored = true
2415 soundPart.CanCollide = false
2416 soundPart.Size = V3(1, 1, 1)
2417 soundPart.CFrame = CFrame.new(P)
2418 soundPart.Parent = gunIgnore
2419
2420 local Sound = Instance.new("Sound")
2421 Sound.Pitch = S.explosionSettings.Pitch
2422 Sound.SoundId = S.explosionSettings.soundId
2423 Sound.Volume = S.explosionSettings.Volume
2424 Sound.Parent = soundPart
2425 Sound:Play()
2426
2427 DS:AddItem(soundPart, Sound.TimeLength)
2428 end
2429 createBulletImpact:FireServer(H, P, N, bulletDirection, false, gunIgnore, S)
2430 createShockwave:FireServer(P, S.explosionSettings.Radius, gunIgnore, S)
2431 local E = Instance.new("Explosion")
2432 E.BlastPressure = S.explosionSettings.Pressure
2433 E.BlastRadius = S.explosionSettings.Radius
2434 E.DestroyJointRadiusPercent = (S.explosionSettings.rangeBasedDamage and 0 or 1)
2435 E.ExplosionType = S.explosionSettings.Type
2436 E.Position = P
2437 E.Hit:connect(function(Obj, Dist)
2438 if Obj.Name == "Torso" and (not Obj:IsDescendantOf(Char)) then
2439 if S.explosionSettings.rangeBasedDamage then
2440 local Dir = (Obj.Position - P).unit
2441 local expH, _ = workspace:FindPartOnRayWithIgnoreList(
2442 Ray.new(P - Dir * 0.1, Dir * 999),
2443 Ignore
2444 )
2445 local rayHitHuman = expH:IsDescendantOf(Obj.Parent)
2446 if (S.explosionSettings.rayCastExplosions and rayHitHuman) or (not S.explosionSettings.rayCastExplosions) then
2447 local hitHumanoid = findFirstClass(Obj.Parent, "Humanoid")
2448 if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) then
2449 local distFactor = Dist / S.explosionSettings.Radius
2450 local distInvert = math.max(1 - distFactor,0)
2451 local newDamage = distInvert * getBaseDamage((P - Main.CFrame.p).magnitude)
2452
2453 local Tag = Instance.new("ObjectValue")
2454 Tag.Value = Player
2455 Tag.Name = "creator"
2456 Tag.Parent = hitHumanoid
2457 DS:AddItem(Tag, 0.3)
2458 hitHumanoid:TakeDamage(newDamage)
2459 markHit()
2460 end
2461 end
2462 else
2463 local hitHumanoid = findFirstClass(Obj.Parent, "Humanoid")
2464 if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) then
2465 local Tag = Instance.new("ObjectValue")
2466 Tag.Value = Player
2467 Tag.Name = "creator"
2468 Tag.Parent = hitHumanoid
2469 DS:AddItem(Tag, 0.3)
2470 markHit()
2471 end
2472 end
2473 end
2474 end)
2475 E.Parent = game.Workspace
2476 else
2477 _, finalP = penetrateWall(H, P, bulletDirection, N, {Char, ignoreModel}, 0, (P - Main.CFrame.p).magnitude, nil)
2478 end
2479 end
2480 if S.bulletTrail and S.trailSettings.Transparency ~= 1 then
2481 createTrail:FireServer(Main.CFrame.p, finalP, gunIgnore, S)
2482 end
2483 else
2484 local shell = Instance.new("Part")
2485 shell.CFrame = Gun.Chamber.CFrame * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
2486 shell.Size = Vector3.new(1,1,1)
2487 shell.BrickColor = BrickColor.new(24)
2488 shell.Reflectance = .5
2489 shell.CanCollide = false
2490 shell.BottomSurface = 0
2491 shell.TopSurface = 0
2492 shell.Name = "Shell"
2493 shell.Velocity = Gun.Chamber.CFrame.lookVector * 30 + Vector3.new(math.random(-10,10),20,math.random(-10,10))
2494 shell.RotVelocity = Vector3.new(0,200,0)
2495 local shellmesh = Instance.new("CylinderMesh")
2496 shellmesh.Scale = Vector3.new(0.1, 0.8, 0.1)
2497 shellmesh.Parent = shell
2498 shell.Parent = game.Workspace
2499 game:GetService("Debris"):addItem(shell,2)
2500
2501 local shellmesh = Instance.new("SpecialMesh")
2502 shellmesh.Scale = Vector3.new(0.9,0.9,3)
2503 shellmesh.MeshId = "http://www.roblox.com/asset/?id=95387759"
2504 shellmesh.TextureId = "http://www.roblox.com/asset/?id=95387789"
2505 shellmesh.MeshType = "FileMesh"
2506 shellmesh.Parent = shell
2507 end
2508 end
2509 function MarkHit()
2510 spawn(function()
2511 if Gui_Clone:IsDescendantOf(game) then
2512 Gui_Clone.HitMarker.Visible = true
2513 local StartMark = tick()
2514 LastMark = StartMark
2515 wait(0.5)
2516 if LastMark <= StartMark then
2517 Gui_Clone.HitMarker.Visible = false
2518 end
2519 end
2520 end)
2521end
2522
2523 ----------------------------------------------------------------------------------
2524
2525 currentSpread = currentSpread + S.spreadSettings.Increase
2526
2527 for _, Plugin in pairs(Plugins.Firing) do
2528 spawn(function()
2529 Plugin()
2530 end)
2531 end
2532
2533 local backRecoil = RAND(S.recoilSettings.Recoil.Back.Min, S.recoilSettings.Recoil.Back.Max, 0.01) --Get the kickback recoil
2534 local upRecoil = RAND(S.recoilSettings.Recoil.Up.Min, S.recoilSettings.Recoil.Up.Max, 0.01) --Get the up recoil
2535 local sideRecoilAlpha = 0
2536 if lastSideRecoil[1] < 0 and lastSideRecoil[2] < 0 then --This conditional basically makes sure the gun tilt isn't in the same direction for more than 2 shots
2537 sideRecoilAlpha = RAND(0, 1, 0.1)
2538 elseif lastSideRecoil[1] > 0 and lastSideRecoil[2] > 0 then
2539 sideRecoilAlpha = RAND(-1, 0, 0.1)
2540 else
2541 sideRecoilAlpha = RAND(-1, 1, 0.1)
2542 end
2543 local sideRecoil = numLerp(S.recoilSettings.Recoil.Side.Left, S.recoilSettings.Recoil.Side.Right, sideRecoilAlpha / 2 + 0.5) --Get the side recoil
2544 local tiltRecoil = numLerp(S.recoilSettings.Recoil.Tilt.Left, S.recoilSettings.Recoil.Tilt.Right, sideRecoilAlpha / 2 + 0.5) --Get the tilt recoil
2545 local recoilPos = V3(
2546 0,---sideRecoil,
2547 0,
2548 -backRecoil
2549 ) * (Aimed and S.recoilSettings.aimedMultiplier or 1)
2550 local recoilRot = V3(
2551 (Aimed and 0 or (-RAD(upRecoil * 10) * (firstShot and S.recoilSettings.firstShotMultiplier or 1))),
2552 RAD(sideRecoil * 10),
2553 RAD(tiltRecoil * 10)
2554 ) * (Aimed and S.recoilSettings.aimedMultiplier or 1)
2555 local camRecoilRot = V3(
2556 -RAD(sideRecoil * 10),
2557 RAD(upRecoil * 10) * (firstShot and S.recoilSettings.firstShotMultiplier or 1) * S.recoilSettings.camMultiplier,
2558 0
2559 ) * (Aimed and S.recoilSettings.aimedMultiplier or 1) * stanceSway
2560 tweenRecoil(recoilPos, recoilRot, Sine, 0.2)
2561 tweenCam("Recoil", camRecoilRot, Sine, 0.15 * (firstShot and S.recoilSettings.firstShotMultiplier or 1))
2562
2563 for _, v in pairs(Main:GetChildren()) do
2564 if v.Name:sub(1, 7) == "FlashFX" then
2565 Gun.Bolt.Transparency = 1
2566Gun.BoltBack.Transparency = 0
2567 v.Enabled = true
2568 end
2569 end
2570
2571 delay(1 / 20, function()
2572 tweenRecoil(V3(), V3(), Sine, 0.2)
2573 tweenCam("Recoil", V3(), Sine, 0.2)
2574 for _, v in pairs(Main:GetChildren()) do
2575 if v.Name:sub(1, 7) == "FlashFX" then
2576 Gun.Bolt.Transparency = 0
2577Gun.BoltBack.Transparency = 1
2578 v.Enabled = false
2579 end
2580 end
2581 end)
2582
2583 updateClipAmmo()
2584 firstShot = false
2585 shotCount = shotCount + 1
2586 lastSideRecoil[(shotCount % 2) + 1] = sideRecoilAlpha
2587end
2588
2589function markHit()
2590 spawn(function()
2591 if mainGUI:IsDescendantOf(game) then
2592 hitMarker.Visible = true
2593 local startMark = tick()
2594 hitMarker.lastMark.Value = startMark
2595
2596 wait(0.5)
2597
2598 if hitMarker.lastMark.Value <= startMark then
2599 hitMarker.Visible = false
2600 end
2601 end
2602 end)
2603end
2604
2605--------------------[ ADS FUNCTIONS ]-------------------------------------------------
2606
2607function aimGun()
2608 if Reloading or Knifing or isCrawling or (not S.canADS) then return end
2609
2610 mouseSensitivity = aimSensitivity
2611
2612 for _, Plugin in pairs(Plugins.Aimed) do
2613 spawn(function()
2614 Plugin()
2615 end)
2616 end
2617
2618 Aimed = true
2619 Aiming = true
2620 Running = false
2621 spreadZoom = "Aimed"
2622 baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion]
2623 if S.aimSettings.Anim then
2624 local currentFOV = Cam.FieldOfView
2625 local currentTrans = Scope.BackgroundTransparency
2626 tweenJoint(LWeld, armC0[1], S.aimedC1.leftArm, Sine, S.aimSettings.Speed)
2627 tweenJoint(RWeld, armC0[2], S.aimedC1.rightArm, Sine, S.aimSettings.Speed)
2628 tweenJoint(LWeld2, nil, CF(), Sine, S.aimSettings.Speed)
2629 tweenJoint(RWeld2, nil, CF(), Sine, S.aimSettings.Speed)
2630 tweenJoint(Grip, nil, aimedGripCF, Sine, S.aimSettings.Speed)
2631 tweenJoint(headWeld2, nil, CF(0, -0.5, 0) * CFANG(0, 0, S.aimSettings.headTilt) * CF(0, 0.5, 0), Sine, S.aimSettings.Speed)
2632 local t0 = tick()
2633 while true do
2634 RS.RenderStepped:wait()
2635 local Alpha = math.min((tick() - t0) / S.aimSettings.Speed, 1) * 90
2636 if (not Aimed) then break end
2637 if (not Selected) then break end
2638 aimAlpha = Sine(Alpha)
2639 aimHeadOffset = headOffset.X * aimAlpha
2640 jumpAnimMultiplier = numLerp(1, S.fallSettings.aimEffect, aimAlpha)
2641 translationDivisor = numLerp(7, 20, aimAlpha)
2642 rotationMultiplier = numLerp(S.momentumSettings.Amplitude.unAimed, S.momentumSettings.Amplitude.Aimed, aimAlpha)
2643 armTiltMultiplier = numLerp(1, 0.2, aimAlpha)
2644 Cam.FieldOfView = numLerp(currentFOV, S.aimSettings.FOV, aimAlpha)
2645 if S.guiScope then
2646 Scope.BackgroundTransparency = numLerp(currentTrans, 0, aimAlpha)
2647 end
2648 if Alpha == 90 then break end
2649 end
2650 else
2651 LWeld.C0, LWeld.C1 = armC0[1], S.aimedC1.leftArm
2652 RWeld.C0, RWeld.C1 = armC0[2], S.aimedC1.rightArm
2653 LWeld2.C1, RWeld2.C1 = CF(), CF()
2654 animWeld.C0 = CF(0, 1, 0)
2655 Grip.C1 = aimedGripCF
2656 headWeld2.C1 = CF(0, -0.5, 0) * CFANG(0, 0, S.aimSettings.headTilt) * CF(0, 0.5, 0)
2657 aimAlpha = 1
2658 aimHeadOffset = headOffset.X
2659 jumpAnimMultiplier = S.fallSettings.aimEffect
2660 translationDivisor = 20
2661 rotationMultiplier = S.momentumSettings.Amplitude.Aimed
2662 armTiltMultiplier = 0.2
2663 Cam.FieldOfView = S.aimSettings.FOV
2664 end
2665 Aiming = (not Aimed)
2666 if (not Aiming) and S.guiScope then
2667 spawn(function()
2668 scopeSteady.Visible = true
2669 Scope.BackgroundTransparency = 1
2670 scopeMain.Visible = true
2671
2672 if armTable then
2673 for _, Obj in pairs(armTable[1].Model:GetChildren()) do
2674 if Obj:IsA("BasePart") then
2675 Obj.LocalTransparencyModifier = 1
2676 end
2677 end
2678 for _, Obj in pairs(armTable[2].Model:GetChildren()) do
2679 if Obj:IsA("BasePart") then
2680 Obj.LocalTransparencyModifier = 1
2681 end
2682 end
2683 elseif armModel then
2684 for _, Obj in pairs(armModel:GetChildren()) do
2685 if Obj:IsA("BasePart") then
2686 Obj.LocalTransparencyModifier = 1
2687 end
2688 end
2689 end
2690 for _, Obj in pairs(playerFolder:GetChildren()) do
2691 if Obj:IsA("BasePart") then
2692 Obj.LocalTransparencyModifier = 1
2693 end
2694 end
2695 for _, Obj in pairs(Gun:GetChildren()) do
2696 if Obj:IsA("BasePart") then
2697 Obj.LocalTransparencyModifier = 1
2698 end
2699 end
2700 end)
2701 spawn(function()
2702 local camAng = 0
2703 local idleCam = function()
2704 return V3(
2705 RAD(SIN(camAng * S.scopeSettings.Frequency.Idling)) * stanceSway * camSway * S.scopeSettings.Amplitude.Idling,
2706 RAD(SIN(camAng * 5 / 2 * S.scopeSettings.Frequency.Idling)) * stanceSway * camSway * S.scopeSettings.Amplitude.Idling * 0.75,
2707 0
2708 )
2709 end
2710 local walkCam = function()
2711 return V3(
2712 RAD(SIN(camAng * S.scopeSettings.Frequency.Walking)) * camSway * stanceSway * S.scopeSettings.Amplitude.Walking,
2713 RAD(SIN(camAng * 5 / 2 * S.scopeSettings.Frequency.Walking)) * camSway * stanceSway * S.scopeSettings.Amplitude.Walking * 0.75,
2714 0
2715 )
2716 end
2717 while Aimed do
2718 local dt = RS.RenderStepped:wait()
2719 camOffsets.guiScope.Rot = (Sine(idleAlpha) * idleCam()) + (Sine(walkAlpha) * walkCam())
2720 camAng = camAng + RAD(105 * dt) * stanceSway * camSway
2721 end
2722 end)
2723 end
2724end
2725
2726function unAimGun(Exception)
2727 if (not S.canADS) then return end
2728
2729 mouseSensitivity = S.sensitivitySettings.Default
2730
2731 for _, Plugin in pairs(Plugins.UnAimed) do
2732 spawn(function()
2733 Plugin()
2734 end)
2735 end
2736
2737 if S.guiScope then
2738 spawn(function()
2739 if armTable then
2740 for _, Obj in pairs(armTable[1].Model:GetChildren()) do
2741 if Obj:IsA("BasePart") then
2742 Obj.LocalTransparencyModifier = 0
2743 end
2744 end
2745 for _, Obj in pairs(armTable[2].Model:GetChildren()) do
2746 if Obj:IsA("BasePart") then
2747 Obj.LocalTransparencyModifier = 0
2748 end
2749 end
2750 elseif armModel then
2751 for _, Obj in pairs(armModel:GetChildren()) do
2752 if Obj:IsA("BasePart") then
2753 Obj.LocalTransparencyModifier = 0
2754 end
2755 end
2756 end
2757 for _, Obj in pairs(playerFolder:GetChildren()) do
2758 if Obj:IsA("BasePart") then
2759 Obj.LocalTransparencyModifier = 0
2760 end
2761 end
2762 for _, Obj in pairs(Gun:GetChildren()) do
2763 if Obj:IsA("BasePart") then
2764 Obj.LocalTransparencyModifier = 0
2765 end
2766 end
2767 end)
2768 end
2769
2770 if (not Exception) then
2771 if (not Aimed) then return end
2772 if (Reloading and Exception) or Knifing then return end
2773 spreadZoom = "unAimed"
2774 baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion]
2775 Aimed = false
2776 Aiming = true
2777 if S.aimSettings.Anim then
2778 local currentFOV = Cam.FieldOfView
2779 local currentTrans = (Scope.BackgroundTransparency == 1 and (S.guiScope and 0 or 1) or Scope.BackgroundTransparency)
2780 scopeMain.Visible = false
2781 scopeSteady.Visible = false
2782 tweenJoint(LWeld, armC0[1], S.unAimedC1.leftArm, Sine, S.aimSettings.Speed)
2783 tweenJoint(RWeld, armC0[2], S.unAimedC1.rightArm, Sine, S.aimSettings.Speed)
2784 tweenJoint(headWeld2, nil, CF(), Sine, S.aimSettings.Speed)
2785 tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, S.aimSettings.Speed)
2786 local t0 = tick()
2787 while true do
2788 RS.RenderStepped:wait()
2789 local Alpha = math.min((tick() - t0) / S.aimSettings.Speed, 1) * 90
2790 if Aimed then break end
2791 if (not Selected) then break end
2792 aimAlpha = 1 - Sine(Alpha)--1 - COS(RAD(X))
2793 aimHeadOffset = headOffset.X * aimAlpha
2794 jumpAnimMultiplier = numLerp(1, S.fallSettings.aimEffect, aimAlpha)
2795 translationDivisor = numLerp(7, 20, aimAlpha)
2796 rotationMultiplier = numLerp(S.momentumSettings.Amplitude.unAimed, S.momentumSettings.Amplitude.Aimed, aimAlpha)
2797 armTiltMultiplier = numLerp(1, 0.2, aimAlpha)
2798 Cam.FieldOfView = numLerp(80, currentFOV, aimAlpha)
2799 Scope.BackgroundTransparency = numLerp(1, currentTrans, aimAlpha)
2800 if Alpha == 90 then break end
2801 end
2802 else
2803 scopeMain.Visible = false
2804 scopeSteady.Visible = false
2805 LWeld.C0, LWeld.C1 = armC0[1], S.unAimedC1.leftArm
2806 RWeld.C0, RWeld.C1 = armC0[2], S.unAimedC1.rightArm
2807 headWeld2.C0 = CF()
2808 Grip.C1 = S.unAimedC1.Grip
2809 aimAlpha = 0
2810 aimHeadOffset = 0
2811 jumpAnimMultiplier = 1
2812 translationDivisor = 7
2813 rotationMultiplier = S.momentumSettings.Amplitude.unAimed
2814 armTiltMultiplier = 1
2815 Cam.FieldOfView = 80
2816 Scope.BackgroundTransparency = 1
2817 end
2818 Aiming = Aimed
2819 else
2820 spawn(function()
2821 Aimed = false
2822 Aiming = false
2823 spreadZoom = "unAimed"
2824 baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion]
2825 local currentFOV = Cam.FieldOfView
2826 local currentTrans = (Scope.BackgroundTransparency == 1 and (S.guiScope and 0 or 1) or Scope.BackgroundTransparency)
2827 scopeMain.Visible = false
2828 scopeSteady.Visible = false
2829 tweenJoint(headWeld2, nil, CF(), Sine, S.aimSettings.Speed)
2830 if S.aimSettings.Anim then
2831 local t0 = tick()
2832 while true do
2833 RS.RenderStepped:wait()
2834 local Alpha = math.min((tick() - t0) / S.aimSettings.Speed, 1) * 90
2835 if Aimed then break end
2836 if (not Selected) then break end
2837 aimAlpha = 1 - Sine(Alpha)--1 - COS(RAD(90 - Alpha))
2838 aimHeadOffset = headOffset.X * aimAlpha
2839 jumpAnimMultiplier = numLerp(1, S.fallSettings.aimEffect, aimAlpha)
2840 translationDivisor = numLerp(7, 20, aimAlpha)
2841 rotationMultiplier = numLerp(S.momentumSettings.Amplitude.unAimed, S.momentumSettings.Amplitude.Aimed, aimAlpha)
2842 armTiltMultiplier = numLerp(1, 0.2, aimAlpha)
2843 Cam.FieldOfView = numLerp(80, currentFOV, aimAlpha)
2844 Scope.BackgroundTransparency = numLerp(1, currentTrans, aimAlpha)
2845 if Alpha == 90 then break end
2846 end
2847 else
2848 scopeMain.Visible = false
2849 scopeSteady.Visible = false
2850 aimAlpha = 0
2851 aimHeadOffset = 0
2852 jumpAnimMultiplier = 1
2853 translationDivisor = 7
2854 rotationMultiplier = S.momentumSettings.Amplitude.unAimed
2855 armTiltMultiplier = 1
2856 Cam.FieldOfView = 80
2857 Scope.BackgroundTransparency = 1
2858 end
2859 end)
2860 end
2861end
2862
2863--------------------[ TEXTURE CREATION FUNCTIONS ]------------------------------------
2864
2865function createBullet(Direction)
2866 local Origin = Gun.Main.CFrame.p
2867 local bulletCF = CF(Origin, Origin + Direction)
2868 local Bullet = Instance.new("Part")
2869 Bullet.BrickColor = S.bulletSettings.Color
2870 Bullet.Material = Enum.Material.Neon
2871 Bullet.Name = "Bullet"
2872 Bullet.CanCollide = false
2873 Bullet.FormFactor = "Custom"
2874 Bullet.Size = S.bulletSettings.Size
2875 Bullet.BottomSurface = "Smooth"
2876 Bullet.TopSurface = "Smooth"
2877 if math.min(S.bulletSettings.Size.X, S.bulletSettings.Size.Y, S.bulletSettings.Size.Z) < 0.2 then
2878 local Mesh = Instance.new("BlockMesh")
2879 Mesh.Scale = S.bulletSettings.Size / Vector3.new(
2880 math.max(S.bulletSettings.Size.X, 0.2),
2881 math.max(S.bulletSettings.Size.Y, 0.2),
2882 math.max(S.bulletSettings.Size.Z, 0.2)
2883 )
2884 Mesh.Parent = Bullet
2885 end
2886 local BF = Instance.new("BodyForce")
2887 BF.force = V3(0, Bullet:GetMass() * (196.2 - S.bulletSettings.Acceleration), 0)
2888 BF.Parent = Bullet
2889 Bullet.Parent = gunIgnore
2890 Bullet.CFrame = bulletCF + Direction * S.bulletSettings.Size.Z / 2
2891 Bullet.Velocity = Direction * S.bulletSettings.Velocity
2892 return Bullet
2893end
2894
2895--------------------[ HIT HANDLING FUNCTIONS ]----------------------------------------
2896
2897function getBaseDamage(Dist)
2898 local startDmg = S.damageSettings.Start.Damage
2899 local startDist = S.damageSettings.Start.Dist
2900 local endDmg = S.damageSettings.End.Damage
2901 local endDist = S.damageSettings.End.Dist
2902 return (
2903 (
2904 Dist < startDist * S.bulletSettings.Range
2905 ) and startDmg or
2906 (
2907 Dist >= startDist * S.bulletSettings.Range and
2908 Dist < endDist * S.bulletSettings.Range
2909 ) and numLerp(startDmg, endDmg, Map(Dist / S.bulletSettings.Range, startDist, endDist, 0, 1)) or
2910 (
2911 Dist >= endDist * S.bulletSettings.Range
2912 ) and endDmg
2913 )
2914end
2915
2916function Damage(H, P, N, D, Dist, customIgnore)
2917 local hVal = S.damageSettings.Multipliers.Head
2918 local cVal = S.damageSettings.Multipliers.Chest
2919 local lVal = S.damageSettings.Multipliers.Limbs
2920 local baseDamage = getBaseDamage(Dist)
2921 if Humanoid.Health ~= 0 then
2922 local hitHumanoid = nil
2923 if H.Parent:IsA("Hat") then
2924 table.insert(customIgnore, H)
2925 local newRay = Ray.new(P - D * 0.1, D * (S.bulletSettings.Range - Dist + 0.1))
2926 local newH, newP, newN = workspace:FindPartOnRayWithIgnoreList(newRay, customIgnore)
2927 if newH then
2928 hitHumanoid = Damage(newH, newP, newN, D, Dist + (newP - P).magnitude, customIgnore)
2929 end
2930 else
2931 hitHumanoid = findFirstClass(H.Parent, "Humanoid")
2932 if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) then
2933 local Tag = Instance.new("ObjectValue")
2934 Tag.Value = Player
2935 Tag.Name = "creator"
2936 Tag.Parent = hitHumanoid
2937 DS:AddItem(Tag, 0.3)
2938 local chosenDamage = 0
2939 if H.Name == "Head" then
2940 chosenDamage = baseDamage * RAND(hVal, hVal + 0.1, 0.01)
2941 elseif H.Name == "Torso" then
2942 chosenDamage = baseDamage * RAND(cVal, cVal + 0.1, 0.01)
2943 else
2944 chosenDamage = baseDamage * RAND(lVal, lVal + 0.1, 0.01)
2945 end
2946 hitHumanoid:TakeDamage(chosenDamage)
2947 markHit()
2948 end
2949 end
2950 return hitHumanoid
2951 end
2952end
2953
2954function isWallIgnored(Wall)
2955 return (
2956 Wall.Transparency >= S.penetrationSettings.transparencyThreshold or
2957 (S.penetrationSettings.ignoreNonCanCollide and (not Wall.CanCollide)) or
2958 isIgnored(Wall, S.penetrationSettings.ignoreCustom)
2959 )
2960end
2961
2962function penetrateWall(Wall, hitPos, Direction, Normal, Ignore, totalPDist, totalBDist, lastDamagedHumanoid)
2963 local wallIgnore = isWallIgnored(Wall)
2964 local hitHumanoid = (Wall.Parent:IsA("Hat") and findFirstClass(Wall.Parent.Parent, "Humanoid") or findFirstClass(Wall.Parent, "Humanoid"))
2965 local damagedHumanoid = nil
2966 if hitHumanoid and hitHumanoid ~= lastDamagedHumanoid then
2967 lastDamagedHumanoid = hitHumanoid
2968 damagedHumanoid = Damage(Wall, hitPos, Normal, Direction, totalBDist, {Char, ignoreModel})
2969 else
2970 lastDamagedHumanoid = nil
2971 end
2972 local ignoreObject = hitHumanoid and (Wall.Parent:IsA("Hat") and Wall.Parent.Parent or Wall.Parent) or Wall
2973 table.insert(Ignore, ignoreObject)
2974 local rayLength = S.bulletSettings.Range - totalBDist
2975 local testRay = Ray.new(hitPos, Direction * (S.bulletSettings.Range - totalBDist))
2976 local H1, P1, N1 = workspace:FindPartOnRayWithIgnoreList(testRay, Ignore)
2977 local newIgnore = removeElement(Ignore, ignoreObject)
2978 local wallRay = Ray.new(P1 + Direction * 0.1, -Direction * (rayLength + 1))
2979 local H2, P2, N2 = workspace:FindPartOnRayWithIgnoreList(wallRay, Ignore)
2980 local newPDist = totalPDist + (wallIgnore and 0 or (getNearestPoint(P1, P2, hitPos) - hitPos).magnitude)
2981 local newBDist = totalBDist + (P1 - hitPos).magnitude
2982 local outOfRange = Round(newPDist, 0.001) > S.penetrationSettings.Dist or Round(newBDist, 0.001) > S.bulletSettings.Range
2983 if (not wallIgnore) then
2984 createBulletImpact:FireServer(Wall, hitPos, Normal, Direction, hitHumanoid, gunIgnore, S)
2985 if (not hitHumanoid) then
2986 createShockwave:FireServer(hitPos, S.shockwaveSettings.Radius, gunIgnore, S)
2987 end
2988 end
2989 if hitHumanoid and hitHumanoid.Health > 0 and isEnemy(hitHumanoid) and hitHumanoid == damagedHumanoid then
2990 createBlood:FireServer(Wall, P2, Direction, gunIgnore, S)
2991 end
2992 if outOfRange or (not H1) then
2993 if (not outOfRange) and (not wallIgnore) then
2994 createBulletImpact:FireServer(Wall, P2, N2, Direction, hitHumanoid, gunIgnore, S)
2995 if (not hitHumanoid) then
2996 createShockwave:FireServer(P2, S.shockwaveSettings.Radius, gunIgnore, S)
2997 end
2998 end
2999 return Wall, hitPos
3000 else
3001 if Wall == H2 and (not wallIgnore) then
3002 createBulletImpact:FireServer(Wall, P2, N2, Direction, hitHumanoid, gunIgnore, S)
3003 if (not hitHumanoid) then
3004 createShockwave:FireServer(P2, S.shockwaveSettings.Radius, gunIgnore, S)
3005 end
3006 end
3007 return penetrateWall(H1, P1, Direction, N1, Ignore, newPDist, newBDist, lastDamagedHumanoid)
3008 end
3009end
3010
3011function PenetrateWall(HitPos, Direction, HitHumanoid, OriginPos, Bullet, CurrentPDist)
3012 local HitDist = (HitPos - OriginPos).magnitude
3013 local Wall, WallHitPos = nil, nil
3014 local Hum, HumHitPos = nil, nil
3015 local CustomIgnore = {unpack(Ignore)}
3016 for i = 1, 10 do
3017 local WallRay = Ray.new(HitPos - (Direction * 0.1), Direction * S.Penetration)
3018 local H, P = game.Workspace:FindPartOnRayWithIgnoreList(WallRay, CustomIgnore)
3019 if H then
3020 local HitHumanoid = nil
3021 if H.Parent.ClassName == "Hat" then
3022 HitHumanoid = findFirstClass(H.Parent.Parent, "Humanoid")
3023 else
3024 HitHumanoid = findFirstClass(H.Parent, "Humanoid")
3025 end
3026 if HitHumanoid and i ~= 1 then
3027 Hum, HumHitPos = H, P
3028 break
3029 else
3030 Wall, WallHitPos = H, P
3031 table.insert(CustomIgnore, H)
3032 end
3033 else
3034 break
3035 end
3036 end
3037 if Wall then
3038 if S.InstantHit then
3039 if Hum then
3040 Damage(Hum.Parent:FindFirstChild("Head"), HumHitPos)
3041 return HumHitPos
3042 else
3043 local HitObj2, HitPos2 = nil, nil
3044 if HitHumanoid then
3045 HitObj2, HitPos2 = AdvRayCast(WallHitPos, Direction, S.BulletRange - HitDist, {Wall, HitHumanoid.Parent, unpack(Ignore)})
3046 else
3047 HitObj2, HitPos2 = AdvRayCast(WallHitPos, Direction, S.BulletRange - HitDist, {Wall, unpack(Ignore)})
3048 end
3049 Damage(HitObj2, HitPos2)
3050
3051 local NewPDist = CurrentPDist + (WallHitPos - HitPos).magnitude
3052 local NewHitPos2 = HitPos2
3053 if NewPDist < S.Penetration and HitObj2 then
3054 NewHitPos2 = PenetrateWall(HitPos2, Direction, HitHumanoid, OriginPos, Bullet, CurrentPDist + NewPDist)
3055 end
3056 return NewHitPos2
3057 end
3058 else
3059 local LastPos = WallHitPos
3060 local TotalDistTraveled = 0
3061 spawn(function()
3062 if Hum then
3063 Damage(Hum.Parent:FindFirstChild("Head"), HumHitPos)
3064 return HumHitPos
3065 else
3066 while true do
3067 RS.RenderStepped:wait()
3068 if TotalDistTraveled >= S.BulletRange - HitDist then
3069 Bullet:Destroy()
3070 break
3071 end
3072 local DistTraveled = (Bullet.Position - LastPos).magnitude
3073 local NewDirection = (Bullet.Position - LastPos).unit
3074 local TempHitObj, TempHitPos = nil, nil
3075 if HitHumanoid then
3076 TempHitObj, TempHitPos = AdvRayCast(LastPos, NewDirection, DistTraveled, {Wall, HitHumanoid.Parent, unpack(Ignore)})
3077 else
3078 TempHitObj, TempHitPos = AdvRayCast(LastPos, NewDirection, DistTraveled, {Wall, unpack(Ignore)})
3079 end
3080 if TempHitObj then
3081 Damage(TempHitObj, TempHitPos)
3082
3083 local NewPDist = CurrentPDist + (WallHitPos - HitPos).magnitude
3084 local NewTempPos = TempHitPos
3085 if NewPDist < S.Penetration and TempHitObj then
3086 NewTempPos = PenetrateWall(TempHitPos, Direction, HitHumanoid, OriginPos, Bullet, CurrentPDist + NewPDist)
3087 else
3088 Bullet:Destroy()
3089 end
3090 return NewTempPos
3091 else
3092 LastPos = Bullet.Position
3093 TotalDistTraveled = TotalDistTraveled + DistTraveled
3094 end
3095 end
3096 end
3097 end)
3098 end
3099 else
3100 if Bullet then Bullet:Destroy() end
3101 return HitPos
3102 end
3103end
3104
3105function isEnemy(Human)
3106 local Plyr = game.Players:GetPlayerFromCharacter(Human.Parent)
3107 if (not Plyr) then return S.CanDamageNPCs end
3108 return S.AllowFriendlyFire or (Plyr.TeamColor ~= Player.TeamColor or Plyr.Neutral)
3109end
3110
3111--------------------[ RELOAD FUNCTIONS ]----------------------------------------------
3112
3113function animateReload()
3114 tweenJoint(LWeld2, CF(), CF(), Sine, 0.15)
3115 tweenJoint(RWeld2, CF(), CF(), Sine, 0.15)
3116 local magParts = {}
3117 local magTable = {}
3118
3119 for _, Obj in pairs(Gun:GetChildren()) do
3120 if string.sub(Obj.Name, 1, 3) == "Mag" and Obj:IsA("BasePart") then
3121 INSERT(magParts, Obj)
3122 end
3123 end
3124
3125 local animVars = {
3126 --FUNCTIONS--
3127 tweenJoint = tweenJoint;
3128
3129 makeMagInvisible = function()
3130 for _, v in pairs(magParts) do
3131 v.Transparency = 1
3132 end
3133 magVisible = false
3134 end;
3135
3136 makeMagVisible = function()
3137 for _, v in pairs(magParts) do
3138 v.Transparency = v:WaitForChild("magTrans").Value
3139 end
3140 magVisible = true
3141 end;
3142
3143 isMagVisible = function()
3144 return magVisible
3145 end;
3146
3147 isMagEmpty = function()
3148 return ammoInClip == 0
3149 end;
3150
3151 setNewMag = function()
3152 newMag = true
3153 end;
3154
3155 isNewMag = function()
3156 return newMag
3157 end;
3158
3159 createMag = function(Key)
3160 local magModel = Instance.new("Model")
3161 local magClones = {}
3162 for i, v in pairs(magParts) do
3163 local vClone = v:Clone()
3164 vClone.Transparency = v:WaitForChild("magTrans").Value
3165 vClone.CanCollide = false
3166 vClone.Parent = magModel
3167 INSERT(magClones, {Original = v, magClone = vClone})
3168 if i ~= 1 then
3169 local W = Instance.new("Weld")
3170 W.Part0 = magClones[1].magClone
3171 W.Part1 = vClone
3172 W.C0 = magClones[1].magClone.CFrame:toObjectSpace(vClone.CFrame)
3173 W.Parent = magClones[1].magClone
3174 end
3175 end
3176 magTable[Key] = {magModel, magClones}
3177 return magModel, magClones
3178 end;
3179
3180 getMag = function(Key)
3181 if magTable[Key] then
3182 return magTable[Key][1], magTable[Key][2]
3183 else
3184 return nil, nil
3185 end
3186 end;
3187
3188 attachGripToHead = function()
3189 local handleCF = RArm.CFrame * Grip.C0
3190 Grip.C0 = Head.CFrame:toObjectSpace(handleCF)
3191 Grip.Part0 = Head
3192 end;
3193
3194 attachGripToArm = function()
3195 local handleCF = Head.CFrame * Grip.C0
3196 Grip.C0 = RArm.CFrame:toObjectSpace(handleCF)
3197 Grip.Part0 = RArm
3198 end;
3199
3200 Sine = Sine;
3201
3202 Linear = Linear;
3203
3204 --VARIABLES--
3205 Handle = Handle;
3206 LArm = LArm;
3207 RArm = RArm;
3208 LWeld = LWeld;
3209 RWeld = RWeld;
3210 LC0 = armC0[1];
3211 RC0 = armC0[2];
3212 Grip = Grip;
3213 gunIgnore = gunIgnore;
3214 Cam = Cam;
3215 CF = CF;
3216 CFANG = CFANG;
3217 V3 = V3;
3218 RAD = RAD;
3219 reloadTimeLoaded = S.reloadSettings.Times.Loaded;
3220 reloadTimeEmpty = S.reloadSettings.Times.Empty
3221 }
3222
3223 local sequenceTable = Anims.Reload(animVars)
3224 --local T = tick()
3225 for _, reloadFunction in pairs(sequenceTable) do
3226 if breakReload then
3227 break
3228 end
3229 reloadFunction()
3230
3231 if (not magVisible) then
3232 Ammo.Value = 0
3233 end
3234 updateClipAmmo()
3235 end
3236 --print(tick() - T) --I divide the reloadTime by this number to get the animation speed
3237
3238 if (not isCrawling) then
3239 if Running and (not S.canFireWhileRunning) then
3240 tweenJoint(LWeld, armC0[1], S.runningC1.leftArm, Sine, 0.4)
3241 tweenJoint(RWeld, armC0[2], S.runningC1.rightArm, Sine, 0.4)
3242 tweenJoint(Grip, nil, S.runningC1.Grip, Sine, 0.4)
3243 else
3244 tweenJoint(LWeld, armC0[1], S.unAimedC1.leftArm, Sine, 0.4)
3245 tweenJoint(RWeld, armC0[2], S.unAimedC1.rightArm, Sine, 0.4)
3246 tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, 0.4)
3247 end
3248 end
3249
3250 for _, v in pairs(magTable) do --In case the reload animations was stopped mid way and there were still fake mags that weren't deleted
3251 v[1]:Destroy()
3252 end
3253end
3254
3255function Reload()
3256 if Ammo.Value < (ClipSize.Value + 1) and (not Reloading) and StoredAmmo.Value > 0 then
3257 Firing = false
3258 ammoInClip = (ammoInClip == 0 and Ammo.Value or ammoInClip)
3259 Reloading = true
3260 lowerSpread()
3261 if Aimed then unAimGun(S.reloadSettings.Anim) end
3262 crossHair.Reload.Visible = true
3263 if Handle:FindFirstChild("ReloadSound") then Handle.ReloadSound:Play() end
3264 if S.reloadSettings.Anim then
3265 wait()
3266 animateReload()
3267 else
3268 local startReload = tick()
3269 local initialReloadTime = Ammo.Value == 0 and S.reloadSettings.Times.Empty or S.reloadSettings.Times.Loaded
3270 while true do
3271 if breakReload then break end
3272 if (tick() - startReload) >= initialReloadTime then break end
3273 RS.RenderStepped:wait()
3274 end
3275 end
3276 if (not breakReload) then
3277 newMag = false
3278 if StoredAmmo.Value >= ClipSize.Value then
3279 if ammoInClip > 0 then
3280 StoredAmmo.Value = StoredAmmo.Value - ((ClipSize.Value + 1) - ammoInClip)
3281 Ammo.Value = ClipSize.Value + 1
3282 else
3283 StoredAmmo.Value = StoredAmmo.Value - ClipSize.Value
3284 Ammo.Value = ClipSize.Value
3285 end
3286 elseif StoredAmmo.Value < ClipSize.Value and StoredAmmo.Value > 0 then
3287 Ammo.Value = StoredAmmo.Value
3288 StoredAmmo.Value = 0
3289 end
3290 end
3291 Reloading = false
3292 if Selected then
3293 ammoInClip = (breakReload and ammoInClip or 0)
3294 crossHair.Reload.Visible = false
3295 end
3296 breakReload = false
3297 end
3298
3299 updateClipAmmo()
3300 updateStoredAmmo()
3301end
3302
3303--------------------[ EXTERNAL DATA LOCATING FUNCTIONS ]-----------------------------
3304
3305function removeElement(Table, Element) --removes the first instance of Element from Table
3306 for i, v in pairs(Table) do
3307 if v == Element then
3308 table.remove(Table, i)
3309 break
3310 end
3311 end
3312 return Table
3313end
3314
3315function findFirstClass(Object, Class)
3316 local foundObject = nil
3317 for _, Obj in pairs(Object:GetChildren()) do
3318 if Obj.ClassName == Class then
3319 foundObject = Obj
3320 break
3321 end
3322 end
3323 return foundObject
3324end
3325
3326function isIgnored(Obj, Table)
3327 for _,v in pairs(Table) do
3328 if Obj == v or Obj:IsDescendantOf(v) then
3329 return true
3330 end
3331 end
3332 return false
3333end
3334
3335function GetHitSurfaceCFrame(HitPos,Obj)
3336 local SurfaceCF = {
3337 {"Back",Obj.CFrame * CF(0,0,Obj.Size.z)};
3338 {"Bottom",Obj.CFrame * CF(0,-Obj.Size.y,0)};
3339 {"Front",Obj.CFrame * CF(0,0,-Obj.Size.z)};
3340 {"Left",Obj.CFrame * CF(-Obj.Size.x,0,0)};
3341 {"Right",Obj.CFrame * CF(Obj.Size.x,0,0)};
3342 {"Top",Obj.CFrame * CF(0,Obj.Size.y,0)}
3343 }
3344 local ClosestDist = HUGE
3345 local ClosestSurface = nil
3346 for _,v in pairs(SurfaceCF) do
3347 local SurfaceDist = (HitPos - v[2].p).magnitude
3348 if SurfaceDist < ClosestDist then
3349 ClosestDist = SurfaceDist
3350 ClosestSurface = v
3351 end
3352 end
3353 return ClosestSurface[2]
3354end
3355
3356function AdvRayCast(Origin, Direction, Dist, CustomIgnore)
3357 local NewIgnore = (CustomIgnore and CustomIgnore or Ignore)
3358 local NewRay = Ray.new(Origin, Direction * (Dist > 999 and 999 or Dist))
3359 local HitObj, HitPos = game.Workspace:FindPartOnRayWithIgnoreList(NewRay, NewIgnore)
3360 local LastPos = HitPos
3361 local FinalHitObj, FinalHitPos = nil, nil
3362 local RepTimes = math.floor(Dist / 999)
3363 if (not HitObj) and (Dist > 999) then
3364 for i = 0, RepTimes do
3365 local NewDist = (i == RepTimes and (Dist - (LastPos - Origin).magnitude) or 999)
3366 local Ray2 = Ray.new(LastPos, Direction * NewDist)
3367 local HitObj2, HitPos2 = game.Workspace:FindPartOnRayWithIgnoreList(Ray2, NewIgnore)
3368 if i ~= RepTimes then
3369 if HitObj2 then
3370 FinalHitObj, FinalHitPos = HitObj2, HitPos2
3371 break
3372 end
3373 elseif i == RepTimes then
3374 FinalHitObj, FinalHitPos = HitObj2, HitPos2
3375 end
3376 LastPos = HitPos2
3377 end
3378 return FinalHitObj, FinalHitPos
3379 elseif HitObj or (Dist <= 999) then
3380 return HitObj, HitPos
3381 end
3382end
3383
3384--------------------[ JUMPING ANIMATION ]---------------------------------------------
3385
3386function onFall(initialVelocity)
3387 spawn(function()
3388 local velocityAlpha = math.max(math.min(initialVelocity / Humanoid.JumpPower, 1), 0)
3389 local startJumpPos = jumpAnim.Pos
3390 local startJumpRot = jumpAnim.Rot
3391 local endJumpPos = 0.04 * S.fallSettings.fallMultiplier * velocityAlpha
3392 local endJumpRot = RAD(4) * S.fallSettings.fallMultiplier * velocityAlpha
3393 local t0 = tick()
3394 while true do
3395 RS.Heartbeat:wait()
3396 local Alpha = math.min((tick() - t0) / 0.15, 1) * 90
3397 if onGround then break end
3398 jumpAnim.Pos = numLerp(startJumpPos, endJumpPos, Sine(Alpha))
3399 jumpAnim.Rot = numLerp(startJumpRot, endJumpRot, Sine(Alpha))
3400 if Alpha == 90 then break end
3401 end
3402 startJumpPos = endJumpPos
3403 startJumpRot = endJumpRot
3404 endJumpPos = -0.08 * S.fallSettings.fallMultiplier
3405 endJumpRot = -RAD(8) * S.fallSettings.fallMultiplier
3406 local X = 1
3407 while true do
3408 local dt = RS.Heartbeat:wait()
3409 X = X + (dt * 60) / X
3410 local Alpha = (X - 1) / 15
3411 if onGround then break end
3412 jumpAnim.Pos = numLerp(startJumpPos, endJumpPos, Alpha)
3413 jumpAnim.Rot = numLerp(startJumpRot, endJumpRot, Alpha)
3414 end
3415 end)
3416end
3417
3418function onLand(fallDist)
3419 spawn(function()
3420 local animAlpha = math.min(fallDist, S.fallSettings.maxDist) * (2 / 3)
3421 local startJumpPos = jumpAnim.Pos
3422 local startJumpRot = jumpAnim.Rot
3423 local endJumpPos = animAlpha / 100 * S.fallSettings.landMultiplier * (runReady and 1 or 2)
3424 local endJumpRot = RAD(animAlpha) * S.fallSettings.landMultiplier * (runReady and 1 or 2)
3425 local t0 = tick()
3426 while true do
3427 RS.Heartbeat:wait()
3428 local Alpha = math.min((tick() - t0) / 0.2, 1)
3429 if (not onGround) then break end
3430 jumpAnim.Pos = numLerp(startJumpPos, endJumpPos, Alpha)
3431 jumpAnim.Rot = numLerp(startJumpRot, endJumpRot, Alpha)
3432 if Alpha == 1 then break end
3433 end
3434 t0 = tick()
3435 while true do
3436 RS.Heartbeat:wait()
3437 local Alpha = math.min((tick() - t0) / 0.3, 1) * 90
3438 if (not onGround) then break end
3439 jumpAnim.Pos = numLerp(endJumpPos, 0, Sine(Alpha))
3440 jumpAnim.Rot = numLerp(endJumpRot, 0, Sine(Alpha))
3441 if Alpha == 90 then break end
3442 end
3443 end)
3444end
3445
3446function onHumanoidStateChanged(oldState, newState)
3447 if newState == Enum.HumanoidStateType.Freefall then
3448 onGround = false
3449 if S.fallAnimation then
3450 onFall(HRP.Velocity.Y)
3451 while HRP.Velocity.Y > 0 do RS.RenderStepped:wait() end
3452 startFallHeight = HRP.Position.Y
3453 end
3454 elseif oldState == Enum.HumanoidStateType.Freefall then
3455 onGround = true
3456 if S.fallAnimation then
3457 local fallDist = startFallHeight - HRP.Position.Y
3458 onLand(fallDist)
3459 end
3460 end
3461end
3462--------------------[ CAMERA STEADYING FUNCTIONS ]------------------------------------
3463
3464function steadyCamera()
3465 scopeSteady.Text = "Steadying..."
3466 scopeSteady.TextColor3 = Color3.new(1, 1, 0)
3467 camSteady = true
3468 local originalSway = camSway
3469 local Increment = 1.5 / 0.6
3470 local X = 0
3471 while true do
3472 RS.RenderStepped:wait()
3473 local newX = X + Increment
3474 X = (newX > 90 and 90 or newX)
3475 if (not steadyKeyPressed) then break end
3476 camSway = numLerp(originalSway, 0, Sine(X))
3477 if X == 90 then break end
3478 end
3479 while steadyKeyPressed and Aimed do
3480 if currentSteadyTime > 0 then
3481 local NewSteadyTime = currentSteadyTime - 1
3482 currentSteadyTime = (NewSteadyTime < 0 and 0 or NewSteadyTime)
3483 camSway = 0
3484 elseif currentSteadyTime == 0 then
3485 break
3486 end
3487 RS.RenderStepped:wait()
3488 end
3489 camSteady = false
3490 spawn(function()
3491 local Increment = 1.5 / 0.25
3492 local X = 0
3493 while true do
3494 RS.RenderStepped:wait()
3495 local newX = X + Increment
3496 X = (newX > 90 and 90 or newX)
3497 if camSteady then break end
3498 camSway = numLerp(0, S.scopeSettings.camSwayOnBreath, 1 - COS(RAD(X)))
3499 if X == 90 then break end
3500 end
3501 Increment = 1.5 / S.scopeSettings.breathTime
3502 X = 0
3503 while true do
3504 RS.RenderStepped:wait()
3505 local newX = X + Increment
3506 X = (newX > 90 and 90 or newX)
3507 if camSteady then break end
3508 camSway = numLerp(S.scopeSettings.camSwayOnBreath, 1, Sine(X))
3509 if X == 90 then break end
3510 end
3511 --[[for X = 0, 90, 1.5 / 0.2 do
3512 local Alpha = 1 - COS(RAD(X))--math.log10(X) / math.log10(90)
3513 camSway = numLerp(0, 3, Alpha)
3514 RS.RenderStepped:wait()
3515 end]]
3516 --[[for X = 0, 90, 1.5 / S.scopeSettings.steadyTime do
3517 if camSteady then break end
3518 local Alpha = SIN(RAD(X))
3519 camSway = numLerp(3, 1, Alpha)
3520 RS.RenderStepped:wait()
3521 end]]
3522 end)
3523 retakeBreath()
3524end
3525
3526function retakeBreath()
3527 scopeSteady.Text = "Re-taking Breath"
3528 scopeSteady.TextColor3 = Color3.new(1, 0, 0)
3529 takingBreath = true
3530 local Increment = S.scopeSettings.steadyTime / S.scopeSettings.breathTime
3531 while takingBreath do
3532 if currentSteadyTime < maxSteadyTime then
3533 local newSteadyTime = currentSteadyTime + Increment
3534 currentSteadyTime = (newSteadyTime > maxSteadyTime and maxSteadyTime or newSteadyTime)
3535 elseif currentSteadyTime >= maxSteadyTime then
3536 break
3537 end
3538 RS.RenderStepped:wait()
3539 end
3540 if takingBreath then
3541 scopeSteady.Text = "Hold "..convertKey(S.Keys.scopeSteady).." to Steady"
3542 scopeSteady.TextColor3 = Color3.new(1, 1, 0)
3543 takingBreath = false
3544 end
3545end
3546
3547--------------------[ SPRINTING FUNCTIONS ]-------------------------------------------
3548
3549function canRun(midRun)
3550 return ((Forward and (not Backward)) and
3551 Walking and (Stamina > 0) and Running and
3552 Selected and (midRun and true or onGround) and
3553 runReady and (S.canFireWhileRunning and true or (not Firing))
3554 )
3555end
3556
3557function monitorStamina()
3558 Running = true
3559 if (not canRun(false)) then
3560 Running = false
3561 return
3562 end
3563 if Aimed then unAimGun(true) end
3564 if Stance == 1 or Stance == 2 then Stand() end
3565 if (not (Reloading and S.reloadSettings.Anim)) then
3566 if S.canFireWhileRunning then
3567 tweenJoint(LWeld, armC0[1], S.unAimedC1.leftArm, Sine, 0.4)
3568 tweenJoint(RWeld, armC0[2], S.unAimedC1.rightArm, Sine, 0.4)
3569 tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, 0.4)
3570 else
3571 tweenJoint(LWeld, armC0[1], S.runningC1.leftArm, Sine, 0.4)
3572 tweenJoint(RWeld, armC0[2], S.runningC1.rightArm, Sine, 0.4)
3573 tweenJoint(Grip, nil, S.runningC1.Grip, Sine, 0.4)
3574 end
3575 end
3576 crossOffset = 50
3577 while runKeyPressed do
3578 if canRun(true) then
3579 if onGround then
3580 local newStamina = Stamina - 1
3581 Stamina = (newStamina < 0 and 0 or newStamina)
3582 end
3583 else
3584 break
3585 end
3586 RS.RenderStepped:wait()
3587 end
3588 Running = false
3589 if (not Aimed) and (not (Reloading and S.reloadSettings.Anim)) and (not S.canFireWhileRunning) then
3590 crossOffset = 0
3591 tweenJoint(LWeld, armC0[1], S.unAimedC1.leftArm, Sine, 0.4)
3592 tweenJoint(RWeld, armC0[2], S.unAimedC1.rightArm, Sine, 0.4)
3593 tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, 0.4)
3594 end
3595
3596 rechargeStamina()
3597end
3598
3599function rechargeStamina()
3600 chargingStamina = true
3601 while ((not runKeyPressed) or (Stamina < maxStamina)) and (not Running) do
3602 if Stamina < maxStamina then
3603 local newStamina = Stamina + (S.sprintTime / S.staminaCoolTime)
3604 Stamina = (newStamina > maxStamina and maxStamina or newStamina)
3605 elseif Stamina >= maxStamina then
3606 break
3607 end
3608 RS.RenderStepped:wait()
3609 end
3610 chargingStamina = false
3611end
3612
3613--------------------[ STANCE FUNCTIONS ]----------------------------------------------
3614
3615function Stand(onDeselected)
3616 local LHip = Torso["Left Hip"]
3617 local RHip = Torso["Right Hip"]
3618 LLegWeld.Part1 = nil
3619 LHip.Part1 = LLeg
3620 RLegWeld.Part1 = nil
3621 RHip.Part1 = RLeg
3622 Stance = 0
3623 spreadStance = "Stand"
3624 baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion]
3625 if S.stanceSettings.Anim and (not onDeselected) then
3626 spawn(function()
3627 local prevStanceSway = stanceSway
3628 local X = 0
3629 local Increment = 1.5 / S.stanceSettings.Speed
3630 while true do
3631 RS.RenderStepped:wait()
3632 local newX = X + Increment
3633 X = (newX > 90 and 90 or newX)
3634 if Stance ~= 0 then break end
3635 stanceSway = numLerp(prevStanceSway, 1, Sine(X))
3636 if X == 90 then break end
3637 end
3638 end)
3639 tweenJoint(ABWeld, CF(), nil, Sine, S.stanceSettings.Speed)
3640 tweenJoint(LLegWeld, legC0.Stand[1], nil, Sine, S.stanceSettings.Speed)
3641 tweenJoint(RLegWeld, legC0.Stand[2], nil, Sine, S.stanceSettings.Speed)
3642 tweenJoint(LHip, CF(-1, -1, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0), Sine, S.stanceSettings.Speed)
3643 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.stanceSettings.Speed)
3644 tweenJoint(Root, CFANG(RAD(-90), 0, RAD(180)), nil, Sine, S.stanceSettings.Speed)
3645 tweenJoint(headWeld, CF(0, 1.5, 0), nil, Sine, S.stanceSettings.Speed)
3646 elseif onDeselected or (not S.stanceSettings.Anim) then
3647 ABWeld.C0 = CF()
3648 LLegWeld.C0 = legC0.Stand[1]
3649 RLegWeld.C0 = legC0.Stand[2]
3650 LHip.C0, LHip.C1 = CF(-1, -1, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0)
3651 RHip.C0, RHip.C1 = CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0)
3652 Root.C0 = CFANG(RAD(-90), 0, RAD(180))
3653 headWeld.C0 = CF(0, 1.5, 0)
3654 end
3655end
3656
3657function Crouch()
3658 local LHip = Torso["Left Hip"]
3659 local RHip = Torso["Right Hip"]
3660 LHip.Part1 = nil
3661 LLegWeld.Part1 = LLeg
3662 RHip.Part1 = nil
3663 RLegWeld.Part1 = RLeg
3664 Stance = 1
3665 spreadStance = "Crouch"
3666 baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion]
3667 if S.stanceSettings.Anim then
3668 spawn(function()
3669 local prevStanceSway = stanceSway
3670 local X = 0
3671 local Increment = 1.5 / S.stanceSettings.Speed
3672 while true do
3673 RS.RenderStepped:wait()
3674 local newX = X + Increment
3675 X = (newX > 90 and 90 or newX)
3676 if Stance ~= 1 then break end
3677 stanceSway = numLerp(prevStanceSway, 0.75, Sine(X))
3678 if X == 90 then break end
3679 end
3680 end)
3681 tweenJoint(ABWeld, CF(0, 0, -0.05), nil, Sine, S.stanceSettings.Speed)
3682 tweenJoint(LLegWeld, legC0.Crouch[1], nil, Sine, S.stanceSettings.Speed)
3683 tweenJoint(RLegWeld, legC0.Crouch[2], nil, Sine, S.stanceSettings.Speed)
3684 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.stanceSettings.Speed)
3685 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.stanceSettings.Speed)
3686 tweenJoint(Root, CF(0, -1, 0) * CFANG(RAD(-90), 0, RAD(180)), nil, Sine, S.stanceSettings.Speed)
3687 tweenJoint(headWeld, CF(0, 1.5, 0), nil, Sine, S.stanceSettings.Speed)
3688 else
3689 ABWeld.C0 = CF(0, 0, -1 / 16)
3690 LLegWeld.C0 = legC0.Crouch[1]
3691 RLegWeld.C0 = legC0.Crouch[2]
3692 LHip.C0, LHip.C1 = CF(-1, -0.5, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 0.5, 1) * CFANG(0, RAD(-90), RAD(-90))
3693 RHip.C0, RHip.C1 = CF(1, -0.5, 0.25) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 0.5, 1) * CFANG(RAD(-180), RAD(90), 0)
3694 Root.C0 = CF(0, -1, 0) * CFANG(RAD(-90), 0, RAD(180))
3695 headWeld.C0 = CF(0, 1.5, 0)
3696 end
3697end
3698
3699function Prone()
3700 local LHip = Torso["Left Hip"]
3701 local RHip = Torso["Right Hip"]
3702 LHip.Part1 = nil
3703 LLegWeld.Part1 = LLeg
3704 RHip.Part1 = nil
3705 RLegWeld.Part1 = RLeg
3706 Stance = 2
3707 spreadStance = "Prone"
3708 baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion]
3709 if S.stanceSettings.Anim then
3710 spawn(function()
3711 local prevStanceSway = stanceSway
3712 local X = 0
3713 local Increment = 1.5 / S.stanceSettings.Speed
3714 while true do
3715 RS.RenderStepped:wait()
3716 local newX = X + Increment
3717 X = (newX > 90 and 90 or newX)
3718 if Stance ~= 2 then break end
3719 stanceSway = numLerp(prevStanceSway, 0.5, Sine(X))
3720 if X == 90 then break end
3721 end
3722 end)
3723 tweenJoint(ABWeld, CF(0, 0, -0.1), nil, Sine, S.stanceSettings.Speed)
3724 tweenJoint(LLegWeld, legC0.Prone[1], nil, Sine, S.stanceSettings.Speed)
3725 tweenJoint(RLegWeld, legC0.Prone[2], nil, Sine, S.stanceSettings.Speed)
3726 tweenJoint(Root, CF(0, -2.5, 1) * CFANG(RAD(180), 0, RAD(180)), nil, Sine, S.stanceSettings.Speed)
3727 tweenJoint(headWeld, CF(0, 1, 1) * CFANG(RAD(90), 0, 0), nil, Sine, S.stanceSettings.Speed)
3728 else
3729 ABWeld.C0 = CF(0, 0, -1 / 8)
3730 LLegWeld.C0 = legC0.Prone[1]
3731 RLegWeld.C0 = legC0.Prone[2]
3732 Root.C0 = CF(0, -2.5, 1) * CFANG(RAD(180), 0, RAD(180))
3733 headWeld.C0 = CF(0, 1, 1) * CFANG(RAD(90), 0, 0)
3734 end
3735end
3736
3737function Dive()
3738 onGround = false
3739 local diveDirection = (HRP.CFrame * CFANG(S.diveSettings.Angle, 0, 0)).lookVector * S.walkSpeeds.Sprinting * S.diveSettings.Force
3740 local BF = Instance.new("BodyForce")
3741 BF.force = diveDirection + Vector3.new(0, playerMass * 196.2, 0)
3742 BF.Parent = HRP
3743 --[[spawn(function()
3744 HRP.Velocity = HRP.CFrame.lookVector * 60 + V3(0, 40, 0)
3745 wait(0.1)
3746 HRP.Velocity = HRP.CFrame.lookVector * 70 + V3(0, 30, 0)
3747 wait(0.4)
3748 HRP.Velocity = HRP.CFrame.lookVector * 30 + V3(0, -10, 0)
3749 end)]]
3750 delay(0.05, function()
3751 spawn(function()
3752 while true do
3753 local newRay = Ray.new(HRP.Position, V3(0, -3.1, 0))
3754 local H, _ = workspace:FindPartOnRayWithIgnoreList(newRay, Ignore)
3755 if H then
3756 onGround = true
3757 break
3758 end
3759 wait()
3760 end
3761 end)
3762 Prone()
3763 wait(0.1)
3764 BF:Destroy()
3765 end)
3766end
3767
3768--------------------[ MOUSE FUNCTIONS ]-----------------------------------------------
3769
3770function onMB1Down()
3771 MB1Down = true
3772 firstShot = true
3773 if fireFunction then
3774 fireFunction()
3775 end
3776end
3777
3778function onMB1Up()
3779 MB1Down = false
3780 lowerSpread()
3781end
3782
3783function onMB2Down()
3784 if S.aimSettings.holdToADS then
3785 if (not AimingIn) and (not Aimed) then
3786 AimingIn = true
3787 aimGun()
3788 AimingIn = false
3789 end
3790 else
3791 if Aimed then
3792 unAimGun()
3793 else
3794 aimGun()
3795 end
3796 end
3797end
3798
3799function onMB2Up()
3800 if S.aimSettings.holdToADS then
3801 if (not AimingOut) and Aimed then
3802 AimingOut = true
3803 unAimGun()
3804 AimingOut = false
3805 end
3806 end
3807end
3808
3809function onScrollUp()
3810 local newAimSensitivity = aimSensitivity + S.sensitivitySettings.Increment
3811 aimSensitivity = (
3812 newAimSensitivity < S.sensitivitySettings.Min and S.sensitivitySettings.Min or
3813 newAimSensitivity > S.sensitivitySettings.Max and S.sensitivitySettings.Max or
3814 newAimSensitivity
3815 )
3816 mouseSensitivity = (Aimed and aimSensitivity or mouseSensitivity)
3817
3818 Sens.Text = "S: "..aimSensitivity
3819 if mainGUI:IsDescendantOf(game) then
3820 Sens.Visible = true
3821 local t0 = tick()
3822 lastSensUpdate = t0
3823
3824 wait(0.3)
3825
3826 if lastSensUpdate <= t0 then
3827 Sens.Visible = false
3828 end
3829 end
3830end
3831
3832function onScrollDown()
3833 local newAimSensitivity = aimSensitivity - S.sensitivitySettings.Increment
3834 aimSensitivity = (
3835 newAimSensitivity < S.sensitivitySettings.Min and S.sensitivitySettings.Min or
3836 newAimSensitivity > S.sensitivitySettings.Max and S.sensitivitySettings.Max or
3837 newAimSensitivity
3838 )
3839 mouseSensitivity = (Aimed and aimSensitivity or mouseSensitivity)
3840
3841 Sens.Text = "S: "..aimSensitivity
3842 if mainGUI:IsDescendantOf(game) then
3843 Sens.Visible = true
3844 local t0 = tick()
3845 lastSensUpdate = t0
3846
3847 wait(0.3)
3848
3849 if lastSensUpdate <= t0 then
3850 Sens.Visible = false
3851 end
3852 end
3853end
3854
3855--------------------[ KEYBOARD FUNCTIONS ]--------------------------------------------
3856
3857function keyDown(K)
3858 local Key = string.lower(K)
3859
3860 if Key == S.Keys.lowerStance and S.canChangeStance then
3861 if (not Running) then
3862 if Stance == 0 then
3863 if S.stanceSettings.Stances.Crouch then
3864 Crouch()
3865 elseif S.stanceSettings.Stances.Prone then
3866 Prone()
3867 end
3868 elseif Stance == 1 then
3869 if S.stanceSettings.Stances.Prone then
3870 Prone()
3871 end
3872 end
3873 elseif S.dolphinDive then
3874 wait()
3875 if Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall and (not UIS:IsKeyDown("Space")) and runReady then
3876 local tempConnection = Humanoid.Changed:connect(function()
3877 Humanoid.Jump = false
3878 end)
3879 runReady = false
3880 Dive()
3881 Running = false
3882 wait(S.diveSettings.rechargeTime)
3883 tempConnection:disconnect()
3884 runReady = true
3885 end
3886 end
3887 end
3888
3889 if Key == S.Keys.raiseStance and S.canChangeStance then
3890 if (not Running) then
3891 if Stance == 2 then
3892 if S.stanceSettings.Stances.Crouch then
3893 Crouch()
3894 else
3895 Stand()
3896 end
3897 elseif Stance == 1 then
3898 Stand()
3899 end
3900 end
3901 end
3902
3903 if Key == S.Keys.ADS then
3904 if S.aimSettings.holdToADS then
3905 if (not AimingIn) and (not Aimed) then
3906 AimingIn = true
3907 aimGun()
3908 AimingIn = false
3909 end
3910 else
3911 if Aimed then
3912 unAimGun()
3913 else
3914 aimGun()
3915 end
3916 end
3917 end
3918
3919 if Key == S.Keys.selectFire and S.selectFire then
3920 if canSelectFire then
3921 canSelectFire = false
3922 rawFireMode = rawFireMode + 1
3923 modeGUI.Text = Modes[((rawFireMode - 1) % numModes) + 1]
3924 if modeGUI.Text == "AUTO" then
3925 fireFunction = autoFire
3926 elseif modeGUI.Text == "BURST" then
3927 fireFunction = burstFire
3928 elseif modeGUI.Text == "SEMI" then
3929 fireFunction = semiFire
3930 else
3931 fireFunction = nil
3932 end
3933 local speedAlpha = S.selectFireSettings.animSpeed / 0.6
3934 if S.selectFireSettings.GUI then
3935 spawn(function()
3936 fireSelect.Visible = true
3937 local prevRawFireMode = rawFireMode
3938 local Increment = 1.5 / (speedAlpha * 0.25)
3939 local X = 0
3940 wait(speedAlpha * 0.1)
3941 while true do
3942 RS.RenderStepped:wait()
3943 local newX = X + Increment
3944 X = (newX > 90 and 90 or newX)
3945 if prevRawFireMode ~= rawFireMode then break end
3946 updateModeLabels(rawFireMode - 1, rawFireMode, X)
3947 if X == 90 then break end
3948 end
3949 wait(speedAlpha * 0.25)
3950 fireSelect.Visible = false
3951 end)
3952 end
3953 if S.selectFireSettings.Animation and (not Aimed) and (not isRunning) and (not isCrawling) then
3954 spawn(function()
3955 local sequenceTable = {
3956 function()
3957 tweenJoint(RWeld2, nil, CFANG(0, RAD(5), 0), Sine, speedAlpha * 0.15)
3958 tweenJoint(LWeld, armC0[1], CF(0.1, 1, -0.3) * CFANG(RAD(-7), 0, RAD(-65)), Linear, speedAlpha * 0.15)
3959 wait(speedAlpha * 0.2)
3960 end;
3961
3962 function()
3963 tweenJoint(LWeld, armC0[1], CF(0.1, 1, -0.3) * CFANG(RAD(-10), 0, RAD(-65)), Linear, speedAlpha * 0.1)
3964 wait(speedAlpha * 0.2)
3965 end;
3966
3967 function()
3968 tweenJoint(RWeld2, nil, CF(), Sine, speedAlpha * 0.2)
3969 tweenJoint(LWeld, armC0[1], S.unAimedC1.leftArm, Sine, speedAlpha * 0.2)
3970 wait(speedAlpha * 0.2)
3971 end;
3972 }
3973
3974 for _, F in pairs(sequenceTable) do
3975 if Aimed or isRunning or isCrawling or Reloading then
3976 break
3977 end
3978 F()
3979 end
3980 end)
3981 end
3982 if S.selectFireSettings.Animation or S.selectFireSettings.GUI then
3983 wait(S.selectFireSettings.animSpeed)
3984 end
3985 canSelectFire = true
3986 end
3987 end
3988
3989 if Key == S.Keys.Reload then
3990 if (not Reloading) and (not isCrawling) then
3991 Reload()
3992 end
3993 end
3994
3995 if Key == S.Keys.Sprint then
3996 runKeyPressed = true
3997 if runReady then
3998 if (not Idling) and Walking and (not Running) and (not Knifing) and (not (Aimed and S.guiScope and S.Keys.Sprint == S.Keys.scopeSteady)) then
3999 monitorStamina()
4000 end
4001 end
4002 end
4003
4004 if Key == S.Keys.scopeSteady then
4005 steadyKeyPressed = true
4006 if Aimed and (not Aiming) then
4007 takingBreath = false
4008 steadyCamera()
4009 end
4010 end
4011
4012 for _, PTable in pairs(Plugins.KeyDown) do
4013 if Key == string.lower(PTable.Key) then
4014 spawn(function()
4015 PTable.Plugin()
4016 end)
4017 end
4018 end
4019end
4020
4021function keyUp(K)
4022 local Key = string.lower(K)
4023
4024 if Key == S.Keys.ADS then
4025 if S.aimSettings.holdToADS then
4026 if (not AimingOut) and Aimed then
4027 AimingOut = true
4028 unAimGun()
4029 AimingOut = false
4030 end
4031 end
4032 end
4033
4034 if Key == S.Keys.Sprint then
4035 runKeyPressed = false
4036 Running = false
4037 if (not chargingStamina) then
4038 rechargeStamina()
4039 end
4040 end
4041
4042 if Key == S.Keys.scopeSteady then
4043 steadyKeyPressed = false
4044 end
4045
4046 for _, PTable in pairs(Plugins.KeyUp) do
4047 if Key == string.lower(PTable.Key) then
4048 spawn(function()
4049 PTable.Plugin()
4050 end)
4051 end
4052 end
4053end
4054
4055--------------------[ END FUNCTIONS ]-------------------------------------------------
4056
4057--------------------------------------------------------------------------------------
4058--------------------[ PRE-CONNECTIONS ]-----------------------------------------------
4059--------------------------------------------------------------------------------------
4060
4061local function updateAnimVars()
4062 wait()
4063 Forward = (UIS:IsKeyDown("W") or UIS:IsKeyDown("Up"))
4064 Backward = (UIS:IsKeyDown("S") or UIS:IsKeyDown("Down"))
4065 local Right = UIS:IsKeyDown("D")
4066 local Left = UIS:IsKeyDown("A")
4067
4068 local walkingForward = (Forward and (not Backward))
4069 local walkingBackward = ((not Forward) and Backward)
4070 local walkingRight = (Right and (not Left))
4071 local walkingLeft = ((not Right) and Left)
4072
4073 if (Forward or Backward or Right or Left) then
4074 Walking, Idling = true, false
4075 if (not Running) and (not Aimed) then
4076 spreadMotion = "Moving"
4077 baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion]
4078 end
4079 elseif (not (Forward and Backward and Right and Left)) then
4080 Walking, Idling = false, true
4081 if (not Aimed) then
4082 spreadMotion = "Idling"
4083 baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion]
4084 end
4085 end
4086
4087 local newArmTilt = (
4088 ((walkingForward or walkingBackward) and walkingRight) and 2.5 or
4089 ((walkingForward or walkingBackward) and walkingLeft) and -2.5 or
4090 ((not (walkingForward and walkingBackward)) and walkingRight) and 5 or
4091 ((not (walkingForward and walkingBackward)) and walkingLeft) and -5 or 0
4092 )
4093 local newMoveAng = (
4094 (walkingForward and (not (walkingRight or walkingLeft))) and 0 or
4095 (walkingForward and walkingRight) and RAD(-45) or
4096 ((not (walkingForward or walkingBackward)) and walkingRight) and RAD(-90) or
4097 (walkingBackward and walkingRight) and RAD(-135) or
4098 (walkingBackward and (not (walkingRight or walkingLeft))) and (moveAng < 0 and RAD(-180) or RAD(180)) or
4099 (walkingBackward and walkingLeft) and RAD(135) or
4100 ((not (walkingForward or walkingBackward)) and walkingLeft) and RAD(90) or
4101 (walkingForward and walkingLeft) and RAD(45) or 0
4102 )
4103
4104 local newAnimCode = math.random(-1e9, 1e9)
4105 animCode = newAnimCode
4106 local startTilt = armTilt
4107 local startAng = (ABS(moveAng) == RAD(180)) and (newMoveAng > 0 and RAD(180) or RAD(-180)) or moveAng
4108 local Increment = (startTilt == newArmTilt and 1.5 / 0.7 or 1.5 / (0.35 * ABS(startTilt - newArmTilt) / 5))
4109 local X = 0
4110 while true do
4111 RS.RenderStepped:wait()
4112 local newX = X + Increment
4113 X = (newX > 90 and 90 or newX)
4114 if animCode ~= newAnimCode then break end
4115 armTilt = numLerp(startTilt, newArmTilt, Sine(X))
4116 moveAng = numLerp(startAng, newMoveAng, Sine(X))
4117 if X == 90 then break end
4118 end
4119end
4120
4121M2.KeyDown:connect(updateAnimVars)
4122M2.KeyUp:connect(updateAnimVars)
4123updateAnimVars()
4124
4125--------------------------------------------------------------------------------------
4126--------------------[ TOOL SELECTION AND DESELECTION ]--------------------------------
4127--------------------------------------------------------------------------------------
4128
4129function onEquipped()
4130 wait()
4131 if Humanoid.Health ~= 0 and (not Selected) and Gun.Parent == Char then
4132 Selected = true
4133 breakReload = false
4134 equipAnimPlaying = true
4135
4136 math.randomseed(tick()) --This sets a new seed for the random function each time you select the gun
4137
4138 --------------------[ FAILSAFE RESETING ]-------------------------------------
4139
4140 for _, GM in pairs(ignoreModel:GetChildren()) do
4141 if GM.Name == "gunIgnore_"..Player.Name then
4142 GM:Destroy()
4143 end
4144 end
4145
4146 for _, c in pairs(Connections) do
4147 c:disconnect()
4148 end
4149
4150 Connections = {}
4151
4152 --------------------[ REMOTE GUN SETUP ]--------------------------------------
4153
4154 --[[local Vars = {
4155 ignoreModel = ignoreModel;
4156 Humanoid = Humanoid;
4157 Shoulders = Shoulders;
4158 Torso = Torso;
4159 Head = Head;
4160 armC0 = armC0;
4161 leftArmC1 = S.equipSettings.leftArmC1;
4162 rightArmC1 = S.equipSettings.rightArmC1;
4163 LArm = LArm;
4164 RArm = RArm;
4165 gunParts = gunParts;
4166 Handle = Handle;
4167 }
4168 gunIgnore, playerFolder, headWeld, headWeld2, animWeld, ABWeld, LWeld, RWeld, LWeld2, RWeld2, LLegWeld, RLegWeld, gunParts2 = gunSetup:InvokeServer(Vars)]]
4169
4170 --------------------[ CREATING IGNORE MODELS ]--------------------------------
4171
4172 gunIgnore = Instance.new("Model")
4173 gunIgnore.Name = "gunIgnore_"..Player.Name
4174 gunIgnore.Parent = ignoreModel
4175
4176 --------------------[ MODIFYING THE PLAYER ]----------------------------------
4177
4178 Player.CameraMode = Enum.CameraMode.LockFirstPerson
4179 Cam.CameraType = Enum.CameraType.Scriptable
4180 Cam.FieldOfView = 80
4181 UIS.MouseBehavior = Enum.MouseBehavior.LockCenter
4182 UIS.MouseIconEnabled = false
4183
4184 local initialX, initialY = getYawPitch(Cam.CoordinateFrame)
4185 camAng = -VEC2(initialX, initialY)
4186
4187 mainGUI.Parent = Player.PlayerGui
4188
4189 setUpGUI()
4190 updateHealth()
4191
4192 if S.selectFire then
4193 local currentMode = Modes[((rawFireMode - 1) % numModes) + 1]
4194 if currentMode == "AUTO" then
4195 fireFunction = autoFire
4196 elseif currentMode == "BURST" then
4197 fireFunction = burstFire
4198 elseif currentMode == "SEMI" then
4199 fireFunction = semiFire
4200 else
4201 fireFunction = nil
4202 end
4203 else
4204 if S.gunType.Semi then
4205 fireFunction = semiFire
4206 elseif S.gunType.Auto then
4207 fireFunction = autoFire
4208 elseif S.gunType.Burst then
4209 fireFunction = burstFire
4210 else
4211 fireFunction = nil
4212 end
4213 end
4214
4215 changePlayerTrans(Char, 1)
4216
4217 Humanoid.AutoRotate = false
4218
4219 Shoulders.Right.Part1 = nil
4220 Shoulders.Left.Part1 = nil
4221
4222 playerFolder = Instance.new("Model")
4223 playerFolder.Name = "playerFolder"
4224 playerFolder.Parent = gunIgnore
4225
4226 local headBase = Instance.new("Part")
4227 headBase.Transparency = 1
4228 headBase.Name = "headBase"
4229 headBase.CanCollide = false
4230 headBase.FormFactor = Enum.FormFactor.Custom
4231 headBase.Size = V3(0.2, 0.2, 0.2)
4232 headBase.BottomSurface = Enum.SurfaceType.Smooth
4233 headBase.TopSurface = Enum.SurfaceType.Smooth
4234 headBase.Parent = playerFolder
4235
4236 headWeld = Instance.new("Weld")
4237 headWeld.Part0 = Torso
4238 headWeld.Part1 = headBase
4239 headWeld.C0 = CF(0, 1.5, 0)
4240 headWeld.Parent = Torso
4241
4242 headWeld2 = Instance.new("Weld")
4243 headWeld2.Part0 = headBase
4244 headWeld2.Part1 = Head
4245 headWeld2.Parent = headBase
4246
4247 neckClone = Neck:Clone()
4248
4249 --[[local stanceBase = Instance.new("Part")
4250 stanceBase.Transparency = 1
4251 stanceBase.Name = "stanceBase"
4252 stanceBase.CanCollide = false
4253 stanceBase.FormFactor = Enum.FormFactor.Custom
4254 stanceBase.Size = V3(0.2, 0.2, 0.2)
4255 stanceBase.BottomSurface = Enum.SurfaceType.Smooth
4256 stanceBase.TopSurface = Enum.SurfaceType.Smooth
4257 stanceBase.Parent = playerFolder
4258
4259 stanceWeld = Instance.new("Weld")
4260 stanceWeld.Part0 = stanceBase
4261 stanceWeld.Part1 = Torso
4262 stanceWeld.Parent = stanceBase]]
4263
4264 local animBase = Instance.new("Part")
4265 animBase.Transparency = 1
4266 animBase.Name = "animBase"
4267 animBase.CanCollide = false
4268 animBase.FormFactor = Enum.FormFactor.Custom
4269 animBase.Size = V3(0.2, 0.2, 0.2)
4270 animBase.BottomSurface = Enum.SurfaceType.Smooth
4271 animBase.TopSurface = Enum.SurfaceType.Smooth
4272 animBase.Parent = playerFolder
4273
4274 animWeld = Instance.new("Weld")
4275 animWeld.Part0 = animBase
4276 animWeld.Part1 = headBase
4277 animWeld.Parent = animBase
4278
4279 local ArmBase = Instance.new("Part")
4280 ArmBase.Transparency = 1
4281 ArmBase.Name = "ArmBase"
4282 ArmBase.CanCollide = false
4283 ArmBase.FormFactor = Enum.FormFactor.Custom
4284 ArmBase.Size = V3(0.2, 0.2, 0.2)
4285 ArmBase.BottomSurface = Enum.SurfaceType.Smooth
4286 ArmBase.TopSurface = Enum.SurfaceType.Smooth
4287 ArmBase.Parent = playerFolder
4288
4289 ABWeld = Instance.new("Weld")
4290 ABWeld.Part0 = ArmBase
4291 ABWeld.Part1 = animBase
4292 ABWeld.Parent = ArmBase
4293
4294 local LArmBase = Instance.new("Part")
4295 LArmBase.Transparency = 1
4296 LArmBase.Name = "LArmBase"
4297 LArmBase.CanCollide = false
4298 LArmBase.FormFactor = Enum.FormFactor.Custom
4299 LArmBase.Size = V3(0.2, 0.2, 0.2)
4300 LArmBase.BottomSurface = Enum.SurfaceType.Smooth
4301 LArmBase.TopSurface = Enum.SurfaceType.Smooth
4302 LArmBase.Parent = playerFolder
4303
4304 local RArmBase = Instance.new("Part")
4305 RArmBase.Transparency = 1
4306 RArmBase.Name = "RArmBase"
4307 RArmBase.CanCollide = false
4308 RArmBase.FormFactor = Enum.FormFactor.Custom
4309 RArmBase.Size = V3(0.2, 0.2, 0.2)
4310 RArmBase.BottomSurface = Enum.SurfaceType.Smooth
4311 RArmBase.TopSurface = Enum.SurfaceType.Smooth
4312 RArmBase.Parent = playerFolder
4313
4314 LWeld = Instance.new("Weld")
4315 LWeld.Name = "LWeld"
4316 LWeld.Part0 = ArmBase
4317 LWeld.Part1 = LArmBase
4318 LWeld.C0 = armC0[1]
4319 LWeld.C1 = S.equipSettings.leftArmC1
4320 LWeld.Parent = ArmBase
4321
4322 RWeld = Instance.new("Weld")
4323 RWeld.Name = "RWeld"
4324 RWeld.Part0 = ArmBase
4325 RWeld.Part1 = RArmBase
4326 RWeld.C0 = armC0[2]
4327 RWeld.C1 = S.equipSettings.rightArmC1
4328 RWeld.Parent = ArmBase
4329
4330 LWeld2 = Instance.new("Weld")
4331 LWeld2.Name = "LWeld"
4332 LWeld2.Part0 = LArmBase
4333 LWeld2.Part1 = LArm
4334 LWeld2.Parent = LArmBase
4335
4336 RWeld2 = Instance.new("Weld")
4337 RWeld2.Name = "RWeld"
4338 RWeld2.Part0 = RArmBase
4339 RWeld2.Part1 = RArm
4340 RWeld2.Parent = RArmBase
4341
4342 LLegWeld = Instance.new("Weld")
4343 LLegWeld.Name = "LLegWeld"
4344 LLegWeld.Part0 = Torso
4345 LLegWeld.Part1 = nil
4346 LLegWeld.C0 = CF(-0.5, -2, 0)
4347 LLegWeld.Parent = Torso
4348
4349 RLegWeld = Instance.new("Weld")
4350 RLegWeld.Name = "RLegWeld"
4351 RLegWeld.Part0 = Torso
4352 RLegWeld.Part1 = nil
4353 RLegWeld.C0 = CF(0.5, -2, 0)
4354 RLegWeld.Parent = Torso
4355
4356 if S.playerArms then
4357 armModel = Instance.new("Model", workspace.FilteringEnabled and playerFolder or Cam)
4358
4359 fakeLArm = LArm:Clone()
4360 fakeLArm.Parent = armModel
4361 fakeLArm.Transparency = S.fakeArmSettings.Transparency
4362 fakeLArm.CanCollide = false
4363 fakeLArm.Size = S.fakeArmSettings.armSize
4364 fakeLArm:BreakJoints()
4365
4366 --LArm.Transparency = 1
4367
4368 local fakeLWeld = Instance.new("Weld")
4369 fakeLWeld.Part0 = fakeLArm
4370 fakeLWeld.Part1 = LArm
4371 fakeLWeld.Parent = fakeLArm
4372
4373 fakeRArm = RArm:Clone()
4374 fakeRArm.Parent = armModel
4375 fakeRArm.Transparency = S.fakeArmSettings.Transparency
4376 fakeRArm.CanCollide = false
4377 fakeRArm.Size = S.fakeArmSettings.armSize
4378 fakeRArm:BreakJoints()
4379
4380 --RArm.Transparency = 1
4381
4382 local fakeRWeld = Instance.new("Weld")
4383 fakeRWeld.Part0 = fakeRArm
4384 fakeRWeld.Part1 = RArm
4385 fakeRWeld.Parent = fakeRArm
4386
4387 Instance.new("Humanoid", armModel)
4388
4389 if S.fakeArmSettings.characterMeshes then
4390 for _,Obj in pairs(Char:GetChildren()) do
4391 if Obj:IsA("CharacterMesh") then
4392 Obj:Clone().Parent = armModel
4393 end
4394 end
4395 end
4396 for _,Obj in pairs(Char:GetChildren()) do
4397 if Obj:IsA("Shirt") then
4398 Obj:Clone().Parent = armModel
4399 end
4400 end
4401 else
4402 armTable = createArms()
4403 if workspace.FilteringEnabled then
4404 armTable[1].Model.Parent = playerFolder
4405 armTable[2].Model.Parent = playerFolder
4406 else
4407 armTable[1].Model.Parent = Cam--playerFolder
4408 armTable[2].Model.Parent = Cam--playerFolder
4409 end
4410
4411 fakeLArm = armTable[1].armPart
4412
4413 --LArm.Transparency = 1
4414
4415 local fakeLWeld = Instance.new("Weld")
4416 fakeLWeld.Part0 = fakeLArm
4417 fakeLWeld.Part1 = LArm
4418 fakeLWeld.Parent = fakeLArm
4419
4420 fakeRArm = armTable[2].armPart
4421
4422 --RArm.Transparency = 1
4423
4424 local fakeRWeld = Instance.new("Weld")
4425 fakeRWeld.Part0 = fakeRArm
4426 fakeRWeld.Part1 = RArm
4427 fakeRWeld.Parent = fakeRArm
4428 end
4429
4430 --------------------[ MODIFYING THE GUN ]-------------------------------------
4431
4432 for _, Tab in pairs(gunParts) do
4433 local Weld = Instance.new("Weld")
4434 Weld.Name = "MainWeld"
4435 Weld.Part0 = Handle
4436 Weld.Part1 = Tab.Obj
4437 Weld.C0 = Tab.Obj.weldCF.Value
4438 Weld.Parent = Handle
4439 Tab.Weld = Weld
4440 end
4441
4442 Grip = RArm:WaitForChild("RightGrip")
4443
4444 local handleCF = Torso.CFrame * CF(0, 0.5, 0) * armC0[2] * S.aimedC1.rightArm:inverse() * Grip.C0
4445 local handleOffset = AimPart.CFrame:toObjectSpace(Handle.CFrame)
4446 aimedGripCF = ((Torso.CFrame * CF(headOffset.X, headOffset.Y, 0)) * handleOffset):toObjectSpace(handleCF)
4447
4448 Grip.C1 = S.equipSettings.GripC1
4449
4450 --------------------[ RUNNING PLUGINS ]---------------------------------------
4451
4452 for _, Plugin in pairs(Plugins.OnEquipped) do
4453 spawn(function()
4454 Plugin()
4455 end)
4456 end
4457
4458 --------------------[ GETTING PLAYER MASS ]-----------------------------------
4459
4460 local connectedParts = HRP:GetConnectedParts(true)
4461 for _, v in pairs(connectedParts) do
4462 if v:IsA("BasePart") then
4463 playerMass = playerMass + v:GetMass()
4464 end
4465 end
4466
4467 --------------------[ CONNECTIONS ]-------------------------------------------
4468
4469 INSERT(Connections, Humanoid.Died:connect(function()
4470 onUnequipped(true)
4471 end))
4472
4473 INSERT(Connections, Humanoid.Jumping:connect(function()
4474 if Stance ~= 0 then
4475 Stand()
4476 end
4477 end))
4478
4479 INSERT(Connections, Humanoid.StateChanged:connect(onHumanoidStateChanged))
4480
4481 INSERT(Connections, Humanoid.HealthChanged:connect(updateHealth))
4482
4483 INSERT(Connections, M2.Button1Down:connect(onMB1Down))
4484
4485 INSERT(Connections, M2.Button1Up:connect(onMB1Up))
4486
4487 INSERT(Connections, M2.Button2Down:connect(onMB2Down))
4488
4489 INSERT(Connections, M2.Button2Up:connect(onMB2Up))
4490
4491 INSERT(Connections, M2.KeyDown:connect(keyDown))
4492
4493 INSERT(Connections, M2.KeyUp:connect(keyUp))
4494
4495 if S.sensitivitySettings.scrollToChange then
4496 INSERT(Connections, M2.WheelForward:connect(onScrollUp))
4497 INSERT(Connections, M2.WheelBackward:connect(onScrollDown))
4498 end
4499
4500 if S.AutoKnife then
4501 INSERT(Connections, RS.Stepped:connect(function()
4502 local H, P = AdvRayCast(Head.CFrame.p, Head.CFrame.lookVector, S.AutoKnifeDist, nil)
4503 if H then
4504 local HitHuman = findFirstClass(H.Parent, "Humanoid")
4505 if HitHuman and isEnemy(HitHuman) and HitHuman.Health ~= 0 then
4506 Knife()
4507 end
4508 end
4509 end))
4510 end
4511
4512 INSERT(Connections, UIS.InputChanged:connect(function(inputObj)
4513 if inputObj.UserInputType == Enum.UserInputType.MouseMovement then
4514 local rawCamAng = camAng - (VEC2(RAD(inputObj.Delta.x), RAD(inputObj.Delta.y)) * mouseSensitivity * 0.25)
4515 camAng = VEC2(rawCamAng.x, (rawCamAng.y > RAD(80) and RAD(80) or rawCamAng.y < RAD(-80) and RAD(-80) or rawCamAng.y))
4516
4517 desiredXOffset = math.min(math.max(inputObj.Delta.x, -S.momentumSettings.maxInput), S.momentumSettings.maxInput)
4518 desiredYOffset = math.min(math.max(inputObj.Delta.y, -S.momentumSettings.maxInput), S.momentumSettings.maxInput)
4519 end
4520 end))
4521
4522 INSERT(Connections, M2.Idle:connect(function(inputObj)
4523 desiredXOffset = 0
4524 desiredYOffset = 0
4525 end))
4526
4527 INSERT(Connections, RS.Stepped:connect(function()
4528 if tick() - lastBeat > (Humanoid.Health / 75) then
4529 lastBeat = tick()
4530 HUD.Health.Tray.Beat:TweenPosition(
4531 UDim2.new(0, -21, 0, 0),
4532 Enum.EasingDirection.Out,
4533 Enum.EasingStyle.Linear,
4534 0.7 - ((100 - Humanoid.Health) / 400),
4535 false,
4536 function()
4537 HUD.Health.Tray.Beat.Position = UDim2.new(1, 0, 0, 0)
4538 end
4539 )
4540 end
4541 end))
4542
4543 INSERT(Connections, RS.RenderStepped:connect(function()
4544 --Main animation
4545 local animC0, animC1 = getAnimCF()
4546 animWeld.C0 = animC0
4547 animWeld.C1 = animC1
4548
4549 --Camera updating
4550 renderCamera()
4551 end))
4552
4553 --------------------[ ANIMATE GUN ]-------------------------------------------
4554
4555 tweenJoint(LWeld, nil, S.unAimedC1.leftArm, Sine, S.equipSettings.Time)
4556 tweenJoint(RWeld, nil, S.unAimedC1.rightArm, Sine, S.equipSettings.Time)
4557 tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, S.equipSettings.Time)
4558 spawn(function()
4559 local T = tick()
4560 while true do
4561 if tick() - T > S.equipSettings.Time then break end
4562 if (not Selected) then break end
4563 wait()
4564 end
4565 equipAnimPlaying = false
4566 end)
4567
4568 Animate()
4569 end
4570end
4571
4572function onUnequipped(deleteTool)
4573 if Selected then
4574 Selected = false
4575
4576 breakReload = true
4577
4578 --------------------[ RUNNING PLUGINS ]---------------------------------------
4579
4580 for _, Plugin in pairs(Plugins.OnUnEquipped) do
4581 spawn(function()
4582 Plugin()
4583 end)
4584 end
4585
4586 --------------------[ MODIFYING THE PLAYER ]----------------------------------
4587
4588 Cam.FieldOfView = 70
4589 Cam.CameraType = Enum.CameraType.Custom
4590
4591 UIS.MouseBehavior = Enum.MouseBehavior.Default
4592 UIS.MouseIconEnabled = true
4593
4594 Player.CameraMode = Enum.CameraMode.Classic
4595
4596 if armTable then
4597 armTable[1].Model:Destroy()
4598 armTable[2].Model:Destroy()
4599 elseif armModel then
4600 armModel:Destroy()
4601 end
4602
4603 LLegWeld:Destroy()
4604 RLegWeld:Destroy()
4605
4606 changePlayerTrans(Char, 0)
4607
4608 mainGUI.Parent = script
4609
4610 Shoulders.Right.Part1 = RArm
4611 Shoulders.Left.Part1 = LArm
4612
4613 neckClone.Parent = Torso
4614 headWeld:Destroy()
4615
4616 Humanoid.WalkSpeed = 16
4617 Humanoid.AutoRotate = true
4618
4619 --------------------[ RESETING THE TOOL ]-------------------------------------
4620
4621 gunIgnore:Destroy()
4622
4623 mouseSensitivity = S.sensitivitySettings.Default
4624
4625 MB1Down = false
4626
4627 playerMass = 0
4628
4629 Aimed = false
4630
4631 camOffsets = {
4632 guiScope = {
4633 Rot = V3();
4634 };
4635 Reload = {
4636 Rot = V3();
4637 Code = nil;
4638 };
4639 Recoil = {
4640 Rot = V3();
4641 Code = nil;
4642 };
4643 }
4644
4645 recoilAnim = {
4646 Pos = V3();
4647 Rot = V3();
4648 Code = nil;
4649 }
4650
4651 --Setting the aim variables to unaimed
4652 spreadZoom = "unAimed"
4653 scopeMain.Visible = false
4654 scopeSteady.Visible = false
4655 aimAlpha = 0
4656 aimHeadOffset = 0
4657 jumpAnimMultiplier = 1
4658 translationDivisor = 7
4659 rotationMultiplier = S.momentumSettings.Amplitude.unAimed
4660 armTiltMultiplier = 1
4661 Scope.BackgroundTransparency = 1
4662 if S.guiScope then
4663 spawn(function()
4664 for _, Obj in pairs(Gun:GetChildren()) do
4665 if Obj:IsA("BasePart") then
4666 Obj.LocalTransparencyModifier = 0
4667 end
4668 end
4669 end)
4670 end
4671
4672 onGround = true
4673
4674 for _, Tab in pairs(gunParts) do
4675 Tab.Weld:Destroy()
4676 Tab.Weld = nil
4677 end
4678
4679 for _,c in pairs(Connections) do
4680 c:disconnect()
4681 end
4682
4683 Connections = {}
4684
4685 if deleteTool then
4686 Cam:ClearAllChildren()
4687 Gun:Destroy()
4688 end
4689
4690 wait() --This is here in case you dolphin dived and deselected the tool instantly
4691
4692 if S.stanceSettings.standOnDeselect and Stance ~= 0 then
4693 crawlCamRot = 0
4694 isCrawling = false
4695 stanceSway = 1
4696 spreadStance = "Stand"
4697 Stand(true)
4698 end
4699 baseSpread = S.spreadSettings[spreadZoom][spreadStance][spreadMotion]
4700 end
4701end
4702
4703Gun.Equipped:connect(onEquipped)
4704Gun.Unequipped:connect(function() onUnequipped(false) end)
4705
4706--------------------------------------------------------------------------------------
4707--------------------[ END PROGRAM ]---------------------------------------------------
4708--------------------------------------------------------------------------------------
4709end))
4710
4711IntValue47.Name = "ignoreCode"
4712IntValue47.Parent = LocalScript46
4713Folder48.Name = "Server_Scripts"
4714Folder48.Parent = LocalScript46
4715ModuleScript49.Name = "Spring"
4716ModuleScript49.Parent = LocalScript46
4717table.insert(cors,sandbox(ModuleScript49,function()
4718local Spring = {}
4719
4720function Spring.new(Initial)
4721 local t0 = tick()
4722 local p0 = Initial or 0
4723 local v0 = Initial and Vector3.new() or 0
4724 local t = Initial or 0
4725 local d = 1
4726 local s = 1
4727
4728 local function positionVelocity(Tick)
4729 local x = Tick - t0
4730 local c0 = p0 - t
4731 if s == 0 then
4732 return p0, 0
4733 elseif d < 1 then
4734 local c = math.sqrt(1 - d ^ 2)
4735 local c1 = (v0 / s + d * c0) / c
4736 local co = math.cos(c * s * x)
4737 local si = math.sin(c * s * x)
4738 local e = math.exp(d * s * x)
4739 local p = t + (c0 * co + c1 * si) / e
4740 local v = s * ((c * c1 - d * c0) * co - (c * c0 + d * c1) * si) / e
4741 return p, v
4742 else
4743 local c1 = v0 / s + c0
4744 local e = math.exp(s * x)
4745 local p = t + (c0 + c1 * s * x) / e
4746 local v = s * (c1 - c0 - c1 * s * x) / e
4747 return p, v
4748 end
4749 end
4750
4751 return setmetatable(
4752 {
4753 accelerate = function(_, acceleration)
4754 local T = tick()
4755 local p, v = positionVelocity(T)
4756 p0 = p
4757 v0 = v + acceleration
4758 t0 = T
4759 end;
4760 },
4761 {
4762 __index = function(_, index)
4763 if index == "value" or index == "position" or index == "p" then
4764 local p, v = positionVelocity(tick())
4765 return p
4766 elseif index == "velocity" or index == "v" then
4767 local p, v = positionVelocity(tick())
4768 return v
4769 elseif index == "acceleration" or index == "a" then
4770 local x = tick() - t0
4771 local c0 = p0 - t
4772 if s == 0 then
4773 return 0
4774 elseif d < 1 then
4775 local c = math.sqrt(1 - d ^ 2)
4776 local c1 = (v0 / s + d * c0) / c
4777 local cs = (c0 * d ^ 2 - 2 * c * d * c1 - c0 * c ^ 2) * math.cos(c * s * x)
4778 local sn = (c1 * d ^ 2 + 2 * c * d * c0 - c1 * c ^ 2) * math.sin(c * s * x)
4779 return s ^ 2 *(cs + sn) / math.exp(d * s * x)
4780 else
4781 local c1 = v0 / s + c0
4782 return s ^ 2 * (c0 - 2 * c1 + c1 * s * x) / math.exp(s * x)
4783 end
4784 elseif index == "target" or index == "t" then
4785 return t
4786 elseif index == "damper" or index == "d" then
4787 return d
4788 elseif index == "speed" or index == "s" then
4789 return s
4790 elseif index == "magnitude" or index == "m" then
4791 local p, v = positionVelocity(tick())
4792 return p.magnitude
4793 else
4794 error(index.." is not a valid member of spring", 0)
4795 end
4796 end;
4797
4798 __newindex = function(_, index, value)
4799 local T = tick()
4800 if index == "value" or index == "position" or index == "p" then
4801 local p, v = positionVelocity(T)
4802 p0, v0 = value, v
4803 elseif index == "velocity" or index == "v" then
4804 local p, v = positionVelocity(T)
4805 p0, v0 = p, value
4806 elseif index == "acceleration" or index == "a" then
4807 local p, v = positionVelocity(T)
4808 p0, v0 = p, v + value
4809 elseif index == "target" or index == "t" then
4810 p0, v0 = positionVelocity(T)
4811 t = value
4812 elseif index == "damper" or index == "d" then
4813 p0, v0 = positionVelocity(T)
4814 d = value < 0 and 0 or value < 1 and value or 1
4815 elseif index == "speed" or index == "s" then
4816 p0, v0 = positionVelocity(T)
4817 s = value < 0 and 0 or value
4818 else
4819 error(index.." is not a valid member of spring", 0)
4820 end
4821 t0 = T
4822 end;
4823 }
4824 )
4825end
4826
4827return Spring
4828end))
4829ModuleScript50.Name = "Particle"
4830ModuleScript50.Parent = LocalScript46
4831table.insert(cors,sandbox(ModuleScript50,function()
4832---------------------------------------------------------------------------------------------------------
4833--[[
4834
4835 AUTHOR: TurboFusion
4836 DATE CREATED: 4/8/16
4837
4838 DESCRIPTION: This is a module that creates gui particles which simulates physical parts
4839
4840 function Particle.new(Prop)
4841
4842 ARGUMENT: Table {
4843 Table rayIgnore; --This table contains objects that the visiblity checking ray should ignore (DEFAULT: {})
4844 Color3 Color; --This color3 value is what color the particle will be (DEFAULT: Color3.new(1, 1, 1))
4845 float Length; --This float value is how long the particle will be in world space (DEFAULT: 1)
4846 float Width; --This float value is how wide the particle will be in world space (DEFAULT: 1)
4847 Vector3 p0; --This Vector3 value is the initial position of the particle (Must exist)
4848 Vector3 v0; --This Vector3 value is the initial velocity of the particle (Must exist)
4849 Vector3 a0; --This Vector3 value is the initial acceleration of the particle (Must exist)
4850 }
4851
4852 RETURNS: Metatable
4853
4854 EDITABLE PROPERTIES:
4855 Particle.t = float Time --Sets a time value in seconds which is used to figure out where to render the particle (t=0 will be initial conditions)
4856
4857 READ-ONLY PROPERTIES:
4858 Particle.p or Particle.position --Returns a world position of the particle
4859 Particle.v or Particle.velocity --Returns a world velocity of the particle
4860 Particle.obj or Particle.object --Returns the particle frame itself
4861
4862 METHODS:
4863 Particle:delete() --This method deletes the particle and stops rendering calculations (use this instead of directly destroying the frame itself)
4864
4865 EXAMPLE CODE:
4866 local t = 0
4867 local Particle = Particle.new(
4868 {
4869 Color = Color3.new(1, 1, 0);
4870 Width = 1;
4871 p0 = Vector3.new();
4872 v0 = Vector3.new(0, 100, 100);
4873 a0 = Vector3.new(0, -196.2, 0);
4874 }
4875 )
4876 Particle.obj.Parent = screenGui
4877 while true do
4878 Particle.t = t
4879 t = t + 1/30
4880 wait()
4881 end
4882
4883--]]
4884---------------------------------------------------------------------------------------------------------
4885
4886local Particle = {}
4887
4888function Particle.new(Prop)
4889 ----------[ CONSTANTS ]--------------------
4890
4891 local Cam = workspace.CurrentCamera
4892 local rayIgnore = Prop.rayIgnore or {} --If the property doesn't exist, then set it to it's default
4893 local Color = Prop.Color or Color3.new(1, 1, 1)
4894 local Length = Prop.Length or 1
4895 local Width = Prop.Width or 1
4896 local p0 = Prop.p0 or error("Particle.new requires a p0 (origin position) property!", 0) --Give an error message if you don't this
4897 local v0 = Prop.v0 or error("Particle.new requires a v0 (initial velocity) property!", 0)
4898 local a0 = Prop.a0 or error("Particle.new requires an a0 (initial acceleration) property!", 0)
4899
4900 ----------[ VARIABLES ]--------------------
4901
4902 local Deleted = false
4903 local p = p0 --Set the position, velocity, and acceleration as the intial conditions
4904 local v = v0
4905 local a = a0
4906 local t = 0
4907
4908 ----------[ FUNCTIONS ]--------------------
4909
4910 local function worldWidthToScreenWidth(Width, Depth) --A function I made that gives you a screen width given a world width and depth
4911 local Center = Cam.CoordinateFrame * CFrame.new(0, 0, -Depth)
4912 local wp1 = (Center * CFrame.new(0, Width / 2, 0)).p
4913 local wp2 = (Center * CFrame.new(0, -Width / 2, 0)).p
4914 local sp1 = Cam:WorldToScreenPoint(wp1) --Use the WorldToScreenPoint method of the camera to get the screen width from the world width
4915 local sp2 = Cam:WorldToScreenPoint(wp2)
4916 return (sp1 - sp2).magnitude
4917 end
4918
4919 ----------[ MAIN PROGRAM ]-----------------
4920
4921 local Container = Instance.new("Frame")
4922 Container.BackgroundTransparency = 1
4923 Container.Position = UDim2.new()
4924 Container.Size = UDim2.new()
4925 local Line = Instance.new("Frame")
4926 Line.BackgroundColor3 = Color
4927 Line.BorderSizePixel = 0
4928 Line.Position = UDim2.new()
4929 Line.Size = UDim2.new()
4930 Line.Parent = Container
4931
4932 return setmetatable(
4933 {
4934 delete = function() --This function safely removes the particle
4935 Container:Destroy()
4936 Deleted = true
4937 end
4938 },
4939 {
4940 __index = function(_, Index)
4941 if Index == "p" or Index == "position" then --Return the world position of the particle
4942 return (Deleted and nil or p)
4943 elseif Index == "v" or Index == "velocity" then --Return the world velocity of the particle
4944 return (Deleted and nil or v)
4945 elseif Index == "obj" or Index == "object" then --Return the particle frame itself
4946 return (Deleted and nil or Container)
4947 else
4948 error(Index.." is not a member of Particle!", 0) --Give an error message if any other index is called
4949 end
4950 end;
4951
4952 __newindex = function(_, Index, Value)
4953 if Index == "t" or Index == "time" and (not Deleted) then --Render the particle given a time value
4954 t = Value
4955 p = p0 + (v0 * t) + (0.5 * a0 * t * t) --update the position given the time
4956 v = v0 + (a0 * t) --update the velocity given the time
4957
4958 local testRay1 = Ray.new(Cam.CoordinateFrame.p, (p + (v.unit * Length) / 2) - Cam.CoordinateFrame.p)
4959 local testRay2 = Ray.new(Cam.CoordinateFrame.p, (p - (v.unit * Length) / 2) - Cam.CoordinateFrame.p)
4960 local H1, _ = workspace:FindPartOnRayWithIgnoreList(testRay1, rayIgnore)
4961 local H2, _ = workspace:FindPartOnRayWithIgnoreList(testRay2, rayIgnore)
4962
4963 if H1 and H2 then
4964 Line.Visible = false
4965 else
4966 local face1 = Cam:WorldToScreenPoint(p + (v.unit * Length) / 2) --Get the 2 endpoints of the particle in screen space
4967 local face2 = Cam:WorldToScreenPoint(p - (v.unit * Length) / 2)
4968 local Center, isVisible = Cam:WorldToScreenPoint(p) --Get the center of the particle in screen space
4969
4970 local screenLength = (face1 - face2).magnitude
4971 local screenWidth = worldWidthToScreenWidth(Width, Center.Z)
4972 local Ang = math.atan2(face1.Y - face2.Y, face1.X - face2.X) --Get the angle the particle needs to be at in order to line up
4973
4974 Line.Position = UDim2.new(0, 0, 0, -screenWidth / 2)
4975 Line.Size = UDim2.new(1, 0, 0, screenWidth)
4976 Line.Visible = isVisible --Make the particle invisible if the world point isn't on screen
4977
4978 Container.Position = UDim2.new(
4979 0,
4980 face2.X + (math.cos(Ang) - 1) * screenLength / 2, --Yay trig!
4981 0,
4982 face2.Y + math.sin(Ang) * screenLength / 2
4983 )
4984 Container.Size = UDim2.new(0, screenLength, 0, 0)
4985 Container.Rotation = math.deg(Ang)
4986 end
4987 else
4988 error(Index.." is not a member of Particle!", 0) --Give an error message if any other index is being changed
4989 end
4990 end
4991 }
4992 )
4993end
4994
4995return Particle
4996end))
4997ScreenGui51.Name = "mainGUI"
4998ScreenGui51.Parent = LocalScript46
4999ImageLabel52.Name = "hitMarker"
5000ImageLabel52.Parent = ScreenGui51
5001ImageLabel52.Position = UDim2.new(0.400000006, 3, 0.5, -95)
5002ImageLabel52.Visible = false
5003ImageLabel52.Transparency = 1
5004ImageLabel52.Size = UDim2.new(0, 156, 0, 156)
5005ImageLabel52.BackgroundTransparency = 1
5006ImageLabel52.ZIndex = 10
5007ImageLabel52.Image = "rbxassetid://483916271"
5008NumberValue53.Name = "lastMark"
5009NumberValue53.Parent = ImageLabel52
5010Frame54.Name = "crossHair"
5011Frame54.Parent = ScreenGui51
5012Frame54.Position = UDim2.new(0.5, 0, 0.5, -18)
5013Frame54.Visible = false
5014Frame54.BackgroundColor = BrickColor.new("Institutional white")
5015Frame54.BackgroundColor3 = Color3.new(1, 1, 1)
5016Frame54.BorderColor = BrickColor.new("Really black")
5017Frame54.BorderColor3 = Color3.new(0, 0, 0)
5018Frame54.BorderSizePixel = 0
5019ImageLabel55.Parent = Frame54
5020ImageLabel55.Position = UDim2.new(0, -150, 0, -150)
5021ImageLabel55.Visible = false
5022ImageLabel55.Transparency = 1
5023ImageLabel55.Size = UDim2.new(0, 300, 0, 300)
5024ImageLabel55.BackgroundColor = BrickColor.new("Institutional white")
5025ImageLabel55.BackgroundColor3 = Color3.new(1, 1, 1)
5026ImageLabel55.BackgroundTransparency = 1
5027ImageLabel55.ZIndex = 2
5028ImageLabel55.Image = "http://www.roblox.com/asset/?id=68308747"
5029TextLabel56.Name = "Reload"
5030TextLabel56.Parent = Frame54
5031TextLabel56.Position = UDim2.new(0, -50, 0, 70)
5032TextLabel56.Visible = false
5033TextLabel56.Transparency = 1
5034TextLabel56.Size = UDim2.new(0, 100, 0, 20)
5035TextLabel56.BackgroundColor = BrickColor.new("Institutional white")
5036TextLabel56.BackgroundColor3 = Color3.new(1, 1, 1)
5037TextLabel56.BackgroundTransparency = 1
5038TextLabel56.ZIndex = 2
5039TextLabel56.Font = Enum.Font.SourceSansBold
5040TextLabel56.FontSize = Enum.FontSize.Size18
5041TextLabel56.Text = "RELOADING..."
5042TextLabel56.TextColor = BrickColor.new("Institutional white")
5043TextLabel56.TextColor3 = Color3.new(1, 1, 1)
5044TextLabel56.TextSize = 18
5045TextLabel56.TextStrokeTransparency = 0.5
5046Frame57.Name = "C"
5047Frame57.Parent = Frame54
5048Frame57.Position = UDim2.new(0, -2, 0, 0)
5049Frame57.Transparency = 1
5050Frame57.Size = UDim2.new(0, 4, 0, 500)
5051Frame57.BackgroundColor = BrickColor.new("Institutional white")
5052Frame57.BackgroundColor3 = Color3.new(1, 1, 1)
5053Frame57.BackgroundTransparency = 1
5054Frame57.ClipsDescendants = true
5055TextLabel58.Name = "Line"
5056TextLabel58.Parent = Frame57
5057TextLabel58.Position = UDim2.new(0.5, -1, 0, 10)
5058TextLabel58.Size = UDim2.new(0, 2, 0, 15)
5059TextLabel58.BackgroundColor = BrickColor.new("Institutional white")
5060TextLabel58.BackgroundColor3 = Color3.new(1, 1, 1)
5061TextLabel58.BorderColor = BrickColor.new("Dark stone grey")
5062TextLabel58.BorderColor3 = Color3.new(0.392157, 0.392157, 0.392157)
5063TextLabel58.Font = Enum.Font.SourceSans
5064TextLabel58.FontSize = Enum.FontSize.Size14
5065TextLabel58.Text = ""
5066TextLabel58.TextSize = 14
5067Frame59.Name = "A"
5068Frame59.Parent = Frame54
5069Frame59.Position = UDim2.new(0, -2, 0, -500)
5070Frame59.Transparency = 1
5071Frame59.Size = UDim2.new(0, 4, 0, 500)
5072Frame59.BackgroundColor = BrickColor.new("Institutional white")
5073Frame59.BackgroundColor3 = Color3.new(1, 1, 1)
5074Frame59.BackgroundTransparency = 1
5075Frame59.ClipsDescendants = true
5076TextLabel60.Name = "Line"
5077TextLabel60.Parent = Frame59
5078TextLabel60.Position = UDim2.new(0.5, -1, 1, -25)
5079TextLabel60.Size = UDim2.new(0, 2, 0, 15)
5080TextLabel60.BackgroundColor = BrickColor.new("Institutional white")
5081TextLabel60.BackgroundColor3 = Color3.new(1, 1, 1)
5082TextLabel60.BorderColor = BrickColor.new("Dark stone grey")
5083TextLabel60.BorderColor3 = Color3.new(0.392157, 0.392157, 0.392157)
5084TextLabel60.Font = Enum.Font.SourceSans
5085TextLabel60.FontSize = Enum.FontSize.Size14
5086TextLabel60.Text = ""
5087TextLabel60.TextSize = 14
5088Frame61.Name = "B"
5089Frame61.Parent = Frame54
5090Frame61.Position = UDim2.new(0, 0, 0, -2)
5091Frame61.Transparency = 1
5092Frame61.Size = UDim2.new(0, 500, 0, 4)
5093Frame61.BackgroundColor = BrickColor.new("Institutional white")
5094Frame61.BackgroundColor3 = Color3.new(1, 1, 1)
5095Frame61.BackgroundTransparency = 1
5096Frame61.ClipsDescendants = true
5097TextLabel62.Name = "Line"
5098TextLabel62.Parent = Frame61
5099TextLabel62.Position = UDim2.new(0, 10, 0.5, -1)
5100TextLabel62.Size = UDim2.new(0, 15, 0, 2)
5101TextLabel62.BackgroundColor = BrickColor.new("Institutional white")
5102TextLabel62.BackgroundColor3 = Color3.new(1, 1, 1)
5103TextLabel62.BorderColor = BrickColor.new("Dark stone grey")
5104TextLabel62.BorderColor3 = Color3.new(0.392157, 0.392157, 0.392157)
5105TextLabel62.Font = Enum.Font.SourceSans
5106TextLabel62.FontSize = Enum.FontSize.Size14
5107TextLabel62.Text = ""
5108TextLabel62.TextSize = 14
5109Frame63.Name = "D"
5110Frame63.Parent = Frame54
5111Frame63.Position = UDim2.new(0, -500, 0, -2)
5112Frame63.Transparency = 1
5113Frame63.Size = UDim2.new(0, 500, 0, 4)
5114Frame63.BackgroundColor = BrickColor.new("Institutional white")
5115Frame63.BackgroundColor3 = Color3.new(1, 1, 1)
5116Frame63.BackgroundTransparency = 1
5117Frame63.ClipsDescendants = true
5118TextLabel64.Name = "Line"
5119TextLabel64.Parent = Frame63
5120TextLabel64.Position = UDim2.new(1, -25, 0.5, -1)
5121TextLabel64.Size = UDim2.new(0, 15, 0, 2)
5122TextLabel64.BackgroundColor = BrickColor.new("Institutional white")
5123TextLabel64.BackgroundColor3 = Color3.new(1, 1, 1)
5124TextLabel64.BorderColor = BrickColor.new("Dark stone grey")
5125TextLabel64.BorderColor3 = Color3.new(0.392157, 0.392157, 0.392157)
5126TextLabel64.Font = Enum.Font.SourceSans
5127TextLabel64.FontSize = Enum.FontSize.Size14
5128TextLabel64.Text = ""
5129TextLabel64.TextSize = 14
5130Frame65.Name = "fireSelect"
5131Frame65.Parent = ScreenGui51
5132Frame65.Position = UDim2.new(0.5, 0, 0.5, -18)
5133Frame65.Visible = false
5134Frame65.Transparency = 1
5135Frame65.BackgroundColor = BrickColor.new("Institutional white")
5136Frame65.BackgroundColor3 = Color3.new(1, 1, 1)
5137Frame65.BackgroundTransparency = 1
5138Frame66.Name = "Modes"
5139Frame66.Parent = Frame65
5140Frame66.Transparency = 1
5141Frame66.BackgroundColor = BrickColor.new("Institutional white")
5142Frame66.BackgroundColor3 = Color3.new(1, 1, 1)
5143Frame66.BackgroundTransparency = 1
5144ImageLabel67.Name = "Circle"
5145ImageLabel67.Parent = Frame65
5146ImageLabel67.Position = UDim2.new(0, -60, 0, -60)
5147ImageLabel67.Transparency = 1
5148ImageLabel67.Size = UDim2.new(0, 120, 0, 120)
5149ImageLabel67.BackgroundColor = BrickColor.new("Institutional white")
5150ImageLabel67.BackgroundColor3 = Color3.new(1, 1, 1)
5151ImageLabel67.BackgroundTransparency = 1
5152ImageLabel67.Image = "http://www.roblox.com/asset/?id=55754953"
5153ImageLabel67.ImageTransparency = 0.5
5154ImageLabel68.Name = "Arrow"
5155ImageLabel68.Parent = Frame65
5156ImageLabel68.Position = UDim2.new(0, -20, 0, -140)
5157ImageLabel68.Transparency = 1
5158ImageLabel68.Size = UDim2.new(0, 40, 0, 20)
5159ImageLabel68.BackgroundColor = BrickColor.new("Institutional white")
5160ImageLabel68.BackgroundColor3 = Color3.new(1, 1, 1)
5161ImageLabel68.BackgroundTransparency = 1
5162ImageLabel68.Image = "http://www.roblox.com/asset/?id=126877530"
5163TextLabel69.Name = "Sens"
5164TextLabel69.Parent = ScreenGui51
5165TextLabel69.Position = UDim2.new(0.5, -50, 0.5, 50)
5166TextLabel69.Visible = false
5167TextLabel69.Transparency = 1
5168TextLabel69.Size = UDim2.new(0, 100, 0, 20)
5169TextLabel69.BackgroundColor = BrickColor.new("Institutional white")
5170TextLabel69.BackgroundColor3 = Color3.new(1, 1, 1)
5171TextLabel69.BackgroundTransparency = 1
5172TextLabel69.ZIndex = 10
5173TextLabel69.Font = Enum.Font.SourceSansBold
5174TextLabel69.FontSize = Enum.FontSize.Size28
5175TextLabel69.Text = "S: 0.3"
5176TextLabel69.TextColor = BrickColor.new("Institutional white")
5177TextLabel69.TextColor3 = Color3.new(1, 1, 1)
5178TextLabel69.TextSize = 28
5179TextLabel69.TextStrokeTransparency = 0
5180Frame70.Name = "Scope"
5181Frame70.Parent = ScreenGui51
5182Frame70.Position = UDim2.new(0, 0, 0, -36)
5183Frame70.Transparency = 1
5184Frame70.Size = UDim2.new(1, 0, 1, 36)
5185Frame70.BackgroundColor = BrickColor.new("Really black")
5186Frame70.BackgroundColor3 = Color3.new(0, 0, 0)
5187Frame70.BackgroundTransparency = 1
5188TextLabel71.Name = "Steady"
5189TextLabel71.Parent = Frame70
5190TextLabel71.Position = UDim2.new(0.5, -60, 0.5, 50)
5191TextLabel71.Visible = false
5192TextLabel71.Transparency = 1
5193TextLabel71.Size = UDim2.new(0, 120, 0, 20)
5194TextLabel71.BackgroundColor = BrickColor.new("Institutional white")
5195TextLabel71.BackgroundColor3 = Color3.new(1, 1, 1)
5196TextLabel71.BackgroundTransparency = 1
5197TextLabel71.ZIndex = 9
5198TextLabel71.Font = Enum.Font.ArialBold
5199TextLabel71.FontSize = Enum.FontSize.Size14
5200TextLabel71.Text = ""
5201TextLabel71.TextColor = BrickColor.new("New Yeller")
5202TextLabel71.TextColor3 = Color3.new(1, 1, 0)
5203TextLabel71.TextSize = 14
5204TextLabel71.TextStrokeTransparency = 0
5205Frame72.Name = "Main"
5206Frame72.Parent = Frame70
5207Frame72.Visible = false
5208Frame72.Transparency = 1
5209Frame72.Size = UDim2.new(1, 0, 1, 0)
5210Frame72.BackgroundColor = BrickColor.new("Institutional white")
5211Frame72.BackgroundColor3 = Color3.new(1, 1, 1)
5212Frame72.BackgroundTransparency = 1
5213ImageLabel73.Name = "ScopeImg2"
5214ImageLabel73.Parent = Frame72
5215ImageLabel73.Position = UDim2.new(0.5, -10, 0, -10)
5216ImageLabel73.Transparency = 1
5217ImageLabel73.Size = UDim2.new(0, 20, 0, 20)
5218ImageLabel73.BackgroundColor = BrickColor.new("Really black")
5219ImageLabel73.BackgroundColor3 = Color3.new(0, 0, 0)
5220ImageLabel73.BackgroundTransparency = 1
5221ImageLabel73.Image = "http://www.roblox.com/asset/?id=184922644"
5222ImageLabel74.Name = "ScopeImg1"
5223ImageLabel74.Parent = Frame72
5224ImageLabel74.Position = UDim2.new(0.5, -10, 0, -10)
5225ImageLabel74.Transparency = 1
5226ImageLabel74.Size = UDim2.new(0, 20, 0, 20)
5227ImageLabel74.BackgroundColor = BrickColor.new("Really black")
5228ImageLabel74.BackgroundColor3 = Color3.new(0, 0, 0)
5229ImageLabel74.BackgroundTransparency = 1
5230ImageLabel74.Image = "http://www.roblox.com/asset/?id=72002022"
5231Frame75.Name = "F2"
5232Frame75.Parent = Frame72
5233Frame75.Position = UDim2.new(0, -10, 0, -10)
5234Frame75.Size = UDim2.new(0, 0, 1, 20)
5235Frame75.BackgroundColor = BrickColor.new("Really black")
5236Frame75.BackgroundColor3 = Color3.new(0, 0, 0)
5237Frame75.BorderColor = BrickColor.new("Really black")
5238Frame75.BorderColor3 = Color3.new(0, 0, 0)
5239Frame75.BorderSizePixel = 0
5240Frame76.Name = "F1"
5241Frame76.Parent = Frame72
5242Frame76.Position = UDim2.new(0, -10, 0, -10)
5243Frame76.Size = UDim2.new(0, 0, 1, 20)
5244Frame76.BackgroundColor = BrickColor.new("Really black")
5245Frame76.BackgroundColor3 = Color3.new(0, 0, 0)
5246Frame76.BorderColor = BrickColor.new("Really black")
5247Frame76.BorderColor3 = Color3.new(0, 0, 0)
5248Frame76.BorderSizePixel = 0
5249LocalScript77.Name = "Update"
5250LocalScript77.Parent = Frame72
5251table.insert(cors,sandbox(LocalScript77,function()
5252local GUI = script.Parent
5253
5254function updateScopeDimension()
5255 GUI.ScopeImg1.Position = UDim2.new(0.5, -10 - (GUI.AbsoluteSize.y / 2), 0, -10)
5256 GUI.ScopeImg1.Size = UDim2.new(0, 20 + GUI.AbsoluteSize.y, 0, 20 + GUI.AbsoluteSize.y)
5257 GUI.ScopeImg2.Position = UDim2.new(0.5, -10 - (GUI.AbsoluteSize.y / 2), 0, -10)
5258 GUI.ScopeImg2.Size = UDim2.new(0, 20 + GUI.AbsoluteSize.y, 0, 20 + GUI.AbsoluteSize.y)
5259 GUI.F1.Size = UDim2.new(0, 20 + ((GUI.AbsoluteSize.x - GUI.AbsoluteSize.y) / 2), 1, 20)
5260 GUI.F2.Size = UDim2.new(0, 20 + ((GUI.AbsoluteSize.x - GUI.AbsoluteSize.y) / 2), 1, 20)
5261 GUI.F2.Position = UDim2.new(1, -10 - ((GUI.AbsoluteSize.x - GUI.AbsoluteSize.y) / 2), 0, -10)
5262end
5263
5264wait()
5265
5266GUI.Changed:connect(updateScopeDimension)
5267
5268updateScopeDimension()
5269end))
5270TextLabel78.Name = "Co"
5271TextLabel78.Parent = ScreenGui51
5272TextLabel78.Transparency = 1
5273TextLabel78.Size = UDim2.new(1, 0, 0, 20)
5274TextLabel78.BackgroundColor = BrickColor.new("Institutional white")
5275TextLabel78.BackgroundColor3 = Color3.new(1, 1, 1)
5276TextLabel78.BackgroundTransparency = 1
5277TextLabel78.ZIndex = 10
5278TextLabel78.Font = Enum.Font.SourceSansItalic
5279TextLabel78.FontSize = Enum.FontSize.Size18
5280TextLabel78.Text = "tEhYuM yB ekameR & noisuFobruT yB tiK"
5281TextLabel78.TextColor = BrickColor.new("Institutional white")
5282TextLabel78.TextColor3 = Color3.new(1, 1, 1)
5283TextLabel78.TextSize = 18
5284TextLabel78.TextStrokeColor3 = Color3.new(1, 1, 1)
5285TextLabel78.TextStrokeTransparency = 0.89999997615814
5286TextLabel78.TextTransparency = 0.89999997615814
5287ImageLabel79.Name = "HUD"
5288ImageLabel79.Parent = ScreenGui51
5289ImageLabel79.Position = UDim2.new(1, -210, 1, -125)
5290ImageLabel79.Transparency = 1
5291ImageLabel79.Size = UDim2.new(0, 100, 0, 100)
5292ImageLabel79.BackgroundColor = BrickColor.new("Institutional white")
5293ImageLabel79.BackgroundColor3 = Color3.new(1, 1, 1)
5294ImageLabel79.BackgroundTransparency = 1
5295ImageLabel79.Image = "rbxassetid://500188818"
5296ImageLabel79.ImageColor3 = Color3.new(0.156863, 0.156863, 0.156863)
5297ImageLabel79.ImageTransparency = 0.30000001192093
5298Frame80.Parent = ImageLabel79
5299Frame80.Position = UDim2.new(0, 100, 0, 0)
5300Frame80.Transparency = 0.30000001192093
5301Frame80.Size = UDim2.new(0, 110, 0, 100)
5302Frame80.Active = true
5303Frame80.BackgroundColor = BrickColor.new("Black")
5304Frame80.BackgroundColor3 = Color3.new(0.14902, 0.14902, 0.14902)
5305Frame80.BackgroundTransparency = 0.30000001192093
5306Frame80.BorderSizePixel = 0
5307Frame81.Name = "Controls"
5308Frame81.Parent = ImageLabel79
5309Frame81.Position = UDim2.new(0, 0, 0, -200)
5310Frame81.Visible = false
5311Frame81.Transparency = 0.30000001192093
5312Frame81.Size = UDim2.new(1, 0, 0, 120)
5313Frame81.BackgroundColor = BrickColor.new("Black")
5314Frame81.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
5315Frame81.BackgroundTransparency = 0.30000001192093
5316Frame81.BorderColor3 = Color3.new(0.156863, 0.156863, 0.156863)
5317Frame81.BorderSizePixel = 5
5318Frame81.ZIndex = 10
5319TextLabel82.Name = "Title"
5320TextLabel82.Parent = Frame81
5321TextLabel82.Transparency = 1
5322TextLabel82.Size = UDim2.new(1, 0, 0, 15)
5323TextLabel82.BackgroundColor = BrickColor.new("Institutional white")
5324TextLabel82.BackgroundColor3 = Color3.new(1, 1, 1)
5325TextLabel82.BackgroundTransparency = 1
5326TextLabel82.ZIndex = 10
5327TextLabel82.Font = Enum.Font.SourceSansBold
5328TextLabel82.FontSize = Enum.FontSize.Size14
5329TextLabel82.Text = "CONTROLS"
5330TextLabel82.TextColor = BrickColor.new("Institutional white")
5331TextLabel82.TextColor3 = Color3.new(1, 1, 1)
5332TextLabel82.TextSize = 14
5333TextLabel83.Name = "Line"
5334TextLabel83.Parent = TextLabel82
5335TextLabel83.Position = UDim2.new(0, 0, 1, 1)
5336TextLabel83.Size = UDim2.new(1, 0, 0, 2)
5337TextLabel83.BackgroundColor = BrickColor.new("New Yeller")
5338TextLabel83.BackgroundColor3 = Color3.new(1, 1, 0)
5339TextLabel83.BorderSizePixel = 0
5340TextLabel83.ZIndex = 10
5341TextLabel83.Font = Enum.Font.SourceSans
5342TextLabel83.FontSize = Enum.FontSize.Size14
5343TextLabel83.Text = ""
5344TextLabel83.TextSize = 14
5345Frame84.Name = "Grenades"
5346Frame84.Parent = ImageLabel79
5347Frame84.Position = UDim2.new(0, 0, 0, 90)
5348Frame84.Visible = false
5349Frame84.Transparency = 1
5350Frame84.Size = UDim2.new(0, 175, 0, 25)
5351Frame84.BackgroundTransparency = 1
5352Frame84.ZIndex = 10
5353Frame85.Name = "Lethals"
5354Frame85.Parent = Frame84
5355Frame85.Size = UDim2.new(0.5, -2, 1, 0)
5356Frame85.BackgroundColor = BrickColor.new("Institutional white")
5357Frame85.BackgroundColor3 = Color3.new(1, 1, 1)
5358Frame85.BorderSizePixel = 0
5359Frame85.ZIndex = 10
5360ImageLabel86.Name = "Icon"
5361ImageLabel86.Parent = Frame85
5362ImageLabel86.Position = UDim2.new(0, 7, 0, 2)
5363ImageLabel86.Transparency = 1
5364ImageLabel86.Size = UDim2.new(0, 21, 0, 21)
5365ImageLabel86.BackgroundColor = BrickColor.new("Institutional white")
5366ImageLabel86.BackgroundColor3 = Color3.new(1, 1, 1)
5367ImageLabel86.BackgroundTransparency = 1
5368ImageLabel86.ZIndex = 10
5369TextLabel87.Name = "Mult"
5370TextLabel87.Parent = Frame85
5371TextLabel87.Position = UDim2.new(0.5, -10, 0, 0)
5372TextLabel87.Transparency = 1
5373TextLabel87.Size = UDim2.new(0, 20, 1, 0)
5374TextLabel87.BackgroundColor = BrickColor.new("Institutional white")
5375TextLabel87.BackgroundColor3 = Color3.new(1, 1, 1)
5376TextLabel87.BackgroundTransparency = 1
5377TextLabel87.BorderSizePixel = 0
5378TextLabel87.ZIndex = 10
5379TextLabel87.Font = Enum.Font.ArialBold
5380TextLabel87.FontSize = Enum.FontSize.Size18
5381TextLabel87.Text = "X"
5382TextLabel87.TextColor = BrickColor.new("Really black")
5383TextLabel87.TextColor3 = Color3.new(0, 0, 0)
5384TextLabel87.TextSize = 18
5385TextLabel88.Name = "Num"
5386TextLabel88.Parent = Frame85
5387TextLabel88.Position = UDim2.new(1, -7, 0, 0)
5388TextLabel88.Transparency = 1
5389TextLabel88.Size = UDim2.new(0, 0, 1, 0)
5390TextLabel88.BackgroundColor = BrickColor.new("Institutional white")
5391TextLabel88.BackgroundColor3 = Color3.new(1, 1, 1)
5392TextLabel88.BackgroundTransparency = 1
5393TextLabel88.ZIndex = 10
5394TextLabel88.Font = Enum.Font.ArialBold
5395TextLabel88.FontSize = Enum.FontSize.Size18
5396TextLabel88.Text = "0"
5397TextLabel88.TextColor = BrickColor.new("Really black")
5398TextLabel88.TextColor3 = Color3.new(0, 0, 0)
5399TextLabel88.TextSize = 18
5400TextLabel88.TextXAlignment = Enum.TextXAlignment.Right
5401Frame89.Name = "Tacticals"
5402Frame89.Parent = Frame84
5403Frame89.Position = UDim2.new(0.5, 2, 0, 0)
5404Frame89.Size = UDim2.new(0.5, -2, 1, 0)
5405Frame89.BackgroundColor = BrickColor.new("Institutional white")
5406Frame89.BackgroundColor3 = Color3.new(1, 1, 1)
5407Frame89.BorderSizePixel = 0
5408Frame89.ZIndex = 10
5409ImageLabel90.Name = "Icon"
5410ImageLabel90.Parent = Frame89
5411ImageLabel90.Position = UDim2.new(0, 7, 0, 2)
5412ImageLabel90.Transparency = 1
5413ImageLabel90.Size = UDim2.new(0, 21, 0, 21)
5414ImageLabel90.BackgroundColor = BrickColor.new("Institutional white")
5415ImageLabel90.BackgroundColor3 = Color3.new(1, 1, 1)
5416ImageLabel90.BackgroundTransparency = 1
5417ImageLabel90.ZIndex = 10
5418TextLabel91.Name = "Num"
5419TextLabel91.Parent = Frame89
5420TextLabel91.Position = UDim2.new(1, -7, 0, 0)
5421TextLabel91.Transparency = 1
5422TextLabel91.Size = UDim2.new(0, 0, 1, 0)
5423TextLabel91.BackgroundColor = BrickColor.new("Institutional white")
5424TextLabel91.BackgroundColor3 = Color3.new(1, 1, 1)
5425TextLabel91.BackgroundTransparency = 1
5426TextLabel91.ZIndex = 10
5427TextLabel91.Font = Enum.Font.ArialBold
5428TextLabel91.FontSize = Enum.FontSize.Size18
5429TextLabel91.Text = "0"
5430TextLabel91.TextColor = BrickColor.new("Really black")
5431TextLabel91.TextColor3 = Color3.new(0, 0, 0)
5432TextLabel91.TextSize = 18
5433TextLabel91.TextXAlignment = Enum.TextXAlignment.Right
5434TextLabel92.Name = "Mult"
5435TextLabel92.Parent = Frame89
5436TextLabel92.Position = UDim2.new(0.5, -10, 0, 0)
5437TextLabel92.Transparency = 1
5438TextLabel92.Size = UDim2.new(0, 20, 1, 0)
5439TextLabel92.BackgroundColor = BrickColor.new("Institutional white")
5440TextLabel92.BackgroundColor3 = Color3.new(1, 1, 1)
5441TextLabel92.BackgroundTransparency = 1
5442TextLabel92.BorderSizePixel = 0
5443TextLabel92.ZIndex = 10
5444TextLabel92.Font = Enum.Font.ArialBold
5445TextLabel92.FontSize = Enum.FontSize.Size18
5446TextLabel92.Text = "X"
5447TextLabel92.TextColor = BrickColor.new("Really black")
5448TextLabel92.TextColor3 = Color3.new(0, 0, 0)
5449TextLabel92.TextSize = 18
5450Frame93.Name = "Health"
5451Frame93.Parent = ImageLabel79
5452Frame93.Position = UDim2.new(0, 25, 0, 20)
5453Frame93.Transparency = 1
5454Frame93.Size = UDim2.new(0.400000006, 0, 0, 25)
5455Frame93.BackgroundColor = BrickColor.new("Dirt brown")
5456Frame93.BackgroundColor3 = Color3.new(0.247059, 0.247059, 0.247059)
5457Frame93.BackgroundTransparency = 1
5458Frame93.BorderColor3 = Color3.new(0.156863, 0.156863, 0.156863)
5459Frame93.BorderSizePixel = 0
5460Frame93.Draggable = true
5461Frame93.ZIndex = 10
5462TextLabel94.Name = "Num"
5463TextLabel94.Parent = Frame93
5464TextLabel94.Position = UDim2.new(1, -50, 0, 0)
5465TextLabel94.Transparency = 1
5466TextLabel94.Size = UDim2.new(0, 50, 1, 0)
5467TextLabel94.BackgroundColor = BrickColor.new("Really black")
5468TextLabel94.BackgroundColor3 = Color3.new(0, 0, 0)
5469TextLabel94.BackgroundTransparency = 1
5470TextLabel94.BorderColor = BrickColor.new("Really black")
5471TextLabel94.BorderColor3 = Color3.new(0, 0, 0)
5472TextLabel94.BorderSizePixel = 0
5473TextLabel94.ZIndex = 10
5474TextLabel94.Font = Enum.Font.SourceSansBold
5475TextLabel94.FontSize = Enum.FontSize.Size24
5476TextLabel94.Text = "100%"
5477TextLabel94.TextColor = BrickColor.new("Institutional white")
5478TextLabel94.TextColor3 = Color3.new(1, 1, 1)
5479TextLabel94.TextSize = 24
5480TextLabel94.TextStrokeColor3 = Color3.new(0.745098, 0.745098, 0.745098)
5481TextLabel94.TextXAlignment = Enum.TextXAlignment.Right
5482Frame95.Name = "Tray"
5483Frame95.Parent = Frame93
5484Frame95.Position = UDim2.new(0, 2, 0.5, -10)
5485Frame95.Visible = false
5486Frame95.Transparency = 1
5487Frame95.Size = UDim2.new(1, -60, 0, 20)
5488Frame95.BackgroundColor = BrickColor.new("Really black")
5489Frame95.BackgroundColor3 = Color3.new(0, 0, 0)
5490Frame95.BackgroundTransparency = 1
5491Frame95.BorderColor = BrickColor.new("Really black")
5492Frame95.BorderColor3 = Color3.new(0, 0, 0)
5493Frame95.BorderSizePixel = 0
5494Frame95.ClipsDescendants = true
5495Frame95.ZIndex = 10
5496Frame96.Name = "Beat"
5497Frame96.Parent = Frame95
5498Frame96.Position = UDim2.new(1, 0, 0, 0)
5499Frame96.Transparency = 1
5500Frame96.Size = UDim2.new(0, 21, 1, 0)
5501Frame96.BackgroundColor = BrickColor.new("Really black")
5502Frame96.BackgroundColor3 = Color3.new(0, 0, 0)
5503Frame96.BackgroundTransparency = 1
5504Frame96.BorderColor = BrickColor.new("Really black")
5505Frame96.BorderColor3 = Color3.new(0, 0, 0)
5506Frame96.BorderSizePixel = 0
5507Frame96.ZIndex = 10
5508Frame97.Name = "00"
5509Frame97.Parent = Frame96
5510Frame97.Position = UDim2.new(0, 0, 0.5, -2)
5511Frame97.Size = UDim2.new(0.0476190485, 0, 0, 3)
5512Frame97.BackgroundColor = BrickColor.new("Institutional white")
5513Frame97.BackgroundColor3 = Color3.new(1, 1, 1)
5514Frame97.BorderColor = BrickColor.new("Really black")
5515Frame97.BorderColor3 = Color3.new(0, 0, 0)
5516Frame97.BorderSizePixel = 0
5517Frame97.ZIndex = 10
5518Frame98.Name = "01"
5519Frame98.Parent = Frame96
5520Frame98.Position = UDim2.new(0.0476190485, 0, 0.423076928, -2)
5521Frame98.Size = UDim2.new(0.0476190485, 0, 0, 4)
5522Frame98.BackgroundColor = BrickColor.new("Institutional white")
5523Frame98.BackgroundColor3 = Color3.new(1, 1, 1)
5524Frame98.BorderColor = BrickColor.new("Really black")
5525Frame98.BorderColor3 = Color3.new(0, 0, 0)
5526Frame98.BorderSizePixel = 0
5527Frame98.ZIndex = 10
5528Frame99.Name = "02"
5529Frame99.Parent = Frame96
5530Frame99.Position = UDim2.new(0.095238097, 0, 0.346153855, -2)
5531Frame99.Size = UDim2.new(0.0476190485, 0, 0, 4)
5532Frame99.BackgroundColor = BrickColor.new("Institutional white")
5533Frame99.BackgroundColor3 = Color3.new(1, 1, 1)
5534Frame99.BorderColor = BrickColor.new("Really black")
5535Frame99.BorderColor3 = Color3.new(0, 0, 0)
5536Frame99.BorderSizePixel = 0
5537Frame99.ZIndex = 10
5538Frame100.Name = "03"
5539Frame100.Parent = Frame96
5540Frame100.Position = UDim2.new(0.142857149, 0, 0.269230783, -2)
5541Frame100.Size = UDim2.new(0.0476190485, 0, 0, 4)
5542Frame100.BackgroundColor = BrickColor.new("Institutional white")
5543Frame100.BackgroundColor3 = Color3.new(1, 1, 1)
5544Frame100.BorderColor = BrickColor.new("Really black")
5545Frame100.BorderColor3 = Color3.new(0, 0, 0)
5546Frame100.BorderSizePixel = 0
5547Frame100.ZIndex = 10
5548Frame101.Name = "04"
5549Frame101.Parent = Frame96
5550Frame101.Position = UDim2.new(0.190476194, 0, 0.192307696, -2)
5551Frame101.Size = UDim2.new(0.0476190485, 0, 0, 4)
5552Frame101.BackgroundColor = BrickColor.new("Institutional white")
5553Frame101.BackgroundColor3 = Color3.new(1, 1, 1)
5554Frame101.BorderColor = BrickColor.new("Really black")
5555Frame101.BorderColor3 = Color3.new(0, 0, 0)
5556Frame101.BorderSizePixel = 0
5557Frame101.ZIndex = 10
5558Frame102.Name = "05"
5559Frame102.Parent = Frame96
5560Frame102.Position = UDim2.new(0.238095239, 0, 0.115384616, -2)
5561Frame102.Size = UDim2.new(0.0476190485, 0, 0, 4)
5562Frame102.BackgroundColor = BrickColor.new("Institutional white")
5563Frame102.BackgroundColor3 = Color3.new(1, 1, 1)
5564Frame102.BorderColor = BrickColor.new("Really black")
5565Frame102.BorderColor3 = Color3.new(0, 0, 0)
5566Frame102.BorderSizePixel = 0
5567Frame102.ZIndex = 10
5568Frame103.Name = "06"
5569Frame103.Parent = Frame96
5570Frame103.Position = UDim2.new(0.285714298, 0, 0.0384615399, -2)
5571Frame103.Size = UDim2.new(0.0476190485, 0, 0, 4)
5572Frame103.BackgroundColor = BrickColor.new("Institutional white")
5573Frame103.BackgroundColor3 = Color3.new(1, 1, 1)
5574Frame103.BorderColor = BrickColor.new("Really black")
5575Frame103.BorderColor3 = Color3.new(0, 0, 0)
5576Frame103.BorderSizePixel = 0
5577Frame103.ZIndex = 10
5578Frame104.Name = "07"
5579Frame104.Parent = Frame96
5580Frame104.Position = UDim2.new(0.333333343, 0, 0, -2)
5581Frame104.Size = UDim2.new(0.0476190485, 0, 0, 4)
5582Frame104.BackgroundColor = BrickColor.new("Institutional white")
5583Frame104.BackgroundColor3 = Color3.new(1, 1, 1)
5584Frame104.BorderColor = BrickColor.new("Really black")
5585Frame104.BorderColor3 = Color3.new(0, 0, 0)
5586Frame104.BorderSizePixel = 0
5587Frame104.ZIndex = 10
5588Frame105.Name = "08"
5589Frame105.Parent = Frame96
5590Frame105.Position = UDim2.new(0.380952388, 0, 0.142857149, -2)
5591Frame105.Size = UDim2.new(0.0476190485, 0, 0, 4)
5592Frame105.BackgroundColor = BrickColor.new("Institutional white")
5593Frame105.BackgroundColor3 = Color3.new(1, 1, 1)
5594Frame105.BorderColor = BrickColor.new("Really black")
5595Frame105.BorderColor3 = Color3.new(0, 0, 0)
5596Frame105.BorderSizePixel = 0
5597Frame105.ZIndex = 10
5598Frame106.Name = "09"
5599Frame106.Parent = Frame96
5600Frame106.Position = UDim2.new(0.428571433, 0, 0.285714298, -2)
5601Frame106.Size = UDim2.new(0.0476190485, 0, 0, 4)
5602Frame106.BackgroundColor = BrickColor.new("Institutional white")
5603Frame106.BackgroundColor3 = Color3.new(1, 1, 1)
5604Frame106.BorderColor = BrickColor.new("Really black")
5605Frame106.BorderColor3 = Color3.new(0, 0, 0)
5606Frame106.BorderSizePixel = 0
5607Frame106.ZIndex = 10
5608Frame107.Name = "10"
5609Frame107.Parent = Frame96
5610Frame107.Position = UDim2.new(0.476190478, 0, 0.428571433, -2)
5611Frame107.Size = UDim2.new(0.0476190485, 0, 0, 4)
5612Frame107.BackgroundColor = BrickColor.new("Institutional white")
5613Frame107.BackgroundColor3 = Color3.new(1, 1, 1)
5614Frame107.BorderColor = BrickColor.new("Really black")
5615Frame107.BorderColor3 = Color3.new(0, 0, 0)
5616Frame107.BorderSizePixel = 0
5617Frame107.ZIndex = 10
5618Frame108.Name = "11"
5619Frame108.Parent = Frame96
5620Frame108.Position = UDim2.new(0.523809552, 0, 0.571428597, -2)
5621Frame108.Size = UDim2.new(0.0476190485, 0, 0, 4)
5622Frame108.BackgroundColor = BrickColor.new("Institutional white")
5623Frame108.BackgroundColor3 = Color3.new(1, 1, 1)
5624Frame108.BorderColor = BrickColor.new("Really black")
5625Frame108.BorderColor3 = Color3.new(0, 0, 0)
5626Frame108.BorderSizePixel = 0
5627Frame108.ZIndex = 10
5628Frame109.Name = "12"
5629Frame109.Parent = Frame96
5630Frame109.Position = UDim2.new(0.571428597, 0, 0.714285731, -2)
5631Frame109.Size = UDim2.new(0.0476190485, 0, 0, 4)
5632Frame109.BackgroundColor = BrickColor.new("Institutional white")
5633Frame109.BackgroundColor3 = Color3.new(1, 1, 1)
5634Frame109.BorderColor = BrickColor.new("Really black")
5635Frame109.BorderColor3 = Color3.new(0, 0, 0)
5636Frame109.BorderSizePixel = 0
5637Frame109.ZIndex = 10
5638Frame110.Name = "13"
5639Frame110.Parent = Frame96
5640Frame110.Position = UDim2.new(0.619047642, 0, 0.857142866, -2)
5641Frame110.Size = UDim2.new(0.0476190485, 0, 0, 4)
5642Frame110.BackgroundColor = BrickColor.new("Institutional white")
5643Frame110.BackgroundColor3 = Color3.new(1, 1, 1)
5644Frame110.BorderColor = BrickColor.new("Really black")
5645Frame110.BorderColor3 = Color3.new(0, 0, 0)
5646Frame110.BorderSizePixel = 0
5647Frame110.ZIndex = 10
5648Frame111.Name = "14"
5649Frame111.Parent = Frame96
5650Frame111.Position = UDim2.new(0.666666687, 0, 0.916666687, -2)
5651Frame111.Size = UDim2.new(0.0476190485, 0, 0, 4)
5652Frame111.BackgroundColor = BrickColor.new("Institutional white")
5653Frame111.BackgroundColor3 = Color3.new(1, 1, 1)
5654Frame111.BorderColor = BrickColor.new("Really black")
5655Frame111.BorderColor3 = Color3.new(0, 0, 0)
5656Frame111.BorderSizePixel = 0
5657Frame111.ZIndex = 10
5658Frame112.Name = "15"
5659Frame112.Parent = Frame96
5660Frame112.Position = UDim2.new(0.714285731, 0, 0.833333313, -2)
5661Frame112.Size = UDim2.new(0.0476190485, 0, 0, 4)
5662Frame112.BackgroundColor = BrickColor.new("Institutional white")
5663Frame112.BackgroundColor3 = Color3.new(1, 1, 1)
5664Frame112.BorderColor = BrickColor.new("Really black")
5665Frame112.BorderColor3 = Color3.new(0, 0, 0)
5666Frame112.BorderSizePixel = 0
5667Frame112.ZIndex = 10
5668Frame113.Name = "16"
5669Frame113.Parent = Frame96
5670Frame113.Position = UDim2.new(0.761904776, 0, 0.75, -2)
5671Frame113.Size = UDim2.new(0.0476190485, 0, 0, 4)
5672Frame113.BackgroundColor = BrickColor.new("Institutional white")
5673Frame113.BackgroundColor3 = Color3.new(1, 1, 1)
5674Frame113.BorderColor = BrickColor.new("Really black")
5675Frame113.BorderColor3 = Color3.new(0, 0, 0)
5676Frame113.BorderSizePixel = 0
5677Frame113.ZIndex = 10
5678Frame114.Name = "17"
5679Frame114.Parent = Frame96
5680Frame114.Position = UDim2.new(0.809523821, 0, 0.666666687, -2)
5681Frame114.Size = UDim2.new(0.0476190485, 0, 0, 4)
5682Frame114.BackgroundColor = BrickColor.new("Institutional white")
5683Frame114.BackgroundColor3 = Color3.new(1, 1, 1)
5684Frame114.BorderColor = BrickColor.new("Really black")
5685Frame114.BorderColor3 = Color3.new(0, 0, 0)
5686Frame114.BorderSizePixel = 0
5687Frame114.ZIndex = 10
5688Frame115.Name = "18"
5689Frame115.Parent = Frame96
5690Frame115.Position = UDim2.new(0.857142866, 0, 0.583333313, -2)
5691Frame115.Size = UDim2.new(0.0476190485, 0, 0, 4)
5692Frame115.BackgroundColor = BrickColor.new("Institutional white")
5693Frame115.BackgroundColor3 = Color3.new(1, 1, 1)
5694Frame115.BorderColor = BrickColor.new("Really black")
5695Frame115.BorderColor3 = Color3.new(0, 0, 0)
5696Frame115.BorderSizePixel = 0
5697Frame115.ZIndex = 10
5698Frame116.Name = "19"
5699Frame116.Parent = Frame96
5700Frame116.Position = UDim2.new(0.90476191, 0, 0.5, -2)
5701Frame116.Size = UDim2.new(0.0476190485, 0, 0, 4)
5702Frame116.BackgroundColor = BrickColor.new("Institutional white")
5703Frame116.BackgroundColor3 = Color3.new(1, 1, 1)
5704Frame116.BorderColor = BrickColor.new("Really black")
5705Frame116.BorderColor3 = Color3.new(0, 0, 0)
5706Frame116.BorderSizePixel = 0
5707Frame116.ZIndex = 10
5708Frame117.Name = "20"
5709Frame117.Parent = Frame96
5710Frame117.Position = UDim2.new(0.952000022, 0, 0.49000001, -2)
5711Frame117.Size = UDim2.new(0.0476190485, 0, 0, 4)
5712Frame117.BackgroundColor = BrickColor.new("Institutional white")
5713Frame117.BackgroundColor3 = Color3.new(1, 1, 1)
5714Frame117.BorderColor = BrickColor.new("Really black")
5715Frame117.BorderColor3 = Color3.new(0, 0, 0)
5716Frame117.BorderSizePixel = 0
5717Frame117.ZIndex = 10
5718Frame118.Name = "Line"
5719Frame118.Parent = Frame96
5720Frame118.Position = UDim2.new(1, 0, 0.5, -2)
5721Frame118.Size = UDim2.new(0, 200, 0, 3)
5722Frame118.BackgroundColor = BrickColor.new("Institutional white")
5723Frame118.BackgroundColor3 = Color3.new(1, 1, 1)
5724Frame118.BorderColor = BrickColor.new("Really black")
5725Frame118.BorderColor3 = Color3.new(0, 0, 0)
5726Frame118.BorderSizePixel = 0
5727Frame118.ZIndex = 10
5728Frame119.Name = "Line"
5729Frame119.Parent = Frame96
5730Frame119.Position = UDim2.new(0, -200, 0.5, -2)
5731Frame119.Size = UDim2.new(0, 200, 0, 3)
5732Frame119.BackgroundColor = BrickColor.new("Institutional white")
5733Frame119.BackgroundColor3 = Color3.new(1, 1, 1)
5734Frame119.BorderColor = BrickColor.new("Really black")
5735Frame119.BorderColor3 = Color3.new(0, 0, 0)
5736Frame119.BorderSizePixel = 0
5737Frame119.ZIndex = 10
5738Frame120.Name = "Mode"
5739Frame120.Parent = ImageLabel79
5740Frame120.Position = UDim2.new(1, 22, 1, -60)
5741Frame120.Transparency = 1
5742Frame120.Size = UDim2.new(0, 85, 0, 20)
5743Frame120.BackgroundColor = BrickColor.new("Institutional white")
5744Frame120.BackgroundColor3 = Color3.new(1, 1, 1)
5745Frame120.BackgroundTransparency = 1
5746Frame120.ZIndex = 10
5747TextLabel121.Name = "Bracket"
5748TextLabel121.Parent = Frame120
5749TextLabel121.Transparency = 1
5750TextLabel121.Size = UDim2.new(0, 5, 0, 20)
5751TextLabel121.BackgroundTransparency = 1
5752TextLabel121.ZIndex = 10
5753TextLabel121.Font = Enum.Font.ArialBold
5754TextLabel121.FontSize = Enum.FontSize.Size18
5755TextLabel121.Text = "["
5756TextLabel121.TextColor = BrickColor.new("Institutional white")
5757TextLabel121.TextColor3 = Color3.new(1, 1, 1)
5758TextLabel121.TextSize = 18
5759TextLabel121.TextXAlignment = Enum.TextXAlignment.Left
5760TextLabel122.Name = "Bracket"
5761TextLabel122.Parent = Frame120
5762TextLabel122.Position = UDim2.new(1, -5, 0, 0)
5763TextLabel122.Transparency = 1
5764TextLabel122.Size = UDim2.new(0, 5, 0, 20)
5765TextLabel122.BackgroundTransparency = 1
5766TextLabel122.ZIndex = 10
5767TextLabel122.Font = Enum.Font.ArialBold
5768TextLabel122.FontSize = Enum.FontSize.Size18
5769TextLabel122.Text = "]"
5770TextLabel122.TextColor = BrickColor.new("Institutional white")
5771TextLabel122.TextColor3 = Color3.new(1, 1, 1)
5772TextLabel122.TextSize = 18
5773TextLabel122.TextXAlignment = Enum.TextXAlignment.Left
5774TextLabel123.Name = "Main"
5775TextLabel123.Parent = Frame120
5776TextLabel123.Transparency = 1
5777TextLabel123.Size = UDim2.new(1, 0, 0, 20)
5778TextLabel123.BackgroundTransparency = 1
5779TextLabel123.ZIndex = 10
5780TextLabel123.Font = Enum.Font.SourceSansItalic
5781TextLabel123.FontSize = Enum.FontSize.Size18
5782TextLabel123.Text = "Auto"
5783TextLabel123.TextColor = BrickColor.new("Institutional white")
5784TextLabel123.TextColor3 = Color3.new(1, 1, 1)
5785TextLabel123.TextSize = 18
5786TextLabel123.TextWrap = true
5787TextLabel123.TextWrapped = true
5788Frame124.Name = "gunName"
5789Frame124.Parent = ImageLabel79
5790Frame124.Transparency = 1
5791Frame124.Size = UDim2.new(1, 0, 0, 36)
5792Frame124.BackgroundColor = BrickColor.new("Dark grey metallic")
5793Frame124.BackgroundColor3 = Color3.new(0.352941, 0.352941, 0.352941)
5794Frame124.BackgroundTransparency = 1
5795Frame124.ZIndex = 10
5796TextLabel125.Name = "Title"
5797TextLabel125.Parent = Frame124
5798TextLabel125.Position = UDim2.new(0, 30, 0, -5)
5799TextLabel125.Transparency = 1
5800TextLabel125.Size = UDim2.new(1, 75, 1, 0)
5801TextLabel125.BackgroundColor = BrickColor.new("Institutional white")
5802TextLabel125.BackgroundColor3 = Color3.new(1, 1, 1)
5803TextLabel125.BackgroundTransparency = 1
5804TextLabel125.ZIndex = 10
5805TextLabel125.Font = Enum.Font.SourceSansItalic
5806TextLabel125.FontSize = Enum.FontSize.Size36
5807TextLabel125.Text = "GUN"
5808TextLabel125.TextColor = BrickColor.new("Institutional white")
5809TextLabel125.TextColor3 = Color3.new(1, 1, 1)
5810TextLabel125.TextSize = 36
5811TextLabel125.TextStrokeColor3 = Color3.new(0.745098, 0.745098, 0.745098)
5812TextLabel125.TextStrokeTransparency = 0
5813TextLabel125.TextWrap = true
5814TextLabel125.TextWrapped = true
5815TextLabel125.TextXAlignment = Enum.TextXAlignment.Left
5816TextLabel126.Name = "Version"
5817TextLabel126.Parent = ImageLabel79
5818TextLabel126.Position = UDim2.new(1, 10, 1, 0)
5819TextLabel126.Transparency = 1
5820TextLabel126.Size = UDim2.new(1, 0, 0, 15)
5821TextLabel126.BackgroundColor = BrickColor.new("Institutional white")
5822TextLabel126.BackgroundColor3 = Color3.new(1, 1, 1)
5823TextLabel126.BackgroundTransparency = 1
5824TextLabel126.ZIndex = 10
5825TextLabel126.Font = Enum.Font.ArialBold
5826TextLabel126.FontSize = Enum.FontSize.Size14
5827TextLabel126.Text = "V0.4 - REMAKE"
5828TextLabel126.TextColor = BrickColor.new("Institutional white")
5829TextLabel126.TextColor3 = Color3.new(1, 1, 1)
5830TextLabel126.TextSize = 14
5831TextLabel126.TextStrokeColor3 = Color3.new(0.745098, 0.745098, 0.745098)
5832TextLabel126.TextStrokeTransparency = 0.60000002384186
5833TextLabel126.TextTransparency = 0.60000002384186
5834TextLabel126.TextWrap = true
5835TextLabel126.TextWrapped = true
5836TextLabel126.TextXAlignment = Enum.TextXAlignment.Right
5837Frame127.Name = "Ammo"
5838Frame127.Parent = ImageLabel79
5839Frame127.Position = UDim2.new(0, 72, 0, 60)
5840Frame127.Transparency = 1
5841Frame127.Size = UDim2.new(0, 135, 0, 40)
5842Frame127.BackgroundTransparency = 1
5843Frame127.ZIndex = 10
5844TextLabel128.Name = "Slash"
5845TextLabel128.Parent = Frame127
5846TextLabel128.Position = UDim2.new(0, 92, 0, -12)
5847TextLabel128.Transparency = 1
5848TextLabel128.Size = UDim2.new(0, 0, 0, 45)
5849TextLabel128.BackgroundTransparency = 1
5850TextLabel128.ZIndex = 10
5851TextLabel128.Font = Enum.Font.SourceSansBold
5852TextLabel128.FontSize = Enum.FontSize.Size24
5853TextLabel128.Text = "//"
5854TextLabel128.TextColor = BrickColor.new("Institutional white")
5855TextLabel128.TextColor3 = Color3.new(1, 1, 1)
5856TextLabel128.TextSize = 24
5857TextLabel129.Name = "Stored"
5858TextLabel129.Parent = Frame127
5859TextLabel129.Position = UDim2.new(0, 100, 0, -35)
5860TextLabel129.Transparency = 1
5861TextLabel129.Size = UDim2.new(1, 0, 0, 85)
5862TextLabel129.BackgroundTransparency = 1
5863TextLabel129.ZIndex = 10
5864TextLabel129.Font = Enum.Font.SourceSansBold
5865TextLabel129.FontSize = Enum.FontSize.Size28
5866TextLabel129.Text = "999"
5867TextLabel129.TextColor = BrickColor.new("Institutional white")
5868TextLabel129.TextColor3 = Color3.new(1, 1, 1)
5869TextLabel129.TextSize = 28
5870TextLabel129.TextXAlignment = Enum.TextXAlignment.Left
5871TextLabel130.Name = "Background"
5872TextLabel130.Parent = TextLabel129
5873TextLabel130.Transparency = 1
5874TextLabel130.Size = UDim2.new(1, 0, 1, 0)
5875TextLabel130.BackgroundTransparency = 1
5876TextLabel130.ZIndex = 10
5877TextLabel130.Font = Enum.Font.ArialBold
5878TextLabel130.FontSize = Enum.FontSize.Size24
5879TextLabel130.Text = "000"
5880TextLabel130.TextColor = BrickColor.new("Sand violet metallic")
5881TextLabel130.TextColor3 = Color3.new(0.588235, 0.588235, 0.588235)
5882TextLabel130.TextSize = 24
5883TextLabel130.TextTransparency = 0.80000001192093
5884TextLabel130.TextWrap = true
5885TextLabel130.TextWrapped = true
5886TextLabel130.TextXAlignment = Enum.TextXAlignment.Left
5887TextLabel131.Name = "Clip"
5888TextLabel131.Parent = Frame127
5889TextLabel131.Position = UDim2.new(0, 0, 0, -5)
5890TextLabel131.Transparency = 1
5891TextLabel131.Size = UDim2.new(0, 85, 1, 0)
5892TextLabel131.BackgroundTransparency = 1
5893TextLabel131.ZIndex = 10
5894TextLabel131.Font = Enum.Font.SourceSansBold
5895TextLabel131.FontSize = Enum.FontSize.Size60
5896TextLabel131.Text = "999"
5897TextLabel131.TextColor = BrickColor.new("Institutional white")
5898TextLabel131.TextColor3 = Color3.new(1, 1, 1)
5899TextLabel131.TextSize = 60
5900TextLabel131.TextXAlignment = Enum.TextXAlignment.Right
5901TextLabel132.Name = "Background"
5902TextLabel132.Parent = TextLabel131
5903TextLabel132.Transparency = 1
5904TextLabel132.Size = UDim2.new(1, 0, 1, 0)
5905TextLabel132.BackgroundTransparency = 1
5906TextLabel132.ZIndex = 10
5907TextLabel132.Font = Enum.Font.SourceSansBold
5908TextLabel132.FontSize = Enum.FontSize.Size60
5909TextLabel132.Text = "000"
5910TextLabel132.TextColor = BrickColor.new("Sand violet metallic")
5911TextLabel132.TextColor3 = Color3.new(0.588235, 0.588235, 0.588235)
5912TextLabel132.TextSize = 60
5913TextLabel132.TextTransparency = 0.80000001192093
5914TextLabel132.TextXAlignment = Enum.TextXAlignment.Right
5915ImageLabel133.Name = "Bear"
5916ImageLabel133.Parent = ImageLabel79
5917ImageLabel133.Position = UDim2.new(0, 100, 0, 5)
5918ImageLabel133.Rotation = -10
5919ImageLabel133.Visible = false
5920ImageLabel133.Transparency = 1
5921ImageLabel133.Size = UDim2.new(0, 80, 0, 50)
5922ImageLabel133.BackgroundColor = BrickColor.new("Institutional white")
5923ImageLabel133.BackgroundColor3 = Color3.new(1, 1, 1)
5924ImageLabel133.BackgroundTransparency = 1
5925ImageLabel133.Image = "rbxassetid://500200470"
5926ImageLabel133.ImageTransparency = 0.69999998807907
5927TextLabel134.Parent = ImageLabel133
5928TextLabel134.Rotation = 10
5929TextLabel134.Transparency = 1
5930TextLabel134.Size = UDim2.new(1, 0, 1, 0)
5931TextLabel134.BackgroundColor = BrickColor.new("Institutional white")
5932TextLabel134.BackgroundColor3 = Color3.new(1, 1, 1)
5933TextLabel134.BackgroundTransparency = 1
5934TextLabel134.Font = Enum.Font.SourceSansItalic
5935TextLabel134.FontSize = Enum.FontSize.Size24
5936TextLabel134.Text = "~BoG~"
5937TextLabel134.TextColor = BrickColor.new("Institutional white")
5938TextLabel134.TextColor3 = Color3.new(1, 1, 1)
5939TextLabel134.TextSize = 24
5940TextLabel134.TextStrokeColor3 = Color3.new(0.745098, 0.745098, 0.745098)
5941TextLabel134.TextStrokeTransparency = 0.89999997615814
5942TextLabel134.TextTransparency = 0.89999997615814
5943TextLabel134.TextWrap = true
5944TextLabel134.TextWrapped = true
5945ModuleScript135.Name = "ANIMATIONS"
5946ModuleScript135.Parent = Tool0
5947table.insert(cors,sandbox(ModuleScript135,function()
5948local Animations = {
5949
5950 Reload = function(S)
5951 local W1 = nil
5952 local W2 = nil
5953 local animSpeed = S.isMagEmpty() and S.reloadTimeEmpty / 1.3 or S.reloadTimeLoaded / 0.9
5954 return {
5955 function()
5956 if (not S.isNewMag()) then
5957 if S.isMagVisible() then
5958 local Mag1, magTable1 = S.createMag("Mag1")
5959
5960 Mag1.Parent = S.gunIgnore
5961
5962 W1 = Instance.new("Weld")
5963 W1.Part0 = magTable1[1].magClone
5964 W1.Part1 = S.Handle
5965 W1.C0 = magTable1[1].Original.CFrame:toObjectSpace(S.Handle.CFrame)
5966 W1.Parent = magTable1[1].magClone
5967
5968 S.tweenJoint(S.LWeld, nil, S.CF(-1, 1.4, -1) * S.CFANG(S.RAD(-15), 0, S.RAD(-25)), S.Sine, 0.2 * animSpeed)
5969 S.tweenJoint(S.RWeld, nil, S.CF(.1, 1, -0.31) * S.CFANG(S.RAD(-12), 0, S.RAD(25)), S.Sine, 0.2 * animSpeed)
5970 S.tweenJoint(S.Grip, nil, S.CFANG(0, S.RAD(20), S.RAD(10)), S.Sine, 0.1 * animSpeed)
5971 wait(0.2 * animSpeed)
5972 end
5973 end
5974 end;
5975
5976 function()
5977 if (not S.isNewMag()) then
5978 if S.isMagVisible() then
5979 S.makeMagInvisible()
5980 W1:Destroy()
5981 local Mag1, magTable1 = S.getMag("Mag1")
5982 magTable1[1].magClone.Velocity = S.Handle.Velocity + S.Handle.CFrame:vectorToWorldSpace(S.V3(0, -1, 0)) * 20
5983
5984 S.tweenJoint(S.RWeld, nil, S.CF(0.3, 0.2, -0.5) * S.CFANG(S.RAD(-20), S.RAD(10), S.RAD(25)), S.Sine, 0.25 * animSpeed)
5985 S.tweenJoint(S.Grip, nil, S.CFANG(0, S.RAD(20), S.RAD(10)), S.Sine, 0.2 * animSpeed)
5986 else
5987 S.tweenJoint(S.RWeld, nil, S.CF(.1, 1.2, -0.31) * S.CFANG(S.RAD(-12), S.RAD(20), S.RAD(25)), S.Sine, 0.2 * animSpeed)
5988 S.tweenJoint(S.Grip, nil, S.CFANG(S.RAD(-10), S.RAD(20), S.RAD(10)), S.Sine, 0.2 * animSpeed)
5989 end
5990
5991 S.tweenJoint(S.LWeld, nil, S.CF(0, 0.5, 0) * S.CFANG(S.RAD(95), 0, S.RAD(-25)), S.Sine, 0.2 * animSpeed)
5992
5993 wait(0.25 * animSpeed)
5994 end
5995 end;
5996
5997 function()
5998 if (not S.isNewMag()) then
5999 local Mag1, magTable1 = S.getMag("Mag1")
6000 if Mag1 then Mag1:Destroy() end
6001
6002 local Mag2, magTable2 = S.createMag("Mag2")
6003
6004 Mag2.Parent = S.gunIgnore
6005
6006 local LArmCF = S.LWeld.Part0.CFrame * S.LWeld.C0 * (S.CF(0.58, 1.63, -1.4) * S.CFANG(S.RAD(-22), S.RAD(20), S.RAD(-60))):inverse()
6007 local RArmCF = S.RWeld.Part0.CFrame * S.RWeld.C0 * (S.CF(-.1, 1.2, -0.31) * S.CFANG(S.RAD(-0), S.RAD(20), S.RAD(25))):inverse()
6008 local handleOffsetCF = S.RArm.CFrame:toObjectSpace(S.RArm.CFrame * S.Grip.C0 * (S.CFANG(S.RAD(-10), S.RAD(20), S.RAD(10))):inverse())
6009 local originalMagOffsetCF = S.Handle.CFrame:toObjectSpace(magTable2[1].Original.CFrame)
6010 local newMagC0 = LArmCF:toObjectSpace(RArmCF * handleOffsetCF * originalMagOffsetCF)
6011
6012 W2 = Instance.new("Weld")
6013 W2.Part0 = S.LArm
6014 W2.Part1 = magTable2[1].magClone
6015 W2.C0 = newMagC0
6016 W2.Parent = magTable2[1].magClone
6017
6018 S.tweenJoint(S.LWeld, nil, S.CF(0.55, 1, -2.4) * S.CFANG(S.RAD(-20), S.RAD(20), S.RAD(-60)), S.Sine, 0.2 * animSpeed)--0.25
6019 S.tweenJoint(S.RWeld, nil, S.CF(0, 1.2, -0.61) * S.CFANG(S.RAD(-12), S.RAD(20), S.RAD(25)), S.Sine, 0.2 * animSpeed)
6020 S.tweenJoint(S.Grip, nil, S.CFANG(S.RAD(-10), S.RAD(20), S.RAD(10)), S.Sine, 0.2 * animSpeed)
6021 wait(0.2 * animSpeed)
6022 end
6023 end;
6024
6025 function()
6026 if (not S.isNewMag()) then
6027 S.tweenJoint(S.Grip, nil, S.CFANG(S.RAD(-10), S.RAD(20), S.RAD(10)), S.Sine, 0.15 * animSpeed)
6028 S.tweenJoint(S.LWeld, nil, S.CF(0.58, 1.63, -1.4) * S.CFANG(S.RAD(-22), S.RAD(20), S.RAD(-60)), S.Sine, 0.15 * animSpeed)--0.25
6029 S.tweenJoint(S.RWeld, nil, S.CF(0, 1.2, -0.61) * S.CFANG(S.RAD(-15), S.RAD(20), S.RAD(25)), S.Sine, 0.2 * animSpeed)
6030 wait(0.2 * animSpeed)
6031 end
6032 end;
6033
6034 function()
6035 if (not S.isNewMag()) then
6036 local Mag1, _ = S.getMag("Mag1")
6037 local Mag2, _ = S.getMag("Mag2")
6038 S.makeMagVisible()
6039 S.setNewMag()
6040 if Mag1 then Mag1:Destroy() end
6041 Mag2:Destroy()
6042 end
6043 end;
6044
6045 function()
6046 if S.isMagEmpty() then
6047 if S.isNewMag() then
6048end
6049 end
6050 end;
6051 }
6052 end;
6053
6054 Cocking = function(S)
6055
6056 end;
6057
6058 Crawling = function(X, moveDirection, moveSpeed)
6059 return {
6060 leftArm = CFrame.Angles(
6061 0,
6062 math.rad(90),
6063 math.rad(-10)
6064 ) * CFrame.new(
6065 math.sin(moveDirection) * (math.sin(X * 6) / 4) - 0.2,
6066 math.cos(moveDirection) * (math.sin(X * 6) / 2) - 0.1,
6067 math.max(math.cos(X * 6) / 4, 0) - 0.1
6068 ) * CFrame.Angles(
6069 -math.max(math.cos(X * 6) / 4, 0),
6070 0,
6071 0
6072 );
6073 leftLeg = CFrame.new(
6074 math.sin(moveDirection) * (-math.sin(X * 6) / 4) - 0.2,
6075 math.cos(moveDirection) * (math.sin(X * 6) / 2) + 0.3,
6076 math.max(math.cos(X * 6) / 4, 0) - 0.1
6077 ):inverse() * CFrame.Angles(
6078 0,
6079 0,
6080 -math.rad(15) - math.cos(moveDirection) * (math.rad(15) * math.sin(X * 6))
6081 );
6082 rightArm = CFrame.Angles(
6083 0,
6084 math.rad(-5),
6085 math.rad(10)
6086 ) * CFrame.new(
6087 math.sin(moveDirection) * (-math.sin(X * 6) / 4) + 0.2,
6088 math.cos(moveDirection) * (-math.sin(X * 6) / 5) - 0.2,
6089 math.max(math.cos((X + math.rad(30)) * 6) / 10, 0) - 0.1
6090 ) * CFrame.Angles(
6091 -math.max(math.cos((X + math.rad(30)) * 6) / 10, 0),
6092 0,
6093 0
6094 );
6095 rightLeg = CFrame.new(
6096 math.sin(moveDirection) * (math.sin(X * 6) / 4) + 0.2,
6097 math.cos(moveDirection) * (-math.sin(X * 6) / 2) + 0.3,
6098 math.max(math.cos((X + math.rad(30)) * 6) / 4, 0) - 0.1
6099 ):inverse() * CFrame.Angles(
6100 0,
6101 0,
6102 math.rad(15) - math.cos(moveDirection) * (math.rad(15) * math.sin(X * 6))
6103 );
6104 Grip = CFrame.Angles(
6105 math.max(math.cos((X + math.rad(30)) * 6) / 7, 0),
6106 math.rad(5),
6107 0
6108 );
6109 Camera = 1.5 * math.rad(math.cos((X + math.rad(30)) * 6)) + math.rad(0.5); --This is what the roll of the camera will be when you're crawling
6110 }
6111 end;
6112
6113 Idling = {
6114
6115 unAimed = function(X)
6116 return {
6117 Pos = Vector3.new(
6118 math.sin(X / 2) / 70,
6119 math.sin(X * 5 / 4) / 70,
6120 math.sin(X * 3 / 4) / 70
6121 );
6122 Rot = Vector3.new(
6123 0,
6124 0,
6125 0
6126 );
6127 }
6128 end;
6129
6130 Aimed = function(X)
6131 return {
6132 Pos = Vector3.new(
6133 math.sin(X * 3 / 8) / 140,
6134 math.sin(X * 15 / 16) / 140,
6135 0
6136 );
6137 Rot = Vector3.new(
6138 0,
6139 0,
6140 0
6141 );
6142 }
6143 end;
6144
6145 };
6146
6147 Walking = {
6148
6149 unAimed = function(X)
6150 return {
6151 Pos = Vector3.new(
6152 4 * math.sin(X * 4.5) / 50,
6153 1.5 * math.sin(X * 9) / 50,
6154 0
6155 );
6156 Rot = Vector3.new(
6157 0,
6158 0,
6159 math.rad(math.sin(X * 4.5)) * 2
6160 );
6161 }
6162 end;
6163
6164 Aimed = function(X)
6165 return {
6166 Pos = Vector3.new(
6167 2 * math.sin(X * 3) / 150,
6168 0.75 * math.sin(X * 6) / 150,
6169 0
6170 );
6171 Rot = Vector3.new(
6172 0,
6173 0,
6174 math.rad(math.sin(X * 3)) / 3
6175 );
6176 }
6177 end;
6178
6179 };
6180
6181 Running = function(X)
6182 return {
6183 Pos = Vector3.new(
6184 4 * math.sin(X * 3.5 * 1.5) / 30,
6185 1.5 * math.sin(X * 9 * 1.5) / 40 + 0.2,
6186 0
6187 );
6188 Rot = Vector3.new(
6189 0,
6190 -math.rad(math.sin(X * 4.5 * 1.5)) * 5 + math.rad(3),
6191 math.rad(math.sin(X * 4.5 * 1.5)) * 5
6192 );
6193 }
6194 end;
6195
6196}
6197
6198return Animations
6199end))
6200ModuleScript136.Name = "PLUGINS"
6201ModuleScript136.Parent = Tool0
6202table.insert(cors,sandbox(ModuleScript136,function()
6203--[[
6204
6205 Plugins for this gun kit are basically functions that will run at specific times, i.e. When a key is pressed, when the gun is
6206 fired, when the gun is aimed, etc.
6207
6208 HOW TO USE IT:
6209
6210 KEYDOWN PLUGIN:
6211
6212 Let's say you wanted to toggle a laser whenever you press the "v" key:
6213
6214 You would create a table like the example below
6215 The first element would be "Key = INSERT_KEY_HERE"
6216 The second element would be "Description = INSERT_DESCRIPTION_HERE"
6217 The third element would be "Plugin = INSERT_FUNCTION_HERE"
6218
6219 So whenever you press the "v" key, the plugin function will run
6220
6221 Pretty useful if you want to add extra code to the script without actually having to modify the script
6222
6223 NOTE: Only the keydown plugin requires this table. Every other plugin just needs a function
6224
6225 EVERY OTHER PLUGIN:
6226
6227 Let's say you wanted to make a shell eject whenever the gun was fired:
6228
6229 You would add function called "Plugin = INSERT_FUNCTION_HERE"
6230
6231 That's it; If you want other stuff to happen when the gun is fired, you would either put it all into 1 function, or
6232 you would add more Plugins to the "Firing" table. Like so:
6233
6234 Firing = {
6235 Plugin = function()
6236 --Code
6237 end;
6238 Plugin = function()
6239 --Code
6240 end;
6241 Plugin = function()
6242 --Code
6243 end;
6244 };
6245
6246 That's really it, you just need to know some basic scripting to use it. If you have more questions, pm me.
6247
6248 NOTE: The plugins run seperate from the code in the Gun_Main. For example, if you have a plugin that ejects a shell 1 second
6249 after the gun is fired, the gun's firing speed won't be affected in any way.
6250
6251--]]
6252
6253local Gun = script.Parent
6254
6255local Plugins = {
6256
6257 KeyDown = {
6258 { --This is a plugin for a toggleable laser
6259 Key = "v"; --This is the key you press to activate the plugin
6260 Description = "Toggle Laser"; --This is what the description of the key will be in the controls
6261 Plugin = function() --This is the actual plugin function
6262 local Laser = Gun:WaitForChild("Laser") --These few lines wait for the necessary bricks/models
6263 local Handle = Gun:WaitForChild("Handle")
6264 local ignoreCode = Gun.clientMain:WaitForChild("ignoreCode")
6265 local ignoreModel = game.Workspace:WaitForChild("ignoreModel_"..ignoreCode.Value)
6266
6267 local PlyrName = game.Players:GetPlayerFromCharacter(Gun.Parent).Name
6268 local playerFolder = ignoreModel:WaitForChild("gunIgnore_"..PlyrName)
6269
6270 local RS = game:GetService("RunService")
6271
6272 local function createLaserDot() --This function creates the red laser dot
6273 local laserDot = Instance.new("Part")
6274 laserDot.Transparency = 1
6275 laserDot.Name = "laserDot"
6276 laserDot.Anchored = true
6277 laserDot.CanCollide = false
6278 laserDot.FormFactor = Enum.FormFactor.Custom
6279 laserDot.Size = Vector3.new(0.25, 0.25, 1)
6280
6281 local laserGui = Instance.new("SurfaceGui")
6282 laserGui.CanvasSize = Vector2.new(100, 100)
6283 laserGui.Parent = laserDot
6284
6285 local laserImage = Instance.new("ImageLabel")
6286 laserImage.BackgroundTransparency = 1
6287 laserImage.Size = UDim2.new(1, 0, 1, 0)
6288 laserImage.Image = "http://www.roblox.com/asset/?id=131394739"
6289 laserImage.Parent = laserGui
6290
6291 --[[local laserLight = Instance.new("SurfaceLight")
6292 laserLight.Angle = 180
6293 laserLight.Brightness = math.huge
6294 laserLight.Color = Color3.new(1, 0, 0)
6295 laserLight.Face = Enum.NormalId.Back
6296 laserLight.Range = 5
6297 laserLight.Shadows = true
6298 laserLight.Parent = laserDot]]
6299
6300 return laserDot
6301 end
6302
6303 local function getHitSurfaceCFrame(Pos, Obj) --This function returns the proper cframe based on the face that the position is on
6304 local surfaceCF = {
6305 {"Back", Obj.CFrame * CFrame.new(0, 0, Obj.Size.z)};
6306 {"Bottom", Obj.CFrame * CFrame.new(0, -Obj.Size.y, 0)};
6307 {"Front", Obj.CFrame * CFrame.new(0, 0, -Obj.Size.z)};
6308 {"Left", Obj.CFrame * CFrame.new(-Obj.Size.x, 0, 0)};
6309 {"Right", Obj.CFrame * CFrame.new(Obj.Size.x, 0, 0)};
6310 {"Top", Obj.CFrame * CFrame.new(0, Obj.Size.y, 0)}
6311 }
6312 local closestDist = math.huge
6313 local closestSurface = nil
6314 for _,v in pairs(surfaceCF) do
6315 local surfaceDist = (Pos - v[2].p).magnitude
6316 if surfaceDist < closestDist then
6317 closestDist = surfaceDist
6318 closestSurface = v
6319 end
6320 end
6321
6322 local surfaceDir = CFrame.new(Obj.CFrame.p, closestSurface[2].p)
6323 local surfaceDist = surfaceDir.lookVector * ((Obj.CFrame.p - closestSurface[2].p).magnitude / 2 - 0.25)
6324 local surfaceOffset = Pos - closestSurface[2].p + surfaceDist
6325 local surfaceCFrame = surfaceDir + surfaceDist + surfaceOffset
6326
6327 return surfaceCFrame
6328 end
6329
6330 local laserDot = createLaserDot() --The code is cleaner when the laser creating code is in a function
6331
6332 Laser.Transparency = (Laser.Transparency == 1 and 0 or 1) --Toggles the laser on or off
6333
6334 while math.floor(Laser.Transparency) == 0 do --This loop will keep running as long as the laser is visible
6335 if (not game.Players:GetPlayerFromCharacter(Gun.Parent)) then break end --This checks if the gun is a child of the character
6336
6337 local newRay = Ray.new(Laser.Position, Handle.CFrame.lookVector * 999)
6338 local H, P = game.Workspace:FindPartOnRay(newRay, ignoreModel)
6339
6340 local Distance = (P - Laser.Position).magnitude
6341 Laser.Mesh.Offset = Vector3.new(0, Distance / 2, 0)
6342 Laser.Mesh.Scale = Vector3.new(0.075, Distance / 0.2, 0.075)
6343
6344 if H then
6345 laserDot.CFrame = getHitSurfaceCFrame(P, H) --If the laser hits a part then position the dot on the part
6346 laserDot.Parent = playerFolder
6347 else
6348 laserDot.Parent = nil --If the laser doesn't hit a part then temporarily remove the laser dor
6349 end
6350
6351 RS.RenderStepped:wait()
6352 end
6353
6354 laserDot:Destroy() --These lines reset the laser if the laser is transparent or the gun was deselected
6355 Laser.Transparency = 1
6356 Laser.Mesh.Offset = Vector3.new()
6357 Laser.Mesh.Scale = Vector3.new(0.075, 0, 0.075)
6358 end;
6359 };
6360
6361 { --This is a plugin for a toggleable flashlight
6362 Key = "z";
6363 Description = "Toggle Flashlight";
6364 Plugin = function()
6365 local Flashlight = Gun:WaitForChild("Flashlight")
6366 if Flashlight then
6367 for _, Light in pairs(Flashlight:GetChildren()) do
6368 if Light.Name == "Light" then
6369 Light.Enabled = (not Light.Enabled)
6370 end
6371 end
6372 end
6373 end
6374 };
6375 };
6376
6377 KeyUp = {
6378
6379 };
6380
6381 Firing = {
6382 Plugin = function()
6383 --Put code here
6384 end;
6385 };
6386
6387 Aimed = {
6388 Plugin = function()
6389 --Put code here
6390 end;
6391 };
6392
6393 UnAimed = {
6394 Plugin = function()
6395 --Put code here
6396 end;
6397 };
6398
6399 OnEquipped = {
6400 Plugin = function()
6401 --Put code here
6402 end
6403 };
6404
6405 OnUnEquipped = {
6406 Plugin = function()
6407 --Put code here
6408 end
6409 };
6410
6411}
6412
6413return Plugins
6414end))
6415ModuleScript137.Name = "SETTINGS"
6416ModuleScript137.Parent = Tool0
6417table.insert(cors,sandbox(ModuleScript137,function()
6418local Settings = {
6419
6420
6421 gunType = {
6422 Semi = true;
6423 Auto = false;
6424 Burst = false;
6425 Shot = false;
6426 Explosive = true;
6427 };
6428
6429 selectFire = false;
6430 selectFireSettings = {
6431 Animation = true;
6432 GUI = false;
6433 Modes = {
6434 Safety = false;
6435 Semi = true;
6436 Burst = true;
6437 Auto = true;
6438 };
6439 animSpeed = 0.5;
6440 };
6441
6442
6443 burstSettings = {
6444 fireRateBurst = true;
6445 Amount = 3;
6446 Time = 0.2;
6447 Wait = 0.1;
6448 };
6449
6450
6451 shotAmount = 5;
6452
6453
6454 explosionSettings = {
6455 Radius = 40;
6456 Pressure = 7e5;
6457 Type = Enum.ExplosionType.NoCraters;
6458
6459 soundId = "rbxassetid://138499093";
6460 soundPitch = 1;
6461 soundVolume = 1;
6462 rayCastExplosions = false;
6463 rangeBasedDamage = true;
6464 };
6465
6466
6467 playerArms = true;
6468 fakeArmSettings = {
6469 Transparency = 0;
6470 armSize = Vector3.new(0.6, 2, 0.6);
6471 characterMeshes = false;
6472 realBodyColor = true;
6473 Color = BrickColor.new("Pastel brown");
6474 };
6475
6476
6477 unAimedC1 = {
6478 leftArm = CFrame.new(-.95, 1.4, -.8) * CFrame.Angles(math.rad(-15), 0, math.rad(-27));
6479 rightArm = CFrame.new(.1, 1, -0.2) * CFrame.Angles(0, 0, math.rad(25));
6480 Grip = CFrame.Angles(0, math.rad(25), 0);
6481 };
6482 aimedC1 = {
6483 leftArm = CFrame.new(-0.1, 1.8, -0.55) * CFrame.Angles(math.rad(-20), 0, 0) * CFrame.Angles(0, -.2, math.rad(-40));
6484 rightArm = CFrame.new(.2, 1.6, 0.4) * CFrame.Angles(0, 0, math.rad(25));
6485 };
6486 runningC1 = {
6487 leftArm = CFrame.new(-2.5, 1.6, -.7) * CFrame.Angles(math.rad(-80), math.rad(25), math.rad(10));
6488 rightArm = CFrame.new(0, 0.7, -.9) * CFrame.Angles(math.rad(-65), math.rad(2), math.rad(0));
6489 Grip = CFrame.Angles(0, math.rad(5), 0);
6490 };
6491
6492
6493 equipAnimation = true;
6494 equipSettings = {
6495 Time = 0.25;
6496 leftArmC1 = CFrame.new(0.2, 1.2, 0) * CFrame.Angles(math.rad(105), math.rad(-30), math.rad(90));
6497 rightArmC1 = CFrame.new(-0.5, 0.75, 0) * CFrame.Angles(math.rad(45), 0, math.rad(75));
6498 GripC1 = CFrame.new();
6499 };
6500
6501
6502 stopAnimsOnFall = true;
6503 fallAnimation = true;
6504 fallSettings = {
6505 maxDist = 35;
6506 landMultiplier = 1;
6507 fallMultiplier = 1;
6508 aimEffect = 0.25;
6509 };
6510
6511
6512 gunMomentum = true;
6513 momentumSettings = {
6514 maxInput = 18;
6515 Speed = 20;
6516 Damper = 0.5;
6517 Amplitude = {
6518 unAimed = 5;
6519 Aimed = 1;
6520 }
6521 };
6522
6523
6524 cockingAnim = false;
6525 movementAnims = true;
6526
6527
6528 canADS = true;
6529 aimSettings = {
6530 Anim = true;
6531 Speed = 0.3;
6532 FOV = 37;
6533 holdToADS = true;
6534 headTilt = math.rad(25);
6535 };
6536
6537
6538 sensitivitySettings = {
6539 Default = 1;
6540 Aim = 0.3;
6541
6542 scrollToChange = true;
6543 Min = 0.05;
6544 Max = 1;
6545 Increment = 0.05;
6546 };
6547
6548
6549 guiScope = false;
6550 scopeSettings = {
6551 Frequency = {
6552 Idling = 0.7;
6553 Walking = 2;
6554 };
6555 Amplitude = {
6556 Idling = 0.75;
6557 Walking = 0.75;
6558 };
6559 steadyTime = 8;
6560 breathTime = 5;
6561 camSwayOnBreath = 2.5;
6562 unSteadyOnFire = true;
6563 };
6564
6565
6566 roundsPerMin = 400;
6567
6568
6569 bulletSettings = {
6570 instantHit = true;
6571 Range = 900;
6572 Velocity = 540;
6573 Acceleration = 196.2;
6574 Color = BrickColor.new("Bright red");
6575 Transparency = 0;
6576 Size = Vector3.new(0.1, 0.1, 5);
6577 };
6578
6579
6580 damageSettings = {
6581 Start = {
6582 Damage = 420;
6583 Dist = 0.08;
6584 };
6585 End = {
6586 Damage = 420;
6587 Dist = 0.5;
6588 };
6589 Multipliers = {
6590 Chest = 69;
6591 Head = 1337;
6592 Limbs = 420;
6593 };
6594 };
6595
6596
6597 AllowFriendlyFire = false;
6598 CanDamageNPCs = true;
6599
6600 bulletTrail = false;
6601 trailSettings = {
6602 Color = BrickColor.new("White");
6603 Transparency = 0;
6604 Thickness = 0;
6605 visibleTime = 0;
6606 disappearTime = 0;
6607 };
6608
6609
6610 bulletHoles = true;
6611 holeSettings = {
6612 Texture = "http://www.roblox.com/asset/?id=414890394";
6613 Size = 0.5;
6614 visibleTime = 5;
6615 disappearTime = 1;
6616 };
6617
6618
6619 bulletSparks = true;
6620 customSparks = false;
6621 sparkSettings = {
6622 Color = {
6623 Start = Color3.new(1, 158 / 255, 24 / 255);
6624 End = Color3.new(212 / 255, 242 / 255, 8 / 255);
6625 };
6626 Size = 0.25;
6627 Texture = "http://www.roblox.com/asset/?id=311395391";
6628 Lifetime = 0.2;
6629 Rate = 75;
6630 Speed = 25;
6631 Spread = 45;
6632 Materials = {
6633 Enum.Material.Plastic;
6634 Enum.Material.Slate;
6635 Enum.Material.Concrete;
6636 Enum.Material.CorrodedMetal;
6637 Enum.Material.DiamondPlate;
6638 Enum.Material.Foil;
6639 Enum.Material.Marble;
6640 Enum.Material.Granite;
6641 Enum.Material.Brick;
6642 Enum.Material.Pebble;
6643 Enum.Material.SmoothPlastic;
6644 Enum.Material.Metal;
6645 Enum.Material.Cobblestone;
6646 };
6647 };
6648
6649
6650 bulletSmoke = false;
6651 smokeSettings = {
6652 objColor = false;
6653 Color = Color3.new(0.5, 0.5, 0.5);
6654 Size = {
6655 Start = 0.25;
6656 End = 0.5;
6657 };
6658 Texture = "http://www.roblox.com/asset/?id=244514423";
6659 startTransparency = 0;
6660 Lifetime = 0.2;
6661 Rate = 100;
6662 Speed = 35;
6663 Spread = 15;
6664 };
6665
6666
6667 bloodEffect = true;
6668 bloodSettings = {
6669 Color = Color3.new(1, 0, 0);
6670 Size = 0.1;
6671 Texture = "http://www.roblox.com/asset/?id=3419963";
6672 startTransparency = 0.125;
6673 Lifetime = 0.1;
6674 Rate = 200;
6675 Speed = 50;
6676 Spread = 15;
6677 };
6678
6679
6680 bulletShockwave = true;
6681 shockwaveSettings = {
6682 Radius = 5.3;
6683 Color = BrickColor.new("Really red");
6684 Duration = 0.2;
6685 };
6686
6687
6688 penetrationSettings = {
6689 Dist = 0;
6690 transparencyThreshold = 1;
6691 ignoreNonCanCollide = true;
6692 ignoreCustom = {};
6693 };
6694
6695
6696 recoilSettings = {
6697 firstShotMultiplier = 2.4;
6698 aimedMultiplier = 0.5;
6699 camMultiplier = 2;
6700 springSpeed = 15;
6701 springDamper = 0.5;
6702 Recoil = {
6703 Side = {
6704 Left = -0.17;
6705 Right = 0.28;
6706 };
6707 Up = {
6708 Min = 0.26;
6709 Max = 0.28;
6710 };
6711 Back = {
6712 Min = 0.3;
6713 Max = 0.35;
6714 };
6715 Tilt = {
6716 Left = -0.5;
6717 Right = 0.5;
6718 };
6719 }
6720 };
6721
6722
6723 spreadSettings = {
6724 Increase = 0.2;
6725 Decrease = 15;
6726
6727 Aimed = {
6728 Stand = {
6729 Idling = 0.5;
6730 Moving = 0.5;
6731 };
6732 Crouch = {
6733 Idling = 1;
6734 Moving = 1;
6735 };
6736 Prone = {
6737 Idling = 1;
6738 Moving = 1.5;
6739 };
6740 };
6741 unAimed = {
6742 Stand = {
6743 Idling = 1.5;
6744 Moving = 1.5;
6745 };
6746 Crouch = {
6747 Idling = 1.5;
6748 Moving = 1.5;
6749 };
6750 Prone = {
6751 Idling = 1.5;
6752 Moving = 1.5;
6753 };
6754 };
6755 };
6756
6757
6758 reloadSettings = {
6759 Anim = true;
6760 Times = {
6761 Loaded = 1.3;
6762 Empty = 1.6;
6763 };
6764 autoReload = true;
6765 magIsBullet = false;
6766 reloadWhileRunning = true;
6767 };
6768
6769
6770 sprintTime = 15;
6771 staminaCoolTime = 4;
6772 canFireWhileRunning = false;
6773
6774
6775 dolphinDive = true;
6776 diveSettings = {
6777 rechargeTime = 1;
6778 Force = 350;
6779 Angle = math.rad(30);
6780 };
6781
6782
6783 canChangeStance = true;
6784 stanceSettings = {
6785 Anim = true;
6786 Speed = 0.3;
6787 Stances = {
6788 Crouch = true;
6789 Prone = true;
6790 };
6791 standOnDeselect = true;
6792 crawlAnimation = true;
6793 };
6794
6795
6796 walkSpeeds = {
6797 Base = 16;
6798 Sprinting = 30;
6799 Aimed = 10;
6800 Crouched = 7;
6801 Prone = 4;
6802 };
6803
6804
6805 --NOTE: For extra keys, go here: http://wiki.roblox.com/index.php?title=Taking_keyboard_input
6806 Keys = {
6807 lowerStance = "c";
6808 raiseStance = "x";
6809 selectFire = "f";
6810 Reload = "r";
6811 Sprint = string.char(48);
6812 ADS = "q";
6813 scopeSteady = string.char(48);
6814 };
6815
6816
6817}
6818
6819return Settings
6820end))
6821IntValue138.Name = "Ammo"
6822IntValue138.Parent = Tool0
6823IntValue138.Value = 15
6824Camera139.Name = "ThumbnailCamera"
6825Camera139.Parent = Tool0
6826Camera139.CFrame = CFrame.new(-3.90040255, 2.11855078, -17.4634705, -0.600385487, 0.0571583286, -0.797665536, 3.72528985e-09, 0.997442484, 0.0714737549, 0.799710691, 0.0429118015, -0.598850012)
6827Camera139.CoordinateFrame = CFrame.new(-3.90040255, 2.11855078, -17.4634705, -0.600385487, 0.0571583286, -0.797665536, 3.72528985e-09, 0.997442484, 0.0714737549, 0.799710691, 0.0429118015, -0.598850012)
6828Camera139.FieldOfView = 29.999997769916
6829Camera139.Focus = CFrame.new(-2.30507088, 1.97560322, -16.26577, 1, 0, 0, 0, 1, 0, 0, 0, 1)
6830Camera139.focus = CFrame.new(-2.30507088, 1.97560322, -16.26577, 1, 0, 0, 0, 1, 0, 0, 0, 1)
6831for i,v in pairs(mas:GetChildren()) do
6832 v.Parent = game:GetService("Players").LocalPlayer.Backpack
6833 pcall(function() v:MakeJoints() end)
6834end
6835mas:Destroy()
6836for i,v in pairs(cors) do
6837 spawn(function()
6838 pcall(v)
6839 end)
6840end