--// Input Connections

L_71_.InputBegan:connect(function(L_229_arg1, L_230_arg2)
	if not L_230_arg2 and L_14_ then
		if L_229_arg1.UserInputType == Enum.UserInputType.MouseButton2 and L_21_.CanAim and not L_51_ and L_14_ and not L_43_ and not L_44_ then
			if not L_41_ then
				if not L_42_ then
					L_3_.Humanoid.WalkSpeed = 10
					L_109_ = 10
					L_108_ = 0.008
				end
				L_64_ = L_31_
				L_91_.target = L_34_.CFrame:toObjectSpace(L_25_.CFrame).p
				L_41_ = true
			end
		end;
		
		if L_229_arg1.UserInputType == Enum.UserInputType.MouseButton1 and L_46_ and L_14_ and not L_43_ and not L_44_ and not L_51_ then
			L_45_ = true
			if not Shooting and L_14_ and L_68_ > 0 then
				Shoot()
			end
		end;
		
		if L_229_arg1.KeyCode == L_21_.LaserKey and L_14_ and L_21_.LaserAttached then
			local L_231_ = L_1_:FindFirstChild("LaserLight")
			L_80_.KeyDown[1].Plugin()
		end;
		
		if L_229_arg1.KeyCode == L_21_.LightKey and L_14_ and L_21_.LightAttached then
			local L_232_ = L_1_:FindFirstChild("FlashLight"):FindFirstChild('Light')
			local L_233_ = false
			L_232_.Enabled = not L_232_.Enabled
		end;
		
		if L_14_ and L_229_arg1.KeyCode == L_21_.FireSelectKey and not L_47_ then
			L_47_ = true
			if L_59_ == 1 then
				if Shooting then
					Shooting = false
				end
				if L_21_.AutoEnabled then
					L_59_ = 2
				elseif not L_21_.AutoEnabled and L_21_.BurstEnabled then
					L_59_ = 3
				elseif not L_21_.AutoEnabled and not L_21_.BurstEnabled and L_21_.BoltAction then
					L_59_ = 4
				elseif not L_21_.AutoEnabled and not L_21_.BurstEnabled and not L_21_.BoltAction then
					L_59_ = 1
				end
			elseif L_59_ == 2 then
				if Shooting then
					Shooting = false
				end
				if L_21_.BurstEnabled then
					L_59_ = 3
				elseif not L_21_.BurstEnabled and L_21_.BoltAction then
					L_59_ = 4
				elseif not L_21_.BurstEnabled and not L_21_.BoltAction and L_21_.SemiEnabled then
					L_59_ = 1
				elseif not L_21_.BurstEnabled and not L_21_.BoltAction and not L_21_.SemiEnabled then
					L_59_ = 2
				end
			elseif L_59_ == 3 then
				if Shooting then
					Shooting = false
				end
				if L_21_.BoltAction then
					L_59_ = 4
				elseif not L_21_.BoltAction and L_21_.SemiEnabled then
					L_59_ = 1
				elseif not L_21_.BoltAction and not L_21_.SemiEnabled and L_21_.AutoEnabled then
					L_59_ = 2
				elseif not L_21_.BoltAction and not L_21_.SemiEnabled and not L_21_.AutoEnabled then
					L_59_ = 3
				end
			elseif L_59_ == 4 then
				if Shooting then
					Shooting = false
				end
				if L_21_.SemiEnabled then
					L_59_ = 1
				elseif not L_21_.SemiEnabled and L_21_.AutoEnabled then
					L_59_ = 2
				elseif not L_21_.SemiEnabled and not L_21_.AutoEnabled then
					L_59_ = 3
				elseif not L_21_.SemiEnabled and not L_21_.AutoEnabled and not L_21_.BurstEnabled then
					L_59_ = 4
				end
			end
			L_47_ = false
		end;
		
		if L_229_arg1.KeyCode == Enum.KeyCode.F and not L_44_ and not L_47_ and not L_41_ and not L_43_ and not Shooting then			
			if not L_50_ and not L_51_ then
				L_51_ = true
				Shooting = false
				L_46_ = false
				L_93_ = time()
				delay(0.6, function()
					if L_68_ ~= L_21_.Ammo and L_68_ > 0 then
						CreateShell()
					end
				end)	
				BoltBackAnim()
				L_50_ = true
			elseif L_50_ and L_51_ then
				BoltForwardAnim()
				Shooting = false
				L_46_ = true
				if L_68_ ~= L_21_.Ammo and L_68_ > 0 then
					L_68_ = L_68_ - 1
				elseif L_68_ >= L_21_.Ammo then
					L_46_ = true
				end						
				L_50_ = false
				L_51_ = false
				IdleAnim()
				L_52_ = false
			end
		end;
		
		if L_229_arg1.KeyCode == Enum.KeyCode.LeftShift and L_104_ then
			L_48_ = true
			if L_14_ and not L_47_ and not L_44_ and L_48_ and not L_42_ and not L_51_ then
				Shooting = false
				L_41_ = false
				L_44_ = true
						
				delay(0, function()
					if L_44_ and not L_43_ then
						L_41_ = false
						L_49_ = true
					end
				end)
				L_64_ = 80
				L_3_.Humanoid.WalkSpeed = 21
				L_109_ = 21
				L_108_ = 0.4
			end
		end;
		
		if L_229_arg1.KeyCode == Enum.KeyCode.R and L_14_ and not L_43_ and not L_41_ and not Shooting and not L_44_ and not L_51_ then		
			if L_69_ > 0 and L_68_ < L_21_.Ammo then
				Shooting = false
				L_43_ = true
				ReloadAnim()
				if L_68_ <= 0 then
					BoltBackAnim()
					BoltForwardAnim()
					L_46_ = true
				end
				IdleAnim()
				
				if L_68_ <= 0 then
					if (L_69_ - (L_21_.Ammo - L_68_)) < 0 then
						L_68_ = L_68_ + L_69_
						L_69_ = 0
					else
						L_69_ = L_69_ - (L_21_.Ammo - L_68_)
						L_68_ = L_21_.Ammo
					end
				elseif L_68_ > 0 then
					if (L_69_ - (L_21_.Ammo - L_68_)) < 0 then
						L_68_ = L_68_ + L_69_ + 1
						L_69_ = 0
					else
						L_69_ = L_69_ - (L_21_.Ammo - L_68_)
						L_68_ = L_21_.Ammo + 1
					end
				end

				L_43_ = false
				if not L_52_ then
					L_46_ = true
				end
			end
		end;
		
		if L_229_arg1.KeyCode == Enum.KeyCode.RightBracket then
			if (L_32_ < 1) then
				L_32_ = L_32_ + L_21_.SensitivityIncrement
			end
		end
		
		if L_229_arg1.KeyCode == Enum.KeyCode.LeftBracket then
			if (L_32_ > 0.1) then
				L_32_ = L_32_ - L_21_.SensitivityIncrement
			end
		end
		
		if L_229_arg1.KeyCode == Enum.KeyCode.T and L_1_:FindFirstChild("AimPart2") then
			if not L_53_ then
				L_34_ = L_1_:WaitForChild("AimPart2")
				L_31_ = L_21_.CycleAimZoom
				if L_41_ then
					L_64_ = L_21_.CycleAimZoom
				end
				L_53_ = true
			else
				L_34_ = L_1_:FindFirstChild("AimPart")
				L_31_ = L_21_.AimZoom
				if L_41_ then
					L_64_ = L_21_.AimZoom
				end
				L_53_ = false
			end;
		end;
	end
end)

L_71_.InputEnded:connect(function(L_234_arg1, L_235_arg2)
	if not L_235_arg2 and L_14_ then
		if L_234_arg1.UserInputType == Enum.UserInputType.MouseButton2 and L_21_.CanAim then
			if L_41_ then
				if not L_42_ then
					L_3_.Humanoid.WalkSpeed = 16
					L_109_ = 17
					L_108_ = .25
				end	
				L_64_ = 70
				L_91_.target = Vector3.new()
				L_41_ = false
			end
		end;
		
		if L_234_arg1.UserInputType == Enum.UserInputType.MouseButton1 then
			L_45_ = false				
			if Shooting then
				Shooting = false
			end
		end;
		
		if L_234_arg1.KeyCode == Enum.KeyCode.LeftShift and not L_47_ and not L_42_ then -- SPRINT
			L_48_ = false
			if L_44_ and not L_41_ and not Shooting and not L_48_ then
				L_44_ = false
				L_49_ = false
				L_64_ = 70
			
				L_3_.Humanoid.WalkSpeed = 16	
				L_109_ = 17
				L_108_ = .25			
			end
		end;
	end
end)

L_71_.InputChanged:connect(function(L_236_arg1, L_237_arg2)
	if not L_237_arg2 and L_14_ and L_21_.FirstPersonOnly then
		if L_236_arg1.UserInputType == Enum.UserInputType.MouseWheel then
			if L_236_arg1.Position.Z == 1 and (L_32_ < 1) then
				L_32_ = L_32_ + L_21_.SensitivityIncrement
			elseif L_236_arg1.Position.Z == -1 and (L_32_ > 0.1) then
				L_32_ = L_32_ - L_21_.SensitivityIncrement
			end
		end
	end
end)
