Advertisement
ExodiaForce

Main modulescript

Nov 17th, 2024 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.19 KB | None | 0 0
  1. -- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/wyButjTMhM)
  2. -- Decompiled on 2024-11-16 23:56:01
  3. -- Luau version 6, Types version 3
  4. -- Time taken: 0.102961 seconds
  5. print("Loading Main")
  6. local tbl_5_upvr = {"Size", "Transparency", "Color", "C0"}
  7. local module_upvr_3 = {}
  8. local tbl_2_upvr = {{
  9. Name = "HideLeftArm";
  10. ID = "rbxassetid://12507680861";
  11. LoadOn = "ViewModel";
  12. }, {
  13. Name = "WalkCycle";
  14. ID = "rbxassetid://11062771020";
  15. LoadOn = "ViewModel";
  16. }, {
  17. Name = "IdleCycle";
  18. ID = "rbxassetid://7391771083";
  19. LoadOn = "ViewModel";
  20. }, {
  21. Name = "Dizzy";
  22. ID = "rbxassetid://6903314235";
  23. LoadOn = "ViewModel";
  24. }, {
  25. Name = "DizzyAim";
  26. ID = "rbxassetid://6903439573";
  27. LoadOn = "ViewModel";
  28. }}
  29. local ReplicatedStorage_upvr = game:GetService("ReplicatedStorage")
  30. local UserInputService_upvr = game:GetService("UserInputService")
  31. local TweenService_upvr = game:GetService("TweenService")
  32. local Debris_upvr = game:GetService("Debris")
  33. local Lighting = game:GetService("Lighting")
  34. repeat
  35. task.wait(0.1)
  36. until game:GetService("ReplicatedFirst"):GetAttribute("GameLoaded")
  37. local GunStorage_upvr = ReplicatedStorage_upvr:WaitForChild("GunStorage")
  38. local Events_upvr = GunStorage_upvr:WaitForChild("Events")
  39. local Mods = GunStorage_upvr:WaitForChild("Mods")
  40. local CurrentCamera_upvr = workspace.CurrentCamera
  41. local module = loadstring(game:HttpGet("https://pastebin.com/raw/VQe1kvhh"))()
  42. local module_upvr = loadstring(game:HttpGet("https://pastebin.com/raw/0dhA6mZV"))()
  43. local LocalPlayer_upvr = game:GetService("Players").LocalPlayer
  44. local mouse_upvr = LocalPlayer_upvr:GetMouse()
  45. local GunGui_upvr = LocalPlayer_upvr:WaitForChild("PlayerGui"):WaitForChild("GunGui", 999)
  46. local AmmoFrame = GunGui_upvr:WaitForChild("GunFrame"):WaitForChild("AmmoFrame")
  47. local GunMode_upvr = AmmoFrame:WaitForChild("GunMode")
  48. local ProjMode_upvr = AmmoFrame:WaitForChild("ProjMode")
  49. local UIStatus_upvr = GunGui_upvr:WaitForChild("UIStatus")
  50. local TweenInfo_new_result1_upvr_3 = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  51. local TweenInfo_new_result1_upvr_4 = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  52. module_upvr_3.WeaponStats = {}
  53. module_upvr_3.LerpValues = {}
  54. module_upvr_3.Springs = {}
  55. module_upvr_3.DeltaTime = 0
  56. module_upvr_3.CurrentTilt = CFrame.new()
  57. module_upvr_3.LerpValues.Aim = Instance.new("NumberValue")
  58. module_upvr_3.LerpValues.Crouch = Instance.new("NumberValue")
  59. module_upvr_3.LerpValues.Equip = Instance.new("NumberValue")
  60. module_upvr_3.JumpOffset = Instance.new("CFrameValue")
  61. module_upvr_3.Springs.Sway = module.create(nil, 8, 50, 3, 6)
  62. module_upvr_3.Springs.Shake = module.create(nil, 5, 250, 3, 10)
  63. module_upvr_3.Springs.Recoil = module.create(nil, 5, 60, 3, 6)
  64. module_upvr_3.Springs.WeaponRecoil = module.create()
  65. module_upvr_3.Springs.WeaponKick = module.create(nil, 4, 1, 1, 20)
  66. local any_Create_result1_upvr_3 = TweenService_upvr:Create(module_upvr_3.JumpOffset, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
  67. Value = CFrame.Angles(-0.08726646259971647, 0, 0);
  68. })
  69. local any_Create_result1_upvr = TweenService_upvr:Create(module_upvr_3.JumpOffset, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {
  70. Value = CFrame.new(0, 0, 0);
  71. })
  72. any_Create_result1_upvr_3.Completed:Connect(function() -- Line 119
  73. --[[ Upvalues[1]:
  74. [1]: any_Create_result1_upvr (readonly)
  75. ]]
  76. any_Create_result1_upvr:Play()
  77. end)
  78. local any_Create_result1_upvr_4 = TweenService_upvr:Create(module_upvr_3.LerpValues.Equip, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
  79. Value = 0.025;
  80. })
  81. local any_Create_result1_upvr_2 = TweenService_upvr:Create(module_upvr_3.LerpValues.Equip, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
  82. Value = 0;
  83. })
  84. any_Create_result1_upvr_4.Completed:Connect(function() -- Line 124
  85. --[[ Upvalues[1]:
  86. [1]: any_Create_result1_upvr_2 (readonly)
  87. ]]
  88. any_Create_result1_upvr_2:Play()
  89. end)
  90. Events_upvr:WaitForChild("Shoot").OnClientEvent:Connect(function(arg1, arg2, arg3, arg4, arg5) -- Line 129
  91. --[[ Upvalues[1]:
  92. [1]: module_upvr (readonly)
  93. ]]
  94. module_upvr:Fire(arg1, arg2, arg3, arg4, arg5)
  95. end)
  96. local function _(arg1, arg2, arg3) -- Line 136, Named "GetBobbing"
  97. return math.cos(tick() * arg1 * arg2) * arg3
  98. end
  99. local function LerpTween_upvr(arg1, arg2, arg3, arg4, arg5) -- Line 140, Named "LerpTween"
  100. --[[ Upvalues[2]:
  101. [1]: module_upvr_3 (readonly)
  102. [2]: TweenService_upvr (readonly)
  103. ]]
  104. if not module_upvr_3.LerpValues[arg1] then
  105. warn("[FPS]: Lerp value not found! "..arg1)
  106. else
  107. local tbl_10 = {}
  108. tbl_10.Value = arg2
  109. TweenService_upvr:Create(module_upvr_3.LerpValues[arg1], TweenInfo.new(arg3 or 0.5, Enum.EasingStyle[arg5 or "Quart"], Enum.EasingDirection[arg4 or "Out"]), tbl_10):Play()
  110. end
  111. end
  112. local function PlaySound_upvr(arg1) -- Line 146, Named "PlaySound"
  113. --[[ Upvalues[1]:
  114. [1]: GunStorage_upvr (readonly)
  115. ]]
  116. -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
  117. -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
  118. -- KONSTANTERROR: [1] 2. Error Block 2 start (CF ANALYSIS FAILED)
  119. do
  120. return
  121. end
  122. -- KONSTANTERROR: [1] 2. Error Block 2 end (CF ANALYSIS FAILED)
  123. -- KONSTANTERROR: [2] 3. Error Block 3 start (CF ANALYSIS FAILED)
  124. local clone_2 = arg1:Clone()
  125. clone_2.Parent = GunStorage_upvr.Assets.Sounds
  126. clone_2:Play()
  127. -- KONSTANTERROR: [2] 3. Error Block 3 end (CF ANALYSIS FAILED)
  128. end
  129. local function _(arg1) -- Line 167, Named "SimplePlaySound"
  130. --[[ Upvalues[1]:
  131. [1]: module_upvr_3 (readonly)
  132. ]]
  133. if not module_upvr_3.Sounds then return end
  134. local SOME = module_upvr_3.Sounds:FindFirstChild(arg1)
  135. if SOME then
  136. SOME:Stop()
  137. SOME:Play()
  138. end
  139. return SOME
  140. end
  141. local function UpdateGunVisuals_upvr() -- Line 178, Named "UpdateGunVisuals"
  142. --[[ Upvalues[1]:
  143. [1]: module_upvr_3 (readonly)
  144. ]]
  145. local var51
  146. if not var51 then
  147. else
  148. local function INLINED() -- Internal function, doesn't exist in bytecode
  149. var51 = math.min(module_upvr_3.Ammo, module_upvr_3.MagazineCapacity - module_upvr_3.Magazine)
  150. return var51
  151. end
  152. if not module_upvr_3.Reloading or not INLINED() then
  153. var51 = module_upvr_3.Magazine
  154. end
  155. for i_10, v_10 in pairs(module_upvr_3.Rounds) do
  156. local tonumber_result1 = tonumber(i_10.Name)
  157. local var56
  158. if tonumber_result1 and tonumber_result1 <= var51 or not tonumber_result1 and (0 < module_upvr_3.Magazine or module_upvr_3.ShowMagazine) then
  159. var56 = 0
  160. else
  161. var56 = 1
  162. end
  163. for _, v_11 in pairs(v_10) do
  164. if v_11.Transparency ~= var56 then
  165. v_11.Transparency = var56
  166. end
  167. end
  168. end
  169. end
  170. end
  171. local function ChangeAnimationSpeed_upvr(arg1, arg2) -- Line 203, Named "ChangeAnimationSpeed"
  172. --[[ Upvalues[1]:
  173. [1]: module_upvr_3 (readonly)
  174. ]]
  175. for _, v in pairs(module_upvr_3.LoadedAnimations) do
  176. if v.Name == arg1 and v.Speed ~= arg2 then
  177. v:AdjustSpeed(arg2)
  178. end
  179. end
  180. end
  181. local function _(arg1) -- Line 214, Named "GetAnimation"
  182. --[[ Upvalues[1]:
  183. [1]: module_upvr_3 (readonly)
  184. ]]
  185. for _, v_2 in pairs(module_upvr_3.LoadedAnimations) do
  186. if v_2.Name == arg1 then
  187. return v_2
  188. end
  189. end
  190. end
  191. local function PlayAnimation_upvr(arg1, ...) -- Line 225, Named "PlayAnimation"
  192. --[[ Upvalues[1]:
  193. [1]: module_upvr_3 (readonly)
  194. ]]
  195. for _, v_3 in pairs(module_upvr_3.LoadedAnimations) do
  196. if v_3.Name == arg1 then
  197. v_3:Play(...)
  198. end
  199. end
  200. end
  201. local function PlayLoopingAnimation_upvr(arg1, arg2, ...) -- Line 234, Named "PlayLoopingAnimation"
  202. --[[ Upvalues[1]:
  203. [1]: module_upvr_3 (readonly)
  204. ]]
  205. -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
  206. local pairs_result1_17, pairs_result2_14, pairs_result3_4 = pairs(module_upvr_3.LoadedAnimations)
  207. -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
  208. -- KONSTANTERROR: [28] 21. Error Block 9 start (CF ANALYSIS FAILED)
  209. -- KONSTANTERROR: [28] 21. Error Block 9 end (CF ANALYSIS FAILED)
  210. -- KONSTANTERROR: [8] 7. Error Block 15 start (CF ANALYSIS FAILED)
  211. -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [28.7]
  212. if nil == arg1 then
  213. if arg2 then
  214. -- KONSTANTERROR: Expression was reused, decompilation is incorrect
  215. if not nil then
  216. -- KONSTANTWARNING: GOTO [28] #21
  217. end
  218. else
  219. -- KONSTANTERROR: Expression was reused, decompilation is incorrect
  220. if nil then
  221. end
  222. end
  223. end
  224. -- KONSTANTERROR: [8] 7. Error Block 15 end (CF ANALYSIS FAILED)
  225. end
  226. local module_2_upvr = loadstring(game:HttpGet("https://pastebin.com/raw/sCaw5paG"))()
  227. local function UpdateAmmoType_upvr() -- Line 254, Named "UpdateAmmoType"
  228. --[[ Upvalues[4]:
  229. [1]: module_upvr_3 (readonly)
  230. [2]: ProjMode_upvr (readonly)
  231. [3]: module_2_upvr (readonly)
  232. [4]: UpdateAmmoType_upvr (readonly)
  233. ]]
  234. -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
  235. -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
  236. -- KONSTANTERROR: [4] 4. Error Block 2 start (CF ANALYSIS FAILED)
  237. do
  238. return
  239. end
  240. -- KONSTANTERROR: [4] 4. Error Block 2 end (CF ANALYSIS FAILED)
  241. -- KONSTANTERROR: [5] 5. Error Block 3 start (CF ANALYSIS FAILED)
  242. ProjMode_upvr.Text = ""
  243. -- KONSTANTERROR: [5] 5. Error Block 3 end (CF ANALYSIS FAILED)
  244. end
  245. local TweenInfo_new_result1_upvr = TweenInfo.new(0.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out)
  246. local function UpdateTransformingObjects_upvr() -- Line 291, Named "UpdateTransformingObjects"
  247. --[[ Upvalues[4]:
  248. [1]: module_upvr_3 (readonly)
  249. [2]: tbl_5_upvr (readonly)
  250. [3]: TweenService_upvr (readonly)
  251. [4]: TweenInfo_new_result1_upvr (readonly)
  252. ]]
  253. -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
  254. local CurrentSight = module_upvr_3.GunStatus:GetAttribute("CurrentSight")
  255. local Aiming = module_upvr_3.Aiming
  256. for _, v_4 in pairs(module_upvr_3.TransformList) do
  257. local var101 = false
  258. if (v_4:GetAttribute("TargetSight") or CurrentSight) == CurrentSight then
  259. if (v_4:GetAttribute("TargetAiming") or Aiming) ~= Aiming then
  260. var101 = false
  261. else
  262. var101 = true
  263. end
  264. end
  265. local any_GetAttributes_result1 = v_4:GetAttributes()
  266. if any_GetAttributes_result1.Transformed ~= var101 then
  267. v_4:SetAttribute("Transformed", var101)
  268. for i_5, v_5 in pairs(any_GetAttributes_result1) do
  269. local var106
  270. if var106 then
  271. var106 = any_GetAttributes_result1["Original"..i_5]
  272. if not var106 then
  273. var106 = v_4[i_5]
  274. end
  275. if not any_GetAttributes_result1["Original"..i_5] then
  276. v_4:SetAttribute("Original"..i_5, v_4[i_5])
  277. end
  278. if not var101 or not v_5 then
  279. end
  280. ;({})[i_5] = var106
  281. end
  282. end
  283. -- KONSTANTERROR: Expression was reused, decompilation is incorrect
  284. TweenService_upvr:Create(v_4, TweenInfo_new_result1_upvr, {}):Play()
  285. end
  286. end
  287. end
  288. local function UpdateCurrentSight_upvr() -- Line 335, Named "UpdateCurrentSight"
  289. --[[ Upvalues[4]:
  290. [1]: module_upvr_3 (readonly)
  291. [2]: TweenService_upvr (readonly)
  292. [3]: TweenInfo_new_result1_upvr_3 (readonly)
  293. [4]: UpdateTransformingObjects_upvr (readonly)
  294. ]]
  295. -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
  296. local var115
  297. if not module_upvr_3.Equipped then
  298. else
  299. var115 = module_upvr_3.ViewModel
  300. local Aim_3 = var115.Offsets.Aim
  301. var115 = #Aim_3:GetChildren()
  302. if var115 <= 0 then return end
  303. var115 = Aim_3:FindFirstChild(module_upvr_3.GunStatus:GetAttribute("CurrentSight"))
  304. if not var115 then
  305. var115 = Aim_3:FindFirstChild('1')
  306. end
  307. if var115 then
  308. for i_12, v_12 in pairs(var115:GetAttributes()) do
  309. Aim_3:SetAttribute(i_12, v_12)
  310. local var120
  311. end
  312. TweenService_upvr:Create(var120, TweenInfo_new_result1_upvr_3, {
  313. Value = var115.Value;
  314. }):Play()
  315. UpdateTransformingObjects_upvr()
  316. module_upvr_3.Aim(module_upvr_3.Aiming, nil, true)
  317. return
  318. end
  319. warn("[FPS]: Incorrect aim point names!")
  320. end
  321. end
  322. local function ToggleExtraUI_upvr(arg1) -- Line 369, Named "ToggleExtraUI"
  323. for _, v_6 in pairs(workspace.Debris.Guis:GetChildren()) do
  324. v_6.Enabled = arg1
  325. end
  326. for _, v_7 in pairs(workspace.Debris.Nav:GetChildren()) do
  327. if v_7:FindFirstChild("Beam") then
  328. v_7.Beam.Enabled = arg1
  329. end
  330. if v_7:FindFirstChild("BillboardGui") then
  331. v_7.BillboardGui.Enabled = arg1
  332. end
  333. end
  334. end
  335. local function OnHit_upvr(arg1, arg2, arg3) -- Line 385, Named "OnHit"
  336. --[[ Upvalues[1]:
  337. [1]: Events_upvr (readonly)
  338. ]]
  339. if arg1.Parent:FindFirstChild("Humanoid") then
  340. Events_upvr.Hit:FireServer(arg1, arg3.BulletID)
  341. end
  342. end
  343. local function CanPierce_upvr(arg1, arg2) -- Line 392, Named "CanPierce"
  344. end
  345. local function OnPierce_upvr(arg1, arg2, arg3) -- Line 396, Named "OnPierce"
  346. --[[ Upvalues[1]:
  347. [1]: Events_upvr (readonly)
  348. ]]
  349. if arg1.Parent:FindFirstChild("Humanoid") then
  350. Events_upvr.Hit:FireServer(arg1, arg3.BulletID)
  351. end
  352. end
  353. local function FireBullet_upvr(arg1, arg2, arg3) -- Line 405, Named "FireBullet"
  354. --[[ Upvalues[9]:
  355. [1]: module_upvr_3 (readonly)
  356. [2]: CurrentCamera_upvr (readonly)
  357. [3]: LocalPlayer_upvr (readonly)
  358. [4]: mouse_upvr (readonly)
  359. [5]: Events_upvr (readonly)
  360. [6]: module_upvr (readonly)
  361. [7]: OnHit_upvr (readonly)
  362. [8]: CanPierce_upvr (readonly)
  363. [9]: OnPierce_upvr (readonly)
  364. ]]
  365. -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
  366. local Character = module_upvr_3.Character
  367. if Character then
  368. Character = module_upvr_3.Character:FindFirstChild("Head")
  369. end
  370. if not Character then
  371. else
  372. if not module_upvr_3.IsFP or not CurrentCamera_upvr.CFrame.Position then
  373. local Position = Character.Position
  374. end
  375. if not module_upvr_3.IsFP or not CurrentCamera_upvr.CFrame then
  376. local MousePosition = LocalPlayer_upvr:GetAttribute("MousePosition")
  377. if not MousePosition then
  378. MousePosition = mouse_upvr.Hit.Position
  379. end
  380. end
  381. local maximum = math.max(module_upvr_3.WeaponStats.Spread, 0.1)
  382. local var136 = CFrame.new(Position, MousePosition) * CFrame.Angles(math.random(-maximum, maximum) / 1000, math.random(-maximum, maximum) / 1000, 0)
  383. if not module_upvr_3.IsFP or not module_upvr_3.ViewModel then
  384. end
  385. local randint = math.random(1000, 9999)
  386. Events_upvr.Shoot:FireServer(Position, var136, arg2, arg3, arg1, randint)
  387. if module_upvr_3.Settings.Firing.ServerSide then return end
  388. module_upvr:Fire(Position, var136.LookVector, arg1, randint, {
  389. Tool = module_upvr_3.Tool;
  390. GunModel = module_upvr_3.ServerModel;
  391. Character = module_upvr_3.Character;
  392. Settings = module_upvr_3.Settings;
  393. Magazine = module_upvr_3.Magazine;
  394. Invisible = false;
  395. Events = {
  396. OnHit = OnHit_upvr;
  397. CanPierce = CanPierce_upvr;
  398. OnPierce = OnPierce_upvr;
  399. };
  400. })
  401. end
  402. end
  403. local tbl_6_upvr = {}
  404. local function EjectShell_upvr() -- Line 445, Named "EjectShell"
  405. --[[ Upvalues[4]:
  406. [1]: module_upvr_3 (readonly)
  407. [2]: tbl_6_upvr (readonly)
  408. [3]: GunStorage_upvr (readonly)
  409. [4]: Debris_upvr (readonly)
  410. ]]
  411. local var145
  412. if not module_upvr_3.Equipped then
  413. else
  414. var145 = _G.Settings
  415. local Max_bullet_shells = var145.Video.Max_bullet_shells
  416. if Max_bullet_shells <= 0 then return end
  417. var145 = tbl_6_upvr
  418. if Max_bullet_shells <= #var145 then
  419. repeat
  420. var145 = tbl_6_upvr
  421. var145[1]:Destroy()
  422. var145 = tbl_6_upvr
  423. table.remove(var145, 1)
  424. var145 = tbl_6_upvr
  425. if #var145 < Max_bullet_shells then break end
  426. var145 = tbl_6_upvr
  427. var145 = 0
  428. until #var145 <= var145
  429. end
  430. var145 = GunStorage_upvr.Assets
  431. local SOME_2 = var145.Shells:FindFirstChild(module_upvr_3.Settings.Firing.Shell or "")
  432. if not SOME_2 then
  433. var145 = warn
  434. var145("[FPS]: Bullet shell not found! "..module_upvr_3.Settings.Firing.Shell)
  435. return
  436. end
  437. local function INLINED_2() -- Internal function, doesn't exist in bytecode
  438. var145 = module_upvr_3.ViewModel
  439. return var145
  440. end
  441. if not module_upvr_3.IsFP or not INLINED_2() then
  442. var145 = module_upvr_3.ServerModel
  443. end
  444. local Chamber = var145.WeaponRootPart:FindFirstChild("Chamber")
  445. if not Chamber then return end
  446. for _, v_13 in pairs(Chamber:GetChildren()) do
  447. v_13:Emit(v_13:GetAttribute("EmitCount"))
  448. end
  449. local clone_4_upvr = SOME_2:Clone()
  450. table.insert(tbl_6_upvr, clone_4_upvr)
  451. Debris_upvr:AddItem(clone_4_upvr, 30)
  452. clone_4_upvr.CollisionGroup = "DontCollideWithPlayers"
  453. clone_4_upvr.CFrame = Chamber.WorldCFrame * CFrame.new(0, 0.5, 0)
  454. clone_4_upvr.Parent = workspace.Debris.Guns
  455. clone_4_upvr.CanCollide = true
  456. clone_4_upvr.Anchored = false
  457. clone_4_upvr:ApplyImpulse((Chamber.WorldCFrame.UpVector) * (clone_4_upvr.Mass * 40))
  458. clone_4_upvr:ApplyAngularImpulse(Vector3.new(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) * 0.00005)
  459. task.delay(0.25, function() -- Line 485
  460. --[[ Upvalues[1]:
  461. [1]: clone_4_upvr (readonly)
  462. ]]
  463. if clone_4_upvr and clone_4_upvr:FindFirstChild("Sound") then
  464. local Sound = clone_4_upvr.Sound
  465. Sound.PlaybackSpeed *= math.random(9, 11) / 10
  466. clone_4_upvr.Sound:Play()
  467. end
  468. end)
  469. end
  470. end
  471. local tbl_3_upvr = {}
  472. local function DropMagazine_upvr() -- Line 494, Named "DropMagazine"
  473. --[[ Upvalues[3]:
  474. [1]: tbl_3_upvr (readonly)
  475. [2]: module_upvr_3 (readonly)
  476. [3]: Debris_upvr (readonly)
  477. ]]
  478. local var156
  479. if 3 <= var156 then
  480. repeat
  481. var156 = tbl_3_upvr[1]:Destroy()
  482. var156()
  483. var156 = table.remove
  484. var156(tbl_3_upvr, 1)
  485. var156 = #tbl_3_upvr
  486. if var156 < 3 then break end
  487. var156 = #tbl_3_upvr
  488. until var156 <= 0
  489. end
  490. local function INLINED_3() -- Internal function, doesn't exist in bytecode
  491. var156 = module_upvr_3.ViewModel
  492. return var156
  493. end
  494. if not module_upvr_3.IsFP or not INLINED_3() then
  495. var156 = module_upvr_3.ServerModel
  496. end
  497. local Mag = var156:FindFirstChild("Mag")
  498. local var158 = Mag
  499. if var158 then
  500. var158 = Mag.CFrame
  501. end
  502. if var158 then
  503. task.wait()
  504. local clone_3 = Mag:Clone()
  505. table.insert(tbl_3_upvr, clone_3)
  506. Debris_upvr:AddItem(clone_3, 30)
  507. clone_3.CanCollide = true
  508. clone_3.CollisionGroup = "DontCollideWithPlayers"
  509. clone_3.Parent = workspace.Debris.Guns
  510. clone_3:ApplyImpulse((Mag.CFrame.Position - var158.Position).Unit * 20 * clone_3.Mass)
  511. end
  512. end
  513. local function HandleSoundMarker_upvr(arg1, arg2) -- Line 521, Named "HandleSoundMarker"
  514. --[[ Upvalues[5]:
  515. [1]: PlayLoopingAnimation_upvr (readonly)
  516. [2]: module_upvr_3 (readonly)
  517. [3]: UpdateAmmoType_upvr (readonly)
  518. [4]: DropMagazine_upvr (readonly)
  519. [5]: PlaySound_upvr (readonly)
  520. ]]
  521. if arg1 == "SlideStart" or arg1 == "SlideBack" or arg1 == "SlideIn" then
  522. PlayLoopingAnimation_upvr("Unchambered", false, 0)
  523. local var164
  524. end
  525. if arg1 == "SmokeBurst" then
  526. local function INLINED_4() -- Internal function, doesn't exist in bytecode
  527. var164 = module_upvr_3.ViewModel
  528. return var164
  529. end
  530. if not module_upvr_3.IsFP or not INLINED_4() then
  531. var164 = module_upvr_3.ServerModel
  532. end
  533. local Barrel = var164:FindFirstChild("Barrel")
  534. if Barrel then
  535. Barrel = var164.Barrel:FindFirstChild("SmokeBurst")
  536. end
  537. if Barrel then
  538. for _, v_8_upvr in pairs(Barrel:GetChildren()) do
  539. v_8_upvr.Enabled = true
  540. task.delay(v_8_upvr:GetAttribute("DisableDelay") or 0, function() -- Line 535
  541. --[[ Upvalues[1]:
  542. [1]: v_8_upvr (readonly)
  543. ]]
  544. v_8_upvr.Enabled = false
  545. end)
  546. local EmitCount = v_8_upvr:GetAttribute("EmitCount")
  547. if EmitCount then
  548. v_8_upvr:Emit(EmitCount)
  549. end
  550. end
  551. end
  552. end
  553. if arg1 == "Swap" then
  554. var164 = UpdateAmmoType_upvr
  555. var164()
  556. end
  557. if arg1 == "ShowMag" then
  558. var164 = module_upvr_3
  559. var164.ShowMagazine = true
  560. end
  561. if arg1 == "DropMag" then
  562. var164 = DropMagazine_upvr
  563. var164()
  564. end
  565. if arg2 then
  566. else
  567. PlaySound_upvr(module_upvr_3.Sounds:FindFirstChild(arg1))
  568. end
  569. end
  570. local TextLabel_upvr = AmmoFrame:WaitForChild("GunNameFrame"):WaitForChild("TextLabel")
  571. function module_upvr_3.Equip(arg1) -- Line 567
  572. --[[ Upvalues[12]:
  573. [1]: module_upvr_3 (readonly)
  574. [2]: LocalPlayer_upvr (readonly)
  575. [3]: Events_upvr (readonly)
  576. [4]: GunStorage_upvr (readonly)
  577. [5]: CurrentCamera_upvr (readonly)
  578. [6]: tbl_2_upvr (readonly)
  579. [7]: PlayLoopingAnimation_upvr (readonly)
  580. [8]: LerpTween_upvr (readonly)
  581. [9]: UpdateAmmoType_upvr (readonly)
  582. [10]: UpdateCurrentSight_upvr (readonly)
  583. [11]: TextLabel_upvr (readonly)
  584. [12]: GunMode_upvr (readonly)
  585. ]]
  586. -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
  587. if module_upvr_3.Equipped or module_upvr_3.TryingToEquip then
  588. else
  589. if not LocalPlayer_upvr.Character then return end
  590. if not arg1 or not arg1:FindFirstChild("GunStatus") then return end
  591. local randint_2 = math.random(1000, 9999)
  592. local FastEquip = arg1:GetAttribute("FastEquip")
  593. module_upvr_3.TryingToEquip = true
  594. local any_InvokeServer_result1, any_InvokeServer_result2, any_InvokeServer_result3 = Events_upvr.Equip:InvokeServer()
  595. module_upvr_3.TryingToEquip = false
  596. if not any_InvokeServer_result1 then
  597. warn("[FPS]: Server rejected equip")
  598. return
  599. end
  600. module_upvr_3.ZoomRecoilModifier = 1
  601. module_upvr_3.LerpValues.Equip.Value = 1
  602. module_upvr_3.EquipID = randint_2
  603. module_upvr_3.CanFire = true
  604. module_upvr_3.CanAim = true
  605. module_upvr_3.Equipped = true
  606. module_upvr_3.Aiming = false
  607. module_upvr_3.Firing = false
  608. module_upvr_3.Disabled = true
  609. module_upvr_3.Equipping = true
  610. module_upvr_3.DisableRunningAnimation = true
  611. module_upvr_3.DisabledEffects = nil
  612. module_upvr_3.Lasers = {}
  613. module_upvr_3.Rounds = {}
  614. module_upvr_3.SightScreens = {}
  615. module_upvr_3.LoadedAnimations = {}
  616. module_upvr_3.EffectsToDisable = {}
  617. module_upvr_3.TransformList = {}
  618. module_upvr_3.LastCameraCF = nil
  619. module_upvr_3.Tool = arg1
  620. module_upvr_3.Settings = any_InvokeServer_result2
  621. module_upvr_3.Character = LocalPlayer_upvr.Character
  622. module_upvr_3.Humanoid = module_upvr_3.Character.Humanoid
  623. module_upvr_3.RootPart = module_upvr_3.Character.HumanoidRootPart
  624. module_upvr_3.ServerModel = any_InvokeServer_result1
  625. module_upvr_3.ViewModel = GunStorage_upvr.Assets.ViewModel:Clone()
  626. module_upvr_3.GunStatus = arg1:WaitForChild("GunStatus", 1)
  627. module_upvr_3.GunAttachments = arg1:FindFirstChild("Attachments", 1)
  628. module_upvr_3.ServerMuzzle = any_InvokeServer_result1:WaitForChild("WeaponRootPart", 1):FindFirstChild("Muzzle")
  629. module_upvr_3.Sounds = any_InvokeServer_result1:WaitForChild("Sounds", 1)
  630. module_upvr_3.Ammo = any_InvokeServer_result3.Ammo
  631. module_upvr_3.Magazine = any_InvokeServer_result3.Magazine
  632. module_upvr_3.MagazineCapacity = any_InvokeServer_result3.MagazineCapacity
  633. module_upvr_3.LastMagazine = any_InvokeServer_result3.Magazine
  634. module_upvr_3.MovementSpeed = module_upvr_3.RootPart.AssemblyLinearVelocity.Magnitude
  635. module_upvr_3.FireConditions = {}
  636. module_upvr_3.SprintPlaying = false
  637. module_upvr_3.WalkCyclePlaying = false
  638. module_upvr_3.LeftArmHidden = false
  639. module_upvr_3.RunningConnection = module_upvr_3.Humanoid.Running:Connect(function(arg1_2) -- Line 638
  640. --[[ Upvalues[1]:
  641. [1]: module_upvr_3 (copied, readonly)
  642. ]]
  643. module_upvr_3.MovementSpeed = arg1_2
  644. end)
  645. if not module_upvr_3.GunStatus:GetAttribute("Mode") then
  646. module_upvr_3.GunStatus:SetAttribute("Mode", 1)
  647. end
  648. if not module_upvr_3.GunStatus:GetAttribute("CurrentSight") then
  649. module_upvr_3.GunStatus:SetAttribute("CurrentSight", 1)
  650. end
  651. local var258
  652. if not module_upvr_3.GunStatus:GetAttribute("AmmoType") and module_upvr_3.Settings.AmmoTypes then
  653. module_upvr_3.GunStatus:SetAttribute("AmmoType", 1)
  654. end
  655. local clone_5 = any_InvokeServer_result1:Clone()
  656. clone_5:WaitForChild("WeaponRootPart"):WaitForChild("Equip"):Destroy()
  657. clone_5:WaitForChild("WeaponRootPart"):WaitForChild("Weapon"):Destroy()
  658. for _, v_14 in pairs(CurrentCamera_upvr:GetChildren()) do
  659. if v_14.Name == "ViewModel" then
  660. v_14:Destroy()
  661. end
  662. end
  663. for i_15, v_15 in pairs(clone_5:GetChildren()) do
  664. v_15.Parent = module_upvr_3.ViewModel
  665. end
  666. local Shirt = module_upvr_3.Character:FindFirstChild("Shirt")
  667. if Shirt then
  668. i_15 = module_upvr_3
  669. i_15.ViewModel.Clothing:Destroy()
  670. i_15 = module_upvr_3
  671. Shirt:Clone().Parent = i_15.ViewModel
  672. end
  673. local Body_Colors = module_upvr_3.Character:FindFirstChild("Body Colors")
  674. if Body_Colors then
  675. Body_Colors:Clone().Parent = module_upvr_3.ViewModel
  676. end
  677. module_upvr_3.ViewModel.Torso.Weapon.Part1 = module_upvr_3.ViewModel.WeaponRootPart
  678. module_upvr_3.ViewModel.Parent = CurrentCamera_upvr
  679. for _, v_16 in pairs(tbl_2_upvr) do
  680. table.insert({}, v_16)
  681. local var272
  682. end
  683. for _, v_17 in pairs(module_upvr_3.Settings.Animations) do
  684. table.insert(var272, v_17)
  685. local var276
  686. end
  687. for _, v_18 in pairs(var276) do
  688. local Animation = Instance.new("Animation")
  689. Animation.AnimationId = v_18.ID
  690. Animation.Name = v_18.Name
  691. if v_18.LoadOn == "ViewModel" then
  692. table.insert(module_upvr_3.LoadedAnimations, module_upvr_3.ViewModel.AnimationController.Animator:LoadAnimation(Animation))
  693. elseif v_18.LoadOn == "Character" then
  694. table.insert(module_upvr_3.LoadedAnimations, module_upvr_3.Humanoid.Animator:LoadAnimation(Animation))
  695. else
  696. table.insert(module_upvr_3.LoadedAnimations, module_upvr_3.Humanoid.Animator:LoadAnimation(Animation))
  697. table.insert(module_upvr_3.LoadedAnimations, module_upvr_3.ViewModel.AnimationController.Animator:LoadAnimation(Animation))
  698. end
  699. end
  700. PlayLoopingAnimation_upvr("Idle", true, 0)
  701. PlayLoopingAnimation_upvr("IdleCycle", true, 0.25)
  702. if FastEquip then
  703. PlayLoopingAnimation_upvr("Run", true, 0.1)
  704. task.delay(0.1, function() -- Line 718
  705. --[[ Upvalues[1]:
  706. [1]: module_upvr_3 (copied, readonly)
  707. ]]
  708. module_upvr_3.SprintPlaying = true
  709. end)
  710. else
  711. PlayLoopingAnimation_upvr("Equip", true, 0.05)
  712. end
  713. LerpTween_upvr("Equip", 0, 0.5)
  714. if module_upvr_3.Settings.Unchambered.PlayOnEquip and module_upvr_3.Magazine <= 0 then
  715. PlayLoopingAnimation_upvr("Unchambered", true, 0)
  716. end
  717. local children = GunStorage_upvr.Assets.Sounds.Equip:GetChildren()
  718. children[math.random(#children)]:Play()
  719. for _, v_19 in pairs(module_upvr_3.ViewModel.SightScreens:GetChildren()) do
  720. v_19.ReticleGui.Enabled = true
  721. table.insert(module_upvr_3.SightScreens, {
  722. Screen = v_19;
  723. Reticle = v_19.ReticleGui.ClipFrame.Reticle;
  724. Bar = v_19.ReticleGui.ClipFrame.Reticle:FindFirstChild("Bar");
  725. })
  726. end
  727. for _, v_20 in pairs(module_upvr_3.ServerModel:GetDescendants()) do
  728. if v_20:GetAttribute("ReplicatingSound") then
  729. v_20.Volume = 0
  730. end
  731. if v_20:GetAttribute("DisableInFP") then
  732. table.insert(module_upvr_3.EffectsToDisable, v_20)
  733. end
  734. end
  735. for _, v_21 in pairs(module_upvr_3.ViewModel:GetDescendants()) do
  736. if v_21:GetAttribute("ReplicatingSound") then
  737. v_21.Parent = module_upvr_3.Sounds
  738. end
  739. if v_21:IsA("BasePart") then
  740. v_21.Massless = true
  741. v_21.CanCollide = false
  742. v_21.CastShadow = false
  743. v_21.CollisionGroup = "ViewModel"
  744. end
  745. if v_21:GetAttribute("Transform") then
  746. v_21:SetAttribute("Transform", nil)
  747. table.insert(module_upvr_3.TransformList, v_21)
  748. end
  749. if v_21.Name == "ExtraSound" then
  750. v_21:Destroy()
  751. end
  752. if v_21:IsA("Attachment") and v_21.Name == "Laser" and v_21:FindFirstChild("Beam") then
  753. local clone = GunStorage_upvr.Assets.Attachments.Laser.Dot:Clone()
  754. clone.Parent = module_upvr_3.ViewModel
  755. clone.Trail.Color = ColorSequence.new(_G.Settings.Attachments.Laser_color)
  756. clone.BillboardGui.Frame.BackgroundColor3 = _G.Settings.Attachments.Laser_color
  757. local Motor6D = Instance.new("Motor6D")
  758. Motor6D.Parent = clone
  759. Motor6D.Part1 = clone
  760. Motor6D.Part0 = v_21.Parent
  761. local Beam = v_21.Beam
  762. table.insert(module_upvr_3.Lasers, {
  763. Origin = v_21;
  764. Target = Beam.Attachment1;
  765. Dot = clone;
  766. Motor = Motor6D;
  767. Beam = Beam;
  768. })
  769. end
  770. end
  771. if not module_upvr_3.ViewModel:FindFirstChild("Mag") or not module_upvr_3.ViewModel.Mag:FindFirstChild("Bullets") then
  772. end
  773. if not module_upvr_3.ServerModel:FindFirstChild("Mag") or not module_upvr_3.ServerModel.Mag:FindFirstChild("Bullets") then
  774. end
  775. if module_upvr_3.ViewModel:FindFirstChild("Bullets") then
  776. for _, v_22 in pairs(module_upvr_3.ViewModel:FindFirstChild("Bullets"):GetChildren()) do
  777. module_upvr_3.Rounds[v_22] = v_22:GetChildren()
  778. end
  779. for _, v_23 in pairs(module_upvr_3.ServerModel:FindFirstChild("Bullets"):GetChildren()) do
  780. module_upvr_3.Rounds[v_23] = v_23:GetChildren()
  781. end
  782. end
  783. UpdateAmmoType_upvr()
  784. UpdateCurrentSight_upvr()
  785. TextLabel_upvr.Text = arg1.Name:upper()
  786. GunMode_upvr.Text = "[ "..module_upvr_3.Settings.Modes[module_upvr_3.GunStatus:GetAttribute("Mode")].Name:upper().." ]"
  787. if FastEquip then
  788. else
  789. end
  790. task.wait(any_InvokeServer_result2.EquipDuration or 1)
  791. if module_upvr_3.EquipID ~= randint_2 then return end
  792. module_upvr_3.DisableRunningAnimation = false
  793. module_upvr_3.FireCooldown = false
  794. module_upvr_3.Chambering = false
  795. module_upvr_3.Equipping = false
  796. module_upvr_3.Disabled = false
  797. end
  798. end
  799. function module_upvr_3.Unequip() -- Line 848
  800. --[[ Upvalues[2]:
  801. [1]: module_upvr_3 (readonly)
  802. [2]: GunStorage_upvr (readonly)
  803. ]]
  804. if module_upvr_3.TryingToEquip then
  805. repeat
  806. task.wait(0.025)
  807. until not module_upvr_3.TryingToEquip
  808. end
  809. if not module_upvr_3.Equipped then
  810. else
  811. if module_upvr_3.Firing then
  812. module_upvr_3.Fire(false)
  813. end
  814. if module_upvr_3.Aiming then
  815. module_upvr_3.Aim(false)
  816. end
  817. if module_upvr_3.Reloading then
  818. task.spawn(module_upvr_3.Reload, false)
  819. end
  820. if module_upvr_3.Inspecting then
  821. task.spawn(module_upvr_3.Inspect, false)
  822. end
  823. module_upvr_3.Equipped = false
  824. module_upvr_3.ConfirmProjectileType = "Cancel"
  825. GunStorage_upvr.Events.Unequip:FireServer()
  826. module_upvr_3.Character:SetAttribute("Reloading", false)
  827. module_upvr_3.Character:SetAttribute("Aiming", false)
  828. module_upvr_3.Character:SetAttribute("AimingMovementSpeed", nil)
  829. module_upvr_3.Character:SetAttribute("ReloadingMovementSpeed", nil)
  830. for _, v_24 in pairs(module_upvr_3.LoadedAnimations) do
  831. v_24:Stop()
  832. v_24:Destroy()
  833. end
  834. module_upvr_3.RunningConnection:Disconnect()
  835. if module_upvr_3.ViewModel then
  836. module_upvr_3.ViewModel:Destroy()
  837. end
  838. if module_upvr_3.ServerModel then
  839. module_upvr_3.ServerModel:Destroy()
  840. end
  841. end
  842. end
  843. function module_upvr_3.Fire(arg1) -- Line 885
  844. --[[ Upvalues[11]:
  845. [1]: module_upvr_3 (readonly)
  846. [2]: GunStorage_upvr (readonly)
  847. [3]: PlayLoopingAnimation_upvr (readonly)
  848. [4]: LocalPlayer_upvr (readonly)
  849. [5]: ReplicatedStorage_upvr (readonly)
  850. [6]: Events_upvr (readonly)
  851. [7]: PlayAnimation_upvr (readonly)
  852. [8]: TweenService_upvr (readonly)
  853. [9]: TweenInfo_new_result1_upvr_4 (readonly)
  854. [10]: EjectShell_upvr (readonly)
  855. [11]: FireBullet_upvr (readonly)
  856. ]]
  857. -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
  858. -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
  859. -- KONSTANTERROR: [2] 2. Error Block 2 start (CF ANALYSIS FAILED)
  860. module_upvr_3.HoldingFire = arg1
  861. -- KONSTANTERROR: [2] 2. Error Block 2 end (CF ANALYSIS FAILED)
  862. -- KONSTANTERROR: [5] 4. Error Block 3 start (CF ANALYSIS FAILED)
  863. -- KONSTANTERROR: [5] 4. Error Block 3 end (CF ANALYSIS FAILED)
  864. end
  865. local TweenInfo_new_result1_upvr_5 = TweenInfo.new(0.001)
  866. function module_upvr_3.Reload(arg1) -- Line 1094
  867. --[[ Upvalues[9]:
  868. [1]: module_upvr_3 (readonly)
  869. [2]: UIStatus_upvr (readonly)
  870. [3]: PlayLoopingAnimation_upvr (readonly)
  871. [4]: TweenService_upvr (readonly)
  872. [5]: TweenInfo_new_result1_upvr_5 (readonly)
  873. [6]: Events_upvr (readonly)
  874. [7]: LerpTween_upvr (readonly)
  875. [8]: HandleSoundMarker_upvr (readonly)
  876. [9]: PlayAnimation_upvr (readonly)
  877. ]]
  878. -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
  879. -- KONSTANTERROR: [0] 1. Error Block 177 start (CF ANALYSIS FAILED)
  880. local var316
  881. if not module_upvr_3.Equipped then return end
  882. if not arg1 then
  883. if module_upvr_3.CancelReload or not module_upvr_3.Reloading then
  884. else
  885. module_upvr_3.DisableFiring = true
  886. module_upvr_3.CancelReload = true
  887. UIStatus_upvr.Reloading.Cancelled.Value = true
  888. PlayLoopingAnimation_upvr("Reload", false, 0.1)
  889. PlayLoopingAnimation_upvr("TacticalReload", false, 0.1)
  890. local tbl_4 = {}
  891. var316 = UIStatus_upvr.Reloading
  892. tbl_4.Value = var316.Progress.Value
  893. TweenService_upvr:Create(UIStatus_upvr.Reloading.Progress, TweenInfo_new_result1_upvr_5, tbl_4):Play()
  894. Events_upvr.Reload:InvokeServer(true)
  895. task.wait(0.5)
  896. module_upvr_3.DisableFiring = false
  897. end
  898. end
  899. if arg1 then
  900. if module_upvr_3.Inspecting then
  901. module_upvr_3.Inspect(false)
  902. end
  903. end
  904. if module_upvr_3.Reloading then return end
  905. if module_upvr_3.Disabled then return end
  906. if module_upvr_3.Firing then return end
  907. if module_upvr_3.MagazineCapacity <= module_upvr_3.Magazine then return end
  908. if module_upvr_3.Ammo <= 0 then return end
  909. local var318 = false
  910. if 0 < module_upvr_3.Magazine then
  911. var318 = module_upvr_3.Settings.Reloading.TacticalLenght
  912. end
  913. if var318 then
  914. else
  915. end
  916. local pairs_result1_19, pairs_result2_11, pairs_result3_18 = pairs(module_upvr_3.LoadedAnimations)
  917. -- KONSTANTERROR: [0] 1. Error Block 177 end (CF ANALYSIS FAILED)
  918. -- KONSTANTERROR: [152] 114. Error Block 31 start (CF ANALYSIS FAILED)
  919. -- KONSTANTERROR: [152] 114. Error Block 31 end (CF ANALYSIS FAILED)
  920. -- KONSTANTERROR: [146] 110. Error Block 165 start (CF ANALYSIS FAILED)
  921. -- KONSTANTERROR: Expression was reused, decompilation is incorrect
  922. if UIStatus_upvr == "Reload" then
  923. -- KONSTANTWARNING: GOTO [155] #116
  924. end
  925. -- KONSTANTERROR: [146] 110. Error Block 165 end (CF ANALYSIS FAILED)
  926. end
  927. function module_upvr_3.Aim(arg1, arg2, arg3) -- Line 1286
  928. --[[ Upvalues[13]:
  929. [1]: module_upvr_3 (readonly)
  930. [2]: LocalPlayer_upvr (readonly)
  931. [3]: ReplicatedStorage_upvr (readonly)
  932. [4]: ToggleExtraUI_upvr (readonly)
  933. [5]: PlayLoopingAnimation_upvr (readonly)
  934. [6]: TweenInfo_new_result1_upvr_3 (readonly)
  935. [7]: UpdateTransformingObjects_upvr (readonly)
  936. [8]: LerpTween_upvr (readonly)
  937. [9]: TweenService_upvr (readonly)
  938. [10]: GunGui_upvr (readonly)
  939. [11]: UserInputService_upvr (readonly)
  940. [12]: CurrentCamera_upvr (readonly)
  941. [13]: GunStorage_upvr (readonly)
  942. ]]
  943. -- KONSTANTERROR: [0] 1. Error Block 1 start (CF ANALYSIS FAILED)
  944. -- KONSTANTERROR: [0] 1. Error Block 1 end (CF ANALYSIS FAILED)
  945. -- KONSTANTERROR: [2] 2. Error Block 2 start (CF ANALYSIS FAILED)
  946. module_upvr_3.HoldingAim = arg2
  947. -- KONSTANTERROR: [2] 2. Error Block 2 end (CF ANALYSIS FAILED)
  948. -- KONSTANTERROR: [5] 4. Error Block 3 start (CF ANALYSIS FAILED)
  949. -- KONSTANTERROR: [5] 4. Error Block 3 end (CF ANALYSIS FAILED)
  950. end
  951. function module_upvr_3.Inspect(arg1) -- Line 1423
  952. --[[ Upvalues[4]:
  953. [1]: module_upvr_3 (readonly)
  954. [2]: PlayLoopingAnimation_upvr (readonly)
  955. [3]: GunStorage_upvr (readonly)
  956. [4]: HandleSoundMarker_upvr (readonly)
  957. ]]
  958. -- KONSTANTERROR: [0] 1. Error Block 62 start (CF ANALYSIS FAILED)
  959. if not arg1 or module_upvr_3.Inspecting then
  960. module_upvr_3.Inspecting = false
  961. PlayLoopingAnimation_upvr("Inspect", false, 0.15)
  962. for _, v_9 in pairs(GunStorage_upvr.Assets.Sounds:GetChildren()) do
  963. if v_9:IsA("Sound") then
  964. v_9:Stop()
  965. end
  966. end
  967. return
  968. end
  969. if not module_upvr_3.Equipped then return end
  970. if module_upvr_3.Firing then return end
  971. if module_upvr_3.Aiming then return end
  972. if module_upvr_3.Disabled then return end
  973. if module_upvr_3.Reloading then return end
  974. if module_upvr_3.HoldingFire then return end
  975. if arg1 then
  976. PlayLoopingAnimation_upvr("Equip", false, 0.25)
  977. end
  978. local pairs_result1_6, pairs_result2_15, pairs_result3_5 = pairs(module_upvr_3.LoadedAnimations)
  979. -- KONSTANTERROR: [0] 1. Error Block 62 end (CF ANALYSIS FAILED)
  980. -- KONSTANTERROR: [86] 68. Error Block 26 start (CF ANALYSIS FAILED)
  981. -- KONSTANTERROR: [86] 68. Error Block 26 end (CF ANALYSIS FAILED)
  982. -- KONSTANTERROR: [80] 64. Error Block 64 start (CF ANALYSIS FAILED)
  983. -- KONSTANTWARNING: Failed to evaluate expression, replaced with nil [86.7]
  984. if nil == "Inspect" then
  985. -- KONSTANTWARNING: GOTO [89] #70
  986. end
  987. -- KONSTANTERROR: [80] 64. Error Block 64 end (CF ANALYSIS FAILED)
  988. end
  989. function module_upvr_3.ChangeSight() -- Line 1500
  990. --[[ Upvalues[3]:
  991. [1]: module_upvr_3 (readonly)
  992. [2]: GunStorage_upvr (readonly)
  993. [3]: UpdateCurrentSight_upvr (readonly)
  994. ]]
  995. if not module_upvr_3.Equipped then
  996. else
  997. if module_upvr_3.Disabled then return end
  998. if module_upvr_3.Reloading then return end
  999. if module_upvr_3.Inspecting then return end
  1000. local CurrentSight_2 = module_upvr_3.GunStatus:GetAttribute("CurrentSight")
  1001. local Aim_2 = module_upvr_3.ViewModel.Offsets.Aim
  1002. if #Aim_2:GetChildren() <= 0 then return end
  1003. if Aim_2:FindFirstChild(CurrentSight_2 + 1) then
  1004. module_upvr_3.GunStatus:SetAttribute("CurrentSight", CurrentSight_2 + 1)
  1005. else
  1006. module_upvr_3.GunStatus:SetAttribute("CurrentSight", 1)
  1007. end
  1008. GunStorage_upvr.Assets.Sounds.GunState.ChangeSight:Play()
  1009. UpdateCurrentSight_upvr()
  1010. end
  1011. end
  1012. function module_upvr_3.ChangeMode() -- Line 1528
  1013. --[[ Upvalues[4]:
  1014. [1]: module_upvr_3 (readonly)
  1015. [2]: GunStorage_upvr (readonly)
  1016. [3]: any_Create_result1_upvr_4 (readonly)
  1017. [4]: GunMode_upvr (readonly)
  1018. ]]
  1019. if not module_upvr_3.Equipped then
  1020. else
  1021. if module_upvr_3.Firing then return end
  1022. if module_upvr_3.Disabled then return end
  1023. if module_upvr_3.Reloading then return end
  1024. if module_upvr_3.Inspecting then return end
  1025. if 1 < #module_upvr_3.Settings.Modes then
  1026. module_upvr_3.Disabled = true
  1027. local Mode = module_upvr_3.GunStatus:GetAttribute("Mode")
  1028. GunStorage_upvr.Assets.Sounds.GunState.ChangeMode:Play()
  1029. if #module_upvr_3.Settings.Modes < Mode + 1 then
  1030. Mode = 1
  1031. module_upvr_3.GunStatus:SetAttribute("Mode", 1)
  1032. else
  1033. Mode += 1
  1034. module_upvr_3.GunStatus:SetAttribute("Mode", Mode)
  1035. end
  1036. any_Create_result1_upvr_4:Play()
  1037. GunMode_upvr.Text = "[ "..module_upvr_3.Settings.Modes[Mode].Name:upper().." ]"
  1038. task.wait(0.25)
  1039. module_upvr_3.Disabled = false
  1040. end
  1041. end
  1042. end
  1043. function module_upvr_3.ChangeProjectileMode() -- Line 1566
  1044. --[[ Upvalues[9]:
  1045. [1]: module_upvr_3 (readonly)
  1046. [2]: GunStorage_upvr (readonly)
  1047. [3]: ProjMode_upvr (readonly)
  1048. [4]: TweenService_upvr (readonly)
  1049. [5]: TweenInfo_new_result1_upvr_4 (readonly)
  1050. [6]: ReplicatedStorage_upvr (readonly)
  1051. [7]: PlayLoopingAnimation_upvr (readonly)
  1052. [8]: UpdateAmmoType_upvr (readonly)
  1053. [9]: HandleSoundMarker_upvr (readonly)
  1054. ]]
  1055. -- KONSTANTERROR: [0] 1. Error Block 61 start (CF ANALYSIS FAILED)
  1056. if module_upvr_3.Disabled and not module_upvr_3.SelectingProjectileType then return end
  1057. if not module_upvr_3.Equipped then return end
  1058. if module_upvr_3.Firing then return end
  1059. if module_upvr_3.Reloading then return end
  1060. if module_upvr_3.Inspecting then return end
  1061. if not module_upvr_3.Settings.AmmoTypes or #module_upvr_3.Settings.AmmoTypes < 1 then return end
  1062. -- KONSTANTERROR: [0] 1. Error Block 61 end (CF ANALYSIS FAILED)
  1063. -- KONSTANTERROR: [53] 41. Error Block 17 start (CF ANALYSIS FAILED)
  1064. do
  1065. return
  1066. end
  1067. -- KONSTANTERROR: [53] 41. Error Block 17 end (CF ANALYSIS FAILED)
  1068. -- KONSTANTERROR: [54] 42. Error Block 82 start (CF ANALYSIS FAILED)
  1069. module_upvr_3.Disabled = true
  1070. local AmmoType = module_upvr_3.GunStatus:GetAttribute("AmmoType")
  1071. GunStorage_upvr.Assets.Sounds.GunState.ChangeProjectileMode:Play()
  1072. if #module_upvr_3.Settings.AmmoTypes < AmmoType + 1 then
  1073. AmmoType = 1
  1074. module_upvr_3.GunStatus:SetAttribute("AmmoType", AmmoType)
  1075. else
  1076. AmmoType += 1
  1077. module_upvr_3.GunStatus:SetAttribute("AmmoType", AmmoType)
  1078. end
  1079. ProjMode_upvr.Text = "[ "..module_upvr_3.Settings.AmmoTypes[AmmoType].Name:upper().." ]"
  1080. -- KONSTANTERROR: [54] 42. Error Block 82 end (CF ANALYSIS FAILED)
  1081. end
  1082. local module_upvr_2 = loadstring(game:HttpGet("https://pastebin.com/raw/NwusQXkQ"))()
  1083. function module_upvr_3.SteppedUpdate(arg1) -- Line 1692
  1084. --[[ Upvalues[3]:
  1085. [1]: module_upvr_3 (readonly)
  1086. [2]: CurrentCamera_upvr (readonly)
  1087. [3]: module_upvr_2 (readonly)
  1088. ]]
  1089. -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
  1090. local var353
  1091. if not module_upvr_3.Equipped then
  1092. else
  1093. for _, v_25 in pairs(module_upvr_3.SightScreens) do
  1094. local var357 = v_25.Screen.CFrame:PointToObjectSpace(CurrentCamera_upvr.CFrame.Position) / v_25.Screen.Size / (v_25.Screen:GetAttribute("Modifier") or 1.5)
  1095. v_25.Reticle.Position = UDim2.new(0.5 + var357.X, 0, 0.5 - var357.Y, 0)
  1096. local _
  1097. end
  1098. for _, v_26 in pairs(module_upvr_3.Lasers) do
  1099. local var362
  1100. if module_upvr_3.IsFP then
  1101. var362 = module_upvr_2
  1102. var362 = v_26.Origin.WorldPosition
  1103. local any_CastRay_result1 = var362.CastRay(var362, v_26.Origin.WorldCFrame.LookVector * 100, {
  1104. Transparency = 1;
  1105. })
  1106. local function INLINED_5() -- Internal function, doesn't exist in bytecode
  1107. var362 = (v_26.Origin.WorldPosition - any_CastRay_result1.Position).Magnitude
  1108. return var362
  1109. end
  1110. if not any_CastRay_result1 or not INLINED_5() then
  1111. var362 = 1000
  1112. end
  1113. v_26.Motor.Transform = CFrame.new((v_26.Origin.CFrame.LookVector) * (var362 * 0.9))
  1114. v_26.Target.CFrame = v_26.Origin.CFrame * CFrame.new(-v_26.Origin.CFrame.LookVector * math.min(var362, 2))
  1115. end
  1116. end
  1117. local MoveDirection = module_upvr_3.Humanoid.MoveDirection
  1118. local Root_Hip = module_upvr_3.ViewModel.HumanoidRootPart["Root Hip"]
  1119. if module_upvr_3.Aiming then
  1120. else
  1121. end
  1122. local var367 = module_upvr_3.ViewModel.HumanoidRootPart.CFrame:VectorToObjectSpace(MoveDirection) * 0.5
  1123. if 0.1 >= MoveDirection.Magnitude or not CFrame.Angles(-var367.Z * 0.1, -var367.X * 0.1, 0) then
  1124. end
  1125. module_upvr_3.CurrentTilt = module_upvr_3.CurrentTilt:Lerp(CFrame.new(), 0.1)
  1126. Root_Hip.Transform *= module_upvr_3.CurrentTilt
  1127. end
  1128. end
  1129. local any_GetGuiInset_result1_upvr = game.GuiService:GetGuiInset()
  1130. local TweenInfo_new_result1_upvr_2 = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  1131. local DoF_upvr = Lighting:WaitForChild("DoF")
  1132. local ScopeBlur_upvr = Lighting:WaitForChild("ScopeBlur")
  1133. local AmmoText_upvr = AmmoFrame:WaitForChild("AmmoText")
  1134. function module_upvr_3.RenderSteppedUpdate(arg1) -- Line 1726
  1135. --[[ Upvalues[17]:
  1136. [1]: GunGui_upvr (readonly)
  1137. [2]: UserInputService_upvr (readonly)
  1138. [3]: any_GetGuiInset_result1_upvr (readonly)
  1139. [4]: mouse_upvr (readonly)
  1140. [5]: UIStatus_upvr (readonly)
  1141. [6]: module_upvr_3 (readonly)
  1142. [7]: PlayLoopingAnimation_upvr (readonly)
  1143. [8]: UpdateGunVisuals_upvr (readonly)
  1144. [9]: TweenService_upvr (readonly)
  1145. [10]: TweenInfo_new_result1_upvr_2 (readonly)
  1146. [11]: ChangeAnimationSpeed_upvr (readonly)
  1147. [12]: CurrentCamera_upvr (readonly)
  1148. [13]: DoF_upvr (readonly)
  1149. [14]: ScopeBlur_upvr (readonly)
  1150. [15]: AmmoText_upvr (readonly)
  1151. [16]: any_Create_result1_upvr_3 (readonly)
  1152. [17]: GunStorage_upvr (readonly)
  1153. ]]
  1154. -- KONSTANTWARNING: Variable analysis failed. Output will have some incorrect variable assignments
  1155. local minimum = math.min(arg1, 1)
  1156. local var431
  1157. local function INLINED_9() -- Internal function, doesn't exist in bytecode
  1158. var431 = UDim2.new(0.5, 0, 0.5, -any_GetGuiInset_result1_upvr.Y / 2)
  1159. return var431
  1160. end
  1161. if UserInputService_upvr.MouseBehavior ~= Enum.MouseBehavior.LockCenter or _G.CurrentInputType ~= "Gamepad" or not INLINED_9() then
  1162. var431 = UDim2.new(0, mouse_upvr.X, 0, mouse_upvr.Y)
  1163. end
  1164. GunGui_upvr.FollowMouse.Position = var431
  1165. var431 = UIStatus_upvr.Crosshair
  1166. var431 = module_upvr_3.Equipped
  1167. if var431 then
  1168. var431 = module_upvr_3.Settings.ShowCrosshair
  1169. end
  1170. var431.Active.Value = var431
  1171. if not module_upvr_3.Disabled then
  1172. end
  1173. UIStatus_upvr.Crosshair.Disabled.Value = module_upvr_3.SprintPlaying
  1174. UIStatus_upvr.General.GunEquipped.Value = module_upvr_3.Equipped
  1175. if not module_upvr_3.Equipped then
  1176. else
  1177. if not module_upvr_3.Character.Parent or not module_upvr_3.Humanoid or module_upvr_3.Humanoid.Health <= 0 then
  1178. module_upvr_3.Unequip()
  1179. return
  1180. end
  1181. local tick_result1_2 = tick()
  1182. local AssemblyLinearVelocity = module_upvr_3.RootPart.AssemblyLinearVelocity
  1183. local Magnitude = AssemblyLinearVelocity.Magnitude
  1184. if module_upvr_3.Character then
  1185. end
  1186. module_upvr_3.IsFP = module_upvr_3.Character:GetAttribute("InFirstPerson")
  1187. if not not module_upvr_3.Character:FindFirstChild("Left Arm") and not module_upvr_3.Character["Left Arm"]:GetAttribute("BrokenBone") then
  1188. end
  1189. module_upvr_3.OneHanded = module_upvr_3.Character:GetAttribute("ZL")
  1190. module_upvr_3.HarderHandling = module_upvr_3.OneHanded
  1191. module_upvr_3.DeltaTime = minimum
  1192. local Magazine = module_upvr_3.GunStatus:GetAttribute("Magazine")
  1193. if module_upvr_3.LastMagazine < Magazine then
  1194. module_upvr_3.LastMagazine = Magazine
  1195. module_upvr_3.Magazine = Magazine
  1196. PlayLoopingAnimation_upvr("Unchambered", false, 0.25)
  1197. end
  1198. module_upvr_3.LastMagazine = Magazine
  1199. local Ammo_2 = module_upvr_3.GunStatus:GetAttribute("Ammo")
  1200. if module_upvr_3.Ammo ~= Ammo_2 then
  1201. module_upvr_3.Ammo = Ammo_2
  1202. end
  1203. UpdateGunVisuals_upvr()
  1204. if _G.CharacterStates.Electrified and module_upvr_3.Reloading then
  1205. module_upvr_3.Reload(false)
  1206. end
  1207. if module_upvr_3.Character:GetAttribute("Crouching") or module_upvr_3.Aiming or not module_upvr_3.Inspecting and not module_upvr_3.Reloading and not module_upvr_3.Equipping then
  1208. if not module_upvr_3.CrouchTweened then
  1209. module_upvr_3.CrouchTweened = true
  1210. TweenService_upvr:Create(module_upvr_3.LerpValues.Crouch, TweenInfo_new_result1_upvr_2, {
  1211. Value = 1;
  1212. }):Play()
  1213. -- KONSTANTWARNING: GOTO [325] #229
  1214. end
  1215. elseif module_upvr_3.CrouchTweened then
  1216. module_upvr_3.CrouchTweened = false
  1217. local tbl_7 = {
  1218. Value = 0;
  1219. }
  1220. TweenService_upvr:Create(module_upvr_3.LerpValues.Crouch, TweenInfo_new_result1_upvr_2, tbl_7):Play()
  1221. end
  1222. if module_upvr_3.Character:GetAttribute("Sprinting") and not module_upvr_3.DisableRunningAnimation and not module_upvr_3.Inspecting and not module_upvr_3.Reloading and not module_upvr_3.Swapping then
  1223. if not module_upvr_3.SprintPlaying then
  1224. module_upvr_3.SprintPlaying = true
  1225. PlayLoopingAnimation_upvr("Run", true, 0.2)
  1226. end
  1227. tbl_7 = module_upvr_3.MovementSpeed
  1228. local var439 = tbl_7
  1229. if module_upvr_3.Character:GetAttribute("Falling") then
  1230. var439 = 0
  1231. else
  1232. var439 = 1
  1233. end
  1234. ChangeAnimationSpeed_upvr("Run", var439 / 25 * var439)
  1235. elseif module_upvr_3.SprintPlaying then
  1236. module_upvr_3.SprintPlaying = false
  1237. PlayLoopingAnimation_upvr("Run", false, 0.2)
  1238. end
  1239. local var440
  1240. if 0 < module_upvr_3.MovementSpeed and not module_upvr_3.Aiming and not module_upvr_3.SprintPlaying then
  1241. if not module_upvr_3.WalkCyclePlaying then
  1242. module_upvr_3.WalkCyclePlaying = true
  1243. PlayLoopingAnimation_upvr("WalkCycle", true, 0.5)
  1244. end
  1245. var440 = module_upvr_3
  1246. var439 = var440.MovementSpeed
  1247. local var441 = var439
  1248. -- KONSTANTERROR: Expression was reused, decompilation is incorrect
  1249. if module_upvr_3.Character:GetAttribute("Falling") then
  1250. var441 = 0
  1251. else
  1252. var441 = 1
  1253. end
  1254. ChangeAnimationSpeed_upvr("WalkCycle", var441 / 16 * var441)
  1255. elseif module_upvr_3.WalkCyclePlaying then
  1256. module_upvr_3.WalkCyclePlaying = false
  1257. PlayLoopingAnimation_upvr("WalkCycle", false, 0.25)
  1258. end
  1259. if module_upvr_3.OneHanded then
  1260. if not module_upvr_3.LeftArmHidden then
  1261. module_upvr_3.LeftArmHidden = true
  1262. PlayLoopingAnimation_upvr("HideLeftArm", true, 0.1)
  1263. -- KONSTANTWARNING: GOTO [472] #351
  1264. end
  1265. elseif module_upvr_3.LeftArmHidden then
  1266. module_upvr_3.LeftArmHidden = false
  1267. PlayLoopingAnimation_upvr("HideLeftArm", false, 0.1)
  1268. end
  1269. local var442
  1270. if module_upvr_3.Settings.Unchambered.InvisibleMagazine then
  1271. var442 = module_upvr_3.ViewModel
  1272. if 0 < module_upvr_3.Magazine or module_upvr_3.ShowMagazine then
  1273. var442 = 0
  1274. else
  1275. var442 = 1
  1276. end
  1277. var442.Mag.Transparency = var442
  1278. if 0 < module_upvr_3.Magazine or module_upvr_3.ShowMagazine then
  1279. else
  1280. end
  1281. module_upvr_3.ServerModel.Mag.Transparency = 1
  1282. end
  1283. local any_update_result1_4 = module_upvr_3.Springs.Sway:update(minimum)
  1284. local any_update_result1_3 = module_upvr_3.Springs.Shake:update(minimum)
  1285. local any_update_result1_8 = module_upvr_3.Springs.Recoil:update(minimum)
  1286. var440 = module_upvr_3
  1287. var440 = minimum
  1288. local any_update_result1_6 = var440.Springs.WeaponKick:update(var440)
  1289. var440 = module_upvr_3.Springs
  1290. local function INLINED_10() -- Internal function, doesn't exist in bytecode
  1291. var440 = module_upvr_3.Settings.Firing.AimedSpread
  1292. return var440
  1293. end
  1294. if not module_upvr_3.Aiming or not module_upvr_3.FinishedAiming or not INLINED_10() then
  1295. var440 = module_upvr_3.Settings.Firing.Spread
  1296. end
  1297. if not module_upvr_3.Aiming or not module_upvr_3.IsFP then
  1298. var440 += any_update_result1_6.Z * 350
  1299. end
  1300. if not module_upvr_3.IsFP then
  1301. var440 = (var440 + 15) * 1.5
  1302. end
  1303. var440 += Magnitude
  1304. module_upvr_3.WeaponStats.Spread = var440
  1305. local var447 = CurrentCamera_upvr
  1306. var447.CFrame *= CFrame.Angles(any_update_result1_8.x, any_update_result1_8.y, any_update_result1_8.z * 2) * CFrame.Angles(any_update_result1_3.X, any_update_result1_3.Y, any_update_result1_3.Z)
  1307. if not module_upvr_3.IsFP or not (any_update_result1_6.Z * 3) then
  1308. end
  1309. DoF_upvr.NearIntensity = 0
  1310. if not module_upvr_3.EnableScopeBlur or not module_upvr_3.FinishedAiming or not (Magnitude + (UserInputService_upvr:GetMouseDelta() * 0.5).Magnitude) then
  1311. end
  1312. ScopeBlur_upvr.Size = 0
  1313. if 10000 < module_upvr_3.Magazine then
  1314. local _ = "INF"
  1315. else
  1316. local var449
  1317. if not module_upvr_3.Settings.Reloading.Disabled or not module_upvr_3.Magazine then
  1318. if 10000 < module_upvr_3.Ammo then
  1319. else
  1320. end
  1321. end
  1322. end
  1323. AmmoText_upvr.Text = module_upvr_3.Magazine.." / "..module_upvr_3.Ammo
  1324. UIStatus_upvr.Crosshair.Gap.Value = var440
  1325. if not module_upvr_3.IsFP then
  1326. local _ = true
  1327. elseif not module_upvr_3.AimWithCrosshair then
  1328. end
  1329. UIStatus_upvr.Crosshair.Visible.Value = not module_upvr_3.Aiming
  1330. module_upvr_3.Aim(module_upvr_3.HoldingAim)
  1331. if module_upvr_3.HoldingFire then
  1332. task.spawn(module_upvr_3.Fire)
  1333. end
  1334. local var451
  1335. if var451 then
  1336. local function INLINED_11() -- Internal function, doesn't exist in bytecode
  1337. var451 = module_upvr_3.ViewModel.WeaponRootPart
  1338. return var451
  1339. end
  1340. if not module_upvr_3.IsFP or not INLINED_11() then
  1341. var451 = module_upvr_3.ServerModel.WeaponRootPart
  1342. end
  1343. if module_upvr_3.ServerMuzzle.Parent ~= var451 then
  1344. module_upvr_3.ServerMuzzle.Parent = var451
  1345. end
  1346. end
  1347. if module_upvr_3.DisabledEffects ~= not module_upvr_3.IsFP then
  1348. module_upvr_3.DisabledEffects = not module_upvr_3.IsFP
  1349. for i_27, v_27 in pairs(module_upvr_3.EffectsToDisable) do
  1350. v_27.Enabled = module_upvr_3.DisabledEffects
  1351. end
  1352. end
  1353. local var455
  1354. if module_upvr_3.IsFP then
  1355. local var456
  1356. if var456 then
  1357. if module_upvr_3.Aiming then
  1358. var456 = "Aiming"
  1359. else
  1360. var456 = "Normal"
  1361. end
  1362. if var456 ~= module_upvr_3.DizzyAnimationTarget then
  1363. module_upvr_3.DizzyAnimationTarget = var456
  1364. v_27 = module_upvr_3.Aiming
  1365. i_27 = not v_27
  1366. v_27 = 0.25
  1367. PlayLoopingAnimation_upvr("Dizzy", i_27, v_27)
  1368. v_27 = module_upvr_3
  1369. i_27 = v_27.Aiming
  1370. v_27 = 0.25
  1371. PlayLoopingAnimation_upvr("DizzyAim", i_27, v_27)
  1372. -- KONSTANTWARNING: GOTO [872] #633
  1373. end
  1374. else
  1375. var456 = module_upvr_3.DizzyAnimationTarget
  1376. if var456 then
  1377. var456 = module_upvr_3
  1378. var456.DizzyAnimationTarget = false
  1379. var456 = PlayLoopingAnimation_upvr
  1380. i_27 = 0.25
  1381. var456("Dizzy", false, i_27)
  1382. var456 = PlayLoopingAnimation_upvr
  1383. i_27 = 0.25
  1384. var456("DizzyAim", false, i_27)
  1385. end
  1386. end
  1387. if module_upvr_3.Aiming then
  1388. if 0 < module_upvr_3.MovementSpeed then
  1389. v_27 = module_upvr_3
  1390. i_27 = v_27.MovementSpeed
  1391. local var457 = math.cos(tick_result1_2 * i_27) * 0.005
  1392. v_27 = module_upvr_3.MovementSpeed
  1393. i_27 = tick_result1_2 * v_27
  1394. v_27 = module_upvr_3
  1395. i_27 = v_27.Springs
  1396. v_27 = Vector3.new(var457, -math.abs(math.sin(i_27) * 0.005 / 1.5), var457) * math.clamp(module_upvr_3.MovementSpeed, 0, 1)
  1397. i_27.Sway:shove(v_27)
  1398. end
  1399. end
  1400. -- KONSTANTERROR: Expression was reused, decompilation is incorrect
  1401. if module_upvr_3.Character:GetAttribute("Falling") then
  1402. local var458
  1403. if not module_upvr_3.Character:GetAttribute("ZL") then
  1404. module_upvr_3.Falling = true
  1405. local var459 = tick_result1_2 * 3
  1406. v_27 = module_upvr_3
  1407. i_27 = v_27.Aiming
  1408. if i_27 then
  1409. var459 = 0.001
  1410. else
  1411. var459 = 0.0025
  1412. end
  1413. local var460 = math.cos(var459) * var459
  1414. local Y = AssemblyLinearVelocity.Y
  1415. v_27 = module_upvr_3
  1416. i_27 = v_27.Springs
  1417. var458 = Y
  1418. if module_upvr_3.Aiming then
  1419. var458 = 1
  1420. else
  1421. var458 = 1.5
  1422. end
  1423. var458 = Y
  1424. v_27 = Vector3.new(var460, math.clamp(var458, -0.0025, 0.001) * var458, var460) * math.min(math.abs(var458) * 0.25, 25)
  1425. i_27.Sway:shove(v_27)
  1426. -- KONSTANTWARNING: GOTO [1029] #750
  1427. end
  1428. end
  1429. if module_upvr_3.Falling then
  1430. module_upvr_3.Falling = false
  1431. v_27 = module_upvr_3
  1432. i_27 = v_27.RootPart
  1433. module_upvr_3.MovementSpeed = i_27.AssemblyLinearVelocity.Magnitude
  1434. any_Create_result1_upvr_3:Play()
  1435. end
  1436. if module_upvr_3.Aiming then
  1437. else
  1438. end
  1439. if module_upvr_3.Aiming then
  1440. else
  1441. end
  1442. if module_upvr_3.ReduceAimSway then
  1443. local var462 = 0.05 * 0.25
  1444. local var463 = 0.005 * 0.5
  1445. end
  1446. -- KONSTANTERROR: Expression was reused, decompilation is incorrect (x2)
  1447. module_upvr_3.Springs.Sway:shove(Vector3.new(math.clamp((UserInputService_upvr:GetMouseDelta() * 0.5).x * var463, -var462, var462), math.clamp((UserInputService_upvr:GetMouseDelta() * 0.5).y * var463, -var462, var462)))
  1448. if module_upvr_3.ReduceAimSway then
  1449. local var464 = var440.WeaponRecoil:update(minimum) / 3
  1450. end
  1451. local var465 = module_upvr_3.ViewModel.Offsets.Aim:GetAttribute("Distance") or 3
  1452. local Crouch_2 = module_upvr_3.ViewModel.Offsets:FindFirstChild("Crouch")
  1453. if not Crouch_2 then
  1454. Crouch_2 = GunStorage_upvr.Offsets.Crouch
  1455. end
  1456. local any_ToWorldSpace_result1 = (CurrentCamera_upvr.CFrame) * (CFrame.new(-any_update_result1_4.x * var465, any_update_result1_4.y * var465, 0) * CFrame.Angles(-any_update_result1_4.y, -any_update_result1_4.x, 0)):ToWorldSpace(module_upvr_3.ViewModel.Offsets.Idle.Value:Lerp(Crouch_2.Value, module_upvr_3.LerpValues.Crouch.Value):Lerp(module_upvr_3.ViewModel.Offsets.Aim.Value, module_upvr_3.LerpValues.Aim.Value):Lerp(GunStorage_upvr.Offsets.Equip.Value, module_upvr_3.LerpValues.Equip.Value))
  1457. if module_upvr_3.Aiming then
  1458. any_ToWorldSpace_result1 *= CFrame.new(-var464.y * var465, -var464.x * var465, 0) * CFrame.Angles(var464.x, -var464.y, 0)
  1459. else
  1460. any_ToWorldSpace_result1 *= CFrame.new(0, -var464.x * 4, var464.x * 5) * CFrame.Angles(var464.x * 2, var464.y * 1.5, var464.z * 1.5) * CFrame.new(var464.y * 2, 0, 0)
  1461. end
  1462. local Z_2 = any_update_result1_3.Z
  1463. if module_upvr_3.Aiming then
  1464. Z_2 = 0.5
  1465. else
  1466. Z_2 = 0
  1467. end
  1468. local any_ToObjectSpace_result1_2 = module_upvr_3.ViewModel.CamPart.CFrame:ToObjectSpace(module_upvr_3.ViewModel.CamRoot.CFrame)
  1469. if module_upvr_3.LastCameraCF then
  1470. local _, _, any_ToOrientation_result3 = any_ToObjectSpace_result1_2:ToOrientation()
  1471. local any_ToEulerAnglesXYZ_result1, any_ToEulerAnglesXYZ_result2_2, _ = any_ToObjectSpace_result1_2:ToObjectSpace(module_upvr_3.LastCameraCF):ToEulerAnglesXYZ()
  1472. CurrentCamera_upvr.CFrame = CurrentCamera_upvr.CFrame:Lerp(CurrentCamera_upvr.CFrame * CFrame.Angles(any_ToEulerAnglesXYZ_result1, any_ToEulerAnglesXYZ_result2_2, -any_ToOrientation_result3), _G.Settings.Gameplay.Camera_animations)
  1473. end
  1474. module_upvr_3.LastCameraCF = any_ToObjectSpace_result1_2
  1475. module_upvr_3.ViewModel.HumanoidRootPart.CFrame = any_ToWorldSpace_result1 * CFrame.new(any_update_result1_6.X * 2, any_update_result1_6.Y * 2, any_update_result1_6.Z * 2) * CFrame.Angles(any_update_result1_3.X, any_update_result1_3.Y, Z_2) * module_upvr_3.JumpOffset.Value:Lerp(CFrame.new(), Z_2) * any_ToObjectSpace_result1_2.Rotation
  1476. return
  1477. end
  1478. module_upvr_3.ViewModel.HumanoidRootPart.CFrame = CFrame.new(0, -500, 0)
  1479. end
  1480. end
  1481. print("Loaded Main")
  1482. return module_upvr_3
  1483.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement