-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsamurais_scripts.lua
More file actions
3925 lines (3804 loc) · 158 KB
/
samurais_scripts.lua
File metadata and controls
3925 lines (3804 loc) · 158 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---@diagnostic disable: undefined-global, lowercase-global, undefined-field
require('ss_init')
CURRENT_BUILD = Game.Version()._build
CURRENT_VERSION = Game.Version()._online
log.info("version " .. SCRIPT_VERSION)
SS.check_kb_keybinds()
SS.check_gpad_keybinds()
Samurais_scripts = gui.add_tab("Samurai's Scripts")
Samurais_scripts:add_imgui(mainUI)
self_tab = Samurais_scripts:add_tab(SELF_TAB_)
self_tab:add_imgui(selfUI)
Actions = self_tab:add_tab("Actions ")
Actions:add_imgui(actionsUI)
sound_player = self_tab:add_tab(SOUND_PLAYER_)
sound_player:add_imgui(soundPlayerUI)
weapon_tab = Samurais_scripts:add_tab(WEAPON_TAB_)
weapon_tab:add_imgui(weaponUI)
vehicle_tab = Samurais_scripts:add_tab(VEHICLE_TAB_)
vehicle_tab:add_imgui(vehicleUI)
custom_paints_tab = vehicle_tab:add_tab("Custom Paint Jobs")
custom_paints_tab:add_imgui(customPaintsUI)
drift_mode_tab = vehicle_tab:add_tab("Drift Mode")
drift_mode_tab:add_imgui(driftModeUI)
flatbed_tab = vehicle_tab:add_tab("Flatbed")
flatbed_tab:add_imgui(flatbedUI)
handling_tab = vehicle_tab:add_tab("Handling Editor")
handling_tab:add_imgui(handingEditorUI)
vehicle_creator = vehicle_tab:add_tab("Vehicle Creator")
vehicle_creator:add_imgui(vCreatorUI)
online_tab = Samurais_scripts:add_tab("Online ")
business_tab = online_tab:add_tab("Business Manager (YRV2)")
business_tab:add_imgui(yrv2UI)
casino_pacino = online_tab:add_tab("Casino Pacino ") -- IT'S NOT AL ANYMORE! IT'S DUNK!
casino_pacino:add_imgui(dunkUI)
world_tab = Samurais_scripts:add_tab(WORLD_TAB_)
world_tab:add_imgui(worldUI)
object_spawner = world_tab:add_tab("Object Spawner ")
object_spawner:add_imgui(objectSpawnerUI)
settings_tab = Samurais_scripts:add_tab(SETTINGS_TAB_)
settings_tab:add_imgui(settingsUI)
hotkeys_tab = settings_tab:add_tab(HOTKEYS_TAB_)
hotkeys_tab:add_imgui(hotkeysUI)
gui.add_always_draw_imgui(command_ui)
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
-------------------------------------------------- Commands -----------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
RegisterCommand("autoheal", function()
gui.show_message("Samurai's Scripts", ("Autoheal %s."):format(Regen and "disabled" or "enabled"))
Regen = not Regen
CFG.save("Regen", Regen)
end)
RegisterCommand("rod", function()
gui.show_message("Samurai's Scripts", ("Ragdoll On Demand %s."):format(rod and "disabled" or "enabled"))
rod = not rod
CFG.save("rod", rod)
end)
RegisterCommand("autofill.hangar", function()
if Game.isOnline() then
gui.show_message("Samurai's Scripts", ("Hangar auto-fill %s."):format(hangarLoop and "disabled" or "enabled"))
hangarLoop = not hangarLoop
else
gui.show_error("Samurai's Scripts", "Unavailable in Single Player.")
end
end)
RegisterCommand("autofill.whouse1", function()
if Game.isOnline() then
gui.show_message("Samurai's Scripts", ("CEO Warehouse 1 auto-fill %s."):format(wh1_loop and "disabled" or "enabled"))
wh1_loop = not wh1_loop
else
gui.show_error("Samurai's Scripts", "Unavailable in Single Player.")
end
end)
RegisterCommand("autofill.whouse2", function()
if Game.isOnline() then
gui.show_message("Samurai's Scripts", ("CEO Warehouse 2 auto-fill %s."):format(wh2_loop and "disabled" or "enabled"))
wh2_loop = not wh2_loop
else
gui.show_error("Samurai's Scripts", "Unavailable in Single Player.")
end
end)
RegisterCommand("autofill.whouse3", function()
if Game.isOnline() then
gui.show_message("Samurai's Scripts", ("CEO Warehouse 3 auto-fill %s."):format(wh3_loop and "disabled" or "enabled"))
wh3_loop = not wh3_loop
else
gui.show_error("Samurai's Scripts", "Unavailable in Single Player.")
end
end)
RegisterCommand("autofill.whouse4", function()
if Game.isOnline() then
gui.show_message("Samurai's Scripts", ("CEO Warehouse 4 auto-fill %s."):format(wh4_loop and "disabled" or "enabled"))
wh4_loop = not wh4_loop
else
gui.show_error("Samurai's Scripts", "Unavailable in Single Player.")
end
end)
RegisterCommand("autofill.whouse5", function()
if Game.isOnline() then
gui.show_message("Samurai's Scripts", ("CEO Warehouse 5 auto-fill %s."):format(wh5_loop and "disabled" or "enabled"))
wh5_loop = not wh5_loop
else
gui.show_error("Samurai's Scripts", "Unavailable in Single Player.")
end
end)
RegisterCommand("yrv2.fillall", function()
script.run_in_fiber(function(fa)
SS.fillAll(fa)
end)
end)
RegisterCommand("finishsale", function()
if Game.isOnline() then
if autosell then
gui.show_warning("Samurai's Scripts", "You aleady have 'Auto-Sell' enabled. No need to manually trigger it.")
else
if scr_is_running then
SS.FinishSale(script_name)
else
gui.show_warning("Samurai's Scripts", "No supported sale script is currently running.")
end
end
else
gui.show_error("Samurai's Scripts", "Unavailable in Single Player.")
end
end)
RegisterCommand("spawnmeaperv", function()
spawnPervert(self.get_ped(), "you")
end)
RegisterCommand("kys", function()
command.call("suicide", {})
end)
RegisterCommand("vehlock", function()
script.run_in_fiber(function(vehlock)
if current_vehicle ~= 0 and is_car then
SS.playKeyfobAnim()
AUDIO.PLAY_SOUND_FRONTEND(-1, "REMOTE_CONTROL_FOB", "PI_MENU_SOUNDS", false)
vehlock:sleep(250)
local toggle = (VEHICLE.GET_VEHICLE_DOOR_LOCK_STATUS(current_vehicle) == 1) and true or false
vehicleLockStatus = toggle and 2 or 1
Game.Vehicle.lockDoors(current_vehicle, toggle, vehlock)
end
end)
end)
RegisterCommand("PANIK", function()
SS.handle_events()
AUDIO.PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE(
"ELECTROCUTION", "MISTERK", self.get_pos().x,
self.get_pos().y, self.get_pos().z, "SPEECH_PARAMS_FORCE"
)
gui.show_message("PANIK!", "(Ó _ Ò )!!")
end)
RegisterCommand("resetcfg", SS.reset_settings)
RegisterCommand("fastvehs", function()
fast_vehicles = not fast_vehicles
gui.show_message("Samurai's Scripts", ("Fast Vehicles %s"):format(fast_vehicles and "enabled" or "disabled"))
if not fast_vehicles and current_vehicle ~= 0 and (is_car or is_bike or is_quad) then
script.run_in_fiber(function()
VEHICLE.MODIFY_VEHICLE_TOP_SPEED(current_vehicle, 0)
end)
end
end)
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
-------------------------------------------------- Threads -----------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
script.register_looped("BALT", function(balt) -- Basic Ass Loading Text
if start_loading_anim then
loading_label = "- "
balt:sleep(80)
loading_label = "-- "
balt:sleep(80)
loading_label = "--- "
balt:sleep(80)
loading_label = "----"
balt:sleep(80)
loading_label = " ---"
balt:sleep(80)
loading_label = " --"
balt:sleep(80)
loading_label = " -"
balt:sleep(80)
loading_label = " "
balt:sleep(80)
return
end
end)
script.register_looped("SRGBT", function(rgbtxt) -- Shitty RGB Text
if gui.is_open() and business_tab:is_selected() then
rgbtxt:sleep(200)
yrv2_color = { 0, 255, 255, 1 }
rgbtxt:sleep(200)
yrv2_color = { 0, 127, 255, 1 }
rgbtxt:sleep(200)
yrv2_color = { 0, 0, 255, 1 }
rgbtxt:sleep(200)
yrv2_color = { 127, 0, 255, 1 }
rgbtxt:sleep(200)
yrv2_color = { 255, 0, 255, 1 }
rgbtxt:sleep(200)
yrv2_color = { 255, 0, 127, 1 }
rgbtxt:sleep(200)
yrv2_color = { 255, 0, 0, 1 }
rgbtxt:sleep(200)
yrv2_color = { 255, 127, 0, 1 }
rgbtxt:sleep(200)
yrv2_color = { 255, 255, 0, 1 }
rgbtxt:sleep(200)
yrv2_color = { 127, 255, 0, 1 }
rgbtxt:sleep(200)
yrv2_color = { 0, 255, 0, 1 }
rgbtxt:sleep(200)
yrv2_color = { 0, 255, 127, 1 }
end
end)
script.register_looped("QOTD", function(qotd) -- Quote Of The Day
qotd:yield()
if not disable_quotes then
if gui.is_open() and Samurais_scripts:is_selected() then
quote_changed = false
random_quote = random_quotes_T[math.random(1, #random_quotes_T)]
qotd:sleep(8000)
quote_changed = true
qotd:sleep(2000)
else
random_quote = ""
quote_changed = false
quote_alpha = 1.0
end
end
end)
script.register_looped("QBE", function(qbe) -- Quote Breathe Effect
qbe:yield()
if not disable_quotes then
if gui.is_open() and Samurais_scripts:is_selected() and random_quote ~= "" and quote_changed then
if quote_alpha > 0.1 then
while quote_alpha > 0.1 do
quote_alpha = quote_alpha - 0.05
qbe:sleep(100)
end
else
while quote_alpha < 1.0 do
quote_alpha = quote_alpha + 0.05
qbe:sleep(100)
end
end
end
end
end)
script.register_looped("GINPUT", function() -- Game Input
if is_typing or is_setting_hotkeys then
if not gui.is_open() then
is_typing, is_setting_hotkeys = false, false
end
PAD.DISABLE_ALL_CONTROL_ACTIONS(0)
end
if HashGrabber and WEAPON.IS_PED_ARMED(self.get_ped(), 4) then
PAD.DISABLE_CONTROL_ACTION(0, 24, true)
PAD.DISABLE_CONTROL_ACTION(0, 257, true)
end
if replaceSneakAnim and Game.Self.isOnFoot() then
PAD.DISABLE_CONTROL_ACTION(0, 36, true)
end
if replacePointAct or is_playing_anim or is_playing_scenario or ped_grabbed or vehicle_grabbed then
PAD.DISABLE_CONTROL_ACTION(0, 29, true)
end
if ducking_in_car then
PAD.DISABLE_CONTROL_ACTION(0, 73, true)
PAD.DISABLE_CONTROL_ACTION(0, 75, true)
PAD.DISABLE_CONTROL_ACTION(0, 86, true)
end
if is_carpooling then
PAD.DISABLE_CONTROL_ACTION(0, 75, true)
end
if PAD.IS_USING_KEYBOARD_AND_MOUSE(0) then
pressing_drift_button = SS.isKeyPressed(keybinds.tdBtn.code) and not
is_typing and not is_setting_hotkeys and not HUD.IS_MP_TEXT_CHAT_TYPING()
pressing_nos_button = SS.isKeyPressed(keybinds.nosBtn.code) and not
is_typing and not is_setting_hotkeys and not HUD.IS_MP_TEXT_CHAT_TYPING()
pressing_purge_button = SS.isKeyPressed(keybinds.purgeBtn.code) and not
is_typing and not is_setting_hotkeys and not HUD.IS_MP_TEXT_CHAT_TYPING()
pressing_fltbd_button = SS.isKeyJustPressed(keybinds.flatbedBtn.code) and not
is_typing and not is_setting_hotkeys and not HUD.IS_MP_TEXT_CHAT_TYPING()
pressing_vmine_button = SS.isKeyJustPressed(keybinds.vehicle_mine.code) and not
is_typing and not is_setting_hotkeys and not HUD.IS_MP_TEXT_CHAT_TYPING()
pressing_rod_button = SS.isKeyPressed(keybinds.rodBtn.code) and not
is_typing and not is_setting_hotkeys and not HUD.IS_MP_TEXT_CHAT_TYPING()
pressing_laser_button = SS.isKeyJustPressed(keybinds.laser_sight.code) and not
is_typing and not is_setting_hotkeys and not HUD.IS_MP_TEXT_CHAT_TYPING()
else
pressing_drift_button = gpad_keybinds.tdBtn.code ~= 0 and PAD.IS_CONTROL_PRESSED(0, gpad_keybinds.tdBtn.code)
pressing_nos_button = gpad_keybinds.nosBtn.code ~= 0 and PAD.IS_CONTROL_PRESSED(0, gpad_keybinds.nosBtn.code)
pressing_purge_button = gpad_keybinds.purgeBtn.code ~= 0 and
(PAD.IS_CONTROL_PRESSED(0, gpad_keybinds.purgeBtn.code) or PAD.IS_DISABLED_CONTROL_PRESSED(0, gpad_keybinds.purgeBtn.code))
pressing_fltbd_button = gpad_keybinds.flatbedBtn.code ~= 0 and
(PAD.IS_CONTROL_JUST_PRESSED(0, gpad_keybinds.flatbedBtn.code) or PAD.IS_DISABLED_CONTROL_JUST_PRESSED(0, gpad_keybinds.flatbedBtn.code))
pressing_vmine_button = gpad_keybinds.vehicle_mine.code ~= 0 and
(PAD.IS_CONTROL_JUST_PRESSED(0, gpad_keybinds.vehicle_mine.code) or PAD.IS_DISABLED_CONTROL_JUST_PRESSED(0, gpad_keybinds.vehicle_mine.code))
pressing_rod_button = gpad_keybinds.rodBtn.code ~= 0 and
(PAD.IS_CONTROL_PRESSED(0, gpad_keybinds.rodBtn.code) or PAD.IS_DISABLED_CONTROL_PRESSED(0, gpad_keybinds.rodBtn.code))
pressing_laser_button = gpad_keybinds.laser_sight.code ~= 0 and
(PAD.IS_CONTROL_JUST_PRESSED(0, gpad_keybinds.laser_sight.code) or PAD.IS_DISABLED_CONTROL_JUST_PRESSED(0, gpad_keybinds.laser_sight.code))
end
if is_using_flatbed then
if keybinds.flatbedBtn.code == 0x58 or gpad_keybinds.flatbedBtn.code == 73 then
PAD.DISABLE_CONTROL_ACTION(0, 73, true)
end
end
if nosPurge and Game.Self.isDriving() then
if validModel and keybinds.purgeBtn.code == 0x58 or gpad_keybinds.purgeBtn.code == 73 then
PAD.DISABLE_CONTROL_ACTION(0, 73, true)
end
end
if Game.Self.isDriving() then
if speedBoost and (keybinds.nosBtn.code == 0x10 or gpad_keybinds.nosBtn.code == 21) then
if PAD.IS_CONTROL_PRESSED(0, 71) and pressing_nos_button then
if validModel or is_boat or is_bike then
-- prevent face planting when using NOS mid-air
PAD.DISABLE_CONTROL_ACTION(0, 60, true)
PAD.DISABLE_CONTROL_ACTION(0, 61, true)
PAD.DISABLE_CONTROL_ACTION(0, 62, true)
end
end
end
if holdF and Game.Self.isOutside() then
if not ducking_in_car and VEHICLE.IS_VEHICLE_STOPPED(self.get_veh())
and not is_typing and not is_setting_hotkeys and not cmd_ui_is_open then
PAD.DISABLE_CONTROL_ACTION(0, 75, true)
else
timerB = 0
end
end
if keepWheelsTurned and Game.Self.isOutside() then
if (is_car or is_quad) and not ducking_in_car
and VEHICLE.IS_VEHICLE_STOPPED(self.get_veh()) then
if PAD.IS_CONTROL_PRESSED(0, 34) or PAD.IS_CONTROL_PRESSED(0, 35) then
PAD.DISABLE_CONTROL_ACTION(0, 75, true)
end
end
end
end
if (pedGrabber or vehicleGrabber) and Game.Self.isOnFoot() and not WEAPON.IS_PED_ARMED(self.get_ped(), 7) then
PAD.DISABLE_CONTROL_ACTION(0, 24, true)
PAD.DISABLE_CONTROL_ACTION(0, 25, true)
PAD.DISABLE_CONTROL_ACTION(0, 50, true)
PAD.DISABLE_CONTROL_ACTION(0, 68, true)
PAD.DISABLE_CONTROL_ACTION(0, 91, true)
PAD.DISABLE_CONTROL_ACTION(0, 257, true)
end
if ped_grabbed or vehicle_grabbed then
PAD.DISABLE_CONTROL_ACTION(0, 24, true)
PAD.DISABLE_CONTROL_ACTION(0, 25, true)
PAD.DISABLE_CONTROL_ACTION(0, 50, true)
PAD.DISABLE_CONTROL_ACTION(0, 68, true)
PAD.DISABLE_CONTROL_ACTION(0, 91, true)
PAD.DISABLE_CONTROL_ACTION(0, 257, true)
end
if cmd_ui_is_open then
PAD.DISABLE_ALL_CONTROL_ACTIONS(0)
end
end)
-- self stuff
script.register_looped("AHL", function(ah) -- Auto-Heal
ah:yield()
if Regen and Game.Self.isAlive() then
local maxHp = Game.Self.maxHealth()
local myHp = Game.Self.health()
local maxArmr = Game.Self.maxArmour()
local myArmr = Game.Self.armour()
if myHp < maxHp and myHp > 0 then
if PED.IS_PED_IN_COVER(self.get_ped(), false) then
ENTITY.SET_ENTITY_HEALTH(self.get_ped(), myHp + 10, 0, 0)
else
ENTITY.SET_ENTITY_HEALTH(self.get_ped(), myHp + 1, 0, 0)
end
end
if myArmr == nil then
PED.SET_PED_ARMOUR(self.get_ped(), 10)
end
if myArmr ~= nil and myArmr < maxArmr then
PED.ADD_ARMOUR_TO_PED(self.get_ped(), 0.5)
end
end
end)
script.register_looped("SELFFT", function(script) -- Self Features
-- Crouch instead of sneak
if replaceSneakAnim then
if PAD.IS_DISABLED_CONTROL_PRESSED(0, 36) and SS.canCrouch() then
script:sleep(200)
if is_handsUp then
is_handsUp = false
TASK.CLEAR_PED_TASKS(self.get_ped())
end
while not STREAMING.HAS_CLIP_SET_LOADED("move_ped_crouched") and not STREAMING.HAS_CLIP_SET_LOADED("move_aim_strafe_crouch_2h") do
STREAMING.REQUEST_CLIP_SET("move_ped_crouched")
STREAMING.REQUEST_CLIP_SET("move_aim_strafe_crouch_2h")
coroutine.yield()
end
PED.SET_PED_MOVEMENT_CLIPSET(self.get_ped(), "move_ped_crouched", 0.3)
PED.SET_PED_STRAFE_CLIPSET(self.get_ped(), "move_aim_strafe_crouch_2h")
script:sleep(500)
isCrouched = true
end
end
if isCrouched and PAD.IS_DISABLED_CONTROL_PRESSED(0, 36)
and not HUD.IS_MP_TEXT_CHAT_TYPING() and not Game.Self.isBrowsingApps() then
script:sleep(200)
PED.RESET_PED_MOVEMENT_CLIPSET(self.get_ped(), 0.3)
script:sleep(500)
isCrouched = false
end
-- Replace 'Point At' Action
if replacePointAct then
if PAD.IS_DISABLED_CONTROL_JUST_PRESSED(0, 29) and SS.canUseHandsUp() then
if not is_handsUp then
script:sleep(200)
if isCrouched then
isCrouched = false
PED.RESET_PED_MOVEMENT_CLIPSET(self.get_ped(), 0)
end
if is_sitting then
standUp()
end
playHandsUp()
is_handsUp = true
else
script:sleep(200)
TASK.CLEAR_PED_TASKS(self.get_ped())
script:sleep(500)
is_handsUp = false
end
end
end
if is_handsUp then
if WEAPON.IS_PED_ARMED(self.get_ped(), 7) then
if PAD.IS_CONTROL_PRESSED(0, 24) then
TASK.CLEAR_PED_TASKS(self.get_ped())
is_handsUp = false
end
end
if PLAYER.IS_PLAYER_FREE_AIMING(self.get_id()) then
TASK.CLEAR_PED_TASKS(self.get_ped())
is_handsUp = false
end
if not Game.Self.isOnFoot() then
if PED.IS_PED_SITTING_IN_ANY_VEHICLE(self.get_ped()) and not is_car then
TASK.CLEAR_PED_TASKS(self.get_ped())
is_handsUp = false
end
end
end
-- Online Phone Animations
if phoneAnim then
if Game.isOnline() and SS.canUsePhoneAnims() then
Game.Self.PhoneAnims(true)
Game.Self.PlayPhoneGestures(script)
phoneAnimsEnabled = true
else
if phoneAnimsEnabled then
Game.Self.PhoneAnims(false)
phoneAnimsEnabled = false
end
end
else
if phoneAnimsEnabled then
Game.Self.PhoneAnims(false)
phoneAnimsEnabled = false
end
end
-- Sprint Inside
if sprintInside then
if not PED.GET_PED_CONFIG_FLAG(self.get_ped(), 427, true) then
PED.SET_PED_CONFIG_FLAG(self.get_ped(), 427, true)
end
else
if PED.GET_PED_CONFIG_FLAG(self.get_ped(), 427, true) then
PED.SET_PED_CONFIG_FLAG(self.get_ped(), 427, false)
end
end
-- Lockpick animation
if lockPick then
if not PED.GET_PED_CONFIG_FLAG(self.get_ped(), 426, true) then
PED.SET_PED_CONFIG_FLAG(self.get_ped(), 426, true)
end
else
if PED.GET_PED_CONFIG_FLAG(self.get_ped(), 426, true) then
PED.SET_PED_CONFIG_FLAG(self.get_ped(), 426, false)
end
end
end)
script.register_looped("RGDL", function(rgdl) -- Ragdoll
if clumsy then
if PED.IS_PED_RAGDOLL(self.get_ped()) then
rgdl:sleep(2500)
return
end
PED.SET_PED_RAGDOLL_ON_COLLISION(self.get_ped(), true)
if isCrouched then
isCrouched = false
end
if is_handsUp then
is_handsUp = false
end
elseif rod and Game.Self.isOnFoot() and pressing_rod_button and not is_hiding then
if PED.CAN_PED_RAGDOLL(self.get_ped()) then
if not Game.Self.isBrowsingApps() then
PED.SET_PED_TO_RAGDOLL(self.get_ped(), 1500, 0, 0, false, false, false)
end
if isCrouched then
isCrouched = false
end
if is_handsUp then
is_handsUp = false
end
else
gui.show_error("Samurais Scripts",
"Unable to ragdoll you.\nPlease make sure 'No Ragdoll' option\nis disabled in YimMenu.")
rgdl:sleep(200)
end
end
if ragdoll_sound and Game.isOnline() then
if PED.IS_PED_RAGDOLL(self.get_ped()) then
rgdl:sleep(500)
local soundName = (ENTITY.GET_ENTITY_MODEL(self.get_ped()) == 0x705E61F2) and "WAVELOAD_PAIN_MALE" or
"WAVELOAD_PAIN_FEMALE"
local myPos = ENTITY.GET_ENTITY_COORDS(self.get_ped(), true)
AUDIO.PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE("SCREAM_PANIC_SHORT", soundName, myPos.x, myPos.y, myPos.z,
"SPEECH_PARAMS_FORCE_SHOUTED")
repeat
rgdl:sleep(100)
until not PED.IS_PED_RAGDOLL(self.get_ped())
end
end
end)
script.register_looped("ASVFX", function(animSfx) -- Anim FX
if is_playing_anim then
if curr_playing_anim.sfx ~= nil then
local soundCoords = self.get_pos()
AUDIO.PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE(curr_playing_anim.sfx, curr_playing_anim.sfxName, soundCoords.x,
soundCoords.y,
soundCoords.z, curr_playing_anim.sfxFlg)
animSfx:sleep(10000)
elseif string.find(string.lower(curr_playing_anim.name), "police torch") then
local myPos = self.get_pos()
local torch = OBJECT.GET_CLOSEST_OBJECT_OF_TYPE(myPos.x, myPos.y, myPos.z, 1, curr_playing_anim.prop1, false, false,
false)
if ENTITY.DOES_ENTITY_EXIST(torch) then
local torchPos = ENTITY.GET_ENTITY_COORDS(torch, false)
local torchFwd = (Game.getForwardVec(torch)):inverse()
GRAPHICS.DRAW_SPOT_LIGHT(
torchPos.x, torchPos.y, torchPos.z - 0.2,
torchFwd.x, torchFwd.y, torchFwd.z, 226, 130, 78,
50.0, 8.0, 1.0, 10.0, 1.0
)
end
end
end
end)
script.register_looped("HFC", function(hfc) -- Hide From Cops
if hideFromCops then
local isWanted = PLAYER.GET_PLAYER_WANTED_LEVEL(self.get_id()) > 0
local was_spotted = PLAYER.IS_WANTED_AND_HAS_BEEN_SEEN_BY_COPS(self.get_id())
local cond
if not is_hiding then
if PED.IS_PED_IN_ANY_VEHICLE(self.get_ped(), false) and is_car then
if Game.Self.isDriving() then
cond = VEHICLE.IS_VEHICLE_STOPPED(current_vehicle)
else
cond = true
end
if cond and not PAD.IS_CONTROL_PRESSED(0, 71) and not PAD.IS_CONTROL_PRESSED(0, 72)
and VEHICLE.IS_VEHICLE_ON_ALL_WHEELS(current_vehicle) and isWanted and not was_spotted then
Game.showButtonPrompt("Press ~INPUT_FRONTEND_ACCEPT~ to hide inside the vehicle.")
if PAD.IS_CONTROL_JUST_PRESSED(0, 201) and not HUD.IS_MP_TEXT_CHAT_TYPING() then
if is_handsUp then
TASK.CLEAR_PED_TASKS(self.get_ped())
is_handsUp = false
end
if Game.requestAnimDict("missmic3leadinout_mcs1") then
VEHICLE.SET_VEHICLE_IS_WANTED(current_vehicle, false)
TASK.TASK_PLAY_ANIM(self.get_ped(), "missmic3leadinout_mcs1", "cockpit_pilot", 6.0, 3.0, -1, 18, 1.0, false,
false, false)
if Game.Self.isDriving() then
VEHICLE.SET_VEHICLE_ENGINE_ON(self.get_veh(), false, false, true)
end
is_hiding, ducking_in_car = true, true
hfc:sleep(1000)
end
end
end
end
if Game.Self.isOnFoot() then
local nearBoot, vehicle, isRearEngined = SS.isNearCarTrunk()
local nearBin, bin = SS.isNearTrashBin()
if not nearBoot and not nearBin then
hfc:sleep(1000)
end
if nearBoot and vehicle > 0 and not is_playing_anim and not is_playing_scenario and not ped_grabbed and not vehicle_grabbed then
Game.showButtonPrompt("Press ~INPUT_PICKUP~ to hide in the trunk.")
if PAD.IS_CONTROL_JUST_PRESSED(0, 38) then
local z_offset = 0.93
if is_handsUp then
TASK.CLEAR_PED_TASKS(self.get_ped())
is_handsUp = false
end
if isCrouched then
PED.RESET_PED_MOVEMENT_CLIPSET(self.get_ped(), 0)
isCrouched = false
end
if not was_spotted then
if Game.Vehicle.class(vehicle) == "Vans" then
z_offset = 1.1
else
if Game.Vehicle.class(vehicle) == "SUVs" then
z_offset = 1.2
end
end
if Game.requestAnimDict("rcmnigel3_trunk") then
if not ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT(self.get_ped(), vehicle) then
TASK.TASK_TURN_PED_TO_FACE_ENTITY(self.get_ped(), vehicle, 0)
repeat
hfc:sleep(10)
until not TASK.GET_IS_TASK_ACTIVE(self.get_ped(), 225) -- CTaskTurnToFaceEntityOrCoord
end
TASK.TASK_PLAY_ANIM(
self.get_ped(), "rcmnigel3_trunk", "out_trunk_trevor", 4.0, -4.0, 1500, 2, 0.0,
false, false, false
)
end
hfc:sleep(800)
if VEHICLE.IS_VEHICLE_STOPPED(vehicle) then
ENTITY.FREEZE_ENTITY_POSITION(self.get_ped(), true)
ENTITY.SET_ENTITY_COLLISION(self.get_ped(), false, true)
hfc:sleep(50)
VEHICLE.SET_VEHICLE_DOOR_OPEN(vehicle, 5, false, false)
hfc:sleep(500)
ENTITY.FREEZE_ENTITY_POSITION(self.get_ped(), false)
local chassis_bone = ENTITY.GET_ENTITY_BONE_INDEX_BY_NAME(vehicle, "chassis_dummy")
if chassis_bone == nil or chassis_bone == -1 then
chassis_bone = 0
end
local veh_hash = ENTITY.GET_ENTITY_MODEL(vehicle)
local vmin, vmax = Game.getModelDimensions(veh_hash)
boot_vehicle_len = vmax.y - vmin.y
local attachPosY = isRearEngined and (boot_vehicle_len / 3) or (-boot_vehicle_len / 3)
if Game.requestAnimDict("timetable@tracy@sleep@") then
TASK.TASK_PLAY_ANIM(
self.get_ped(), "timetable@tracy@sleep@", "base",
4.0, -4.0, -1, 2, 1.0, false, false, false
)
ENTITY.ATTACH_ENTITY_TO_ENTITY(
self.get_ped(), vehicle, chassis_bone, -0.3, attachPosY, z_offset,
180.0, 0.0, 0.0, false, false, false, false, 20, true, 1
)
hfc:sleep(500)
VEHICLE.SET_VEHICLE_DOOR_SHUT(vehicle, 5, false)
ENTITY.SET_ENTITY_COLLISION(self.get_ped(), true, true)
is_hiding, hiding_in_boot, boot_vehicle, boot_vehicle_re = true, true, vehicle, isRearEngined
hfc:sleep(1000)
end
else
TASK.CLEAR_PED_TASKS(self.get_ped())
gui.show_warning("Samurai's Scripts", "Vehicle must be stopped.")
end
else
gui.show_warning("Samurai's Scripts",
"The cops have spotted you. You can't hide until they lose sight of you.")
end
end
end
if nearBin and not is_playing_anim and not is_playing_scenario and not ped_grabbed and not vehicle_grabbed then
Game.showButtonPrompt("Press ~INPUT_PICKUP~ to hide in the dumpster")
if PAD.IS_CONTROL_JUST_PRESSED(0, 38) then
if is_handsUp then
TASK.CLEAR_PED_TASKS(self.get_ped())
is_handsUp = false
end
if isCrouched then
PED.RESET_PED_MOVEMENT_CLIPSET(self.get_ped(), 0)
isCrouched = false
end
if not was_spotted then
if ENTITY.DOES_ENTITY_EXIST(bin) then
TASK.TASK_TURN_PED_TO_FACE_ENTITY(self.get_ped(), bin, 10)
CAM.DO_SCREEN_FADE_OUT(500)
hfc:sleep(1000)
ENTITY.ATTACH_ENTITY_TO_ENTITY(self.get_ped(), bin, -1, 0.0, 0.12, 1.13, 0.0, 0.0, 90.0, false,
false, false, false, 20, true, 1)
if Game.requestAnimDict("anim@amb@inspect@crouch@male_a@base") then
TASK.TASK_PLAY_ANIM(self.get_ped(), "anim@amb@inspect@crouch@male_a@base", "base", 4.0, -4.0, -1, 1,
1.0, false, false, false)
end
hfc:sleep(200)
CAM.DO_SCREEN_FADE_IN(500)
hfc:sleep(200)
AUDIO.PLAY_SOUND_FRONTEND(-1, "TRASH_BAG_LAND", "DLC_HEIST_SERIES_A_SOUNDS", true)
hfc:sleep(1000)
is_hiding, hiding_in_dumpster, thisDumpster = true, true, bin
end
else
gui.show_warning("Samurai's Scripts",
"The cops have spotted you! You can't hide until they lose sight of you.")
end
end
end
end
end
end
if is_hiding then
if not Game.Self.isAlive() then
is_hiding, ducking_in_car, hiding_in_boot, hiding_in_dumpster, boot_vehicle, thisDumpster = false, false, false, false, 0, 0
PLAYER.RESET_WANTED_LEVEL_DIFFICULTY(self.get_id())
end
if ducking_in_car and not ENTITY.DOES_ENTITY_EXIST(self.get_veh()) then
is_hiding, ducking_in_car = false, false
TASK.CLEAR_PED_TASKS(self.get_ped())
PLAYER.RESET_WANTED_LEVEL_DIFFICULTY(self.get_id())
end
if hiding_in_boot and not ENTITY.DOES_ENTITY_EXIST(boot_vehicle) then
is_hiding, hiding_in_boot, boot_vehicle = false, false, 0
TASK.CLEAR_PED_TASKS(self.get_ped())
PLAYER.RESET_WANTED_LEVEL_DIFFICULTY(self.get_id())
end
if hiding_in_dumpster and not ENTITY.DOES_ENTITY_EXIST(thisDumpster) then
is_hiding, hiding_in_dumpster, thisDumpster = false, false, 0
TASK.CLEAR_PED_TASKS(self.get_ped())
PLAYER.RESET_WANTED_LEVEL_DIFFICULTY(self.get_id())
end
local isWanted = PLAYER.GET_PLAYER_WANTED_LEVEL(self.get_id()) > 0
local was_spotted = PLAYER.IS_WANTED_AND_HAS_BEEN_SEEN_BY_COPS(self.get_id())
local offsetCoords
if offsetCoords == nil then
offsetCoords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(
self.get_ped(), math.random(10.0, 50.0),
math.random(10.0, 50.0), math.random(1.0, 10.0)
)
end
if isWanted and not was_spotted then
PED.SET_COP_PERCEPTION_OVERRIDES(40.0, 40.0, 40.0, 100.0, 100.0, 100.0, 0.0)
---@diagnostic disable-next-line
PLAYER.SET_PLAYER_WANTED_CENTRE_POSITION(self.get_id(), offsetCoords)
end
if ducking_in_car then
if was_spotted then
gui.show_warning("Samurai's Scripts",
"You have been spotted by the cops! You can't hide until they lose sight of you.")
is_hiding, ducking_in_car = false, false
TASK.CLEAR_PED_TASKS(self.get_ped())
end
Game.showButtonPrompt(
"Press ~INPUT_FRONTEND_ACCEPT~ or ~INPUT_VEH_ACCELERATE~ or ~INPUT_VEH_BRAKE~ to stop hiding.")
if PAD.IS_CONTROL_JUST_PRESSED(0, 201) or PAD.IS_CONTROL_PRESSED(0, 71)
or PAD.IS_CONTROL_PRESSED(0, 72) and not HUD.IS_MP_TEXT_CHAT_TYPING() then
TASK.CLEAR_PED_TASKS(self.get_ped())
if Game.Self.isDriving() then
VEHICLE.SET_VEHICLE_ENGINE_ON(self.get_veh(), true, false, false)
end
is_hiding, ducking_in_car = false, false
hfc:sleep(1000)
end
end
if hiding_in_boot then
Game.showButtonPrompt("Press ~INPUT_PICKUP~ to get out.")
if PAD.IS_CONTROL_JUST_PRESSED(0, 38) then
local my_pos = self.get_pos()
local veh_fwd = ENTITY.GET_ENTITY_FORWARD_VECTOR(boot_vehicle)
local _, ground_z = MISC.GET_GROUND_Z_FOR_3D_COORD(my_pos.x, my_pos.y, my_pos.z, ground_z, false, false)
local outHeading = boot_vehicle_re and ENTITY.GET_ENTITY_HEADING(boot_vehicle) or
(ENTITY.GET_ENTITY_HEADING(boot_vehicle) - 180)
local outPos = boot_vehicle_re and vec2:new(
my_pos.x + (veh_fwd.x * boot_vehicle_len / 3),
my_pos.y + (veh_fwd.y * boot_vehicle_len / 3)
) or vec2:new(
my_pos.x - (veh_fwd.x * boot_vehicle_len / 3),
my_pos.y - (veh_fwd.y * boot_vehicle_len / 3)
)
VEHICLE.SET_VEHICLE_DOOR_OPEN(boot_vehicle, 5, false, false)
hfc:sleep(500)
TASK.CLEAR_PED_TASKS(self.get_ped())
ENTITY.DETACH_ENTITY(self.get_ped(), true, false)
ENTITY.SET_ENTITY_COORDS(self.get_ped(), outPos.x, outPos.y, ground_z, false, false, false, false)
ENTITY.SET_ENTITY_HEADING(self.get_ped(), outHeading)
VEHICLE.SET_VEHICLE_DOOR_SHUT(boot_vehicle, 5, false)
hfc:sleep(200)
if ENTITY.GET_ENTITY_SPEED(boot_vehicle) > 4.0 then
PED.SET_PED_TO_RAGDOLL(self.get_ped(), 1500, 0, 0, false, false, false)
end
is_hiding, hiding_in_boot, boot_vehicle_re, boot_vehicle, boot_vehicle_len = false, false, false, 0, 0
hfc:sleep(1000)
end
end
if hiding_in_dumpster then
Game.showButtonPrompt("Press ~INPUT_PICKUP~ to get out.")
if PAD.IS_CONTROL_JUST_PRESSED(0, 38) then
CAM.DO_SCREEN_FADE_OUT(500)
hfc:sleep(1000)
local my_pos = self.get_pos()
local _, ground_z = MISC.GET_GROUND_Z_FOR_3D_COORD(my_pos.x, my_pos.y, my_pos.z, ground_z, false, false)
ENTITY.DETACH_ENTITY(self.get_ped(), true, false)
ENTITY.SET_ENTITY_HEADING(self.get_ped(), (ENTITY.GET_ENTITY_HEADING(self.get_ped()) + 90))
TASK.CLEAR_PED_TASKS(self.get_ped())
local my_fwd = Game.getForwardVec(self.get_ped())
ENTITY.SET_ENTITY_COORDS(self.get_ped(), my_pos.x + (my_fwd.x * 1.3),
my_pos.y + (my_fwd.y * 1.3), ground_z, false, false, false, false)
CAM.DO_SCREEN_FADE_IN(500)
AUDIO.PLAY_SOUND_FRONTEND(-1, "TRASH_BAG_LAND", "DLC_HEIST_SERIES_A_SOUNDS", true)
if Game.requestAnimDict("move_m@_idles@shake_off") then
TASK.TASK_PLAY_ANIM(self.get_ped(), "move_m@_idles@shake_off", "shakeoff_1", 4.0, -4.0, 3000, 48, 0.0, false,
false, false)
end
hfc:sleep(1000)
is_hiding, hiding_in_dumpster = false, false
end
end
else
if offsetCoords ~= nil then
offsetCoords = nil
end
end
end)
-- Actions
script.register_looped("AIEV", function(aiev) -- Anim Interrupt Event
if is_playing_anim then
if Game.Self.isSwimming() then
cleanup(aiev)
is_playing_anim = false
end
local isLooped = Lua_fn.has_bit(curr_playing_anim.flag, 0)
local isFrozen = Lua_fn.has_bit(curr_playing_anim.flag, 1)
if not isLooped and not isFrozen then
repeat
aiev:sleep(200)
until not ENTITY.IS_ENTITY_PLAYING_ANIM(self.get_ped(), curr_playing_anim.dict, curr_playing_anim.anim, 3)
is_playing_anim = false
end
if Game.Self.isAlive() then
if is_playing_anim and not ENTITY.IS_ENTITY_PLAYING_ANIM(self.get_ped(), curr_playing_anim.dict, curr_playing_anim.anim, 3)
and not SS.isKeyJustPressed(keybinds.stop_anim.code) then
aiev:sleep(1000)
if PED.IS_PED_FALLING(self.get_ped()) then
repeat
aiev:sleep(1000)
until not PED.IS_PED_FALLING(self.get_ped())
aiev:sleep(1000)
end
if PED.IS_PED_RAGDOLL(self.get_ped()) then
repeat
aiev:sleep(1000)
until not PED.IS_PED_RAGDOLL(self.get_ped())
aiev:sleep(1000)
end
onAnimInterrupt()
end
else
cleanup(aiev)
is_playing_anim = false
end
end
if is_playing_scenario then
if not Game.Self.isAlive() then
if bbq ~= nil and ENTITY.DOES_ENTITY_EXIST(bbq) then
ENTITY.DELETE_ENTITY(bbq)
end
is_playing_scenario = false
end
end
end)
script.register_looped("MISCANIM", function(miscanim)
if is_playing_anim or is_shortcut_anim then
if WEAPON.IS_PED_ARMED(self.get_ped(), 7) then
WEAPON.SET_CURRENT_PED_WEAPON(self.get_ped(), 0xA2719263, false)
end
if ENTITY.IS_ENTITY_PLAYING_ANIM(self.get_ped(), "mp_suicide", "pistol", 3) then
for _, w in ipairs(handguns_T) do
if WEAPON.HAS_PED_GOT_WEAPON(self.get_ped(), w, false) then
WEAPON.SET_CURRENT_PED_WEAPON(self.get_ped(), w, true)
break
end
end
miscanim:sleep(555)
AUDIO.PLAY_SOUND_FRONTEND(-1, "SNIPER_FIRE", "DLC_BIKER_RESUPPLY_MEET_CONTACT_SOUNDS", true)
repeat
miscanim:sleep(10)
until ENTITY.IS_ENTITY_PLAYING_ANIM(self.get_ped(), "mp_suicide", "pistol", 3) == false
PED.SET_PED_CAN_SWITCH_WEAPON(self.get_ped(), true)
end
repeat
miscanim:sleep(10)
until is_playing_anim == false or is_shortcut_anim == false
PED.SET_PED_CAN_SWITCH_WEAPON(self.get_ped(), true)
if curr_playing_anim.cat == "In-Vehicle" then
if PAD.IS_CONTROL_PRESSED(0, 75) or PAD.IS_DISABLED_CONTROL_PRESSED(0, 75) or Game.Self.isOnFoot() then
cleanup(miscanim)
is_playing_anim = false
end
end
end
end)
script.register_looped("AHK", function(script) -- Anim Hotkeys
if not HUD.IS_PAUSE_MENU_ACTIVE() and not HUD.IS_MP_TEXT_CHAT_TYPING() then
if is_playing_anim then
if SS.isKeyJustPressed(keybinds.stop_anim.code) and not Game.Self.isBrowsingApps() then
UI.widgetSound("Cancel")
cleanup(script)
is_playing_anim = false
is_shortcut_anim = false
if spawned_npcs[1] ~= nil then
cleanupNPC(script)
end
end
end
if usePlayKey then
if filteredAnims == nil then
updatefilteredAnims()
end
if SS.isKeyJustPressed(keybinds.next_anim.code) and not Game.Self.isBrowsingApps() then
UI.widgetSound("Nav")
if anim_index < #filteredAnims - 1 then
anim_index = anim_index + 1
else
anim_index = 0
end
info = filteredAnims[anim_index + 1]
gui.show_message("Current Animation:", info.name)
script:sleep(200)
end
if SS.isKeyJustPressed(keybinds.previous_anim.code) and not Game.Self.isBrowsingApps() then
UI.widgetSound("Nav")
if anim_index <= 0 then
anim_index = #filteredAnims - 1
else
anim_index = anim_index - 1
end
info = filteredAnims[anim_index + 1]