dustyroo

Untitled

Dec 16th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.23 KB | None | 0 0
  1. from time import sleep
  2. import random
  3. import pyautogui
  4. import keyboard
  5. import mouse
  6.  
  7. #How much we want to successfully crouch jump from 1-100%, 100% will always crouch jump.
  8. #example 80 = 80% chance of successfully doing a crouch jump
  9.  
  10. success_rate = 90#%t
  11.  
  12. #You can change the key to whatever you want.
  13. #example. '/' = / or keypad devide, '*' = numpad mult or shift+8
  14.  
  15. ads_act_deact = 'f5'
  16. crouch_jump_act_deact = 'f6'
  17. panic_quit_act_deact = 'f7'
  18.  
  19. #What key/'s to push to make you crouch jump
  20. #If you want it to be when you press shift and space do 'shift+space' add a '#' to line 40 just like in like 39 if you dont know what to do.
  21. #you can make it control space do 'ctrl+space' or any other comb of keys. uncomment line 39.
  22. #If you want just one key make it look like 'alt' and uncomment like 39. do not make it 'c' space needs to come first
  23. crouch_jump_keybind = 'shift+alt'
  24.  
  25. ads = 0
  26. crouchJ = 0
  27. start = 0
  28.  
  29. def stop_now():
  30. print('STOPPED!')
  31. mouse.unhook_all()
  32. keyboard.unhook_all()
  33. sleep(43232)
  34. stop_now()
  35.  
  36. def crouch_jump():
  37. if crouchJ == 1:
  38. success_chance = random.randint(1, 100)
  39. if success_chance <= success_rate:
  40. #keyboard.send('shift')
  41. keyboard.send('space')
  42. keyboard.send('c')
  43. else:
  44. keyboard.send('c')
  45. keyboard.send('space')
  46.  
  47. def ads_start():
  48. global start
  49. sleep(0.2)
  50. mouse.unhook_all()
  51. if ads == 1:
  52. if mouse.is_pressed(button='right') is True:
  53. sleep(0.1)
  54. mouse.click(button='right')
  55. mouse.click(button='right')
  56. mouse.wait(button='right', target_types=('up'))
  57. mouse.wait(button='right', target_types=('down'))
  58. start = 1
  59. ads_start()
  60. else:
  61. sleep(0.4)
  62. if start != 0:
  63. mouse.click(button='right')
  64. mouse.wait(button='right', target_types=('down'))
  65. start = 1
  66. ads_start()
  67. else:
  68. mouse.wait(button='right', target_types=('down'))
  69. ads_start()
  70.  
  71. def start_ads():
  72. global ads
  73. if ads == 0:
  74. ads = 1
  75. print('Ads Activated')
  76. elif ads == 1:
  77. ads = 0
  78. print('Ads Deactivated')
  79. else:
  80. return
  81.  
  82. def new_ads_check():
  83. global ads
  84. if keyboard.is_pressed('tab') is True or keyboard.is_pressed('i') is True:
  85. if ads == 1:
  86. sleep(0.3)
  87. if pyautogui.pixelMatchesColor(469, 118, (255, 232, 0 )) is True and pyautogui.pixelMatchesColor(509, 118, (255, 255, 255)) is True:
  88. for p in range(1,1000):
  89. print(p)
  90. sleep(0.1)
  91. ads = 0
  92. if pyautogui.pixelMatchesColor(469, 118, (255, 232, 0 )) is not True and pyautogui.pixelMatchesColor(509, 118, (255, 255, 255)) is not True:
  93. ads = 1
  94. return
  95. if pyautogui.pixelMatchesColor(469, 118, (255, 255, 255)) is True and pyautogui.pixelMatchesColor(509, 118, (255, 232, 0)) is True:
  96. for p in range(1,1000):
  97. print(p)
  98. sleep(0.1)
  99. ads = 0
  100. if pyautogui.pixelMatchesColor(469, 118, (255, 255, 255)) is not True and pyautogui.pixelMatchesColor(509, 118, (255, 232, 0)) is not True:
  101. ads = 1
  102. return
  103. else:
  104. return
  105. return
  106.  
  107. def start_cj():
  108. global crouchJ
  109. if crouchJ == 0:
  110. crouchJ = 1
  111. print('Crouch Jump is Activated')
  112. elif crouchJ == 1:
  113. crouchJ = 0
  114. print('Crouch Jump is Deactivated')
  115. else:
  116. return
  117.  
  118. def auto_fall():
  119. print('working')
  120. for i in range(1, 150):
  121. a = pyautogui.pixelMatchesColor(33, 988, (255, 255, 255)) is True
  122. b = pyautogui.pixelMatchesColor(33, 1032, (255, 255, 255)) is True
  123. c = pyautogui.pixelMatchesColor(33, 1053, (255, 255, 255)) is True
  124. d = pyautogui.pixelMatchesColor(33, 1053, (0, 0, 0)) is True
  125. e = pyautogui.pixelMatchesColor(777, 444, (255, 255, 255)) is True
  126. f = pyautogui.pixelMatchesColor(469, 118, (255, 232, 0 )) is True
  127. g = pyautogui.pixelMatchesColor(469, 118, (255, 255, 255)) is True
  128. if a or b or c or d:#checks to see if you are in a parachute
  129. if e or f or g:#checks to see if you are in tab or esc menu
  130. break
  131. print('ahh')
  132. pyautogui.keyDown('w')
  133. sleep(0.5)
  134. pyautogui.keyUp('w')
  135. sleep(0.9)
  136. else:
  137. if pyautogui.pixelMatchesColor(33, 988, (255, 255, 255)) is not True:
  138. print('not true')
  139. break
  140.  
  141. keyboard.add_hotkey(ads_act_deact, start_ads, trigger_on_release=True)
  142. keyboard.add_hotkey('tab', new_ads_check, trigger_on_release=True)
  143. keyboard.add_hotkey('i', new_ads_check, trigger_on_release=True)
  144. keyboard.add_hotkey(crouch_jump_act_deact, start_cj, trigger_on_release=True)
  145. keyboard.add_hotkey(panic_quit_act_deact, stop_now)
  146. keyboard.add_hotkey(crouch_jump_keybind, crouch_jump)
  147. keyboard.add_hotkey('alt+f', auto_fall, suppress=True, trigger_on_release=True)
  148. ads_start()
Advertisement
Add Comment
Please, Sign In to add comment