-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathKeramiScript.lua
2419 lines (2078 loc) · 118 KB
/
KeramiScript.lua
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
--[[Thanks to:
-Ren (for helping me out a ton)
-Jayphen (for helping me a ton with memory)
-Nowiry (hella help, very cool gamer)
-Aaron (helped with the whitelisting feature)
-Lance (steal his player functions setup xD)
-zPrism, for letting me test stuff with him
-ValidLocket, for being a homie
-Chloe, for being really sweet <3
]]
--require("natives-1640181023")
--util.require_natives(1651208000)
util.require_natives(1663599433)
require("Universal_ped_list")
require("Universal_objects_list")
require("KeramiScriptLib")
util.keep_running()
local scriptName = "KeramisScript V.12"
local menuroot = menu.my_root()
local menuAction = menu.action
local menuToggle = menu.toggle
local menuToggleLoop = menu.toggle_loop
local joaat = util.joaat
local wait = util.yield
local createPed = PED.CREATE_PED
local getEntityCoords = ENTITY.GET_ENTITY_COORDS
local getPlayerPed = PLAYER.GET_PLAYER_PED
local requestModel = STREAMING.REQUEST_MODEL
local hasModelLoaded = STREAMING.HAS_MODEL_LOADED
local noNeedModel = STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED
local setPedCombatAttr = PED.SET_PED_COMBAT_ATTRIBUTES
local giveWeaponToPed = WEAPON.GIVE_WEAPON_TO_PED
CCAM = 0
STP_SPEED_MODIFIER = 0.02
STP_COORD_HEIGHT = 300
local function onStartup()
SE_LocalPed = GetLocalPed()
SE_Notifications = false -- notifications globally
SEisExploInvis = true
SEisExploAudible = false
AIM_WHITELIST = {}
--------
util.toast("Ran startup of " .. scriptName)
end
onStartup()
-----------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------
local lobbyFeats = menu.list(menuroot, "Lobby Features", {}, "")
menu.divider(lobbyFeats, "Toxic Features")
menuAction(lobbyFeats, "Everyone Explode-Suicides", {"allsuicide"}, "Makes everyone commit suicide, with an explosion.", function()
EveryoneExplodeSuicides()
end)
-----------------------------------------------------------------------------------------------------------------
local lobbyremove = menu.list(lobbyFeats, "Removes", {}, "")
Pizzaall = menuAction(lobbyremove, "Black Plague Crash All", {"plagueall"}, "Blocked by most menus.", function ()
menu.show_warning(Pizzaall, 1, "This will crash everyone with the plague. Did you mean to click this?", PizzaCAll)
end)
menuAction(lobbyremove, "Freemode Death All", {"allfdeath"}, "Will probably not work on some/most menus. A 'delayed kick' of sorts.", function ()
FreemodeDeathAll()
end)
TXC_SLOW = false
menuAction(lobbyremove, "AIO Kick All", {"allaiokick", "allaiok"}, "Will probably not work on some menus.", function ()
AIOKickAll()
end)
menuToggle(lobbyremove, "Slower, but better AIO", {}, "", function (on)
TXC_SLOW = on
if SE_Notifications then
util.toast("Better AIO set to " .. tostring(on))
end
end)
----------------------------------------------------------------------------
local otherFeats = menu.list(lobbyFeats, "Other Features / Tools", {}, "")
VehTeleportLoadIterations = 20
menuAction(otherFeats, "Remove Vehicle Godmode for All", {"allremovevehgod"}, "Removes everyone's vehicle godmode, making them easier to kill :)", function ()
RemoveVehicleGodmodeForAll()
end)
menuAction(otherFeats, "Teleport everyone's vehicles to ocean", {"alltpvehocean"}, "Teleports everyone's vehicles into the ocean.", function()
TeleportEveryonesVehicleToOcean()
end)
menuAction(otherFeats, "Teleport everyone's vehicles to Maze Bank", {"alltpvehmazebank"}, "Teleports everyone's vehicles on top of the Maze Bank tower.", function()
TeleportEveryonesVehicleToMazeBank()
end)
menu.slider(otherFeats, "Vehicle Teleporting Load Iterations", {"vehloaditerations"}, "How many times we teleport to the selected person to load their vehicle in. Keep in mind that every iteration is one-tenth of a second. Default is 20, or 2 seconds.", 1, 100, 20, 1, function(value)
VehTeleportLoadIterations = value
end)
menuAction(otherFeats, "Check entire lobby for godmode", {}, "Checks the entire lobby for godmode, and notifies you of their names.", function()
CheckLobbyForGodmode()
end)
menuToggleLoop(otherFeats, "Toast Players When Joining", {}, "Toasts number of players when you join a new session.", function ()
CheckLobbyForPlayers()
end)
-----------------------------------------------------------------------------------------------------------------------------------
--preload
local mFunFeats = menu.list(menuroot, "Weapon Features", {"wpfeats"}, "")
menu.divider(mFunFeats, "Sticky Bomb Gun")
SE_stickyEntities = {}
SE_stickyCount = 1
----
SE_stickyvec3 = {}
SE_stickyvec3count = 1
----
menuToggleLoop(mFunFeats, "Improved Sticky Bomb Gun", {"sbgun"}, "Notes where or what you shot, to explode it later.", function ()
local pped = GetLocalPed() --get local ped, assign to "pped"
if PED.IS_PED_SHOOTING(pped) then --check for shooting
local tarEnt = memory.alloc() --allocate memory to get Target Entity
local isEntFound = PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(players.user(), tarEnt) --is the entity found withing our aiming range?
if isEntFound then --if the entity is found, then...
local entt = memory.read_int(tarEnt) --get the entity handle
SE_stickyEntities[SE_stickyCount] = entt --assign it to our table
SE_stickyCount = SE_stickyCount + 1 --make our counter + 1
if SE_Notifications then
util.toast("Entity marked.")
end
else --if we WEREN't aiming at an entity, then...
local minevec3 = memory.alloc() --allocate memory for target coords
local junk = WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(pped, minevec3) --get target coords
local mv3 = memory.read_vector3(minevec3) --get v3 coords
SE_stickyvec3[SE_stickyvec3count] = mv3 --assign to table
SE_stickyvec3count = SE_stickyvec3count + 1 --counter + 1
memory.free(minevec3)
if SE_Notifications then
util.toast("Coordinate marked.")
end
end
memory.free(tarEnt)
end
end)
menuAction(mFunFeats, "Explode All Stickybombs", {"expsb"}, "Explodes all marked entities and coordinate with one stickybomb.", function ()
for i = 1, #SE_stickyEntities do
local targetC = getEntityCoords(SE_stickyEntities[i])
SE_add_owned_explosion(GetLocalPed(), targetC.x, targetC.y, targetC.z, 2, 10, SEisExploAudible, SEisExploInvis, 0)
end
for i = 1, #SE_stickyvec3 do
local tarc = SE_stickyvec3[i]
SE_add_owned_explosion(GetLocalPed(), tarc.x, tarc.y, tarc.z, 2, 10, SEisExploAudible, SEisExploInvis, 0)
end
if SE_Notifications then
util.toast("Exploded all stickybombs!")
end
end)
menuAction(mFunFeats, "Clear Stickybombs", {"clearsb"}, "Clears all stickybombs from this script.", function ()
if SE_Notifications then
util.toast("Stickybombs deleted!")
end
SE_stickyEntities = {}
SE_stickyCount = 1
SE_stickyvec3 = {}
SE_stickyvec3count = 1
end)
----
menu.divider(mFunFeats, "Extinction Gun")
----
MarkedForExt = {}
MarkedForExtCount = 1
----
menuToggleLoop(mFunFeats, "Better Extinction Gun", {}, "", function ()
local localPed = GetLocalPed()
if PED.IS_PED_SHOOTING(localPed) then
local point = memory.alloc(4)
local isEntFound = PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(players.user(), point)
if isEntFound then
local entt = memory.read_int(point)
if ENTITY.IS_ENTITY_A_PED(entt) and PED.IS_PED_IN_ANY_VEHICLE(entt) then
local pedVeh = PED.GET_VEHICLE_PED_IS_IN(entt, false)
local maxPassengers = VEHICLE.GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(pedVeh) - 1
for i = -1, maxPassengers do
local seatFree = VEHICLE.IS_VEHICLE_SEAT_FREE(pedVeh, i, false)
if not seatFree then
local targetPed = VEHICLE.GET_PED_IN_VEHICLE_SEAT(pedVeh, i, false)
MarkedForExt[MarkedForExtCount] = targetPed
if SE_Notifications then
util.toast("Marked for extinction! Index " .. MarkedForExtCount)
end
MarkedForExtCount = MarkedForExtCount + 1
end
end
MarkedForExt[MarkedForExtCount] = pedVeh
if SE_Notifications then
util.toast("Marked for extinction! Index " .. MarkedForExtCount)
end
MarkedForExtCount = MarkedForExtCount + 1
else
MarkedForExt[MarkedForExtCount] = entt
if SE_Notifications then
util.toast("Marked for extinction! Index " .. MarkedForExtCount)
end
MarkedForExtCount = MarkedForExtCount + 1
end
end
memory.free(point)
end
end)
menuAction(mFunFeats, "Extinct", {}, "", function ()
for i = 1, #MarkedForExt, 1 do
entities.delete_by_handle(MarkedForExt[i])
end
MarkedForExt = {}
MarkedForExtCount = 1
-- resets the extinction
if SE_Notifications then
util.toast("Deleted! Clearing extinction list...")
end
end)
menuAction(mFunFeats, "Clear Extinct List", {}, "", function ()
MarkedForExt = {}
MarkedForExtCount = 1
end)
----------------------------------------------------------------------------------------------------
menu.divider(mFunFeats, "Proximity Mine Gun")
PROX_Coords = {}
PROX_Count = 1
menuToggleLoop(mFunFeats, "Proximity Mine Gun", {"proxgun"}, "Only works on coordinates, not entities. For that, use sticky bomb gun.", function ()
local localped = GetLocalPed()
if PED.IS_PED_SHOOTING(localped) then --check if we shooting
local pointer = memory.alloc() --allocate memory for coords
local junk = WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(localped, pointer) --get pointer to coord
local coord = memory.read_vector3(pointer) --get coord (read from pointer)
if coord.x ~= 0.0 and coord.y ~= 0.0 and coord.z ~= 0.0 then --check for dud (if we didn't register the shot)
PROX_Coords[PROX_Count] = coord --assign coord to table
PROX_Count = PROX_Count + 1 --make the counter go up
if SE_Notifications then
util.toast("Proximity mine placed at " .. coord.x .. " " .. coord.y .. " " .. coord.z)
end
end
memory.free(pointer) --free the memory so we don't bruh moment the script
end
end)
menuToggleLoop(mFunFeats, "Enable/Disable Proximity Mines", {"enableprox", "proxon"}, "Makes the proximity mines actually check for if entities are by them.", function ()
if PROX_Coords ~= nil then
for i = 1, #PROX_Coords do
local pedTable = entities.get_all_peds_as_handles()
for a = 1, #pedTable do
if ENTITY.IS_ENTITY_IN_AREA(pedTable[a], PROX_Coords[i].x + 2, PROX_Coords[i].y + 2, PROX_Coords[i].z, PROX_Coords[i].x - 2, PROX_Coords[i].y - 2, PROX_Coords[i].z + 2, true, true, true) then
SE_add_owned_explosion(GetLocalPed(), PROX_Coords[i].x, PROX_Coords[i].y, PROX_Coords[i].z, 2, 10, true, false, 0.4)
end
end
end
end
end)
menuAction(mFunFeats, "Clear Proximity Mines", {"clearprox"}, "Clears all proximity mines that you've placed.", function ()
util.toast("Cleared all " .. #PROX_Coords .. " proximity mines!")
PROX_Coords = {}
PROX_Count = 1
end)
----------------------------------------------------------------------------------------------------
menu.divider(mFunFeats, "Kill Aura")
--preload
KA_Radius = 20
KA_Blame = true
KA_Players = false
KA_Onlyplayers = false
KA_Delvehs = false
KA_Delpeds = false
menuToggleLoop(mFunFeats, "KillAura", {"killaura"}, "Kills peds, optionally players, optionally friends, in a raidus.", function ()
local tKCount = 1
local toKill = {}
local ourcoords = getEntityCoords(GetLocalPed())
local ourped = GetLocalPed()
local weaponhash = 177293209 -- heavy sniper mk2 hash
--
local pedPointers = entities.get_all_peds_as_pointers()
for i = 1, #pedPointers do
local v3 = entities.get_position(pedPointers[i])
local vdist = MISC.GET_DISTANCE_BETWEEN_COORDS(ourcoords.x, ourcoords.y, ourcoords.z, v3.x, v3.y, v3.z, true)
if vdist <= KA_Radius then
toKill[tKCount] = entities.pointer_to_handle(pedPointers[i])
tKCount = tKCount + 1
end
end
for i = 1, #toKill do
if (not KA_Onlyplayers and not PED.IS_PED_A_PLAYER(toKill[i])) or (KA_Players) or (KA_Onlyplayers and PED.IS_PED_A_PLAYER(toKill[i])) then
if toKill[i] ~= GetLocalPed() then
if not PED.IS_PED_DEAD_OR_DYING(toKill[i]) then
if PED.IS_PED_IN_ANY_VEHICLE(toKill[i]) then
local veh = PED.GET_VEHICLE_PED_IS_IN(toKill[i], false)
local pedcoords = getEntityCoords(toKill[i])
if not PED.IS_PED_A_PLAYER(toKill[i]) and KA_Delvehs then
entities.delete_by_handle(veh)
end
if KA_Blame then
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z - 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x + 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x - 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y + 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y - 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
else
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z - 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x + 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x - 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y + 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y - 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
end
wait(50)
if not PED.IS_PED_A_PLAYER(toKill[i]) and PED.IS_PED_DEAD_OR_DYING(toKill[i]) and KA_Delpeds then
entities.delete_by_handle(toKill[i])
end
else
local pedcoords = getEntityCoords(toKill[i])
if KA_Blame then
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pedcoords.x, pedcoords.y, pedcoords.z + 2, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, false, -1)
else
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pedcoords.x, pedcoords.y, pedcoords.z + 2, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1)
end
wait(50)
if not PED.IS_PED_A_PLAYER(toKill[i]) and PED.IS_PED_DEAD_OR_DYING(toKill[i]) and KA_Delpeds then
entities.delete_by_handle(toKill[i])
end
end
end
end
end
end
wait(100)
end)
local killAuraSettings = menu.list(mFunFeats, "KillAura Settings", {}, "Settings for the KillAura functionality.")
menu.divider(killAuraSettings, "KillAura Settings")
menu.slider(killAuraSettings, "Killaura Radius", {"karadius"}, "Radius for killaura.", 1, 100, 20, 1, function (value)
KA_Radius = value
end)
menuToggle(killAuraSettings, "Blame Killaura on Me?", {"kablame"}, "If toggled off, bullets will not be blamed on you.", function (toggle)
KA_Blame = toggle
end, true)
menuToggle(killAuraSettings, "Target Players?", {"kaplayers"}, "If toggled off, will only target peds.", function (toggle)
KA_Players = toggle
if toggle then
if KA_Onlyplayers then
menu.trigger_commands("kaonlyplayers")
end
end
end)
menuToggle(killAuraSettings, "Target ONLY Players?", {"kaonlyplayers"}, "If toggled on, will target ONLY players.", function (toggle)
KA_Onlyplayers = toggle
if toggle then
if KA_Players then
menu.trigger_commands("kaplayers")
end
end
end)
menuToggle(killAuraSettings, "Delete Vehicles of Peds?", {"kadelvehs"}, "If toggled on, will delete vehicles of non-player peds, which makes them easier to kill.", function (toggle)
KA_Delvehs = toggle
end)
menuToggle(killAuraSettings, "Delete peds after shooting?", {"kasilent"}, "If toggled on, will delete the peds that you have killed.", function (toggle)
KA_Delpeds = toggle
end)
menuToggleLoop(killAuraSettings, "Draw Radius of Killaura?", {"kasphere"}, "Draws a sphere that shows your killaura range.", function ()
local myC = getEntityCoords(GetLocalPed())
GRAPHICS._DRAW_SPHERE(myC.x, myC.y, myC.z, KA_Radius, 255, 0, 0, 0.3)
end)
menuToggleLoop(killAuraSettings, "Draw peds in radius", {"kadrawpeds"}, "If toggled on, will draw the number of peds in the selected radius. Does not need KillAura to be enabled.", function ()
local dcount = 1
local dtable = {}
local ourcoords = getEntityCoords(GetLocalPed())
--
local pedPointers = entities.get_all_peds_as_pointers()
for i = 1, #pedPointers do
local v3 = entities.get_position(pedPointers[i])
local vdist = MISC.GET_DISTANCE_BETWEEN_COORDS(ourcoords.x, ourcoords.y, ourcoords.z, v3.x, v3.y, v3.z, true)
if vdist <= KA_Radius then
dtable[dcount] = entities.pointer_to_handle(pedPointers[i])
dcount = dcount + 1
end
end
local cc = {r = 1.0, g = 1.0, b = 1.0, a = 1.0}
directx.draw_text(0.0, 0.11, "Peds in radius of >> " .. KA_Radius .. " << " .. #dtable, ALIGN_TOP_LEFT, 0.5, cc, false)
end)
menuAction(killAuraSettings, "Spawn test peds", {}, "", function ()
local hash = joaat("G_M_M_ChiGoon_02")
local coords = getEntityCoords(GetLocalPed())
requestModel(hash)
while not hasModelLoaded(hash) do wait() end
PED.CREATE_PED(24, hash, coords.x, coords.y, coords.z, 0, true, false)
noNeedModel(hash)
end)
menuAction(killAuraSettings, "Populate the map", {}, "After killing a bit too many peds, you can re-populate the map with this neat button. How cool!", function ()
MISC.POPULATE_NOW()
end)
----------------------------------------------------------------------------------------------------
menu.divider(mFunFeats, "PvP / PvE Helper")
local pvphelp = menu.list(mFunFeats, "PvP / PvE Helper", {"pvphelp"}, "")
menu.divider(pvphelp, "Silent Aimbot")
Silent_Aimbot = {
hitboxes = {
head = {hash = 12844, toggled = false},
spine = {hash = 24817, toggled = false},
pelvis = {hash = 11816, toggled = false},
},
fov = 2,
dist = 300,
dmg = 100,
los_check = true,
fov_check = true,
hash = 177293209, --heavy sniper mk2 hash
advanced = {
speed = -1
}
}
menu.toggle_loop(pvphelp, "Aimbot 2.0", {}, "", function ()
if PED.IS_PED_SHOOTING(GetLocalPed()) then --main start, checking.
Silent_Aimbot.hash = WEAPON.GET_SELECTED_PED_WEAPON(GetLocalPed())
local suitable = GetSuitableAimbotTarget(Silent_Aimbot.fov, Silent_Aimbot.fov_check,
Silent_Aimbot.dist, Silent_Aimbot.los_check)
if suitable ~= nil then
local hitboxesCheckCount = 0
for i, v in pairs(Silent_Aimbot.hitboxes) do
if (v.toggled) then
ShootBulletAtPedBone(suitable, v.hash, Silent_Aimbot.dmg,
Silent_Aimbot.hash, Silent_Aimbot.advanced.speed)
if SE_Notifications then util.toast("Shot " .. i .. " of player " .. GetPlayerName_ped(suitable)) end
break;
else
hitboxesCheckCount = hitboxesCheckCount + 1
end
end
if (hitboxesCheckCount == 3) then --if all 3 are disabled
util.toast("No hitboxes selected!")
end
end
end
end)
local aimbot_settings = menu.list(pvphelp, "Aimbot 2.0 Settings", {}, "")
menu.divider(aimbot_settings, "---Settings---")
menu.slider(aimbot_settings, "Damage", {"saimdmg", "silentdamage"}, "Damage. May not be exact.", 1, 10000, 100, 10, function (v) Silent_Aimbot.dmg = v end)
menu.slider(aimbot_settings, "Range", {"saimrange", "silentrange"}, "Range for silent aimbot.", 1, 10000, 300, 100, function (v) Silent_Aimbot.dist = v end)
menu.slider(aimbot_settings, "FOV", {"saimfov", "silentfov"}, "FOV for silent aimbot.", 1, 1000, 20, 1, function (v) Silent_Aimbot.fov = v/10 end)
menu.toggle(aimbot_settings, "FOV Check", {}, "Disables FOV check.", function (toggle) Silent_Aimbot.fov_check = toggle end, true)
menu.toggle(aimbot_settings, "LOS Check", {}, "Disables Line-Of-Sight check.", function (toggle) Silent_Aimbot.los_check = toggle end, true)
menu.divider(aimbot_settings, "---Hitboxes---")
menu.toggle(aimbot_settings, "Head", {"saimhead", "silenthead"}, "Toggle head hitbox.", function (toggle) Silent_Aimbot.hitboxes.head.toggled = toggle end)
menu.toggle(aimbot_settings, "Spine/body", {"saimspine", "saimbody", "silentbody"}, "Toggle body hitbox.", function (toggle) Silent_Aimbot.hitboxes.spine.toggled = toggle end)
menu.toggle(aimbot_settings, "Pelvis", {"saimpelvis", "silentpelvis"}, "Toggle pelvis hitbox.", function (toggle) Silent_Aimbot.hitboxes.pelvis.toggled = toggle end)
menu.divider(aimbot_settings, "---Advanced---")
menu.slider(aimbot_settings, "Set speed", {"silentspeed"}, "Advanced. Set speed of bullets. Default is -1.", -1, 2147483647, -1, 10, function (v) Silent_Aimbot.advanced.speed = v end)
--GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS --for shooting the kneecaps
--https://wiki.gtanet.work/index.php?title=Bones
--IK_Head 12844
--SKEL_Spine2 24817
--SKEL_Pelvis 11816
--SKEL_R_Toe0 20781
--IK_R_Hand 6286
----------------------------------------------------------------------------------------------------
menu.divider(pvphelp, "Vehicle Aimbot")
--TYSM NOWIRY AND AARON!
VEH_MISSILE_SPEED = 10000
menuToggleLoop(pvphelp, "Helicopter Aimbot", {}, "Makes the heli aim at the closest player. Combine this with 'silent aimbot' for it to look like you're super good :)", function ()
local p = GetClosestPlayerWithRange_Whitelist(200)
local localped = GetLocalPed()
local localcoords2 = getEntityCoords(localped)
if p ~= nil and not PED.IS_PED_DEAD_OR_DYING(p) and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(localped, p, 17) and not AIM_WHITELIST[NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p)] and (not players.is_in_interior(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p))) and (not players.is_godmode(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p))) then
if PED.IS_PED_IN_ANY_VEHICLE(localped) then
local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false)
if VEHICLE.GET_VEHICLE_CLASS(veh) == 15 or VEHICLE.GET_VEHICLE_CLASS(veh) == 16 then --vehicle class of heli
--did all prechecks, time to actually face them
-- local pcoords = PED.GET_PED_BONE_COORDS(p, 24817, 0, 0, 0)
-- local look = util.v3_look_at(localCoords, pcoords) --x = pitch (vertical), y = roll (fuck no), z = heading (horizontal)
local pcoords2 = PED.GET_PED_BONE_COORDS(p, 24817, 0, 0, 0)
local look2 = v3.lookAt(localcoords2, pcoords2)
local look = GetTableFromV3Instance(look2)
ENTITY.SET_ENTITY_ROTATION(veh, look.x, look.y, look.z, 1, true)
end
end
end
end)
menuAction(pvphelp, "Modify Missile Speed", {}, "Thank you so much Nowiry for this.", function ()
local localped = GetLocalPed()
if PED.IS_PED_IN_ANY_VEHICLE(localped) then
local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false)
if VEHICLE.GET_VEHICLE_CLASS(veh) == 15 or VEHICLE.GET_VEHICLE_CLASS(veh) == 16 then --vehicle class of heli
SetVehicleMissileSpeed(VEH_MISSILE_SPEED)
end
end
end)
menu.slider(pvphelp, "Set Missile Speed", {"vehmissilespeed"}, "Sets the speed of your missiles.", 1, 2147483647, 10000, 100, function (value)
VEH_MISSILE_SPEED = value
end)
----------------------------------------------------------------------------------------------------
menu.divider(pvphelp, "RPG Aimbot")
MISL_AIM = false
local missile_settings = {
radius = 300,
speed = 100,
los = true,
cam = false,
ptfx = true,
ptfx_scale = 1,
air_target = false,
multitarget = false,
multiped = false
}
local missile_particles = {
name = "exp_grd_rpg_lod",
dictionary = "core"
}
--Later: block rockets (spawn walls when detecting they are in range)
ATTACH_CAM_TO_ENTITY_WITH_FIXED_DIRECTION = function (--[[Cam (int)]] cam, --[[Entity (int)]] entity, --[[float]] xRot, --[[float]] yRot, --[[float]] zRot, --[[float]] xOffset, --[[float]] yOffset, --[[float]] zOffset, --[[BOOL (bool)]] isRelative)
native_invoker.begin_call()
native_invoker.push_arg_int(cam)
native_invoker.push_arg_int(entity)
native_invoker.push_arg_float(xRot); native_invoker.push_arg_float(yRot); native_invoker.push_arg_float(zRot)
native_invoker.push_arg_float(xOffset); native_invoker.push_arg_float(yOffset); native_invoker.push_arg_float(zOffset)
native_invoker.push_arg_bool(isRelative)
native_invoker.end_call("202A5ED9CE01D6E7")
end
--https://github.com/Sainan/gta-v-joaat-hash-db/blob/senpai/out/objects-hex.csv
Rocket_Hashes = {
{"rpg", util.joaat("w_lr_rpg_rocket")},
{"homingrpg", util.joaat("w_lr_homing_rocket")},
{"oppressor2", util.joaat("w_ex_vehiclemissile_3")},
{"b11barrage", util.joaat("w_smug_airmissile_01b")},
{"b11regular", util.joaat("w_battle_airmissile_01")},
{"chernobog", util.joaat("w_ex_vehiclemissile_4")},
{"akula", util.joaat("w_smug_airmissile_02")},
{"grenadelauncher", util.joaat("w_lr_40mm")}, --grenade launcher lmfao
{"compactemplauncher", util.joaat("w_lr_ml_40mm")}, --compact emp launhcer lmao
{"teargas", util.joaat("w_ex_grenadesmoke")} --tear gas grenade lmfao
}
Chosen_Rocket_Hash = Rocket_Hashes[1][2] --default is the regular RPG
MISSILE_ENTITY_TABLE = {}
menu.toggle(pvphelp, "RPG Aimbot / Most Vehicles", {"rpgaim"}, "More accurately, rocket aimbot. Will work with the rockets provided in the Rocket Settings list. RPG by default.", function (on)
if on then
MISL_AIM = true
while MISL_AIM do
local localped = GetLocalPed()
local localcoords = getEntityCoords(GetLocalPed())
local forOffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(localped, 0, 5, 0)
RRocket = OBJECT.GET_CLOSEST_OBJECT_OF_TYPE(forOffset.x, forOffset.y, forOffset.z, 10, Chosen_Rocket_Hash, false, true, true, true)
local p
if missile_settings.multitarget then
if missile_settings.air_target then
p = GetClosestPlayerWithRange_Whitelist_DisallowEntities(missile_settings.radius, MISSILE_ENTITY_TABLE, true)
else
p = GetClosestPlayerWithRange_Whitelist_DisallowEntities(missile_settings.radius, MISSILE_ENTITY_TABLE, false)
end
elseif missile_settings.multiped then
if missile_settings.air_target then
p = GetClosestNonPlayerPedWithRange_DisallowedEntities(missile_settings.radius, MISSILE_ENTITY_TABLE, true)
else
p = GetClosestNonPlayerPedWithRange_DisallowedEntities(missile_settings.radius, MISSILE_ENTITY_TABLE, false)
end
elseif not missile_settings.multitarget then
if missile_settings.air_target then
p = GetClosestPlayerWithRange_Whitelist(missile_settings.radius, true)
else
p = GetClosestPlayerWithRange_Whitelist(missile_settings.radius, false)
end
end
local ppcoords = getEntityCoords(p)
----
if (RRocket ~= 0) and (p ~= nil) and (not PED.IS_PED_DEAD_OR_DYING(p)) and (not AIM_WHITELIST[NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p)]) and (PED.IS_PED_SHOOTING(localped)) and (not players.is_in_interior(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p))) and (ppcoords.z > 1) then
util.create_thread(function ()
local plocalized = p
local msl = RRocket
if missile_settings.multitarget then
MISSILE_ENTITY_TABLE[#MISSILE_ENTITY_TABLE+1] = plocalized
end
if (ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(localped, plocalized, 17) and missile_settings.los) or not missile_settings.los or MISL_AIR then
if SE_Notifications then
util.toast("Precusors done!")
end
NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(msl)
if not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(msl) then
for i = 1, 10 do
NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(msl)
end
else
if SE_Notifications then
util.toast("has control")
end
end
local aircount = 1
----
Missile_Camera = 0
--preload the fake rocket and the particle fx
-- > -- Load the particleFX for the fakerocket so it networks to other players
STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary)
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(missile_particles.dictionary) do
STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary)
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET(missile_particles.dictionary)
-- > -- we now have loaded our PTFX for our fake rocket.
--GRAPHICS.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY("exp_grd_rpg_lod", msl, 0, 0, 0, 0, 0, 0, 2, false, false, false)
--while the rocket exists, we do this vvvv
while ENTITY.DOES_ENTITY_EXIST(msl) do
if SE_Notifications then
util.toast("rocket exists")
end
-- NEW CODE W/O DEPRECATION:
--local pcoords2 = v3.new(PED.GET_PED_BONE_COORDS(plocalized, 20781, 0, 0, 0))
local pcoords2 = getEntityCoords(plocalized)
local pcoords = GetTableFromV3Instance(pcoords2)
local lc2 = getEntityCoords(msl)
local lc = GetTableFromV3Instance(lc2)
local look2 = v3.lookAt(lc2, pcoords2)
local look = GetTableFromV3Instance(look2)
local dir2 = v3.toDir(look2)
local dir = GetTableFromV3Instance(dir2)
--didn't wanna make new fuckin variables/replace old ones, so we're multiplying the code by 2 because fuck you.
-- // -- // --
-- // -- // --
if missile_settings.ptfx then
STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary)
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(missile_particles.dictionary) do
STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary)
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET(missile_particles.dictionary)
-- > -- we now have loaded our PTFX for our fake rocket.
--(const char* effectName, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, float scale, BOOL xAxis, BOOL yAxis, BOOL zAxis, BOOL p11)
GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(missile_particles.name, lc.x, lc.y, lc.z, 0, 0, 0, 0.4 * missile_settings.ptfx_scale, false, false, false, true)
end
-- // -- // --
-- // -- // --
--airstrike air
if aircount < 2 and MISL_AIR then
if ENTITY.DOES_ENTITY_EXIST(msl) then
--thanks ren!
ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(msl, 1, 0, 0, 2700, true, false, true, true)
aircount = aircount + 1
wait(1100)
end
end
local lookCountD = 0
if MISL_AIR then
if missile_settings.cam then
if not CAM.DOES_CAM_EXIST(Missile_Camera) then
if SE_Notifications then
util.toast("camera setup")
end
CAM.DESTROY_ALL_CAMS(true)
Missile_Camera = CAM.CREATE_CAM("DEFAULT_SCRIPTED_CAMERA", true)
--ATTACH_CAM_TO_ENTITY_WITH_FIXED_DIRECTION(Missile_Camera, msl, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1)
CAM.SET_CAM_ACTIVE(Missile_Camera, true)
CAM.RENDER_SCRIPT_CAMS(true, false, 0, true, true, 0)
end
end
local distx = math.abs(lc.x - pcoords.x)
local disty = math.abs(lc.y - pcoords.y)
local distz = math.abs(lc.z - pcoords.z)
if missile_settings.cam then
local ddisst = SYSTEM.VDIST(pcoords.x, pcoords.y, pcoords.z, lc.x, lc.y, lc.z)
if ddisst > 50 then
local camcoordv3 = CAM.GET_CAM_COORD(Missile_Camera)
local look3 = v3.lookAt(camcoordv3, lc2)
local look4 = GetTableFromV3Instance(look3)
--local look2 = util.v3_look_at(CAM.GET_CAM_COORD(Missile_Camera), lc)
--local backoffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, 0, -30, 10)
local backoffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(msl, 10, 10, -2)
CAM.SET_CAM_COORD(Missile_Camera, backoffset.x, backoffset.y, backoffset.z)
if lookCountD < 1 then
CAM.SET_CAM_ROT(Missile_Camera, look4.x, look4.y, look4.z, 2)
lookCountD = lookCountD + 1
end
else
local camcoordv3 = CAM.GET_CAM_COORD(Missile_Camera)
local look3 = v3.lookAt(camcoordv3, lc2)
local look4 = GetTableFromV3Instance(look3)
CAM.SET_CAM_ROT(Missile_Camera, look4.x, look4.y, look4.z, 2)
end
end
--CAM.SET_CAM_PARAMS(Missile_Camera, lc.x, lc.y, lc.z + 1, look.x, look.y, look.z, 100, 0, 0, 0, 0) --(Cam cam, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fieldOfView, Any p8, int p9, int p10, int p11)
ENTITY.SET_ENTITY_ROTATION(msl, look.x, look.y, look.z, 2, true)
ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(msl, 1, dir.x * missile_settings.speed * distx, dir.y * missile_settings.speed * disty, dir.z * missile_settings.speed * distz, true, false, true, true)
wait()
else
-- vanilla "aimbot"
ENTITY.SET_ENTITY_ROTATION(msl, look.x, look.y, look.z, 2, true)
ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(msl, 1, dir.x * missile_settings.speed, dir.y * missile_settings.speed, dir.z * missile_settings.speed, true, false, true, true)
wait()
end
--free all our v3 instances
end
--rocket has stopped existing
if missile_settings.cam then
wait(2000)
if SE_Notifications then
util.toast("cam remove")
end
CAM.RENDER_SCRIPT_CAMS(false, false, 0, true, true, 0)
if CAM.IS_CAM_ACTIVE(Missile_Camera) then
CAM.SET_CAM_ACTIVE(Missile_Camera, false)
end
CAM.DESTROY_CAM(Missile_Camera, true)
end
end
--improve this logic lmfao
if missile_settings.multitarget then
table.remove(MISSILE_ENTITY_TABLE, GetValueIndexFromTable(MISSILE_ENTITY_TABLE, plocalized))
util.toast("Removed value " .. tostring(plocalized) .. " at index " .. tostring(GetValueIndexFromTable(MISSILE_ENTITY_TABLE, p)))
end
end)
end
wait()
end
else
MISL_AIM = false
end
end)
MISL_AIR = false
local rpgrockets = menu.list(pvphelp, "Rocket Settings", {}, "")
local function generateRockets()
for i = 1, #Rocket_Hashes do
menu.action(rpgrockets, "Rocket " .. Rocket_Hashes[i][1], {"rocket " .. Rocket_Hashes[i][1]}, "", function ()
Chosen_Rocket_Hash = Rocket_Hashes[i][2]
util.toast("Set chosen rocket to " .. Rocket_Hashes[i][1] .. " || " .. Rocket_Hashes[i][2])
end)
end
end
generateRockets()
local rpgsettings = menu.list(pvphelp, "RPG Aimbot Settings", {"rpgsettings"}, "")
menu.toggle(rpgsettings, "Enable Javelin Mode", {"rpgjavelin"}, "Makes the rocket go very up high and kill the closest player to you :) | Advised: Combine 'RPG LOS Remove' for you to fire at targets that you do not see.", function (on)
if on then
MISL_AIR = true
else
MISL_AIR = false
end
end)
menu.slider(rpgsettings, "RPG Aimbot Radius", {"msl_frc_rad"}, "Range for missile aimbot, e.g. how far the person can be away.", 1, 10000, 300, 10, function (value)
missile_settings.radius = value
end)
menu.slider(rpgsettings, "RPG Speed Multiplier", {"msl_spd_mult"}, "Multiplier for speed. Default is 100, it's good.", 1, 10000, 100, 10, function (value)
missile_settings.speed = value
end)
menuToggle(rpgsettings, "RPG LOS Remove", {}, "Removes line-of-sight checks. Do not turn this on unless you know what you're doing.", function (on)
missile_settings.los = not on
end)
menuToggle(rpgsettings, "RPG Dashcam™", {"rpgcamera"}, "Now with a dashcam, you can finally find out where the fuck your rocket goes if you're using javelin mode.", function (on)
missile_settings.cam = on
end)
menuToggle(rpgsettings, "Enable PTFX", {}, "Enables particle effects for missiles, to make them look more legit. Enabled by default.", function (toggle)
missile_settings.ptfx = toggle
end, true)
menu.toggle(rpgsettings, "Only Target Airborne Targets", {}, "Makes the aimbot only target those who are in the air.", function (toggle)
missile_settings.air_target = toggle
end)
menuToggle(rpgsettings, "Multi-Target", {}, "Will make missiles target different entities. If a missile is already heading to one entity, other missiles will head to others. Useful for multiple people.", function (toggle)
missile_settings.multitarget = toggle
end)
menuToggle(rpgsettings, "Target Peds (MULTI-TARGET)", {}, "Will target peds instead of players. Multi target is enabled on this one, because no use if it isn't.", function (toggle)
missile_settings.multiped = toggle
end)
menu.divider(rpgsettings, "------- PTFX (ADVANCED) -------")
menu.slider(rpgsettings, "PTFX Scale", {"rpgparscale"}, "Scale for the particle effects.", 1, 10, 1, 1, function (scale)
missile_settings.ptfx_scale = scale
end)
menu.text_input(rpgsettings, "PTFX Name", {"rpgptfx"}, "Particle effects name. ADVANCED USERS ONLY.", function (text)
missile_particles.name = text
end, "exp_grd_rpg_lod")
menu.text_input(rpgsettings, "PTFX Dictionary", {"rpgdictionary"}, "Particle effect dictionary to use PTFX. ADVANCED ONLY!!", function (text)
missile_particles.dictionary = text
end, "core")
----------------------------------------------------------------------------------------------------
menu.divider(pvphelp, "Orbital Waypoint")
--preload
ORB_Sneaky = false
menuAction(pvphelp, "Orbital Strike Waypoint", {"orbway", "orbwp"}, "Orbital Cannons your selected Waypoint.", function ()
local wpos = Get_Waypoint_Pos2()
if SE_Notifications then
util.toast("Selected Waypoint Coordinates: " .. wpos.x .. " " .. wpos.y .. " " .. wpos.z)
end
if ORB_Sneaky then
for a = 1, 30 do
SE_add_explosion(wpos.x, wpos.y, wpos.z + 30 - a, 29, 10, true, false, 1, false)
SE_add_explosion(wpos.x, wpos.y, wpos.z + 30 - a, 59, 10, true, false, 1, false)
wait(30)
end
else
for i = 1, 30 do
SE_add_owned_explosion(GetLocalPed(), wpos.x, wpos.y, wpos.z + 30 - i, 29, 10, true, false, 1)
SE_add_owned_explosion(GetLocalPed(), wpos.x, wpos.y, wpos.z + 30 - i, 59, 10, true, false, 1)
wait(30)
end
end
end)
menuToggle(pvphelp, "Sneaky Explosion", {}, "Makes the orbital not blamed on you.", function (on)
ORB_Sneaky = on
end)
----------------------------------------------------------------------------------------------------
menu.divider(pvphelp, "Auto Car-Suicide")
--preload
CAR_S_sneaky = false
CAR_S_BLACKLIST = {}
menuToggleLoop(pvphelp, "Auto Car-Suicide", {"carexplode"}, "Automatically explodes your car when you are next to a player.", function()
local ourped = GetLocalPed()
if PED.IS_PED_IN_ANY_VEHICLE(ourped, false) then
local pedTable = entities.get_all_peds_as_pointers()
local ourCoords = getEntityCoords(ourped)
for i = 1, #pedTable do
local handle = entities.pointer_to_handle(pedTable[i])
if PED.IS_PED_A_PLAYER(handle) then
local playerID = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(handle)
local v3 = entities.get_position(pedTable[i])
local dist = DistanceBetweenTwoCoords(ourCoords, v3)
if dist < 5 and handle ~= GetLocalPed() and not CAR_S_BLACKLIST[playerID] then
if CAR_S_sneaky then
SE_add_explosion(ourCoords.x, ourCoords.y, ourCoords.z, 2, 10, true, false, 0.1, false)
SE_add_explosion(ourCoords.x - 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1, false)
SE_add_explosion(ourCoords.x + 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1, false)
SE_add_explosion(ourCoords.x, ourCoords.y - 4, ourCoords.z, 2, 20, false, true, 0.1, false)
SE_add_explosion(ourCoords.x, ourCoords.y + 4, ourCoords.z, 2, 20, false, true, 0.1, false)
else
SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y, ourCoords.z, 2, 10, true, false, 0.1)
SE_add_owned_explosion(ourped, ourCoords.x - 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1)
SE_add_owned_explosion(ourped, ourCoords.x + 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1)
SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y - 4, ourCoords.z, 2, 20, false, true, 0.1)
SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y + 4, ourCoords.z, 2, 20, false, true, 0.1)
end
end
end
end
end
end)
menuToggle(pvphelp, "Car Suicide Sneaky", {"carexplodesneaky"}, "Makes the explosion of the car bomb not blamed on you.", function(on)
CAR_S_sneaky = on
end)
----------------------------------------------------------------------------------------------------
menu.divider(pvphelp, "Legit Rapid Fire")
LegitRapidFire = false
LegitRapidMS = 100
menuToggle(pvphelp, "Legit Rapid Fire (fast-switch)", {"legitrapidfire"}, "Quickly switches to grenades and back to your weapon after you shot something. Useful with Sniper, RPG, Grenade Launcher.", function(on)
local localped = GetLocalPed()
if on then
LegitRapidFire = true
util.create_thread(function ()
while LegitRapidFire do
if PED.IS_PED_SHOOTING(localped) then
local currentWpMem = memory.alloc()
local junk = WEAPON.GET_CURRENT_PED_WEAPON(localped, currentWpMem, 1)
local currentWP = memory.read_int(currentWpMem)
--memory.free(currentWpMem)
WEAPON.SET_CURRENT_PED_WEAPON(localped, 2481070269, true) --2481070269 is grenade
wait(LegitRapidMS)
WEAPON.SET_CURRENT_PED_WEAPON(localped, currentWP, true)
end
wait()
end
util.stop_thread()
end)
else
LegitRapidFire = false
end
end)
menu.slider(pvphelp, "Legit Rapid Fire Delay (ms)", {"legitrapiddelay"}, "The delay that it takes to switch to grenade and back to the weapon.", 1, 1000, 100, 50, function (value)
LegitRapidMS = value
end)
----------------------------------------------------------------------------------------------------
menu.divider(pvphelp, "Missile Shield")
Actual_Missiles = {
util.joaat("w_lr_rpg_rocket"),
util.joaat("w_lr_homing_rocket"),
--util.joaat("w_ex_vehiclemissile_3"),
--util.joaat("w_smug_airmissile_01b"),
--util.joaat("w_battle_airmissile_01"),
--util.joaat("w_ex_vehiclemissile_4"),
--util.joaat("w_smug_airmissile_02"),
}
menu.toggle_loop(pvphelp, "Missile Shield", {"missileshield"}, "Attempts to spawn walls, stopping missiles from reaching your location. Cannot be used if missile launcher is in hand.", function()
--local weapon = WEAPON.GET_SELECTED_PED_WEAPON(GetLocalPed())
--if (weapon ~= -1312131151) and (weapon ~= 1672152130) then
local missile = 0
local forOffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(GetLocalPed(), 0, 5, 0)
for i = 1, #Actual_Missiles do
missile = OBJECT.GET_CLOSEST_OBJECT_OF_TYPE(forOffset.x, forOffset.y, forOffset.z, 10, Actual_Missiles[i], false, true, true, true)
if (missile ~= 0) then --missile exists
local pcoords = getEntityCoords(GetLocalPed())
local mcoords = getEntityCoords(missile)
--distance check, if the missile is too close, we're already fcked, so why bother?