//Button Layout define PS = 0; define SHARE = 1; define OPTIONS = 2; define R1 = 3; define R2 = 4; define R3 = 5; define L1 = 6; define L2 = 7; define L3 = 8; define RX = 9; define RY = 10; define LX = 11; define LY = 12; define UP = 13; define DOWN = 14; define LEFT = 15; define RIGHT = 16; define TRIANGLE = 17; define CIRCLE = 18; define CROSS = 19; define SQUARE = 20; define TOUCHPAD = 27; define Blue = 1; define Red = 2; define Green = 3; define Pink = 4; define SkyBlue = 5; define Yellow = 6; define White = 7; //---------------------------------------------------------------------------------------------- //RF_SWITCH and AR_SWITCH toggle buttons // Change here with above numbers if needed //---------------------------------------------------------------------------------------------- define RF_switch = 17; //RAPID FIRE XB1_Y - 17 17 UP 13 // CEMU_EXTRA1 = 21 define save = 2; // XB1_MENU - 2 2 // CEMU_EXTRA3 = 23 SAVE BUTTON define ON = TRUE; define OFF = FALSE; //---------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------- //VARIABLES - YOU CAN MAKE ADJUSTMENTS HERE IF NEEDED !!!!! //--------------------------------------------------------------------------------------------- int AS = ON; //SET OFF IF YOU DONT WANT SHAKY AIM ASSIST OR FEEL WEIRD BEHAVIOUR int Flipped = OFF; //CHANGE OFF TO ON IF YOU PLAY WITH FLIPPED TRIGGERS int RUN = OFF; //CHANGE ON TO OFF IF YOU DON'T WANT AUTO RUN int SS = OFF; //CHANGE OFF TO ON IF YOU WANT SUPER SPRINT - AUTO RUN MUST BE ON int HT = ON; //CHANGE ON TO OFF IF YOU DON'T WANT HAIR TRIGGER int HB = OFF; //CHANGE ON TO OFF IF YOU DON'T WANT HOLD BREATH int rapid_onoff = TRUE; // IF TRUE RAPIDFIRE IS ON BY DEFAULT - IF FALSE, OFF BY DEFAULT int RATE_OF_FIRE = 13; // RANGE: 1 TO 25 RPS (ROUND/S) int Col_ind; int fire_button; int scope_button; int hold_time; int rest_time; int SP = ON; int Remove_Block; //------------------------------------------------------------------------------------------------- // AIM ABUSE // INCREASE AP & AM FOR MORE ASSIST BUT IT CAN CAUSE SHAKE LIKE JUMPY CROSSHAIR // MORE THAN 23 NOT RECOMMENDED. int AS = OFF TO DISABLE ABOVE //------------------------------------------------------------------------------------------------- int AP = 20; // ARELEASE MUST BE 1 HIGHER THAN AP & AM. int AM = -20; // DECREASE AP & AM IF YOU FEEL SHAKE OR WEIRD MOVEMENT AND DON'T LIKE IT. int Delay = 20; // THIS WILL NOT AFFECT SWEET EVILS AIMBOT. int ARelease = 21; //################################################################################################# // // State machine variable // int Current_State = 0; int Aim_Abuse_State = 2; define Get_Last_Value = 0; define Get_Current_Value = 1; define Aim_Correction = 2; define Aim_Boost = 3; define Aim_Perfection_Limit = 60; // //################################################################################################# //######################################### Script variable ####################################### //################################################################################################# // // Dont't change! // int X_Last_Value = 0; int Y_Last_Value = 0; int X_Current_Value = 0; int Y_Current_Value = 0; int mvt = 0; int Aim_Boost_Val = 0; int Aim_Correction_Val = 0; // //################################################################################################# //####################################### Batts anti-recoil ####################################### //################################################################################################# // //--Anti-Recoil Progression Adjustable Transition Point // //################################################################################################# // //--Anti-Recoil values go from Starting_Anti_Recoil_Value to Mid_Point_Anti_Recoil_Value over Progression_Point_Percent of Total_Anti_Recoil_Time //--Anti-Recoil values then go from Mid_Point_Anti_Recoil_Value to Ending_Anti_Recoil_Value for the remaining Total_Anti_Recoil_Time percent //--Ending_Anti_Recoil_Value is then applied until trigger release. // //--Zero's out controller input of less than 10 // //################################################################################################# // //--Adjust These Values define Starting_Anti_Recoil_Value = 20; //--postive values only define Mid_Point_Anti_Recoil_Value = 28; define Ending_Anti_Recoil_Value = 10; define Total_Anti_Recoil_Time = 2500; //-- 10ms increments (min - 2000) define Progression_Point_Percent = 30; //--percentage of total time to transition to mid to end values 10% increments // //################################################################################################# // //--Do not alter sequence of the variables below. Script uses in-direct reference to access the values (ex... inc[0] = inc , inc[1] = inc_2) // //################################################################################################# // int p,inc,inc_2,pr,pr_2,vm,vm_2; int loops,loops_2,vm_count,p_count,v,ar_y; // //################################################################################################# init { fire_button = 4; scope_button = 7; RATE_OF_FIRE = get_pvar(SPVAR_1, 0, 25, 13); loops = (Total_Anti_Recoil_Time / 100) * (Progression_Point_Percent / 10); loops_2 = (Total_Anti_Recoil_Time / 10) - loops; if(Starting_Anti_Recoil_Value < Mid_Point_Anti_Recoil_Value) inc = 1; else inc = -1; if(Mid_Point_Anti_Recoil_Value < Ending_Anti_Recoil_Value) inc_2 = 1; else inc_2 = -1; pr = abs(Starting_Anti_Recoil_Value - Mid_Point_Anti_Recoil_Value); pr_2 = abs(Mid_Point_Anti_Recoil_Value - Ending_Anti_Recoil_Value); vm = loops / pr; vm_2 = loops_2 / pr_2; } // //################################################################################################# //############################################# MAIN ############################################## //################################################################################################# // main { //update main every 8ms --> only for PS4 // vm_tctrl(-2); //--LT pulled if(get_val(PS4_L2)) { if (Current_State == Get_Last_Value) { X_Last_Value = get_lval(PS4_RX); Y_Last_Value = get_lval(PS4_RY); Current_State = Get_Current_Value; } else if (Current_State == Get_Current_Value) { X_Current_Value = get_val(PS4_RX); Y_Current_Value = get_val(PS4_RY); if(Aim_Abuse_State == Aim_Correction) { Current_State = Aim_Boost; } else { Current_State = Aim_Correction; } } if (Current_State == Aim_Boost) { //Applying BOOST //Aim_Perfection(Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS ) Aim_Perfection(X_Last_Value, X_Current_Value, 1, 0, 1, 0 ); Aim_Perfection(Y_Last_Value, Y_Current_Value, 1, 0, 0, 1 ); Current_State = Get_Last_Value; Aim_Abuse_State = Aim_Boost; } else if (Current_State == Aim_Correction) { //Applying CORRECTION //Aim_Perfection(Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS ) Aim_Perfection(X_Last_Value, X_Current_Value, 0, 1, 1, 0 ); Aim_Perfection(Y_Last_Value, Y_Current_Value, 0, 1, 0, 1 ); Current_State = Get_Last_Value; Aim_Abuse_State = Aim_Correction; } } else //--LT not pulled { Current_State = Get_Last_Value; Aim_Abuse_State = Aim_Correction; } // //################################################################################################# //####################################### Batts anti-recoil ####################################### //################################################################################################# // //--reset counters/pointers if(!get_lval(PS4_R2)) { p = 0; vm_count = 0; p_count = 0; ar_y = Starting_Anti_Recoil_Value; } //--anti recoil if((get_val(PS4_R2) && !get_val(PS4_L2)) || ((get_val(PS4_R2) && get_val(PS4_L2) && (Current_State == Get_Current_Value || Current_State == Get_Last_Value)))) { p = p_cycle(); if(p != -1) ar_y = p_val(); else ar_y = Ending_Anti_Recoil_Value; set_val(PS4_RY,y_val()); } if(get_val(7) && event_press(RF_switch)) { // CHANGE 7 INTO DESIRED BUTTON FOR TOGGLE DEFINED ABOVE combo_run (vibrate); rapid_onoff=!rapid_onoff; } if((rapid_onoff)) colourled(Green); if((!rapid_onoff)) colourled(Red); if(rapid_onoff) { if(get_val(4)) { combo_run (RAPID_FIRE);}} hold_time = 500 / RATE_OF_FIRE; rest_time = hold_time - 20; if(rest_time < 0) rest_time = 0; if(get_val(19)) { if(event_press(UP)) { RATE_OF_FIRE = RATE_OF_FIRE+ 1; } if(event_press(DOWN)) { RATE_OF_FIRE = RATE_OF_FIRE- 1; } set_val(UP,0); set_val(DOWN,0); } if(get_val(scope_button) && event_press(save)){ // SAVE VALUES TO DEVICE MONITOR combo_run(vibrate); set_pvar(SPVAR_1, RATE_OF_FIRE); set_val(save, 0); } if(AS) if(get_val(L2)) combo_run(cAS); if(Flipped) { swap(R1,R2); swap(L1,L2);} if(HT) deadzone(L2,R2,100,100); if(HB) if(get_val(L2)) set_val(L3,100); if(HB) if(get_val(LY) <-90 && get_val(L2) && get_ptime(L2) > 200) combo_stop(cCH); if(HB) if(event_press(L2)) combo_run(cCH); if(HB) if(get_val(L2) && get_lval(L3)) set_val(L3,0); if(RUN) if(get_val(LY)<-90 && !get_val(L2)) set_val(L3,100); if(SS == ON && get_val(L2)) combo_stop(cSS); if(SS) if(SP && get_val(LY)<-90) combo_run(cSS); if(get_val(LY)>-90) SP = ON; if(get_val(L2)) { if(event_press(UP)) { Remove_Block=!Remove_Block;} if(event_press(RIGHT)) { Remove_Block=!Remove_Block;} if(event_press(DOWN)) { Remove_Block=!Remove_Block;} if(event_press(LEFT)) { Remove_Block=!Remove_Block;} if(event_press(R3)) { Remove_Block=!Remove_Block;} if(event_press(TRIANGLE)) { Remove_Block=!Remove_Block;} if(event_press(R1)) { Remove_Block=!Remove_Block;} if(event_press(L1)) { Remove_Block=!Remove_Block;} set_val(UP,0);set_val(RIGHT,0);set_val(DOWN,0);set_val(LEFT,0);set_val(R3,0);set_val(TRIANGLE,0);set_val(R1,0);set_val(L1,0);} if(get_val(OPTIONS)) { if(event_press(SHARE)) { Remove_Block=!Remove_Block;} set_val(SHARE,0);} } combo cCH { set_val(L3,0); wait(60); set_val(L3,100); wait(110); set_val(L3,0); wait(110);} combo cSS { wait(20); set_val(L3,100); wait(40); set_val(L3,0); wait(40); SP = OFF;} combo cAS { set_val(RY,a_f(RY,AP)); wait(Delay) set_val(RX,a_f(RX,AP)); wait(Delay) set_val(RY,a_f(RY,AM)); wait(Delay) set_val(RX,a_f(RX,AM)); wait(Delay) } combo vibrate { set_rumble(RUMBLE_A, 100); wait(300); reset_rumble(); } combo RAPID_FIRE { set_val(fire_button, 100); wait(hold_time); set_val(fire_button, 0); wait(rest_time); set_val(fire_button, 0); } function a_f(p,m) { if(abs(get_val(p)) < ARelease) return m; return get_val(p); } // //################################################################################################# //############################################# FUNC ############################################## //################################################################################################# // function Aim_Perfection(Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS) { mvt = abs(Last_Value) + abs(Current_Value); Aim_Boost_Val = ( mvt + 1 )/2; //Rounding integer division (instead of truncating) Aim_Correction_Val = Aim_Boost_Val + 4; if(Aim_Boost_Val >= 10) { Aim_Boost_Val = 10; Aim_Correction_Val = 14; } else if(Aim_Boost_Val == 0) { Aim_Boost_Val = 2 Aim_Correction_Val = 4; } if(mvt < Aim_Perfection_Limit) { //--moving right if(Last_Value < Current_Value) { if (Boost) { if (X_AXIS) set_val(PS4_RX, (Current_Value + Aim_Boost_Val)); if (Y_AXIS) set_val(PS4_RY, (Current_Value + Aim_Boost_Val)); } else if(Correction) { if (X_AXIS) set_val(PS4_RX, (Current_Value - Aim_Correction_Val)); if (Y_AXIS) set_val(PS4_RY, (Current_Value - Aim_Correction_Val)); } } else //--moving left { if (Boost) { if (X_AXIS) set_val(PS4_RX, (Current_Value - Aim_Boost_Val)); if (Y_AXIS) set_val(PS4_RY, (Current_Value - Aim_Boost_Val)); } else if(Correction) { if (X_AXIS) set_val(PS4_RX, (Current_Value + Aim_Correction_Val)); if (Y_AXIS) set_val(PS4_RY, (Current_Value + Aim_Correction_Val)); } } } } // //################################################################################################# //####################################### Batts anti-recoil ####################################### //################################################################################################# // //--return progression index function p_cycle() { vm_count++; if (vm_count > loops[p]) { if(!p) { vm_count = 0; return 1; } else { vm_count = loops_2; return -1; } } return p; } //--return current ar val function p_val() { p_count++; if(p_count == vm[p]) { p_count = 0; ar_y = ar_y + inc[p]; } return ar_y; } //--return ar val + input or input if above release function y_val() { v = get_val(PS4_RY); if(abs(v) < 10) v = 0; if(abs(v) > ar_y + 5) return v; return v + ar_y; } // COLOR LED function //-------------------------------------------------------------- function colourled(Colour) { Col_ind=(Colour*4)- 3; set_led(LED_1,dbyte(Col_ind )); set_led(LED_2,dbyte(Col_ind+ 1)); set_led(LED_3,dbyte(Col_ind+ 2)); set_led(LED_4,dbyte(Col_ind+ 3)); } // //################################################################################################# //############################################# END ############################################### //#################################################################################################