Advertisement
Guest User

cool thing asd

a guest
Jul 20th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.33 KB | None | 0 0
  1. --SynapseX Decompiler
  2.  
  3. local d_c = {Tool = nil}
  4. local _ac = Ray.new
  5. local aac = CFrame.new
  6. local bac = Vector3.new
  7. local cac = math.random
  8. local dac = math.floor
  9. local _bc = math.rad
  10. local abc = CFrame.Angles
  11. local bbc = string.find
  12. local cbc = math.ceil
  13. local dbc = UDim2.new
  14. local _cc, acc
  15. local bcc = game.Players.LocalPlayer
  16. repeat
  17. wait()
  18. until bcc.Character
  19. local ccc = bcc.Character
  20. local dcc = game.Workspace.CurrentCamera
  21. local _dc = game:GetService("UserInputService")
  22. local adc = ccc:WaitForChild("Humanoid")
  23. local bdc = adc:LoadAnimation(script:WaitForChild("aimAnim"))
  24. local cdc = adc:LoadAnimation(script:WaitForChild("holdAnim"))
  25. local ddc = adc:LoadAnimation(script:WaitForChild("reloadAnim"))
  26. local __d = adc:LoadAnimation(script:WaitForChild("shootAnim"))
  27. local a_d = game.ReplicatedStorage.Player_Storages:WaitForChild(bcc.Name)
  28. local b_d = bcc.PlayerGui.Core_UI:WaitForChild("Crosshairs")
  29. local c_d = bcc.PlayerGui.Core_UI:WaitForChild("Center_Dot")
  30. local d_d = bcc.PlayerGui.Core_UI:WaitForChild("Scope")
  31. local _ad = bcc.PlayerGui.Core_UI:WaitForChild("CloseHit")
  32. local aad = game:GetService("RunService").RenderStepped
  33. local bad = game:GetService("RunService").Heartbeat
  34. local cad = game.Players.LocalPlayer
  35. local dad = workspace.CurrentCamera
  36. local _bd = 1
  37. local abd = tick()
  38. local bbd = tick()
  39. local cbd = false
  40. local dbd = false
  41. local _cd = false
  42. local acd = 0
  43. local bcd = true
  44. local ccd = 0
  45. local dcd
  46. local _dd = 0
  47. local add = {}
  48. local bdd = {}
  49. local cdd = false
  50. local ddd = false
  51. local ___a = false
  52. local a__a = false
  53. local b__a = game.ReplicatedStorage.Player_Data
  54. local c__a = require(game.ReplicatedStorage.Modules.Game_Data)
  55. local d__a = game:GetService("HttpService")
  56. local _a_a = c__a.weaponData
  57. local aa_a = c__a.levelData
  58. local ba_a = false
  59. local ca_a = 0
  60. local da_a
  61. local _b_a = 1
  62. local ab_a = 1
  63. local bb_a
  64. local cb_a = game:GetService("Debris")
  65. local db_a = bac(0, 0, 0)
  66. local _c_a = false
  67. local ac_a = 2850
  68. local bc_a = -0.295
  69. local cc_a = game:GetService("TweenService")
  70. local dc_a = Enum.EasingDirection.Out
  71. local _d_a = Enum.EasingStyle.Linear
  72. local ad_a = TweenInfo.new
  73. local function bd_a(baaa, caaa, daaa, _baa)
  74. local abaa, bbaa, cbaa = workspace:FindPartOnRayWithIgnoreList(_ac(caaa, daaa.unit * acc.bulletTravel), _G.clientGunIgnores2())
  75. baaa.Trail.Lifetime = baaa.Trail.Lifetime * 1.275
  76. baaa.Position = caaa:Lerp(bbaa, 0.175)
  77. bad:wait()
  78. baaa.Position = bbaa
  79. return abaa, bbaa, cbaa, _ac(caaa, (bbaa - caaa).unit * (caaa - bbaa).magnitude)
  80. end
  81. local function cd_a(baaa, caaa, daaa)
  82. local _baa = acc.bulletTravel
  83. local abaa = _G.clientGunIgnores2()
  84. local bbaa = tick() - 0.01666
  85. repeat
  86. local cbaa = tick() - bbaa
  87. bbaa = tick()
  88. if cbaa > 1 then
  89. cbaa = 1
  90. elseif cbaa < 0.001 then
  91. cbaa = 0.001
  92. end
  93. local dbaa = ac_a * cbaa
  94. daaa = daaa.unit * dbaa + bac(0, bc_a * cbaa, 0)
  95. local _caa, acaa, bcaa = workspace:FindPartOnRayWithIgnoreList(_ac(caaa, daaa), abaa)
  96. baaa.Position = acaa
  97. _baa = _baa - dbaa
  98. if not _caa and _baa > 0 then
  99. aad:wait()
  100. caaa = acaa
  101. else
  102. return _caa, acaa, bcaa, _ac(caaa, (acaa - caaa).unit * dbaa)
  103. end
  104. until _baa <= 0
  105. end
  106. local function dd_a()
  107. local baaa = 2 * acc.spreadRate
  108. if ccd + baaa <= acc.maxSpread then
  109. table.insert(add, {
  110. started = nil,
  111. rate = baaa / 10,
  112. current = baaa
  113. })
  114. end
  115. end
  116. local function __aa()
  117. local baaa = _bc(cac() * 0.08)
  118. if cac(1, 2) == 2 then
  119. baaa = -baaa
  120. end
  121. if acc.kickBackCount then
  122. for i = 1, acc.kickBackCount do
  123. table.insert(bdd, {
  124. finishedKick = false,
  125. applied = 0,
  126. rot = abc(_bc(acc.kickBackInc), baaa, baaa),
  127. rotNeg = abc(_bc(-acc.kickBackInc), -baaa, -baaa),
  128. started = nil
  129. })
  130. end
  131. else
  132. table.insert(bdd, {
  133. finishedKick = false,
  134. applied = 0,
  135. rot = abc(_bc(acc.kickBackInc), baaa, baaa),
  136. rotNeg = abc(_bc(-acc.kickBackInc), -baaa, -baaa),
  137. started = nil
  138. })
  139. end
  140. end
  141. local function a_aa()
  142. if dcd and dcd:FindFirstChild("Ammo") and (_dd < acc.maxAmmo or dcd.Ammo.Value < acc.maxAmmo) and not cdd and _cd and d_c.Tool.Parent == ccc and d_c.Tool and acc.ammoType and a_d:FindFirstChild(acc.ammoType) and a_d[acc.ammoType].Value > 0 then
  143. _G.isReloading = true
  144. cdd = true
  145. d_c.Tool.Handle.Flash.Enabled = false
  146. d_c.Tool.Handle.Eject:Play()
  147. wait(0.25)
  148. d_c.Tool.Handle.Reload:Play()
  149. ddc:Play(0.25, 25, 1 / acc.ReloadTime)
  150. local baaa = tick()
  151. repeat
  152. wait()
  153. until tick() - baaa >= acc.ReloadTime / 1.05 or not _cd and d_c.Tool.Parent ~= ccc
  154. if _cd and d_c.Tool.Parent == ccc then
  155. local caaa, daaa = game.ReplicatedStorage.Remote_Functions.Reload:InvokeServer(dcd)
  156. if caaa then
  157. _dd = daaa
  158. end
  159. end
  160. ddc:Stop(0.25)
  161. wait(0.125)
  162. cdd = false
  163. _G.isReloading = false
  164. end
  165. end
  166. local function b_aa(baaa)
  167. local caaa = dad:ScreenPointToRay(dac(dad.ViewportSize.X / 1.95), dac((dad.ViewportSize.Y - 72) / 2), 0.1)
  168. local daaa, _baa = workspace:FindPartOnRayWithIgnoreList(_ac(caaa.Origin, caaa.Direction * 2000), _G.clientGunIgnores2())
  169. local abaa = ccd / 20
  170. local bbaa = 725 * ((201 - acc.spreadMultiplier) / 200)
  171. if bbaa < 0 then
  172. bbaa = -bbaa
  173. end
  174. abaa = abaa + (_baa - dad.CFrame.p).magnitude / bbaa
  175. local cbaa, dbaa, _caa = workspace:FindPartOnRayWithIgnoreList(_ac(ccc.RightUpperArm.Position, _baa + bac(cac(-1, 1) * (cac() * abaa), cac(-1, 1) * (cac() * abaa), cac(-1, 1) * (cac() * abaa)) - ccc.RightUpperArm.Position), _G.clientGunIgnores2())
  176. _G.replicateWeapon("Rocket", cad, d_c.Tool, cbaa, dbaa, _caa, false, baaa, cbc(acc.weaponDamage * aa_a[dcd.Level.Value].Multiplier))
  177. game.ReplicatedStorage.Remote_Events.Fire_Rocket:FireServer(d_c.Tool, dcd, cbaa, dbaa, _caa, baaa)
  178. __aa()
  179. end
  180. local function c_aa(baaa, caaa)
  181. ca_a = tick()
  182. local daaa = script[b__a[cad.Name]["Bullet Trail"].Value]:Clone()
  183. daaa.CFrame = ccc.RightUpperArm.CFrame
  184. daaa.Parent = workspace.Debris
  185. local _baa = 375
  186. if acc.hasComplexShot == 1 then
  187. _baa = 1750
  188. end
  189. local abaa = dad:ScreenPointToRay(dac(dad.ViewportSize.X / 1.95), dac((dad.ViewportSize.Y - 72) / 2), 0.1)
  190. local bbaa, cbaa = workspace:FindPartOnRayWithIgnoreList(_ac(abaa.Origin, abaa.Direction * _baa), _G.clientGunIgnores2())
  191. local dbaa = ccd / 24
  192. local _caa = acc.distanceAccuracy * ((201 - acc.spreadMultiplier) / 200)
  193. if _caa < 0 then
  194. _caa = -_caa
  195. end
  196. dbaa = dbaa + (cbaa - dad.CFrame.p).magnitude / _caa
  197. if ccd <= acc.baseSpread then
  198. dbaa = 0
  199. end
  200. cbaa = cbaa + bac(cac(-1, 1) * (cac() * dbaa), cac(-1, 1) * (cac() * dbaa), cac(-1, 1) * (cac() * dbaa))
  201. if not acc.multiShot or acc.multiShot and baaa == 1 then
  202. _G.replicateWeapon("FireFirst", cad, d_c.Tool)
  203. game.ReplicatedStorage.Remote_Events.Fire_Shot:FireServer(_cc, nil, d_c.Tool, nil, nil, nil, dcd, true, 1, caaa, ccc.RightUpperArm.Position, cbaa)
  204. d_c.Tool.Handle.Barrel.Fire.Enabled = true
  205. end
  206. if not baaa or baaa == 1 then
  207. __aa()
  208. end
  209. local acaa, bcaa, ccaa, dcaa
  210. if acc.hasComplexShot == 1 then
  211. acaa, bcaa, ccaa, dcaa = cd_a(daaa, ccc.RightUpperArm.Position, cbaa - ccc.RightUpperArm.Position)
  212. elseif acc.hasComplexShot == 3 then
  213. acaa, bcaa, ccaa, dcaa = bd_a(daaa, ccc.RightUpperArm.Position, cbaa - ccc.RightUpperArm.Position, cbaa)
  214. end
  215. local _daa = false
  216. local adaa
  217. local bdaa = acaa
  218. local cdaa, ddaa
  219. if acaa then
  220. if acaa:IsDescendantOf(workspace.Map_Objects) then
  221. if acaa.Parent and acaa.Parent.ClassName == "Model" and acaa.Parent.PrimaryPart then
  222. acaa = acaa.Parent.PrimaryPart
  223. end
  224. cdaa = acaa
  225. elseif acaa:IsDescendantOf(workspace.Characters) then
  226. for __ba, a_ba in pairs(workspace.Characters:GetChildren()) do
  227. if not _daa and a_ba and a_ba ~= ccc then
  228. if a_ba:FindFirstChild("Head") and (acaa:IsDescendantOf(a_ba.Head) or acaa.Name == "Head") then
  229. bdaa = a_ba.Head
  230. _daa = true
  231. break
  232. elseif a_ba:FindFirstChild("HumanoidRootPart") and acaa:IsDescendantOf(a_ba) and acaa.Parent and acaa.Parent.ClassName ~= "Tool" then
  233. bdaa = a_ba.HumanoidRootPart
  234. _daa = true
  235. break
  236. end
  237. end
  238. end
  239. elseif acaa:IsDescendantOf(workspace.Crate_Spawns) then
  240. if acaa.Parent and acaa.Parent.ClassName == "Model" and acaa.Parent.PrimaryPart then
  241. acaa = acaa.Parent.PrimaryPart
  242. end
  243. cdaa = acaa
  244. end
  245. end
  246. if _daa then
  247. local __ba = 1
  248. local a_ba = 1
  249. if dcd and dcd:FindFirstChild("Level") then
  250. a_ba = aa_a[dcd.Level.Value].Multiplier
  251. end
  252. if bdaa.Name == "Head" then
  253. __ba = 1.5
  254. ddaa = true
  255. end
  256. adaa = cbc(acc.weaponDamage * __ba * a_ba)
  257. end
  258. _G.replicateWeapon("FireSecond", cad, d_c.Tool, bdaa, bcaa, ccaa, _daa, nil, adaa, ddaa)
  259. if _G.boop == nil then
  260. if bdaa then
  261. game.ReplicatedStorage.Remote_Events.Fire_Shot:FireServer(_cc, dcaa, d_c.Tool, bdaa, bcaa, ccaa, dcd, baaa, 2, caaa, cdaa, nil, (bdaa.Size.X + bdaa.Size.Y + bdaa.Size.Z) / 2.99, nil, true, false, ddaa)
  262. else
  263. game.ReplicatedStorage.Remote_Events.Fire_Shot:FireServer(_cc, dcaa, d_c.Tool, bdaa, bcaa, ccaa, dcd, baaa, 2, caaa, cdaa, nil, (ccc.Head.Size.X + ccc.Head.Size.Y + ccc.Head.Size.Z) / 2.99, nil, true, false, ddaa)
  264. end
  265. end
  266. daaa.Transparency = 1
  267. cb_a:AddItem(daaa, 0.5)
  268. end
  269. local function d_aa()
  270. if _dd > 0 then
  271. d_c.Tool.Handle.Flash.Enabled = true
  272. acd = tick()
  273. dd_a()
  274. spawn(function()
  275. wait()
  276. d_c.Tool.Handle.Flash.Enabled = false
  277. end)
  278. if not acc.projectile then
  279. if acc.Mode == "Burst" then
  280. local baaa
  281. for i = 1, acc.shotCount do
  282. baaa = tick()
  283. _dd = _dd - 1
  284. c_aa(nil, d__a:GenerateGUID())
  285. repeat
  286. aad:wait()
  287. until tick() - baaa >= acc.burstWait
  288. end
  289. elseif acc.multiShot then
  290. _dd = _dd - 1
  291. local baaa = d__a:GenerateGUID()
  292. for i = 1, acc.shotCount do
  293. c_aa(i, baaa)
  294. aad:wait()
  295. end
  296. else
  297. _dd = _dd - 1
  298. c_aa(nil, d__a:GenerateGUID())
  299. end
  300. else
  301. _dd = _dd - 1
  302. b_aa(d__a:GenerateGUID())
  303. end
  304. else
  305. d_c.Tool.Handle.Flash.Enabled = false
  306. d_c.Tool.Handle.Empty:Play()
  307. cbd = false
  308. a_aa()
  309. end
  310. end
  311. local _aaa = tick()
  312. local aaaa = tick()
  313. aad:connect(function()
  314. if acc and acc.spreadMultiplier and add then
  315. for baaa, caaa in pairs(add) do
  316. if not caaa.started then
  317. caaa.started = tick()
  318. ccd = ccd + caaa.rate * 10
  319. acc.spreadMultiplier = acc.spreadMultiplier + 1
  320. elseif tick() - caaa.started >= acc.spreadCooldown and not cbd then
  321. if caaa.current >= caaa.rate then
  322. ccd = ccd - caaa.rate
  323. caaa.current = caaa.current - caaa.rate
  324. acc.spreadMultiplier = acc.spreadMultiplier - 0.1
  325. else
  326. table.remove(add, baaa)
  327. end
  328. end
  329. end
  330. end
  331. if _cd and ccc:FindFirstChild("Humanoid") and d_c.Tool and d_c.Tool.Parent == ccc then
  332. if adc.MoveDirection ~= db_a then
  333. if bcd then
  334. bcd = false
  335. if _G.sprinting then
  336. _c_a = true
  337. ccd = ccd + 4
  338. else
  339. ccd = ccd + 2
  340. end
  341. elseif not bcd and _G.sprinting and not _c_a then
  342. _c_a = true
  343. ccd = ccd + 2
  344. elseif not bcd and not _G.sprinting and _c_a then
  345. _c_a = false
  346. ccd = ccd - 2
  347. end
  348. elseif not bcd then
  349. bcd = true
  350. if _c_a then
  351. _c_a = false
  352. ccd = ccd - 4
  353. else
  354. ccd = ccd - 2
  355. end
  356. end
  357. if _G.zooming and not _G.isWalled then
  358. if not dbd then
  359. dbd = true
  360. ccd = ccd - 2
  361. acc.maxSpread = acc.maxSpread / acc.adsBoost
  362. acc.spreadMultiplier = acc.spreadMultiplier / acc.adsBoost
  363. end
  364. elseif dbd then
  365. dbd = false
  366. ccd = ccd + 2
  367. acc.maxSpread = acc.maxSpread * acc.adsBoost
  368. acc.spreadMultiplier = acc.spreadMultiplier * acc.adsBoost
  369. end
  370. local baaa = dac(dad.ViewportSize.X / 1.95)
  371. local caaa = dac((dad.ViewportSize.Y - 72) / 2)
  372. b_d.Center.Position = dbc(0, baaa, 0, caaa)
  373. b_d.Dot.Position = b_d.Center.Position
  374. b_d["1"].Position = b_d["1"].Position:Lerp(dbc(0, baaa, 0, caaa - 30 - ccd * acc.spreadRate * _bd), 0.25)
  375. b_d["2"].Position = b_d["2"].Position:Lerp(dbc(0, baaa, 0, caaa + 10 + ccd * acc.spreadRate * _bd), 0.25)
  376. b_d["3"].Position = b_d["3"].Position:Lerp(dbc(0, baaa - 30 - ccd * acc.spreadRate * _bd, 0, caaa), 0.25)
  377. b_d["4"].Position = b_d["4"].Position:Lerp(dbc(0, baaa + 10 + ccd * acc.spreadRate * _bd, 0, caaa), 0.25)
  378. if ___a then
  379. b_d["1"].BackgroundTransparency = 1
  380. b_d["1"].Shotty.Visible = true
  381. b_d["2"].BackgroundTransparency = 1
  382. b_d["2"].Shotty.Visible = true
  383. b_d["3"].BackgroundTransparency = 1
  384. b_d["3"].Shotty.Visible = true
  385. b_d["4"].BackgroundTransparency = 1
  386. b_d["4"].Shotty.Visible = true
  387. else
  388. b_d["1"].BackgroundTransparency = 0
  389. b_d["1"].Shotty.Visible = false
  390. b_d["2"].BackgroundTransparency = 0
  391. b_d["2"].Shotty.Visible = false
  392. b_d["3"].BackgroundTransparency = 0
  393. b_d["3"].Shotty.Visible = false
  394. b_d["4"].BackgroundTransparency = 0
  395. b_d["4"].Shotty.Visible = false
  396. end
  397. if tick() - bbd >= 0.5 then
  398. bbd = tick()
  399. for daaa, _baa in pairs(a_d:GetChildren()) do
  400. if bbc(_baa.Name, "Slot") and _baa.Value and _baa.Value == d_c.Tool then
  401. dcd = _baa
  402. end
  403. end
  404. end
  405. if not ba_a and _G.zooming and not _G.isWalled then
  406. ba_a = true
  407. bdc:Play(0.25)
  408. elseif ba_a and (not _G.zooming or _G.isWalled) then
  409. ba_a = false
  410. bdc:Stop(0.25)
  411. end
  412. if tick() - ca_a <= 0.55 then
  413. d_c.Tool.Handle.Barrel_Smoke.Enabled = true
  414. else
  415. d_c.Tool.Handle.Barrel_Smoke.Enabled = false
  416. end
  417. if tick() - ca_a >= 0.125 then
  418. d_c.Tool.Handle.Barrel.Fire.Enabled = false
  419. end
  420. if tick() - abd >= 0.4 and not _G.buildOpen and not _G.Inventory and not _G.Map then
  421. abd = tick()
  422. local daaa = 375
  423. if acc.hasComplexShot == 1 then
  424. daaa = 1750
  425. end
  426. local _baa = dad:ScreenPointToRay(dac(dad.ViewportSize.X / 1.95), dac((dad.ViewportSize.Y - 72) / 2), 0.1)
  427. local abaa, bbaa = workspace:FindPartOnRayWithIgnoreList(_ac(_baa.Origin, _baa.Direction * daaa), _G.clientGunIgnores2())
  428. local cbaa, dbaa = workspace:FindPartOnRayWithIgnoreList(_ac(ccc.RightUpperArm.Position, (bbaa - ccc.RightUpperArm.Position).unit * 12), _G.clientGunIgnores2())
  429. if cbaa and (bbaa - dbaa).magnitude > 6 then
  430. _ad.Visible = true
  431. local _caa = dad:WorldToScreenPoint(dbaa)
  432. _ad:TweenSizeAndPosition(dbc(0, 25, 0, 25), dbc(0, _caa.x, 0, _caa.y), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.2, true)
  433. else
  434. _ad:TweenSizeAndPosition(dbc(0, 0, 0, 0), _ad.Position, Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.2, true)
  435. end
  436. end
  437. end
  438. if d_c.Tool then
  439. local baaa = 1
  440. local caaa = math.floor((tick() - _aaa) / 0.01666)
  441. if baaa < caaa then
  442. baaa = caaa
  443. end
  444. for i = 1, baaa do
  445. local daaa = true
  446. local _baa = false
  447. local abaa = false
  448. for bbaa, cbaa in pairs(bdd) do
  449. if not cbaa.finishedKick then
  450. daaa = false
  451. break
  452. end
  453. end
  454. for i = 1, baaa do
  455. for bbaa, cbaa in pairs(bdd) do
  456. if not cbaa.started and not abaa then
  457. if 2 > cbaa.applied then
  458. cbaa.applied = cbaa.applied + 1
  459. dad.CFrame = dad.CFrame * cbaa.rot
  460. if d_c.Tool.Name ~= "Submachine Gun" and d_c.Tool.Name ~= "Silenced SMG" then
  461. abaa = true
  462. end
  463. else
  464. cbaa.finishedKick = true
  465. cbaa.started = 1
  466. end
  467. elseif cbaa.started and daaa and not _baa then
  468. if cbaa.started >= 2 then
  469. if 0 < cbaa.applied then
  470. cbaa.applied = cbaa.applied - 1
  471. dad.CFrame = dad.CFrame * cbaa.rotNeg
  472. _baa = true
  473. else
  474. table.remove(bdd, bbaa)
  475. end
  476. else
  477. cbaa.started = cbaa.started + 1
  478. end
  479. end
  480. end
  481. end
  482. end
  483. end
  484. _aaa = tick()
  485. if d_c.Tool and d_c.Tool.Parent ~= ccc then
  486. cbd = false
  487. end
  488. if a__a then
  489. if cbd then
  490. if not da_a then
  491. da_a = tick()
  492. ddd = false
  493. elseif tick() - da_a >= _b_a then
  494. ddd = true
  495. else
  496. ddd = false
  497. end
  498. elseif bb_a then
  499. if tick() - bb_a >= ab_a then
  500. da_a = nil
  501. ddd = false
  502. else
  503. ddd = true
  504. end
  505. else
  506. bb_a = tick()
  507. ddd = true
  508. end
  509. else
  510. ddd = true
  511. end
  512. if _cd and ddd and d_c.Tool and d_c.Tool.Parent == ccc and cbd and not cdd and cad.Character and cad.Character:FindFirstChild("Humanoid") and 0 < cad.Character.Humanoid.Player_Health.Value then
  513. if tick() - acd >= 1 / acc.FireRate then
  514. d_aa()
  515. end
  516. elseif cad.Character and cad.Character:FindFirstChild("Humanoid") and 0 >= cad.Character.Humanoid.Player_Health.Value then
  517. cbd = false
  518. elseif _cd and d_c.Tool and d_c.Tool.Parent == ccc then
  519. c_d.Visible = false
  520. end
  521. aaaa = tick()
  522. end)
  523. _dc.InputBegan:connect(function(baaa)
  524. if not _G.buildOpen and not _G.chatOpen and not _G.Inventory and not _G.Map and d_c.Tool and cad.Character and cad.Character:FindFirstChild("Humanoid") and d_c.Tool.Parent == ccc then
  525. if (baaa.UserInputType.Value <= 2 and baaa.UserInputType.Value == _G.setKeycodes.Reload_KB or baaa.KeyCode.Value == _G.setKeycodes.Reload_KB or baaa.KeyCode == Enum.KeyCode.ButtonX) and _cd and d_c.Tool.Parent == ccc then
  526. a_aa()
  527. elseif (baaa.UserInputType == Enum.UserInputType.MouseButton1 or baaa.KeyCode == Enum.KeyCode.ButtonR2) and not cdd and _cd and d_c.Tool.Parent == ccc then
  528. if acc.Mode == "Auto" or acc.Mode == "Burst" then
  529. cbd = true
  530. if a__a then
  531. d_c.Tool.Handle.Up:Play()
  532. end
  533. end
  534. if _cd and d_c.Tool.Parent == ccc and (cbd or acc.Mode == "Single") and not cdd and cad.Character:FindFirstChild("Humanoid") and cad.Character.Humanoid.Player_Health.Value > 0 and tick() - acd >= 1 / acc.FireRate and not a__a then
  535. d_aa()
  536. end
  537. end
  538. end
  539. end)
  540. _dc.InputEnded:connect(function(baaa, caaa)
  541. if not _G.chatOpen and not _G.Inventory and not _G.Map and cad.Character and cad.Character:FindFirstChild("Humanoid") and cad.Character:FindFirstChild("Humanoid") and cad.Character.Humanoid.Player_Health.Value > 0 and d_c.Tool and d_c.Tool.Parent == ccc then
  542. if baaa.UserInputType == Enum.UserInputType.MouseButton1 or baaa.KeyCode == Enum.KeyCode.ButtonR2 then
  543. if acc.Mode == "Auto" or acc.Mode == "Burst" then
  544. cbd = false
  545. if a__a then
  546. d_c.Tool.Handle.Down:Play()
  547. d_c.Tool.Handle.Up:Stop()
  548. end
  549. end
  550. elseif baaa.UserInputType == Enum.UserInputType.Touch and not caaa and (acc.Mode == "Auto" or acc.Mode == "Burst") then
  551. cbd = false
  552. if a__a then
  553. d_c.Tool.Handle.Down:Play()
  554. d_c.Tool.Handle.Up:Stop()
  555. end
  556. end
  557. end
  558. end)
  559. function d_c.Setup(baaa)
  560. acc = _a_a[baaa.Name]
  561. _bd = acc.maxSpread / 1.75
  562. ccd = acc.baseSpread
  563. d_c.Tool = baaa
  564. d_c.ToolName = baaa.Name
  565. ___a = string.find(d_c.ToolName, "Shotgun")
  566. a__a = string.find(d_c.ToolName, "Minigun") or string.find(d_c.ToolName, "Peppermint Sprayer")
  567. _cc = game.ReplicatedStorage.Remote_Functions.Handle_Object:InvokeServer(baaa)
  568. for caaa, daaa in pairs(a_d:GetChildren()) do
  569. if string.find(daaa.Name, "Slot") and daaa.Value and daaa.Value == d_c.Tool then
  570. dcd = daaa
  571. end
  572. end
  573. if dcd and dcd:FindFirstChild("Ammo") then
  574. _dd = dcd.Ammo.Value
  575. end
  576. d_c.Tool.Equipped:connect(function()
  577. _cd = true
  578. cbd = false
  579. baaa.Handle.Equip:Play()
  580. cdc:Play(0.25)
  581. if dcd and dcd:FindFirstChild("Ammo") then
  582. _dd = dcd.Ammo.Value
  583. end
  584. _ad.Visible = false
  585. end)
  586. d_c.Tool.Unequipped:connect(function()
  587. _cd = false
  588. cbd = false
  589. baaa.Handle.Unequip:Play()
  590. _ad.Visible = false
  591. d_c.Tool.Handle.Reload:Stop()
  592. d_c.Tool.Handle.Eject:Stop()
  593. ddc:Stop(0.25)
  594. cdd = false
  595. _G.isReloading = false
  596. cdc:Stop(0.25)
  597. bdc:Stop(0.25)
  598. end)
  599. end
  600. return d_c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement