Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <iostream>
  3.  
  4. //PUBG ADS ENHANCEMENT BY KassadinSupportMain
  5. //INTENDED FOR USE IN FIRST PERSON MODES
  6. //This program performs a double right click and holds
  7. //when the user performs a single right click and holds.
  8. //Map marking is done with the middle mouse (mouse 3) click.
  9. //This program is free to be duplicated and used in a legal manner by the public.
  10.  
  11. int main(int argc, char* args[])
  12. {
  13. bool quit = false;
  14. bool mouse3hold = false;
  15. bool hold = false;
  16. bool programactive = true;
  17. bool programhold = false;
  18. bool pollhold = false;
  19.  
  20. int pollingrate = 1;
  21.  
  22. INPUT ip;
  23. ip.mi.time = 0;
  24. ip.mi.dx = 0;
  25. ip.mi.dy = 0;
  26. ip.type = INPUT_MOUSE;
  27.  
  28. std::cout << "PUBG ADS ENHANCEMENT BY KassadinSupportMain\nDESIGNED FOR FIRST PERSON MODE, SIMPLY RUN THE PROGRAM ALONGSIDE PUBG TO USE\n" << std::endl;
  29. std::cout << "ONE-CLICK-HOLD ADS ENABLED\nPRESS F8 TO ENABLE OR DISABLE PROGRAM\n" << std::endl;
  30. std::cout << "CLICKING SCROLL WHEEL PLACES MAP MARKERS" << std::endl;
  31. std::cout << "CLICKING SCROLL WHEEL TO AIM TRADITIONALLY IS POSSIBLE BUT NOT RECOMMENDED\n" << std::endl;
  32. std::cout << "POLLING RATE: 500 Hz" << std::endl;
  33. std::cout << "PRESS F7 TO CHANGE POLLING RATE - 500 Hz RECOMMENDED" << std::endl;
  34.  
  35. while (!quit)
  36. {
  37. if (GetAsyncKeyState(0x76) < 0 && pollhold == false)
  38. {
  39. if (pollingrate == 9)
  40. {
  41. pollingrate = 1;
  42. std::cout << "POLLING RATE: 500 Hz" << std::endl;
  43. }
  44. else if(pollingrate == 1)
  45. {
  46. pollingrate = 4;
  47. std::cout << "POLLING RATE: 200 Hz" << std::endl;
  48. }
  49. else
  50. {
  51. pollingrate = 9;
  52. std::cout << "POLLING RATE: 100 Hz" << std::endl;
  53. }
  54. pollhold = true;
  55. }
  56. else if (GetAsyncKeyState(0x76) == 0 && pollhold == true)
  57. {
  58. pollhold = false;
  59. }
  60.  
  61. if (GetAsyncKeyState(0x77) < 0 && programhold == false)
  62. {
  63. if (programactive == false)
  64. {
  65. programactive = true;
  66. std::cout << "ONE-CLICK-HOLD ADS ENABLED" << std::endl;
  67. }
  68. else
  69. {
  70. programactive = false;
  71. std::cout << "ONE-CLICK-HOLD ADS DISABLED" << std::endl;
  72. }
  73.  
  74. programhold = true;
  75. }
  76. else if (GetAsyncKeyState(0x77) == 0 && programhold == true)
  77. {
  78. programhold = false;
  79. }
  80.  
  81. if (programactive)
  82. {
  83. if ((GetAsyncKeyState(0x04) < 0 || GetAsyncKeyState(0x05) < 0 || GetAsyncKeyState(0x06) < 0)&& mouse3hold == false)
  84. {
  85. ip.mi.dwFlags = (MOUSEEVENTF_RIGHTDOWN);
  86. SendInput(1, &ip, sizeof(INPUT));
  87. Sleep(pollingrate);
  88. mouse3hold = true;
  89. }
  90. else if ((GetAsyncKeyState(0x04) == 0 || GetAsyncKeyState(0x05) == 0 ||GetAsyncKeyState(0x06) == 0) && mouse3hold == true)
  91. {
  92. ip.mi.dwFlags = (MOUSEEVENTF_RIGHTUP);
  93. SendInput(1, &ip, sizeof(INPUT));
  94. Sleep(pollingrate);
  95. mouse3hold = false;
  96. }
  97.  
  98. if (GetAsyncKeyState(0x02) < 0 && hold == false && mouse3hold == false)
  99. {
  100. ip.mi.dwFlags = (MOUSEEVENTF_RIGHTUP);
  101. SendInput(1, &ip, sizeof(INPUT));
  102. Sleep(pollingrate);
  103. ip.mi.dwFlags = (MOUSEEVENTF_RIGHTDOWN);
  104. SendInput(1, &ip, sizeof(INPUT));
  105. hold = true;
  106. }
  107. else if (GetAsyncKeyState(0x02) == 0 && hold == true)
  108. {
  109. hold = false;
  110. }
  111. }
  112. Sleep(1);
  113. }
  114. return 0;
  115. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement