-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFairFight.pluto
1277 lines (1190 loc) · 52.9 KB
/
FairFight.pluto
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
--[[
This script was created by MrWalll
]]
local current_version <const> = 1.2
util.require_natives("3095a", "init")
lib_dir = filesystem.scripts_dir().."/lib/FairFight/"
if not filesystem.exists(lib_dir .. "/FF_Funtions.pluto") then
util.toast("[ERROR]\n\nRequired file not found: /lib/fairfight/FF_Funtions.pluto\n\n--["..SCRIPT_FILENAME.."]")
util.stop_script()
end
require("lib.fairfight.FF_Funtions")
----------------------------------------------------------------
-- Updater
----------------------------------------------------------------
-- Auto Updater from https://github.com/hexarobi/stand-lua-auto-updater
local status, auto_updater = pcall(require, "auto-updater")
if not status then
if not async_http.have_access() then
util.toast("Failed to install auto-updater. Internet access is disabled. To enable automatic updates, please stop the script then uncheck the `Disable Internet Access` option.")
else
local auto_update_complete = nil util.toast("Installing auto-updater...", TOAST_ALL)
async_http.init("raw.githubusercontent.com", "/hexarobi/stand-lua-auto-updater/main/auto-updater.lua",
function(raw_result, raw_headers, raw_status_code)
local function parse_auto_update_result(result, headers, status_code)
local error_prefix = "Error downloading auto-updater: "
if status_code ~= 200 then util.toast(error_prefix..status_code, TOAST_ALL) return false end
if not result or result == "" then util.toast(error_prefix.."Found empty file.", TOAST_ALL) return false end
filesystem.mkdir(filesystem.scripts_dir() .. "lib")
local file = io.open(filesystem.scripts_dir() .. "lib\\auto-updater.lua", "wb")
if file == nil then util.toast(error_prefix.."Could not open file for writing.", TOAST_ALL) return false end
file:write(result) file:close() util.toast("Successfully installed auto-updater lib", TOAST_ALL) return true
end
auto_update_complete = parse_auto_update_result(raw_result, raw_headers, raw_status_code)
end, function() util.toast("Error downloading auto-updater lib. Update failed to download.", TOAST_ALL) end)
async_http.dispatch() local i = 1 while (auto_update_complete == nil and i < 40) do util.yield(250) i = i + 1 end
if auto_update_complete == nil then error("Error downloading auto-updater lib. HTTP Request timeout") end
auto_updater = require("auto-updater")
end
end
if auto_updater == true then error("Invalid auto-updater lib. Please delete your Stand/Lua Scripts/lib/auto-updater.lua and try again") end
local default_check_interval = 604800
local auto_update_config = {
source_url="https://raw.githubusercontent.com/MrWalll/FairFight/main/FairFight.pluto",
script_relpath=SCRIPT_RELPATH,
verify_file_begins_with="--[[",
check_interval=86400,
silent_updates=false,
dependencies={
{
name="FF_Functions",
source_url="https://raw.githubusercontent.com/MrWalll/FairFight/main/lib/FairFight/FF_Funtions.pluto",
script_relpath="lib/FairFight/FF_Functions.pluto",
verify_file_begins_with="--FUNCTIONS",
check_interval=default_check_interval,
is_required=true
},
{
name="FF_Tabels",
source_url="https://raw.githubusercontent.com/MrWalll/FairFight/main/lib/FairFight/FF_Tabels.lua",
script_relpath="lib/FairFight/FF_Tabels.lua",
verify_file_begins_with="--TABELS",
check_interval=default_check_interval,
is_required=true
},
{
name="FF_Logo",
source_url="https://raw.githubusercontent.com/MrWalll/FairFight/main/resources/FF.png",
script_relpath="resources/FairFight/FF_Logo.png",
check_interval=default_check_interval,
}
}
}
if not Debug_Active then auto_updater.run_auto_update(auto_update_config) else util.log("Debug Mode Active") end
----------------------------------------------------------------
--Header
----------------------------------------------------------------
menu.divider(menu.my_root(), "".. SCRIPT_NAME)
----------------------------------------------------------------
--Self Opt List
----------------------------------------------------------------
local selflist = menu.list(menu.my_root(), "Self")
----------------------------------------------------------------
--Self Options
----------------------------------------------------------------
selflist:divider("Self")
--[[local l = loadout_1
local loadout_menu = selflist:textslider_stateful("Give loadout", {}, 'Gives yourself a loadout to fight with\n\nDetailed list of the loadouts on GitHub.', loadout_names, function(index, name)
WEAPON.REMOVE_ALL_PED_WEAPONS(ownPed, false)
WEAPON.SET_CAN_PED_SELECT_ALL_WEAPONS(ownPed, true)
switch name do
case "Loadout 1":
l = loadout_1
break
case "Loadout 2":
l = loadout_2
break
case "Loadout 3":
l = loadout_3
break
case "Loadout 4":
l = loadout_4
break
end
for w_hash, attach in pairs(l) do
WEAPON.GIVE_WEAPON_TO_PED(ownPed, w_hash, 10, false, true)
for n, a_hash in pairs(attach) do
if n ~= "tint" then
WEAPON.GIVE_WEAPON_COMPONENT_TO_PED(ownPed, w_hash, a_hash)
util.yield(10)
end
end
WEAPON.SET_PED_WEAPON_TINT_INDEX(ownPed, w_hash, attach["tint"])
WEAPON.ADD_AMMO_TO_PED(ownPed, w_hash, 9999) -- max out ammo for new weapons
end
WEAPON.SET_CURRENT_PED_WEAPON(ownPed, 0xA2719263, true) --so you dont have the last added weapon in your hands
end)]]
selflist:toggle_loop("Disable fall damage", {}, "Always land on your feet", function()
if PED.IS_PED_FALLING(ownPed) then
PED.SET_PED_CONFIG_FLAG(ownPed, 292, true) --Freeze Ped
end
if ENTITY.GET_ENTITY_HEIGHT_ABOVE_GROUND(ownPed) <= 1.4 and PED.GET_PED_CONFIG_FLAG(ownPed, 292, 0) == true then --check if flag not already false and if no longer falling (IS_PED_FALLING returns true if freezed in the air)
PED.SET_PED_CONFIG_FLAG(ownPed, 292, false)
end
end)
--skidded from dom736®#0001
local npcdisable = false
selflist:toggle("Disable NPC damage", {}, "", function(on)
npcdisable = on
while npcdisable do
PED.SET_AI_WEAPON_DAMAGE_MODIFIER(0)
PED.SET_AI_MELEE_WEAPON_DAMAGE_MODIFIER(0)
util.yield()
end
PED.RESET_AI_WEAPON_DAMAGE_MODIFIER()
PED.RESET_AI_MELEE_WEAPON_DAMAGE_MODIFIER()
end)
selflist:toggle_loop("Automatically refill ammo", {"autoFillammo"}, "Tops up the ammo for the gun in your hands, if you run low.", function(toggle)
local ammotype = WEAPON.GET_PED_AMMO_TYPE_FROM_WEAPON(ownPed, WEAPON.GET_SELECTED_PED_WEAPON(ownPed))
local armed = WEAPON.IS_PED_ARMED(ownPed, 6) --6 returns true if you are equipped with any weapon except melee weapons.
local ammoleft = WEAPON.GET_PED_AMMO_BY_TYPE(ownPed, ammotype)
if PLAYER.IS_PLAYER_DEAD(ownUser) or not armed then util.yield(1500) end
if not PLAYER.IS_PLAYER_DEAD(ownUser) then
if armed and ammoleft <= 1 then
WEAPON.SET_PED_AMMO_BY_TYPE(ownPed, ammotype, 9999)
end
end
end)
selflist:toggle_loop("Remove bounty", {}, "Makes sure you never have that delicious looking map blip.", function(toggle)
local ref = menu.ref_by_path("Online>Remove Bounty")
if not util.is_session_started() then
inform.normal_w_name("You need to go online first")
return
end
if players.get_bounty(ownUser) then
util.yield(2000)
ref:trigger()
end
end)
selflist:textslider("Drop Pickups", {}, "", droppables, function(index, name)
local ppos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ownPed, 0, 1, 0)
switch index do
case 1:
request_model(healthModel)
OBJECT.CREATE_AMBIENT_PICKUP(2406513688, ppos.x, ppos.y, ppos.z, 1, 1, healthModel, 1, 1)
OBJECT.CREATE_AMBIENT_PICKUP(2406513688, ppos.x, ppos.y, ppos.z, 1, 1, healthModel, 1, 1)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(healthModel)
break
case 2:
request_model(snackModel)
OBJECT.CREATE_AMBIENT_PICKUP(483577702, ppos.x, ppos.y, ppos.z, 1, 30, snackModel, 1, 1)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(snackModel)
break
case 3:
request_model(armourModel)
OBJECT.CREATE_AMBIENT_PICKUP(1274757841, ppos.x, ppos.y, ppos.z, 1, 1, armourModel, 1, 1)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(armourModel)
break
case 4:
request_model(chuteModel)
OBJECT.CREATE_AMBIENT_PICKUP(1735599485, ppos.x, ppos.y, ppos.z, 1, 1, chuteModel, 1, 1)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(chuteModel)
break
end
end)
----------------------------------------------------------------
--Lobby Opt List
----------------------------------------------------------------
otrPlayers = {}
local plist = menu.list(menu.my_root(), "Lobby", {}, "")
----------------------------------------------------------------
--Session
----------------------------------------------------------------
plist:divider("Session")
local fall = false
plist:toggle("Stop the fall damage", {}, "Toggle fall damage for everyone in the lobby\n\nWorks best close by.", function(s)
if s then
fall = true
for k,a in pairs(playerList) do
util.create_thread(function()
while fall and not LOBBY_BLACKLIST[a] do
while PED.IS_PED_FALLING(PlayerPed(a)) do
ENTITY.SET_ENTITY_HEALTH(PlayerPed(a), 9000)
PED.CLEAR_PED_BLOOD_DAMAGE(PlayerPed(a))
util.yield()
end
util.yield()
end
util.stop_thread()
end)
end
else
fall = false
end
end)
plist:toggle_loop("Reveal Off Radar Players", {''}, "Shows players that hide otr with a custom blip.", function(toggle)
local playerList = players.list_all_with_excludes(false)
for _, playerID in pairs(playerList) do
local isOTR = players.is_otr(playerID)
if experimental_otr then
isOTR = OTRdetection(playerID)
end
if isOTR then
if not otrPlayers[playerID] then
otrPlayers[playerID] = HUD.ADD_BLIP_FOR_ENTITY(PlayerPed(playerID))
end
SetBlipData(otrPlayers[playerID], playerID)
else
if otrPlayers[playerID] then
util.remove_blip(otrPlayers[playerID])
otrPlayers[playerID] = nil
end
end
end
end, function()
for _, playerID in pairs(playerList) do
if otrPlayers[playerID] then
util.remove_blip(otrPlayers[playerID])
otrPlayers[playerID] = nil
end
end
end)
plist:divider("Remove Player Groups")
plist:action("Kick all Gods ", {"kickgods"}, "Note: Ignores friends", function ()
KickAllGods()
end)
plist:action("Kick and History block all gods", {"kickblockgods"}, "Note: Ignores friends", function ()
KickandBlockGods()
end)
plist:action("Remove History blocks", {}, "This will remove the block from ALL previously kicked godmode players.", function ()
removeGodBlocks()
end)
plist:divider("Anti-Godmode")
plist:toggle_loop("Ghost Godmode Players", {}, "", function(toggle)
for _, playerID in ipairs(playerList) do
if not players.is_in_interior(playerID) then
if not PED.IS_PED_DEAD_OR_DYING(PlayerPed(playerID), 1) then
if players.is_godmode(playerID) then
NETWORK.SET_REMOTE_PLAYER_AS_GHOST(playerID, toggle)
else
NETWORK.SET_REMOTE_PLAYER_AS_GHOST(playerID, false)
end
end
end
end
end, function()
for _, playerID in ipairs(playerList) do
NETWORK.SET_REMOTE_PLAYER_AS_GHOST(playerID, false)
end
end)
----------------------------------------------------------------
--Weapons
----------------------------------------------------------------
local weapons = menu.list(menu.my_root(), "Weapon Options")
weapons:divider("Weapon options")
local selectW = weapons:list("Gun Groups", {}, "")
on_shoot = weapons:toggle("While shooting?", {}, "If this is toggled, the players only get punished while shooting.\nOn default, they get punished while aming and if he has ammo. ", function(toggle)
is_on_shoot_toggled = toggle
end)
selectW:divider("Gun selection")
hw_toggle = selectW:toggle("Heavy Weapons", {}, "RPG / Minigun / Homing Launcher / Widowmaker / Grenade Launcher / Railgun", function(he)
if he then
if inform.toggle then
util.toast("Heavy Weapons enabled")
end
hw_thread = util.create_thread(function()
while true do
util.yield(0)
heavyWP()
end
end)
else
if inform.toggle then
util.toast("Heavy Weapons disabled")
end
util.stop_thread(hw_thread)
end
end)
hw_menu_name = lang.get_string(menu.get_menu_name(hw_toggle))
throwabels_toggle = selectW:toggle("Throwables", {}, "Stickybomb / Granade / Proximity Mines / Molotov", function(he)
if he then
if inform.toggle then
util.toast("Throwables enabled")
end
throwabled_thread = util.create_thread(function()
while true do
util.yield(0)
throwabelsWP()
end
end)
else
if inform.toggle then
util.toast("Throwables disabled")
end
util.stop_thread(throwabled_thread)
end
end)
throwables_menu_name = lang.get_string(menu.get_menu_name(throwabels_toggle))
annoying_toggle = selectW:toggle("Annoying", {}, "Up-n-Atomizer / Flaregun / EMP Launcher / Firework Launcher / Stun gun (mp and sp)", function(he)
if he then
if inform.toggle then
util.toast("Annoying enabled")
end
annoying_thread = util.create_thread(function()
while true do
util.yield(0)
annoyingWP()
end
end)
else
if inform.toggle then
util.toast("Annoying disabled")
end
util.stop_thread(annoying_thread)
end
end)
annoying_menu_name = lang.get_string(menu.get_menu_name(annoying_toggle))
semiauto_toggle = selectW:toggle("Semiauto", {}, "Marksman Rifle Mk2 / Marksman Rifle", function(s)
if s then
if inform.toggle then
util.toast("Semiauto enabled")
end
semiauto_thread = util.create_thread(function()
while true do
util.yield(0)
semiautoWP()
end
end)
else
if inform.toggle then
util.toast("Semiauto disabled")
end
util.stop_thread(semiauto_thread)
end
end)
semiauto_menu_name = lang.get_string(menu.get_menu_name(semiauto_toggle))
spaceguns_toggle = selectW:toggle("Space-Guns", {}, "Unholy Hellbringer / Widowmaker / Up-n-Atomizer", function(toggle)
if toggle then
if inform.toggle then
util.toast("Space-Guns enabled")
end
spaceguns_thread = util.create_thread(function()
while true do
util.yield(0)
spacegunsWP()
end
end)
else
if inform.toggle then
util.toast("Space-Guns disabled")
end
util.stop_thread(spaceguns_thread)
end
end)
spaceguns_menu_name = lang.get_string(menu.get_menu_name(spaceguns_toggle))
shootguns_toggle = selectW:toggle("Shootguns", {}, "Pump Shotgun Mk2 / Assault Shotgun / Heavy Shotgun / Combat Shotgun / Sweeper Shotgun", function(toggle)
if toggle then
if inform.toggle then
util.toast("Shootguns enabled")
end
shootguns_thread = util.create_thread(function()
while true do
util.yield(0)
shootgunsWP()
end
end)
else
if inform.toggle then
util.toast("Shootguns disabled")
end
util.stop_thread(shootguns_thread)
end
end)
shootguns_menu_name = lang.get_string(menu.get_menu_name(shootguns_toggle))
----------------------------------------------------------------
--Weapon Punishments
----------------------------------------------------------------
weapons:divider("Punishments")
weapons:list_select("Troll", {}, "", W_troll, 1, function (selected)
W_punishment = W_troll[selected][1]
menu.set_menu_name(w_active, "Active: "..W_punishment)
end)
weapons:list_select("Toxic", {}, "", W_toxic, 1, function(selected)
W_punishment = W_toxic[selected][1]
menu.set_menu_name(w_active, "Active: "..W_punishment)
end)
w_active = weapons:divider( "Active: "..W_punishment)
----------------------------------------------------------------
--Vehicle Options List
----------------------------------------------------------------
local vlist = menu.list(menu.my_root(), "Vehicle Options")
vlist:divider("Vehicle Options")
vehicle_activate_toggle = vlist:toggle("Activate", {}, "1. Choose the vehicles\n2. Choose the punishment\n3. Activate", function (toggle)
if toggle then
vehicle_thread = util.create_thread(function()
while true do
util.yield(250)
vehicle_handle()
end
end)
else
util.stop_thread(vehicle_thread)
end
end)
----------------------------------------------------------------
--Vehicles toggles
----------------------------------------------------------------
local vehlist = vlist:list("Vehicles")
vehlist:divider("Vehicles")
local spec = menu.list(vehlist, "Special Cars")
local plane = menu.list(vehlist, "Planes")
local heli = menu.list(vehlist, "Helicopters")
local grou = menu.list(vehlist, "Ground Vehicles")
spec:divider("Special Cars")
plane:divider("Planes")
heli:divider("Helicopters")
grou:divider("Ground Vehicles")
vehlist:divider(" ")
antistarling = plane:toggle("LF-22 Starling", {}, "", function(toggle)
if toggle then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.STARLING["toggle"] = true
else
CarToggles.STARLING["toggle"] = false
end
end)
antiannihilator = heli:toggle("Annihilator Stealth", {}, "", function(toggle)
if toggle then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.ANNIHILATOR["toggle"] = true
else
CarToggles.ANNIHILATOR["toggle"] = false
end
end)
antivigilante = spec:toggle("Vigilante", {}, "", function(toggle)
if toggle then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.VIGILANTE["toggle"] = true
else
CarToggles.VIGILANTE["toggle"] = false
end
end)
antitampa = grou:toggle("Weaponized Tampa", {}, "", function(toggle)
if toggle then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.TAMPA["toggle"] = true
else
CarToggles.TAMPA["toggle"] = false
end
end)
antimolotok = plane:toggle("V-65 Molotok", {}, "", function(toggle)
if toggle then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.MOLOTOK["toggle"] = true
else
CarToggles.MOLOTOK["toggle"] = false
end
end)
antispeedocustom = grou:toggle("Speedo Custom", {}, "", function(toggle)
if toggle then
if toggleAll.value == true then
toggleAll.value = false
end --[[ _ _ ]]
CarToggles.SPEEDO["toggle"] = true --[[ (.)(.) ]]
else --[[ (.____.) ]]
CarToggles.SPEEDO["toggle"] = false --[[ '--' ]]
end
end)
antinightshark = grou:toggle("Nightshark", {}, "", function(toggle)
if toggle then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.NIGHTSHARK["toggle"] = true
else
CarToggles.NIGHTSHARK["toggle"] = false
end
end)
antimk2 = spec:toggle("Oppressor MK2", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.OPPRESSOR2["toggle"] = true
else
CarToggles.OPPRESSOR2["toggle"] = false
end
end)
antiscramjet = spec:toggle("Scramjet", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.SCRAMJET["toggle"] = true
else
CarToggles.SCRAMJET["toggle"] = false
end
end)
antideluxo = spec:toggle("Deluxo", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.DELUXO["toggle"] = true
else
CarToggles.DELUXO["toggle"] = false
end
end)
antitoreador = spec:toggle("Toreador", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.TOREADOR["toggle"] = true
else
CarToggles.TOREADOR["toggle"] = false
end
end)
antilazer = plane:toggle("P-996 Lazer", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.LAZER["toggle"] = true
else
CarToggles.LAZER["toggle"] = false
end
end)
antib11 = plane:toggle("B11-Strikeforce", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.STRIKEFORCE["toggle"] = true
else
CarToggles.STRIKEFORCE["toggle"] = false
end
end)
antihydra = plane:toggle("Hydra", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.HYDRA["toggle"] = true
else
CarToggles.HYDRA["toggle"] = false
end
end)
antiakula = heli:toggle("Akula", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.AKULA["toggle"] = true
else
CarToggles.AKULA["toggle"] = false
end
end)
antihunter = heli:toggle("Hunter", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.HUNTER["toggle"] = true
else
CarToggles.HUNTER["toggle"] = false
end
end)
antisavage = heli:toggle("Savage", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.SAVAGE["toggle"] = true
else
CarToggles.SAVAGE["toggle"] = false
end
end)
anticonada = heli:toggle("Weaponized Conada", {}, "", function (on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.CONADA["toggle"] = true
else
CarToggles.CONADA["toggle"] = false
end
end)
antistromberg = spec:toggle("Stromberg", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.STROMBERG["toggle"] = true
else
CarToggles.STROMBERG["toggle"] = false
end
end)
antiraiju = plane:toggle("F-160 Raiju", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.RAIJU["toggle"] = true
else
CarToggles.RAIJU["toggle"] = false
end
end)
antitank = grou:toggle("Tanks", {}, "The following vehicles are affected: \nkhanjali, rhino and apc", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.APC["toggle"] = true
CarToggles.RHINO["toggle"] = true
CarToggles.KHANJALI["toggle"] = true
else
CarToggles.APC["toggle"] = false
CarToggles.RHINO["toggle"] = false
CarToggles.KHANJALI["toggle"] = false
end
end)
antirc = grou:toggle("RC Vehicles", {}, "The following vehicles are affected: \nminitank and bandito", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
CarToggles.BANDITO["toggle"] = true
CarToggles.MINITANK["toggle"] = true
else
CarToggles.BANDITO["toggle"] = false
CarToggles.MINITANK["toggle"] = false
end
end)
--Toggle all cars
toggleAll = vehlist:toggle("Toggle All", {}, "", function(on)
if on then
for k, v in pairs(CarToggles) do
CarToggles[k]["toggle"] = true
end
if inform.toggle then
util.toast("Toggle All on")
end
else
for k, v in pairs(CarToggles) do
CarToggles[k]["toggle"] = false
end
if inform.toggle then
util.toast("Toggle All off")
end
end
end)
spec:divider(" ")
spec:toggle("Toggle all special cars", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
antivigilante.value = true
antimk2.value = true
antiscramjet.value = true
antideluxo.value = true
antitoreador.value = true
antistromberg.value = true
if inform.toggle then
util.toast("All special cars toggled on")
end
else
antivigilante.value = false
antimk2.value = false
antiscramjet.value = false
antideluxo.value = false
antitoreador.value = false
antistromberg.value = false
if inform.toggle then
util.toast("All special cars toggled off")
end
end
end)
plane:divider(" ")
plane:toggle("Toggle all planes", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
antistarling.value = true
antimolotok.value = true
antilazer.value = true
antib11.value = true
antihydra.value = true
antiraiju.value = true
if inform.toggle then
util.toast("All planes toggled on")
end
else
antistarling.value = false
antimolotok.value = false
antilazer.value = false
antib11.value = false
antihydra.value = false
antiraiju.value = false
if inform.toggle then
util.toast("All planes toggled off")
end
end
end)
heli:divider(" ")
heli:toggle("Toggle all helicopters", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
antiannihilator.value = true
antiakula.value = true
antihunter.value = true
antisavage.value = true
anticonada.value = true
if inform.toggle then
util.toast("All helicopters toggled on")
end
else
antiannihilator.value = false
antiakula.value = false
antihunter.value = false
antisavage.value = false
anticonada.value = false
if inform.toggle then
util.toast("All helicopters toggled on")
end
end
end)
grou:divider(" ")
grou:toggle("Toggle all ground vehicles", {}, "", function(on)
if on then
if toggleAll.value == true then
toggleAll.value = false
end
antitampa.value = true
antispeedocustom.value = true
antinightshark.value = true
antirc.value = true
antitank.value = true
if inform.toggle then
util.toast("All ground vehicles toggled on")
end
else
antitampa.value = false
antispeedocustom.value = false
antinightshark.value = false
antirc.value = false
antitank.value = false
if inform.toggle then
util.toast("All ground vehicles toggled off")
end
end
end)
----------------------------------------------------------------
--Vechile Punishments
----------------------------------------------------------------
vlist:divider("Punishments")
vlist:list_select("Troll", {}, "", V_troll, 1, function (selected)
V_punishment = V_troll[selected][1]
menu.set_menu_name(v_active, "Active: "..V_punishment)
end)
vlist:list_select("Toxic", {}, "", V_toxic, 1, function(selected)
V_punishment = V_toxic[selected][1]
menu.set_menu_name(v_active, "Active: "..V_punishment)
end)
v_active = vlist:divider("Active: "..V_punishment)
----------------------------------------------------------------
--Settings
----------------------------------------------------------------
local set = menu.list(menu.my_root(), "Settings")
set:divider("Settings")
set:toggle("Toggle Notifications", {}, "Toggle Notifications like 'Player in Vehicle..'.\n\nBy default notifications are turned OFF", function(on)
if on then
inform.toggle = true
else
inform.toggle = false
end
end, Debug_Active)
set:toggle("Effect yourself?", {}, "If toggled you will be effected by the punishments.", function(toggle)
if toggle then
playerList = players.list_all_with_excludes(true)
else
playerList = players.list_all_with_excludes(false)
end
end, Debug_Active)
set:action("Exclude others", {}, "FF uses Stands Excludes so this is a simple redirect to 'Players>All Players>Excludes'", function ()
local ref = menu.ref_by_path("Players>All Players>Excludes")
ref:trigger()
end)
local blacklist_root = set:list('Blacklist players', {}, "Manage blacklist for all players")
local lobby_root = blacklist_root:list("Lobby")
local weapon_root = blacklist_root:list("Weapon options")
local vehicle_root = blacklist_root:list("Vehicle options")
players.add_command_hook(function(playerID)
if not menu.ref_by_rel_path(lobby_root, PlayerName(playerID)):isValid() then
BLACKLIST_TOGGLED_L[playerID] = lobby_root:action(PlayerName(playerID), {}, "", function()
if not LOBBY_BLACKLIST[playerID] then
if inform.toggle then
inform.normal_w_name(PlayerName(playerID) .. " is now on the blacklist")
end
LOBBY_BLACKLIST[playerID] = true
menu.set_menu_name(BLACKLIST_TOGGLED_L[playerID], PlayerName(playerID).." [BLACKLISTED]")
else
menu.set_menu_name(BLACKLIST_TOGGLED_L[playerID], PlayerName(playerID))
LOBBY_BLACKLIST[playerID] = nil
end
end)
end
if not menu.ref_by_rel_path(weapon_root, PlayerName(playerID)):isValid() then
BLACKLIST_TOGGLED_W[playerID] = weapon_root:action(PlayerName(playerID), {}, "", function()
if not WEAPON_BLACKLIST[playerID] then
if inform.toggle then
inform.normal_w_name(PlayerName(playerID) .. " is now on the blacklist")
end
WEAPON_BLACKLIST[playerID] = true
menu.set_menu_name(BLACKLIST_TOGGLED_W[playerID], PlayerName(playerID).." [BLACKLISTED]")
else
menu.set_menu_name(BLACKLIST_TOGGLED_W[playerID], PlayerName(playerID))
WEAPON_BLACKLIST[playerID] = nil
end
end)
end
if not menu.ref_by_rel_path(vehicle_root, PlayerName(playerID)):isValid() then
BLACKLIST_TOGGLED_V[playerID] = vehicle_root:action(PlayerName(playerID), {}, "", function(on_click)
if not VEHICLE_BLACKLIST[playerID] then
if inform.toggle then
inform.normal_w_name(PlayerName(playerID) .. " is now on the blacklist")
end
VEHICLE_BLACKLIST[playerID] = true
menu.set_menu_name(BLACKLIST_TOGGLED_V[playerID], PlayerName(playerID).." [BLACKLISTED]")
else
menu.set_menu_name(BLACKLIST_TOGGLED_V[playerID], PlayerName(playerID))
VEHICLE_BLACKLIST[playerID] = nil
end
end)
end
end)
players.on_leave(function(playerID, name)
if menu.ref_by_rel_path(lobby_root, name):isValid() then
BLACKLIST_TOGGLED_L[playerID]:delete()
LOBBY_BLACKLIST[playerID] = nil
end
if menu.ref_by_rel_path(weapon_root, name):isValid() then
BLACKLIST_TOGGLED_W[playerID]:delete()
WEAPON_BLACKLIST[playerID] = nil
end
if menu.ref_by_rel_path(vehicle_root, name):isValid() then
BLACKLIST_TOGGLED_V[playerID]:delete()
VEHICLE_BLACKLIST[playerID] = nil
end
end)
set:divider("Adjustments")
tireP = set:list("Tire")
tireP:divider("Tire")
tireP:slider("Delay (in seconds)", {"tdelay"}, "", 5, 150, punishmentDelays["Tires"], 5, function(value) punishmentDelays["Tires"] = value end)
tireP:textslider_stateful("Which Tire/s?", {}, "", tires, function (name)
wheel = tires[name]
end)
partP = set:list("Lose parts")
partP:divider("Lose Parts")
partP:slider("Delay (in seconds)", {"losedelay"}, "", 5, 150, punishmentDelays["Lose Parts"], 5, function(value) punishmentDelays["Lose Parts"] = value end)
partP:textslider_stateful("What Part/s to lose?", {}, "Note: Wheels will randomly choose wheels to detach", parts_table, function(name)
part = parts_table[name]
end)
AnimalP = set:list("Animal attack")
AnimalP:divider("Animal attack")
AnimalP:toggle("Godmode?", {}, "Toggles godmode for the attacking animal.", function (toggle)
animal_godmode = toggle
end)
AnimalP:list_select("Spawn location", {}, "", animal_attack_options, 1, function(index)
switch index do
case 1:
animal_space = {y = 0, x = -10, z = 0}
break
case 2:
animal_space = {y = 0, x = 10, z = 0}
break
case 3:
animal_space = {y = 10, x = 0, z = 0}
break
case 4:
animal_space = {y = -10, x = 0, z = 0}
break
end
end)
AnimalP:list_select("Animal", {}, "", animal_attack_models, 1, function(name)
animal = "a_c_"..animal_attack_models[name]
DisplayAnimalName = animal_attack_models[name]
end)
set:toggle("Stunning Kills", {}, "If toggled players who are stunned will also die", function(toggle)
if toggle then
stun_kills = true
else
stun_kills = false
end
end)
set:divider("Other Delays")
local vDelay
local wDelay
local wcDelay
set:list_select("Show", {}, "", delays, 1, function (index)
switch index do
case 1:
menu.set_visible(vDelay, true)
menu.set_visible(wDelay, false)
menu.set_visible(wcDelay, false)
break
case 2:
menu.set_visible(vDelay, false)