//Posted by EveraldoCorrea, a member of the device Community - https://device.com/forums //Posted : Friday 23rd of October, 2020 8:26 CST6CDT define SHOOT_BUTTON = PS4_R2; define RAPIDFIRE_BUTTON = PS4_L2; define RATE_OF_FIRE = 230; define AUTOSPOT_BUTTON = PS4_L2; define SPOT_BUTTON =PS4_R3; int toggle; int hold_time; int rest_time; int DbleClick_Square = 0; int AR = 10; //Anti Recoil int AR_H = 1; //Anti Recoil Horizontal int AR_I = 1; //Change 1 to -1 If you play with Inverted int ARS; //INITIALIZATION - init //-------------------------------------------------------------- init { hold_time = 6100 / RATE_OF_FIRE; rest_time = hold_time - 6100; if(rest_time < 22) rest_time = 0; } main { colorled(0,1,1,0); if(DbleClick_Square > 0) DbleClick_Square = DbleClick_Square - get_rtime();//COMANDO ANDAR AGACHADO if(event_press(PS4_RIGHT) && DbleClick_Square <= 0) { DbleClick_Square = 450; } else if(event_press(PS4_RIGHT) && DbleClick_Square > 0) { toggle = !toggle; } if(toggle) { combo_run(AA); set_val(PS4_CIRCLE, 100); set_val(PS4_L1, 100); } // COLOR INDICATION FOR the RAPID FIRE ON / OFF if(get_val(RAPIDFIRE_BUTTON) && get_val(SHOOT_BUTTON)) { colorled(0,0,1,0); // OFF (Dim Lime/Green) *you can edit here* colorled(3,3,3,3); // (White) *you can edit here* combo_run(RapidFire); } else if(combo_running(RapidFire)) { combo_stop(RapidFire); reset_leds(); } // COLOR INDICATION FOR the RAPID SPOT ON / OFF if(get_val(RAPIDFIRE_BUTTON)) { combo_run(RapidSpot); } else if(combo_running(RapidSpot)) { combo_stop(RapidSpot); reset_leds(); } // Antirecuo if(get_val(PS4_L2) && get_val(PS4_R2)) combo_run(cAR); if(abs(get_val(PS4_RY)) > AR + 2 || abs(get_val(PS4_RX)) > AR + 2) { combo_stop(cAR);} } combo cAR { ARS = get_val(PS4_RY) + AR; if(ARS > 100) ARS = 100; set_val(PS4_RY,ARS * AR_I); ARS = get_val(PS4_RX) + AR_H; if(ARS > 100) ARS = 100; set_val(PS4_RX,ARS); } combo AA { //CORRER AGACHADO set_val(PS4_LEFT, 50); wait(50); set_val(PS4_RIGHT, 50); wait(50); set_val(PS4_UP, 50); wait(50); set_val(PS4_DOWN, 50); wait(50); } combo RapidFire { set_val(SHOOT_BUTTON, 100); wait(hold_time); set_val(SHOOT_BUTTON, 0); wait(rest_time); set_val(SHOOT_BUTTON, 0); } combo RapidSpot { set_val(SPOT_BUTTON, 100); wait(hold_time); set_val(SPOT_BUTTON, 0); wait(rest_time); set_val(SPOT_BUTTON, 0); } // COLOR LED INDICATION for PS4 *NO NEED TO EDIT BELOW* //-------------------------------------------------------------- function colorled(a,b,c,d) { set_led(LED_1,a); set_led(LED_2,b); set_led(LED_3,c); set_led(LED_4,d); }