// NBA 2K25 Vibration on Shot Release with Menu
// This script adds a vibration effect on shot release and allows for menu adjustments
define SHOOT_BUTTON
= PS4_R1
; // Change this to your shoot button (e.g., PS4_R1, XB_RB) define MENU_BUTTON
= PS4_TOUCHPAD
; // Button to open the menu define INCREASE_BUTTON
= PS4_L3
; // Button to increase vibration duration define DECREASE_BUTTON
= PS4_L2
; // Button to decrease vibration duration
int vibrationDuration = 100; // Default vibration duration in milliseconds
int menuOpen = 0;
void main {
// Check if the shoot button is pressed
if (get_val(SHOOT_BUTTON)) {
// Trigger shot release vibration
set_val(PS4_R2, 100); // Start vibration
wait(vibrationDuration); // Wait for the specified duration
set_val(PS4_R2, 0); // Stop vibration
}
// Menu Navigation
if (get_val(MENU_BUTTON)) {
menuOpen = !menuOpen; // Toggle menu state
wait(500); // Debounce wait
}
if (menuOpen) {
displayMenu();
}
}
void displayMenu() {
// Display current vibration duration for a short period
combo_run(menuDisplay);
}
combo menuDisplay {
// Visual feedback
set_val(PS4_L3, 100);
wait(1000); // Wait to allow player to see the display
set_val(PS4_L3, 0); // Clear display
wait(100); // Small delay before next input
// Adjust vibration duration based on button input
if (get_val(INCREASE_BUTTON)) {
vibrationDuration += 10; // Increase duration
wait(200); // Wait to prevent rapid increment
}
if (get_val(DECREASE_BUTTON)) {
vibrationDuration -= 10; // Decrease duration
wait(200); // Wait to prevent rapid decrement
}
// Clamp the duration to a reasonable range
if (vibrationDuration < 10) vibrationDuration = 10; // Minimum duration
if (vibrationDuration > 500) vibrationDuration = 500; // Maximum duration
}