A script using LEDS

This is a script I made for GL0ZZ3N. The script has rapidfire and blinking LEDS. The script has toggles for on and off. I uploaded it because someone else might find this useful. The script inverts the right stick y-axis because it was for GL0ZZ3N. Please enjoy. -Token
Version1.00
Authortoken
Publish DateSat, 8 Mar 2014 - 14:42
Last UpdateSat, 8 Mar 2014 - 14:42
Downloads102
RATE


1

0

Code: Select all
int rapidFireButton =PS4_SQUARE; 
int rapid_onoff = FALSE;
int inverty_onoff = FALSE;
 
int Leftstickyaxis = PS4_LY;
int newstick;
 main {
    // Invert-y
    if(event_press(PS4_SHARE)) inverty_onoff = !inverty_onoff; //sets variable to TRUE or FALSE when PS4_SHARE is pressed.
    if(get_val(Leftstickyaxis) && (inverty_onoff)) {newstick = inv(get_val(Leftstickyaxis)); set_val(Leftstickyaxis, newstick);}//If TRUE invert y axis
    if(inverty_onoff && !combo_running(ledonoff)) set_led(LED_1, 1); //if TRUE lit up LED_1
    if(!inverty_onoff && !combo_running(RapidFire) && !combo_running(ledonoff)) reset_leds(); // if TRUE LEDS will be reset
 
    // RapidFire
    if(event_press(PS4_PS)) rapid_onoff = !rapid_onoff; //sets variable to TRUE or FALSE when PS4_PS is pressed.
    if(get_val(rapidFireButton) && rapid_onoff) combo_run(RapidFire); //if TRUE execute combo RapidFire
    if((rapid_onoff) && combo_running(RapidFire)) combo_run(ledonoff); // if TRUE execute combo ledonoff
}
 
combo RapidFire { //this combo is rapidfire
    set_val(rapidFireButton, 100);
    wait(20);
    set_val(rapidFireButton, 0);
}
combo ledonoff{ //when combo execute LEDS will blink every second
set_led(LED_3, 1);
wait(1000);
set_led(LED_3, 0);
wait(1000);
}