--// Input Connections
L_99_.InputBegan:connect(function(L_296_arg1, L_297_arg2)
	if not L_297_arg2 and L_15_ then
		if L_296_arg1.UserInputType == Enum.UserInputType.MouseButton2 and not L_73_ and L_24_.CanAim and not L_70_ and L_15_ and not L_62_ and not L_63_ then
			if not L_60_ then
				if not L_61_ then
					L_3_.Humanoid.WalkSpeed = 10
					L_144_ = 10
					L_143_ = 0.008
				end
				L_91_ = L_49_
				L_122_.target = L_52_.CFrame:toObjectSpace(L_43_.CFrame).p
				L_107_:FireServer(true)				
				L_60_ = true
			end
		end;
		
		if L_296_arg1.KeyCode == Enum.KeyCode.E and L_15_ and not L_74_ and not L_75_ then
			L_74_ = true
			L_76_ = false
			L_75_ = true
			LeanRight()
		end
		
		if L_296_arg1.KeyCode == Enum.KeyCode.Q and L_15_ and not L_74_ and not L_76_ then
			L_74_ = true
			L_75_ = false
			L_76_ = true
			LeanLeft()
		end
		
		if L_296_arg1.KeyCode == L_24_.AlternateAimKey and not L_73_ and L_24_.CanAim and not L_70_ and L_15_ and not L_62_ and not L_63_ then
			if not L_60_ then
				if not L_61_ then
					L_3_.Humanoid.WalkSpeed = 10
					L_144_ = 10
					L_143_ = 0.008
				end
				L_91_ = L_49_
				L_122_.target = L_52_.CFrame:toObjectSpace(L_43_.CFrame).p
				L_107_:FireServer(true)
				L_60_ = true
			end
		end;
		
		if L_296_arg1.UserInputType == Enum.UserInputType.MouseButton1 and not L_73_ and L_65_ and L_15_ and not L_62_ and not L_63_ and not L_70_ then
			L_64_ = true
			if not Shooting and L_15_ and not L_77_ then
				if L_95_ > 0 then			
					Shoot()
				end
			elseif not Shooting and L_15_ and L_77_ then
				if L_97_ > 0 then
					Shoot()
				end
			end
		end;
		
		if L_296_arg1.KeyCode == L_24_.LaserKey and L_15_ and L_24_.LaserAttached then
			local L_298_ = L_1_:FindFirstChild("LaserLight")
			L_111_.KeyDown[1].Plugin()
		end;
		
		if L_296_arg1.KeyCode == L_24_.LightKey and L_15_ and L_24_.LightAttached then
			local L_299_ = L_1_:FindFirstChild("FlashLight"):FindFirstChild('Light')
			local L_300_ = false
			L_299_.Enabled = not L_299_.Enabled
		end;
		
		if L_15_ and L_296_arg1.KeyCode == L_24_.FireSelectKey and not L_66_ then
			L_66_ = true
			if L_86_ == 1 then
				if Shooting then
					Shooting = false
				end
				if L_24_.AutoEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.AutoEnabled and L_24_.BurstEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and L_24_.BoltAction then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction and L_24_.ExplosiveEnabled then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.ExplosiveEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				end
			elseif L_86_ == 2 then
				if Shooting then
					Shooting = false
				end
				if L_24_.BurstEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BurstEnabled and L_24_.BoltAction then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BurstEnabled and not L_24_.BoltAction and L_24_.ExplosiveEnabled then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				elseif not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.SemiEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				end
			elseif L_86_ == 3 then
				if Shooting then
					Shooting = false
				end
				if L_24_.BoltAction then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BoltAction and L_24_.ExplosiveEnabled then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				elseif not L_24_.BoltAction and not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BoltAction and not L_24_.SemiEnabled and L_24_.AutoEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BoltAction and not L_24_.SemiEnabled and not L_24_.AutoEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				end
			elseif L_86_ == 4 then
				if Shooting then
					Shooting = false
				end
				if L_24_.ExplosiveEnabled then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				elseif not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and L_24_.AutoEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and L_24_.BurstEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				end
			elseif L_86_ == 6 then
				if Shooting then
					Shooting = false
				end
				L_79_ = L_65_
				if L_24_.SemiEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and L_24_.AutoEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and L_24_.BurstEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled and L_24_.BoltAction then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				end
			end
			UpdateAmmo()
			FireModeAnim()
			IdleAnim()
			L_66_ = false
		end;
		
		if L_296_arg1.KeyCode == Enum.KeyCode.F and not L_73_ and not L_63_ and not L_66_ and not L_60_ and not L_62_ and not Shooting and not L_72_ then			
			if not L_69_ and not L_70_ then
				L_70_ = true
				Shooting = false
				L_65_ = false
				L_124_ = time()
				delay(0.6, function()
					if L_95_ ~= L_24_.Ammo and L_95_ > 0 then
						CreateShell()
					end
				end)	
				BoltBackAnim()
				L_69_ = true
			elseif L_69_ and L_70_ then
				BoltForwardAnim()
				Shooting = false
				L_65_ = true
				if L_95_ ~= L_24_.Ammo and L_95_ > 0 then
					L_95_ = L_95_ - 1
				elseif L_95_ >= L_24_.Ammo then
					L_65_ = true
				end						
				L_69_ = false
				L_70_ = false
				IdleAnim()
				L_71_ = false
			end
			UpdateAmmo()
		end;
		
		if L_296_arg1.KeyCode == Enum.KeyCode.LeftShift and not L_73_ and L_135_ and not L_60_ then
			L_67_ = true
			if L_15_ and not L_66_ and not L_63_ and L_67_ and not L_61_ and not L_70_ then
				Shooting = false
				L_60_ = false
				L_63_ = true
						
				delay(0, function()
					if L_63_ and not L_62_ then
						L_60_ = false
						L_68_ = true
					end
				end)
				L_91_ = 80
				L_3_.Humanoid.WalkSpeed = 21
				L_144_ = 21
				L_143_ = 0.4
			end
		end;
		
		if L_296_arg1.KeyCode == Enum.KeyCode.R and not L_73_ and L_15_ and not L_62_ and not L_60_ and not Shooting and not L_63_ and not L_70_ then		
			if not L_77_ then			
				if L_96_ > 0 and L_95_ < L_24_.Ammo then
					Shooting = false
					L_62_ = true
					ReloadAnim()
					if L_95_ <= 0 then
						if not L_24_.CanSlideLock then
							BoltBackAnim()
						end
						BoltForwardAnim()
					end
					IdleAnim()
					L_65_ = true
					
					if L_95_ <= 0 then
						if (L_96_ - (L_24_.Ammo - L_95_)) < 0 then
							L_95_ = L_95_ + L_96_
							L_96_ = 0
						else
							L_96_ = L_96_ - (L_24_.Ammo - L_95_)
							L_95_ = L_24_.Ammo
						end
					elseif L_95_ > 0 then
						if (L_96_ - (L_24_.Ammo - L_95_)) < 0 then
							L_95_ = L_95_ + L_96_ + 1
							L_96_ = 0
						else
							L_96_ = L_96_ - (L_24_.Ammo - L_95_)
							L_95_ = L_24_.Ammo + 1
						end
					end
	
					L_62_ = false
					if not L_71_ then
						L_65_ = true
					end
				end;
			elseif L_77_ then
				if L_97_ > 0 then
					Shooting = false
					L_62_ = true
					nadeReload()
					IdleAnim()
					L_62_ = false
					L_65_ = true
				end
			end;
			UpdateAmmo()
		end;
		
		if L_296_arg1.KeyCode == Enum.KeyCode.RightBracket and L_60_ then
			if (L_50_ < 1) then
				L_50_ = L_50_ + L_24_.SensitivityIncrement
			end
		end
		
		if L_296_arg1.KeyCode == Enum.KeyCode.LeftBracket and L_60_ then
			if (L_50_ > 0.1) then
				L_50_ = L_50_ - L_24_.SensitivityIncrement
			end
		end
		
		if L_296_arg1.KeyCode == Enum.KeyCode.T and L_1_:FindFirstChild("AimPart2") then
			if not L_80_ then
				L_52_ = L_1_:WaitForChild("AimPart2")
				L_49_ = L_24_.CycleAimZoom
				if L_60_ then
					L_91_ = L_24_.CycleAimZoom
				end
				L_80_ = true
			else
				L_52_ = L_1_:FindFirstChild("AimPart")
				L_49_ = L_24_.AimZoom
				if L_60_ then
					L_91_ = L_24_.AimZoom
				end
				L_80_ = false
			end;
		end;
		
		if L_296_arg1.KeyCode == L_24_.InspectionKey then
			if not L_73_ then
				L_73_ = true
				InspectAnim()
				IdleAnim()
				L_73_ = false
			end
		end;
	end
end)

L_99_.InputEnded:connect(function(L_301_arg1, L_302_arg2)
	if not L_302_arg2 and L_15_ then
		if L_301_arg1.UserInputType == Enum.UserInputType.MouseButton2 and not L_73_ and L_24_.CanAim then
			if L_60_ then
				if not L_61_ then
					L_3_.Humanoid.WalkSpeed = 16
					L_144_ = 17
					L_143_ = .25
				end	
				L_91_ = 70
				L_122_.target = Vector3.new()
				L_107_:FireServer(false)
				L_60_ = false
			end
		end;
		
		if L_301_arg1.KeyCode == Enum.KeyCode.E and L_15_ and L_74_ then
			Unlean()		
			L_74_ = false
			L_76_ = false
			L_75_ = false
		end
		
		if L_301_arg1.KeyCode == Enum.KeyCode.Q and L_15_ and L_74_ then
			Unlean()		
			L_74_ = false
			L_76_ = false
			L_75_ = false
		end
		
		if L_301_arg1.KeyCode == L_24_.AlternateAimKey and not L_73_ and L_24_.CanAim then
			if L_60_ then
				if not L_61_ then
					L_3_.Humanoid.WalkSpeed = 16
					L_144_ = 17
					L_143_ = .25
				end	
				L_91_ = 70
				L_122_.target = Vector3.new()
				L_107_:FireServer(false)
				L_60_ = false
			end
		end;
		
		if L_301_arg1.UserInputType == Enum.UserInputType.MouseButton1 and not L_73_ then
			L_64_ = false				
			if Shooting then
				Shooting = false
			end
		end;
		
		if L_301_arg1.KeyCode == Enum.KeyCode.E and L_15_ then
			local L_303_ = L_41_:WaitForChild('GameGui')
			if L_16_ then
				L_303_:WaitForChild('AmmoFrame').Visible = false
				L_16_ = false
			end
		end;
		
		if L_301_arg1.KeyCode == Enum.KeyCode.LeftShift and not L_73_ and not L_66_ and not L_61_ then -- SPRINT
			L_67_ = false
			if L_63_ and not L_60_ and not Shooting and not L_67_ then
				L_63_ = false
				L_68_ = false
				L_91_ = 70
			
				L_3_.Humanoid.WalkSpeed = 16	
				L_144_ = 17
				L_143_ = .25			
			end
		end;
	end
end)

L_99_.InputChanged:connect(function(L_304_arg1, L_305_arg2)
	if not L_305_arg2 and L_15_ and L_24_.FirstPersonOnly and L_60_ then
		if L_304_arg1.UserInputType == Enum.UserInputType.MouseWheel then
			if L_304_arg1.Position.Z == 1 and (L_50_ < 1) then
				L_50_ = L_50_ + L_24_.SensitivityIncrement
			elseif L_304_arg1.Position.Z == -1 and (L_50_ > 0.1) then
				L_50_ = L_50_ - L_24_.SensitivityIncrement
			end
		end
	end
end)

L_99_.InputChanged:connect(function(L_306_arg1, L_307_arg2)
	if not L_307_arg2 and L_15_ then
		local L_308_, L_309_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_52_.CFrame.p, (L_52_.CFrame.lookVector).unit * 10000), IgnoreList);
		if L_308_ then
			local L_310_ = (L_309_ - L_6_.Position).magnitude
			L_33_.Text = math.ceil(L_310_) .. ' m'
		end
	end
end)