-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBB.lua
More file actions
1897 lines (1623 loc) · 86.5 KB
/
BB.lua
File metadata and controls
1897 lines (1623 loc) · 86.5 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
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CollectionService = game:GetService("CollectionService")
local UserInputService = game:GetService("UserInputService")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local RunService = game:GetService("RunService")
local PlayerService = game:GetService("Players")
local Workspace = game:GetService("Workspace")
task.spawn(function()
for Index, Connection in pairs(getconnections(game:GetService("ScriptContext").Error)) do
--print("found ScriptContext error detection, removing")
Connection:Disable()
end
while task.wait(1) do
for Index, Connection in pairs(getconnections(game:GetService("ScriptContext").Error)) do
--print("found ScriptContext error detection, removing")
Connection:Disable()
end
end
end)
local Camera = Workspace.CurrentCamera
local LocalPlayer = PlayerService.LocalPlayer
local Aimbot, SilentAim, Trigger = false, nil, nil
local Mannequin = ReplicatedStorage.Assets.Mannequin
local LootBins = Workspace.Map.Shared.LootBins
local Randoms = Workspace.Map.Shared.Randoms
local Vehicles = Workspace.Vehicles.Spawned
local Characters = Workspace.Characters
local Corpses = Workspace.Corpses
local Zombies = Workspace.Zombies
local Loot = Workspace.Loot
local Framework = require(ReplicatedFirst:WaitForChild("Framework"))
Framework:WaitForLoaded()
repeat task.wait() until Framework.Classes.Players.get()
local PlayerClass = Framework.Classes.Players.get()
local Globals = Framework.Configs.Globals
local World = Framework.Libraries.World
local Network = Framework.Libraries.Network
local Cameras = Framework.Libraries.Cameras
local Bullets = Framework.Libraries.Bullets
local Lighting = Framework.Libraries.Lighting
local Interface = Framework.Libraries.Interface
local Resources = Framework.Libraries.Resources
local Raycasting = Framework.Libraries.Raycasting
local Maids = Framework.Classes.Maids
local Animators = Framework.Classes.Animators
local VehicleController = Framework.Classes.VehicleControler
-- dumb krampus error below :scream:
local Firearm = nil
task.spawn(function() setthreadidentity(2) Firearm = require(ReplicatedStorage.Client.Abstracts.ItemInitializers.Firearm) end)
if not Firearm then LocalPlayer:Kick("Send this error to owner: Firearm module does not exist") return end
local CharacterCamera = Cameras:GetCamera("Character")
--local ReticleInterface = Interface:Get("Reticle")
local Events = getupvalue(Network.Add, 1)
--local EventsQueue = getupvalue(Network.Add, 2)
local GetSpreadAngle = getupvalue(Bullets.Fire, 1)
local GetSpreadVector = getupvalue(Bullets.Fire, 3)
local CastLocalBullet = getupvalue(Bullets.Fire, 4)
local GetFireImpulse = getupvalue(Bullets.Fire, 6)
local LightingState = getupvalue(Lighting.GetState, 1)
--local RenderSettings = getupvalue(World.GetDistance, 1)
local AnimatedReload = getupvalue(Firearm, 7)
local SetWheelSpeeds = getupvalue(VehicleController.Step, 2)
local SetSteerWheels = getupvalue(VehicleController.Step, 3)
--local ApplyDragForce = getupvalue(VehicleController.Step, 4)
local Effects = getupvalue(CastLocalBullet, 2)
local Sounds = getupvalue(CastLocalBullet, 3)
local ImpactEffects = getupvalue(CastLocalBullet, 6)
--local TryRicochet = getupvalue(CastLocalBullet, 10)
if type(Events) == "function" then
Events = getupvalue(Network.Add, 2)
end
local NetworkSyncHeartbeat
local InteractHeartbeat, FindItemData
for Index, Table in pairs(getgc(true)) do
if type(Table) == "table" and rawget(Table, "Rate") == 0.05 then
InteractHeartbeat = Table.Action
FindItemData = getupvalue(InteractHeartbeat, 11)
end
end
local ProjectileSpeed = 1000
local ProjectileOrigin = Vector3.new(0, 0, 0)
local ProjectileDirection = Vector3.new(0, 0, 0)
local ProjectileSpread = Vector3.new(0, 0, 0)
local ShotMaxDistance = Globals.ShotMaxDistance
local ProjectileGravity = Globals.ProjectileGravity
local SquadData = nil
local ItemMemory = {}
local GroundPart = Instance.new("Part")
local OldBaseTime = LightingState.BaseTime
local NoClipObjects, NoClipEvent = {}, nil
local SetIdentity = setthreadidentity
local AddObject = Instance.new("BindableEvent")
AddObject.Event:Connect(function(...)
Parvus.Utilities.Drawing:AddObject(...)
end)
local RemoveObject = Instance.new("BindableEvent")
RemoveObject.Event:Connect(function(...)
Parvus.Utilities.Drawing:RemoveObject(...)
end)
--RenderSettings.Loot = 1
--RenderSettings.Elements = 1
--RenderSettings.Detail = -1
--RenderSettings.Terrain = 36
-- game data mess
local RandomEvents, ItemCategory, ZombieInherits, SanityBans, AdminRoles = {
{"ATVCrashsiteRenegade01", false},
{"BankTruckRobbery01", false},
{"BeachedAluminumBoat01", false},
{"BeechcraftGemBroker01", false},
{"C-123ProviderMilitary01", true},
{"C-123ProviderMilitary02", true},
{"CampSovietBandit01", true},
{"ConstructionWorksite01", false},
{"CrashEasterBus01", true},
{"CrashPrisonBus01", false},
{"EasterNestEvent01", true},
{"FuddCampsite01", false},
{"FuneralProcession01", false},
{"GraveFresh01", false},
{"GraveNumberOne1", false},
{"LifePreserverMilitary01", true},
{"LifePreserverSoviet01", true},
{"LifePreserverSpecOps01", true},
{"LongswordStone01", true},
{"MilitaryBlockade01", true},
{"MilitaryConvoy01", true},
{"ParamedicScene01", false},
{"PartyTrailerDisco01", true},
{"PartyTrailerTechnoGold", true},
{"PartyTrailerTechnoGoldDeagleMod1", true},
{"PirateTreasure01", true},
{"PoliceBlockade01", false},
{"PoolsClosed01", false},
{"PopupCampsite01", false},
{"PopupFishing01", false},
{"PopupFishing02", false},
{"RandomCrashCessna01", false},
{"SeahawkCrashsite04", true},
{"SeahawkCrashsite05", true},
{"SeahawkCrashsite06", true},
{"SeahawkCrashsite07", true},
{"SeahawkCrashsiteRogue01", true},
{"SedanHaul01", false},
{"SpecialForcesCrash01", true},
{"StashFood01", false},
{"StashFood02", false},
{"StashFood03", false},
{"StashGeneral01", false},
{"StashGeneral02", false},
{"StashGeneral03", false},
{"StashMedical01", false},
{"StashMedical02", false},
{"StashMedical03", false},
{"StashWeaponHigh01", false},
{"StashWeaponHigh02", false},
{"StashWeaponHigh03", false},
{"StashWeaponMid01", false},
{"StashWeaponMid02", false},
{"StashWeaponMid03", false},
{"StrandedStation01", false},
{"StrandedStationKeyboard01", false},
{"ValentinesBachelor01", false}
},
{
{"Containers", false}, {"Accessories", true}, {"Ammo", false}, {"Attachments", false},
{"Backpacks", false}, {"Belts", true}, {"Clothing", true}, {"Consumables", true},
{"Firearms", false}, {"Hats", true}, {"Medical", false}, {"Melees", false},
{"Miscellaneous", false}, {"Utility", false}, {"VehicleParts", false}, {"Vests", true}
},
{
{"Presets.Behavior Boss Level 01", true}, {"Presets.Behavior Boss Level 02", true}, {"Presets.Behavior Boss Level 03", true},
{"Presets.Behavior Common Level 01", false}, {"Presets.Behavior Common Level 02", false}, {"Presets.Behavior Common Level 03", false},
{"Presets.Behavior Common Thrall Level 01", false}, {"Presets.Behavior MiniBoss Level 01", false}, {"Presets.Behavior MiniBoss Level 02", false},
{"Presets.Skin Tone Dark", false}, {"Presets.Skin Tone Dark Servant", false}, {"Presets.Skin Tone Light", false}, {"Presets.Skin Tone LightMid", false},
{"Presets.Skin Tone LightMidDark", false}, {"Presets.Skin Tone Mid", false}, {"Presets.Skin Tone MidDark", false}, {"Presets.Skin Tone Servant", false}
},
{
"Chat Message Send", "Ping Return", "Bullet Impact Interaction", "Crouch Audio Mute", "Zombie Pushback Force Request", "Camera CFrame Report",
"Movestate Sync Request", "Update Character Position", "Map Icon History Sync", "Playerlist Staff Icon Get", "Request Physics State Sync",
"Inventory Sync Request", "Wardrobe Resync Request", "Door Interact ", "Sorry Mate, Wrong Path :/"
},
{
[110] = "Contractor",
[120] = "Moderator",
[125] = "Senior Moderator",
[130] = "Administrator",
[160] = "Chief Administrator",
[200] = "Developer",
[255] = "Host"
}
local KnownBodyParts = {
{"Head", true}, {"HumanoidRootPart", true},
{"UpperTorso", false}, {"LowerTorso", false},
{"RightUpperArm", false}, {"RightLowerArm", false}, {"RightHand", false},
{"LeftUpperArm", false}, {"LeftLowerArm", false}, {"LeftHand", false},
{"RightUpperLeg", false}, {"RightLowerLeg", false}, {"RightFoot", false},
{"LeftUpperLeg", false}, {"LeftLowerLeg", false}, {"LeftFoot", false}
}
local Window = Parvus.Utilities.UI:Window({
Name = ("Parvus Hub %s %s"):format(utf8.char(8212), Parvus.Game.Name),
Position = UDim2.new(0.5, -248 * 3, 0.5, -248)
}) do
local CombatTab = Window:Tab({Name = "Combat"}) do
local AimbotSection = CombatTab:Section({Name = "Aimbot", Side = "Left"}) do
AimbotSection:Toggle({Name = "Enabled", Flag = "Aimbot/Enabled", Value = false})
:Keybind({Flag = "Aimbot/Keybind", Value = "MouseButton2", Mouse = true, DisableToggle = true,
Callback = function(Key, KeyDown) Aimbot = Window.Flags["Aimbot/Enabled"] and KeyDown end})
AimbotSection:Toggle({Name = "Always Enabled", Flag = "Aimbot/AlwaysEnabled", Value = false})
AimbotSection:Toggle({Name = "Prediction", Flag = "Aimbot/Prediction", Value = true})
AimbotSection:Toggle({Name = "Team Check", Flag = "Aimbot/TeamCheck", Value = false})
AimbotSection:Toggle({Name = "Distance Check", Flag = "Aimbot/DistanceCheck", Value = false})
AimbotSection:Toggle({Name = "Visibility Check", Flag = "Aimbot/VisibilityCheck", Value = false})
AimbotSection:Slider({Name = "Sensitivity", Flag = "Aimbot/Sensitivity", Min = 0, Max = 100, Value = 20, Unit = "%"})
AimbotSection:Slider({Name = "Field Of View", Flag = "Aimbot/FOV/Radius", Min = 0, Max = 500, Value = 100, Unit = "r"})
AimbotSection:Slider({Name = "Distance Limit", Flag = "Aimbot/DistanceLimit", Min = 25, Max = 10000, Value = 250, Unit = "studs"})
local PriorityList, BodyPartsList = {{Name = "Closest", Mode = "Button", Value = true}}, {}
for Index, Value in pairs(KnownBodyParts) do
PriorityList[#PriorityList + 1] = {Name = Value[1], Mode = "Button", Value = false}
BodyPartsList[#BodyPartsList + 1] = {Name = Value[1], Mode = "Toggle", Value = Value[2]}
end
AimbotSection:Dropdown({Name = "Priority", Flag = "Aimbot/Priority", List = PriorityList})
AimbotSection:Dropdown({Name = "Body Parts", Flag = "Aimbot/BodyParts", List = BodyPartsList})
end
local AFOVSection = CombatTab:Section({Name = "Aimbot FOV Circle", Side = "Left"}) do
AFOVSection:Toggle({Name = "Enabled", Flag = "Aimbot/FOV/Enabled", Value = true})
AFOVSection:Toggle({Name = "Filled", Flag = "Aimbot/FOV/Filled", Value = false})
AFOVSection:Colorpicker({Name = "Color", Flag = "Aimbot/FOV/Color", Value = {1, 0.66666662693024, 1, 0.25, false}})
AFOVSection:Slider({Name = "NumSides", Flag = "Aimbot/FOV/NumSides", Min = 3, Max = 100, Value = 14})
AFOVSection:Slider({Name = "Thickness", Flag = "Aimbot/FOV/Thickness", Min = 1, Max = 10, Value = 2})
end
local SilentAimSection = CombatTab:Section({Name = "Silent Aim", Side = "Right"}) do
SilentAimSection:Toggle({Name = "Enabled", Flag = "SilentAim/Enabled", Value = false}):Keybind({Mouse = true, Flag = "SilentAim/Keybind"})
--SilentAimSection:Toggle({Name = "Prediction", Flag = "SilentAim/Prediction", Value = true})
SilentAimSection:Toggle({Name = "Team Check", Flag = "SilentAim/TeamCheck", Value = false})
SilentAimSection:Toggle({Name = "Distance Check", Flag = "SilentAim/DistanceCheck", Value = false})
SilentAimSection:Toggle({Name = "Visibility Check", Flag = "SilentAim/VisibilityCheck", Value = false})
SilentAimSection:Slider({Name = "Hit Chance", Flag = "SilentAim/HitChance", Min = 0, Max = 100, Value = 100, Unit = "%"})
SilentAimSection:Slider({Name = "Field Of View", Flag = "SilentAim/FOV/Radius", Min = 0, Max = 500, Value = 100, Unit = "r"})
SilentAimSection:Slider({Name = "Distance Limit", Flag = "SilentAim/DistanceLimit", Min = 25, Max = 10000, Value = 250, Unit = "studs"})
local PriorityList, BodyPartsList = {{Name = "Closest", Mode = "Button", Value = true}, {Name = "Random", Mode = "Button"}}, {}
for Index, Value in pairs(KnownBodyParts) do
PriorityList[#PriorityList + 1] = {Name = Value[1], Mode = "Button", Value = false}
BodyPartsList[#BodyPartsList + 1] = {Name = Value[1], Mode = "Toggle", Value = Value[2]}
end
SilentAimSection:Dropdown({Name = "Priority", Flag = "SilentAim/Priority", List = PriorityList})
SilentAimSection:Dropdown({Name = "Body Parts", Flag = "SilentAim/BodyParts", List = BodyPartsList})
end
local SAFOVSection = CombatTab:Section({Name = "Silent Aim FOV Circle", Side = "Right"}) do
SAFOVSection:Toggle({Name = "Enabled", Flag = "SilentAim/FOV/Enabled", Value = true})
SAFOVSection:Toggle({Name = "Filled", Flag = "SilentAim/FOV/Filled", Value = false})
SAFOVSection:Colorpicker({Name = "Color", Flag = "SilentAim/FOV/Color",
Value = {0.6666666865348816, 0.6666666269302368, 1, 0.25, false}})
SAFOVSection:Slider({Name = "NumSides", Flag = "SilentAim/FOV/NumSides", Min = 3, Max = 100, Value = 14})
SAFOVSection:Slider({Name = "Thickness", Flag = "SilentAim/FOV/Thickness", Min = 1, Max = 10, Value = 2})
end
local TriggerSection = CombatTab:Section({Name = "Trigger", Side = "Right"}) do
TriggerSection:Toggle({Name = "Enabled", Flag = "Trigger/Enabled", Value = false})
:Keybind({Flag = "Trigger/Keybind", Value = "MouseButton2", Mouse = true, DisableToggle = true,
Callback = function(Key, KeyDown) Trigger = Window.Flags["Trigger/Enabled"] and KeyDown end})
TriggerSection:Toggle({Name = "Always Enabled", Flag = "Trigger/AlwaysEnabled", Value = false})
TriggerSection:Toggle({Name = "Hold Mouse Button", Flag = "Trigger/HoldMouseButton", Value = false})
TriggerSection:Toggle({Name = "Prediction", Flag = "Trigger/Prediction", Value = true})
--TriggerSection:Toggle({Name = "Team Check", Flag = "Trigger/TeamCheck", Value = false})
TriggerSection:Toggle({Name = "Distance Check", Flag = "Trigger/DistanceCheck", Value = false})
TriggerSection:Toggle({Name = "Visibility Check", Flag = "Trigger/VisibilityCheck", Value = false})
TriggerSection:Slider({Name = "Click Delay", Flag = "Trigger/Delay", Min = 0, Max = 1, Precise = 2, Value = 0.15, Unit = "sec"})
TriggerSection:Slider({Name = "Distance Limit", Flag = "Trigger/DistanceLimit", Min = 25, Max = 10000, Value = 250, Unit = "studs"})
TriggerSection:Slider({Name = "Field Of View", Flag = "Trigger/FOV/Radius", Min = 0, Max = 500, Value = 25, Unit = "r"})
local PriorityList, BodyPartsList = {{Name = "Closest", Mode = "Button", Value = true}, {Name = "Random", Mode = "Button"}}, {}
for Index, Value in pairs(KnownBodyParts) do
PriorityList[#PriorityList + 1] = {Name = Value[1], Mode = "Button", Value = false}
BodyPartsList[#BodyPartsList + 1] = {Name = Value[1], Mode = "Toggle", Value = Value[2]}
end
TriggerSection:Dropdown({Name = "Priority", Flag = "Trigger/Priority", List = PriorityList})
TriggerSection:Dropdown({Name = "Body Parts", Flag = "Trigger/BodyParts", List = BodyPartsList})
end
local TFOVSection = CombatTab:Section({Name = "Trigger FOV Circle", Side = "Left"}) do
TFOVSection:Toggle({Name = "Enabled", Flag = "Trigger/FOV/Enabled", Value = true})
TFOVSection:Toggle({Name = "Filled", Flag = "Trigger/FOV/Filled", Value = false})
TFOVSection:Colorpicker({Name = "Color", Flag = "Trigger/FOV/Color", Value = {0.0833333358168602, 0.6666666269302368, 1, 0.25, false}})
TFOVSection:Slider({Name = "NumSides", Flag = "Trigger/FOV/NumSides", Min = 3, Max = 100, Value = 14})
TFOVSection:Slider({Name = "Thickness", Flag = "Trigger/FOV/Thickness", Min = 1, Max = 10, Value = 2})
end
end
local VisualsSection = Parvus.Utilities:ESPSection(Window, "Visuals", "ESP/Player", true, true, true, true, true, false) do
VisualsSection:Colorpicker({Name = "Ally Color", Flag = "ESP/Player/Ally", Value = {0.3333333432674408, 0.6666666269302368, 1, 0, false}})
VisualsSection:Colorpicker({Name = "Enemy Color", Flag = "ESP/Player/Enemy", Value = {1, 0.6666666269302368, 1, 0, false}})
VisualsSection:Toggle({Name = "Team Check", Flag = "ESP/Player/TeamCheck", Value = false})
VisualsSection:Toggle({Name = "Use Team Color", Flag = "ESP/Player/TeamColor", Value = false})
VisualsSection:Toggle({Name = "Distance Check", Flag = "ESP/Player/DistanceCheck", Value = true})
VisualsSection:Slider({Name = "Distance", Flag = "ESP/Player/Distance", Min = 25, Max = 10000, Value = 1000, Unit = "studs"})
end
local ESPTab = Window:Tab({Name = "AR2 ESP"}) do
local ItemSection = ESPTab:Section({Name = "Item ESP", Side = "Left"}) do local Items = {}
ItemSection:Toggle({Name = "Enabled", Flag = "AR2/ESP/Items/Enabled", Value = false})
ItemSection:Toggle({Name = "Distance Check", Flag = "AR2/ESP/Items/DistanceCheck", Value = true})
ItemSection:Slider({Name = "Distance", Flag = "AR2/ESP/Items/Distance", Min = 25, Max = 5000, Value = 50, Unit = "studs"})
for Index, Data in pairs(ItemCategory) do
local ItemFlag = "AR2/ESP/Items/" .. Data[1]
Window.Flags[ItemFlag .. "/Enabled"] = Data[2]
Items[#Items + 1] = {
Name = Data[1], Mode = "Toggle", Value = Data[2],
Colorpicker = {Flag = ItemFlag .. "/Color", Value = {1, 0, 1, 0.5, false}},
Callback = function(Selected, Option) Window.Flags[ItemFlag .. "/Enabled"] = Option.Value end
}
end
ItemSection:Dropdown({Name = "ESP List", Flag = "AR2/Items", List = Items})
end
local CorpsesSection = ESPTab:Section({Name = "Corpses ESP", Side = "Left"}) do
CorpsesSection:Toggle({Name = "Enabled", Flag = "AR2/ESP/Corpses/Enabled", Value = false})
CorpsesSection:Toggle({Name = "Distance Check", Flag = "AR2/ESP/Corpses/DistanceCheck", Value = true})
CorpsesSection:Colorpicker({Name = "Color", Flag = "AR2/ESP/Corpses/Color", Value = {1, 0, 1, 0.5, false}})
CorpsesSection:Slider({Name = "Distance", Flag = "AR2/ESP/Corpses/Distance", Min = 25, Max = 5000, Value = 1500, Unit = "studs"})
end
local ZombiesSection = ESPTab:Section({Name = "Zombies ESP", Side = "Left"}) do local ZIs = {}
ZombiesSection:Toggle({Name = "Enabled", Flag = "AR2/ESP/Zombies/Enabled", Value = false})
ZombiesSection:Toggle({Name = "Distance Check", Flag = "AR2/ESP/Zombies/DistanceCheck", Value = true})
ZombiesSection:Slider({Name = "Distance", Flag = "AR2/ESP/Zombies/Distance", Min = 25, Max = 5000, Value = 1500, Unit = "studs"})
for Index, Data in pairs(ZombieInherits) do
local Name = Data[1]:gsub("Presets.", ""):gsub(" ", "")
local ZIFlag = "AR2/ESP/Zombies/" .. Name
Window.Flags[ZIFlag .. "/Enabled"] = Data[2]
ZIs[#ZIs + 1] = {
Name = Name, Mode = "Toggle", Value = Data[2],
Colorpicker = {Flag = ZIFlag .. "/Color", Value = {1, 0, 1, 0.5, false}},
Callback = function(Selected, Option) Window.Flags[ZIFlag .. "/Enabled"] = Option.Value end
}
end
ZombiesSection:Dropdown({Name = "ESP List", Flag = "AR2/Zombies", List = ZIs})
end
local RESection = ESPTab:Section({Name = "Random Events ESP", Side = "Right"}) do local REs = {}
RESection:Toggle({Name = "Enabled", Flag = "AR2/ESP/RandomEvents/Enabled", Value = false})
RESection:Toggle({Name = "Distance Check", Flag = "AR2/ESP/RandomEvents/DistanceCheck", Value = true})
RESection:Slider({Name = "Distance", Flag = "AR2/ESP/RandomEvents/Distance", Min = 25, Max = 5000, Value = 1500, Unit = "studs"})
for Index, Data in pairs(RandomEvents) do
local REFlag = "AR2/ESP/RandomEvents/" .. Data[1]
Window.Flags[REFlag .. "/Enabled"] = Data[2]
REs[#REs + 1] = {
Name = Data[1], Mode = "Toggle", Value = Data[2],
Colorpicker = {Flag = REFlag .. "/Color", Value = {1, 0, 1, 0.5, false}},
Callback = function(Selected, Option) Window.Flags[REFlag .. "/Enabled"] = Option.Value end
}
end
RESection:Dropdown({Name = "ESP List", Flag = "AR2/RandomEvents", List = REs})
end
local VehiclesSection = ESPTab:Section({Name = "Vehicles ESP", Side = "Right"}) do
VehiclesSection:Toggle({Name = "Enabled", Flag = "AR2/ESP/Vehicles/Enabled", Value = false})
VehiclesSection:Toggle({Name = "Distance Check", Flag = "AR2/ESP/Vehicles/DistanceCheck", Value = true})
VehiclesSection:Colorpicker({Name = "Color", Flag = "AR2/ESP/Vehicles/Color", Value = {1, 0, 1, 0.5, false}})
VehiclesSection:Slider({Name = "Distance", Flag = "AR2/ESP/Vehicles/Distance", Min = 25, Max = 5000, Value = 1500, Unit = "studs"})
end
end
local MiscTab = Window:Tab({Name = "Miscellaneous"}) do local LModes = {}
local LightingSection = MiscTab:Section({Name = "Lighting", Side = "Left"}) do
LightingSection:Toggle({Name = "Enabled", Flag = "AR2/Lighting/Enabled", Value = false,
Callback = function(Bool) if not Bool then LightingState.BaseTime = OldBaseTime end end})
--LightingSection:Toggle({Name = "Positive StartTime", Flag = "AR2/Lighting/StartTime", Value = false})
LightingSection:Slider({Name = "Time", Flag = "AR2/Lighting/Time", Min = 0, Max = 24, Precise = 1, Value = 12, Unit = "hours"})
for Name, LightingMode in pairs(getupvalue(Lighting.GetState, 4)) do
LModes[#LModes + 1] = {Name = Name, Mode = "Button", Value = false,
Callback = function() Lighting:SetMode(Name) end}
end
LightingSection:Dropdown({Name = "Lighting Mode", Flag = "AR2/Lighting/Modes", List = LModes})
LightingSection:Button({Name = "Reset Lighting Mode", Callback = function() Lighting:Reset() end})
end
local RecoilSection = MiscTab:Section({Name = "Weapon", Side = "Left"}) do
--RecoilSection:Toggle({Name = "Instant Hit", Flag = "AR2/InstantHit", Value = false})
RecoilSection:Toggle({Name = "Bullet Tracer", Flag = "AR2/BulletTracer/Enabled", Value = false})
:Colorpicker({Flag = "AR2/BulletTracer/Color", Value = {1, 0.75, 1, 0, true}})
RecoilSection:Toggle({Name = "Silent Wallbang", Flag = "AR2/MagicBullet/Enabled", Value = false}):Keybind({Flag = "AR2/MagicBullet/Keybind"})
RecoilSection:Slider({Name = "Wallbang Depth", Flag = "AR2/MagicBullet/Depth", Min = 1, Max = 5, Value = 5, Unit = "studs"})
RecoilSection:Divider()
RecoilSection:Toggle({Name = "Recoil Control", Flag = "AR2/Recoil/Enabled", Value = false})
RecoilSection:Slider({Name = "Recoil", Flag = "AR2/Recoil/Value", Min = 0, Max = 100, Value = 0, Unit = "%"})
RecoilSection:Toggle({Name = "No Spread", Flag = "AR2/NoSpread", Value = false})
--RecoilSection:Toggle({Name = "No Wobble", Flag = "AR2/NoWobble", Value = false})
RecoilSection:Toggle({Name = "No Camera Flinch", Flag = "AR2/NoFlinch", Value = false})
RecoilSection:Toggle({Name = "Unlock Firemodes", Flag = "AR2/UnlockFiremodes", Value = false})
RecoilSection:Toggle({Name = "Instant Reload", Flag = "AR2/InstantReload", Value = false})
--[[RecoilSection:Divider()
RecoilSection:Toggle({Name = "Recoil Control", Flag = "AR2/Recoil/Enabled", Value = false})
RecoilSection:Slider({Name = "Shift Force", Flag = "AR2/Recoil/ShiftForce", Min = 0, Max = 100, Value = 0, Unit = "%"})
RecoilSection:Slider({Name = "Roll Bias", Flag = "AR2/Recoil/RollBias", Min = 0, Max = 100, Value = 0, Unit = "%"})
RecoilSection:Slider({Name = "Raise Force", Flag = "AR2/Recoil/RaiseForce", Min = 0, Max = 100, Value = 0, Unit = "%"})
RecoilSection:Slider({Name = "Slide Force", Flag = "AR2/Recoil/SlideForce", Min = 0, Max = 100, Value = 0, Unit = "%"})
RecoilSection:Slider({Name = "KickUp Force", Flag = "AR2/Recoil/KickUpForce", Min = 0, Max = 100, Value = 0, Unit = "%"})
RecoilSection:Slider({Name = "Bob Force", Flag = "AR2/Bob/Force", Min = 0, Max = 100, Value = 0, Unit = "%"})
RecoilSection:Slider({Name = "Bob Damping", Flag = "AR2/Bob/Damping", Min = 0, Max = 100, Value = 0, Unit = "%"})]]
end
local VehSection = MiscTab:Section({Name = "Vehicle", Side = "Left"}) do
VehSection:Toggle({Name = "Enabled", Flag = "AR2/Vehicle/Enabled", Value = false})
VehSection:Toggle({Name = "No Impact", Flag = "AR2/Vehicle/Impact", Value = false})
--VehSection:Toggle({Name = "Fly", Flag = "AR2/Vehicle/Fly", Value = false})
VehSection:Toggle({Name = "Instant Action", Flag = "AR2/Vehicle/Instant", Value = false})
VehSection:Slider({Name = "Max Speed", Flag = "AR2/Vehicle/MaxSpeed", Min = 0, Max = 500, Value = 100, Unit = "mph"})
--VehSection:Slider({Name = "Steer", Flag = "AR2/Vehicle/Steer", Min = 100, Max = 500, Value = 200})
--[[VehSection:Slider({Name = "Damping", Flag = "AR2/Vehicle/Damping", Min = 0, Max = 200, Value = 100})
VehSection:Slider({Name = "Velocity", Flag = "AR2/Vehicle/Velocity", Min = 0, Max = 200, Value = 100})]]
end
--[[local TargetSection = MiscTab:Section({Name = "Target", Side = "Right"}) do
local PlayerDropdown = TargetSection:Dropdown({Name = "Player List",
IgnoreFlag = true, Flag = "AR2/Teleport/List"})
PlayerDropdown:RefreshToPlayers(false)
TargetSection:Button({Name = "Refresh", Callback = function()
PlayerDropdown:RefreshToPlayers(false)
end})
TargetSection:Button({Name = "Teleport", Callback = function()
if Window.Flags["AR2/Teleport/Loop"] then return end
TeleportBypass = true
while task.wait() do
if not Teleport(PlayerDropdown.Value[1]) then
Parvus.Utilities.UI:Toast({Title = "Teleport Ended", Duration = 5})
TeleportBypass = false break
end
end
end})
TargetSection:Toggle({Name = "Loop Teleport", Flag = "AR2/Teleport/Loop", Value = false}):Keybind()
TargetSection:Slider({Name = "Teleport Speed", Flag = "AR2/Teleport/Speed", Min = 1, Max = 50, Value = 20, Unit = "studs", Wide = true})
TargetSection:Button({Name = "TP Zombies", Callback = function()
local OldAntiZombie = Window:GetValue("AR2/AntiZombie/Enabled")
Window:SetValue("AR2/AntiZombie/Enabled", false)
local Closest = GetCharactersInRadius(Zombies.Mobs, 250)
if not Closest then return end
for Index, Character in pairs(Closest) do
if isnetworkowner(Character.PrimaryPart) then
task.spawn(function()
while task.wait() do
if not Character then print("no char") break end
if not Character.PrimaryPart then print("no char pp") break end
Character.PrimaryPart.Anchored = false
if not PlayerDropdown.Value[1] then print("no plr") break end
local TargetPlayer = PlayerService:FindFirstChild(PlayerDropdown.Value[1])
if not TargetPlayer then print("no plr obj") break end
if not TargetPlayer.Character then print("no plr char") break end
local Back = TargetPlayer.Character.PrimaryPart.CFrame * Vector3.new(0, 0, 12)
Character.PrimaryPart.CFrame = CFrame.new(Back, TargetPlayer.Character.PrimaryPart.Position - Back)
if not isnetworkowner(Character.PrimaryPart) then print("teleported", Character) break end
end
end)
end
end
Window:SetValue("AR2/AntiZombie/Enabled", OldAntiZombie)
end})
end]]
local CharSection = MiscTab:Section({Name = "Character", Side = "Right"}) do
CharSection:Toggle({Name = "Fly Enabled", Flag = "AR2/Fly/Enabled", Value = false}):Keybind({Flag = "AR2/Fly/Keybind"})
CharSection:Slider({Name = "", Flag = "AR2/Fly/Speed", Min = 0, Max = 10, Precise = 1, Value = 0.7, Unit = "studs", Wide = true})
--CharSection:Divider()
CharSection:Toggle({Name = "Walk Speed", Flag = "AR2/WalkSpeed/Enabled", Value = false}):Keybind({Flag = "AR2/WalkSpeed/Keybind"})
CharSection:Slider({Name = "", Flag = "AR2/WalkSpeed/Speed", Min = 0, Max = 1.4, Precise = 1, Value = 0.7, Unit = "studs", Wide = true})
--CharSection:Divider()
CharSection:Toggle({Name = "Jump Height", Flag = "AR2/JumpHeight/Enabled", Value = false}):Keybind({Flag = "AR2/JumpHeight/Keybind"})
CharSection:Toggle({Name = "Infinite Jump", Flag = "AR2/JumpHeight/NoFallCheck", Value = false})
CharSection:Toggle({Name = "No Fall Impact", Flag = "AR2/NoFallImpact", Value = false})
CharSection:Toggle({Name = "No Jump Debounce", Flag = "AR2/NoJumpDebounce", Value = false})
CharSection:Slider({Name = "", Flag = "AR2/JumpHeight/Height", Min = 4.8, Max = 100, Precise = 1, Value = 4.8, Unit = "studs", Wide = true})
--CharSection:Divider()
CharSection:Toggle({Name = "Use In Air/Water", Flag = "AR2/UseInAir", Value = false})
--CharSection:Toggle({Name = "Use In Water", Flag = "AR2/UseInWater", Value = false})
CharSection:Toggle({Name = "Fast Respawn", Flag = "AR2/FastRespawn", Value = false})
--[[CharSection:Toggle({Name = "Play Dead", Flag = "AR2/PlayDead", IgnoreFlag = true, Value = false,
Callback = function(Bool)
if not PlayerClass.Character then return end
if Bool then PlayerClass.Character.Animator:PlayAnimationReplicated("Death.Standing Forwards", true)
else PlayerClass.Character.Animator:StopAnimationReplicated("Death.Standing Forwards", true) end
end})]]
CharSection:Button({Name = "Respawn", Callback = function()
task.spawn(function() SetIdentity(2)
PlayerClass:UnloadCharacter()
Interface:Hide("Reticle")
task.wait(0.5)
PlayerClass:LoadCharacter()
end)
end}):Tooltip("You will lose loot")
end
local MiscSection = MiscTab:Section({Name = "Other", Side = "Right"}) do
-- Very basic head expander idc
MiscSection:Toggle({Name = "Head Expander", Flag = "AR2/HeadExpander", Value = false,
Callback = function(Bool)
if Bool then return end
for Index, Player in pairs(PlayerService:GetPlayers()) do
if Player == LocalPlayer then continue end
if not Player.Character then continue end
local Character = Player.Character
local Head = Character.Head
Head.Size = Mannequin.Head.Size
Head.Transparency = Mannequin.Head.Transparency
Head.CanCollide = Mannequin.Head.CanCollide
end
end})
MiscSection:Slider({Name = "Size Mult", Flag = "AR2/HeadExpander/Value", Min = 1, Max = 20, Value = 10, Unit = "x", Wide = true})
MiscSection:Slider({Name = "Transparency", Flag = "AR2/HeadExpander/Transparency", Min = 0, Max = 1, Value = 0.5, Precise = 1, Wide = true})
MiscSection:Divider()
MiscSection:Toggle({Name = "MeleeAura", Flag = "AR2/MeleeAura", Value = false})
MiscSection:Toggle({Name = "Zombie MeleeAura", Flag = "AR2/AntiZombie/MeleeAura", Value = false})
MiscSection:Toggle({Name = "Container Persistence", Flag = "AR2/ContainerPersistence", Value = false})
MiscSection:Toggle({Name = "Instant Search", Flag = "AR2/InstantSearch", Value = false})
--MiscSection:Toggle({Name = "Anti-Zombie", Flag = "AR2/AntiZombie/Enabled", Value = false}):Keybind()
--MiscSection:Toggle({Name = "Anti-Zombie MeleeAura", Flag = "AR2/AntiZombie/MeleeAura", Value = false})
local SpoofSCS = MiscSection:Toggle({Name = "Spoof State", Flag = "AR2/SSCS", Value = false}) SpoofSCS:Keybind()
SpoofSCS:Tooltip("SCS - Set Character State:\nNo Fall Damage\nLess Hunger / Thirst\nWhile Sprinting")
local MoveStates = {}
for MoveState, Value in pairs(Framework.Configs.Character.ValidMoveStates) do
MoveStates[#MoveStates + 1] = {Name = MoveState, Mode = "Button", Value = false}
if MoveState == "Climbing" then MoveStates[#MoveStates].Value = true end
end
MiscSection:Dropdown({Name = "Move States", Flag = "AR2/MoveState", List = MoveStates})
MiscSection:Toggle({Name = "NoClip", Flag = "AR2/NoClip", Value = false,
Callback = function(Bool)
if Bool and not NoClipEvent then
NoClipEvent = RunService.Stepped:Connect(function()
if not LocalPlayer.Character then return end
for Index, Object in pairs(LocalPlayer.Character:GetDescendants()) do
if Object:IsA("BasePart") then
if NoClipObjects[Object] == nil then
NoClipObjects[Object] = Object.CanCollide
end Object.CanCollide = false
end
end
end)
elseif not Bool and NoClipEvent then
NoClipEvent:Disconnect()
NoClipEvent = nil
task.wait(0.1)
for Object, CanCollide in pairs(NoClipObjects) do
Object.CanCollide = CanCollide
end table.clear(NoClipObjects)
end
end}):Keybind()
MiscSection:Toggle({Name = "Map ESP", Flag = "AR2/MapESP", Value = false})
MiscSection:Toggle({Name = "Staff Join", Flag = "AR2/StaffJoin", Value = false})
MiscSection:Dropdown({HideName = true, Flag = "AR2/StaffJoin/List", List = {
{Name = "Server Hop", Mode = "Button", Value = false},
{Name = "Notify", Mode = "Button", Value = true},
{Name = "Kick", Mode = "Button", Value = false}
}})
end
end Parvus.Utilities:SettingsSection(Window, "RightControl", true)
end Parvus.Utilities.InitAutoLoad(Window)
Parvus.Utilities:SetupWatermark(Window)
Parvus.Utilities:SetupLighting(Window.Flags)
Parvus.Utilities.Drawing.SetupCursor(Window)
Parvus.Utilities.Drawing.SetupCrosshair(Window.Flags)
Parvus.Utilities.Drawing.SetupFOV("Aimbot", Window.Flags)
Parvus.Utilities.Drawing.SetupFOV("Trigger", Window.Flags)
Parvus.Utilities.Drawing.SetupFOV("SilentAim", Window.Flags)
local XZVector = Vector3.new(1, 0, 1)
local WallCheckParams = RaycastParams.new()
WallCheckParams.FilterType = Enum.RaycastFilterType.Blacklist
WallCheckParams.FilterDescendantsInstances = {
Workspace.Effects, Workspace.Sounds,
Workspace.Locations, Workspace.Spawns
} WallCheckParams.IgnoreWater = true
local function Raycast(Origin, Direction)
if not table.find(WallCheckParams.FilterDescendantsInstances, LocalPlayer.Character) then
WallCheckParams.FilterDescendantsInstances = {
Workspace.Effects, Workspace.Sounds,
Workspace.Locations, Workspace.Spawns,
LocalPlayer.Character
} --print("added character to raycast")
end
local RaycastResult = Workspace:Raycast(Origin, Direction, WallCheckParams)
if RaycastResult then
if (RaycastResult.Instance.Transparency == 1
and RaycastResult.Instance.CanCollide == false)
or (CollectionService:HasTag(RaycastResult.Instance, "Bullets Penetrate")
or CollectionService:HasTag(RaycastResult.Instance, "Window Part")
or CollectionService:HasTag(RaycastResult.Instance, "World Mesh")
or CollectionService:HasTag(RaycastResult.Instance, "World Water Part")) then
return true
end
end
end
local function InEnemyTeam(Enabled, Player)
if not Enabled then return true end
if SquadData and SquadData.Members then
if table.find(SquadData.Members, Player.Name) then
return false
end
end
return true
end
local function WithinReach(Enabled, Distance, Limit)
if not Enabled then return true end
return Distance < Limit
end
local function ObjectOccluded(Enabled, Origin, Position, Object)
if not Enabled then return false end
return Raycast(Origin, Position - Origin, {Object, LocalPlayer.Character})
end
local function SolveTrajectory(Origin, Velocity, Time, Gravity)
Gravity = Vector3.new(0, math.abs(Gravity), 0)
return Origin + (Velocity * Time) + (Gravity * Time * Time)
end
--[[local function SolveTrajectory2(Origin, Velocity, Time, Gravity)
Gravity = Vector3.new(0, math.abs(Gravity), 0)
return Origin + (Gravity * Time * Time)
end]]
local function GetClosest(Enabled,
TeamCheck, VisibilityCheck, DistanceCheck,
DistanceLimit, FieldOfView, Priority, BodyParts,
PredictionEnabled
)
if not Enabled then return end
if not PlayerClass.Character then return end
--[[local Weapon = PlayerClass.Character.Instance.Equipped:FindFirstChildOfClass("Model")
if not Weapon then return end
local Muzzle = Weapon:FindFirstChild("Muzzle")
if not Muzzle then return end]]
local CameraPosition, Closest = Camera.CFrame.Position, nil
for Index, Player in ipairs(PlayerService:GetPlayers()) do
if Player == LocalPlayer then continue end
local Character = Player.Character if not Character then continue end
if not InEnemyTeam(TeamCheck, Player) then continue end
if Priority == "Random" then
Priority = BodyParts[math.random(#BodyParts)]
BodyPart = Character:FindFirstChild(Priority)
if not BodyPart then continue end
local BodyPartPosition = BodyPart.Position
local Distance = (BodyPartPosition - CameraPosition).Magnitude
BodyPartPosition = PredictionEnabled and SolveTrajectory(BodyPartPosition,
BodyPart.AssemblyLinearVelocity, Distance / ProjectileSpeed, ProjectileGravity) or BodyPartPosition
local ScreenPosition, OnScreen = Camera:WorldToViewportPoint(BodyPartPosition)
ScreenPosition = Vector2.new(ScreenPosition.X, ScreenPosition.Y)
if not OnScreen then continue end
Distance = (BodyPartPosition - CameraPosition).Magnitude
if not WithinReach(DistanceCheck, Distance, DistanceLimit) then continue end
if ObjectOccluded(VisibilityCheck, CameraPosition, BodyPartPosition, Character) then continue end
local Magnitude = (ScreenPosition - UserInputService:GetMouseLocation()).Magnitude
if Magnitude >= FieldOfView then continue end
return {Player, Character, BodyPart, ScreenPosition}
elseif Priority ~= "Closest" then
BodyPart = Character:FindFirstChild(Priority)
if not BodyPart then continue end
local BodyPartPosition = BodyPart.Position
local Distance = (BodyPartPosition - CameraPosition).Magnitude
BodyPartPosition = PredictionEnabled and SolveTrajectory(BodyPartPosition,
BodyPart.AssemblyLinearVelocity, Distance / ProjectileSpeed, ProjectileGravity) or BodyPartPosition
local ScreenPosition, OnScreen = Camera:WorldToViewportPoint(BodyPartPosition)
ScreenPosition = Vector2.new(ScreenPosition.X, ScreenPosition.Y)
if not OnScreen then continue end
Distance = (BodyPartPosition - CameraPosition).Magnitude
if not WithinReach(DistanceCheck, Distance, DistanceLimit) then continue end
if ObjectOccluded(VisibilityCheck, CameraPosition, BodyPartPosition, Character) then continue end
local Magnitude = (ScreenPosition - UserInputService:GetMouseLocation()).Magnitude
if Magnitude >= FieldOfView then continue end
return {Player, Character, BodyPart, ScreenPosition}
end
for Index, BodyPart in ipairs(BodyParts) do
BodyPart = Character:FindFirstChild(BodyPart)
if not BodyPart then continue end
local BodyPartPosition = BodyPart.Position
local Distance = (BodyPartPosition - CameraPosition).Magnitude
BodyPartPosition = PredictionEnabled and SolveTrajectory(BodyPartPosition,
BodyPart.AssemblyLinearVelocity, Distance / ProjectileSpeed, ProjectileGravity) or BodyPartPosition
local ScreenPosition, OnScreen = Camera:WorldToViewportPoint(BodyPartPosition)
ScreenPosition = Vector2.new(ScreenPosition.X, ScreenPosition.Y)
if not OnScreen then continue end
Distance = (BodyPartPosition - CameraPosition).Magnitude
if not WithinReach(DistanceCheck, Distance, DistanceLimit) then continue end
if ObjectOccluded(VisibilityCheck, CameraPosition, BodyPartPosition, Character) then continue end
local Magnitude = (ScreenPosition - UserInputService:GetMouseLocation()).Magnitude
if Magnitude >= FieldOfView then continue end
FieldOfView, Closest = Magnitude, {Player, Character, BodyPart, ScreenPosition}
end
end
return Closest
end
local function AimAt(Hitbox, Sensitivity)
if not Hitbox then return end
local MouseLocation = UserInputService:GetMouseLocation()
mousemoverel(
(Hitbox[4].X - MouseLocation.X) * Sensitivity,
(Hitbox[4].Y - MouseLocation.Y) * Sensitivity
)
end
local function CheckForAdmin(Player)
if Window.Flags["AR2/StaffJoin"] then
local Rank = Player:GetRankInGroup(15434910)
if not Rank then return end
local Role = AdminRoles[Rank]
if not Role then return end
local Message = ("Staff member has joined or is in your game\nName: %s\nUserId: %s\nRole: %s"):format(Player.Name, Player.UserId, Role)
if Window.Flags["AR2/StaffJoin/List"][1] == "Kick" then
LocalPlayer:Kick(Message)
elseif Window.Flags["AR2/StaffJoin/List"][1] == "Server Hop" then
LocalPlayer:Kick(Message)
task.wait(5)
Parvus.Utilities.ServerHop()
elseif Window.Flags["AR2/StaffJoin/List"][1] == "Notify" then
UI:Push({Title = Message, Duration = 20})
end
end
end
local function GetStates()
if not NetworkSyncHeartbeat then print("no") return {} end
--local Character = debug.getupvalue(NetworkSyncHeartbeat, 1)
local Seed = debug.getupvalue(NetworkSyncHeartbeat, 6)
--local Camera = debug.getupvalue(NetworkSyncHeartbeat, 7)
local RandomData = {}
local SeededRandom = Random.new(Seed)
local Data = {
"ServerTime", -- {"ServerTime", workspace:GetServerTimeNow()},
"RootCFrame", -- {"RootCFrame", Self.RootPart.CFrame},
"RootVelocity", -- {"RootVelocity", Self.RootPart.AssemblyLinearVelocity},
"FirstPerson", -- {"FirstPerson", Character.FirstPerson},
"InstanceCFrame", -- {"InstanceCFrame", Character.Instance.CFrame},
"LookDirection", -- {"LookDirection", Self.LookDirectionSpring:GetGoal()},
"MoveState", -- {"MoveState", Self.MoveState},
"AtEaseInput", -- {"AtEaseInput", Self.AtEaseInput},
"ShoulderSwapped", -- {"ShoulderSwapped", Self.ShoulderSwapped},
"Zooming", -- {"Zooming", Self.Zooming},
"BinocsActive", -- {"BinocsActive", Character.FirstPerson and not Self.BinocsAtEase},
"Staggered", -- {"Staggered", Self.Staggered},
"Shoving", -- {"Shoving", Self.Shoving}
}
local DataLength = #Data
while #Data > 0 do
local ToRemove = SeededRandom:NextInteger(1, DataLength)
--print(#Data, ToRemove % #Data, ToRemove, ToRemove % #Data == 0)
ToRemove = ToRemove % #Data == 0 and #Data or ToRemove % #Data
local Removed = table.remove(Data, ToRemove)
table.insert(RandomData, Removed)
end
return RandomData
end
--[[local function CastLocalBulletInstant(Origin, SpreadDirection, Direction)
local Velocity = Direction * ProjectileSpeed
local SpreadVelocity = SpreadDirection * ProjectileSpeed
local ProjectilePosition = Origin
local ProjectileSpreadPosition = Origin
local ProjectileRay = nil
local ProjectileCastInstance = nil
local ProjectileCastPosition = Vector3.zero
local ProjectileSpreadRay = nil
local ProjectileSpreadCastInstance = nil
local ProjectileSpreadCastPosition = Vector3.zero
local Exclude = {
Effects,
Sounds,
PlayerClass.Character.Instance
}
local Frame = 1 / 60
local TravelTime = 0
local Traveling = true
local TravelDistance = 0
local SpreadTravelDistance = 0
while Traveling do
TravelTime += Frame
ProjectileRay = Ray.new(ProjectilePosition, Origin + Velocity * TravelTime + ProjectileGravity * Vector3.yAxis * TravelTime ^ 2 - ProjectilePosition)
ProjectileSpreadRay = Ray.new(ProjectileSpreadPosition, Origin + SpreadVelocity * TravelTime + ProjectileGravity * Vector3.yAxis * TravelTime ^ 2 - ProjectileSpreadPosition)
ProjectileCastInstance, ProjectileCastPosition = Raycasting:BulletCast(ProjectileRay, true, Exclude)
ProjectileSpreadCastInstance, ProjectileSpreadCastPosition = Raycasting:BulletCast(ProjectileSpreadRay, true, Exclude)
TravelDistance = TravelDistance + (ProjectilePosition - ProjectileCastPosition).Magnitude
SpreadTravelDistance = SpreadTravelDistance + (ProjectileSpreadPosition - ProjectileSpreadCastPosition).Magnitude
ProjectilePosition = ProjectileCastPosition
ProjectileSpreadPosition = ProjectileSpreadCastPosition
if ProjectileCastInstance or ShotMaxDistance < TravelDistance then
Traveling = false
break
end
end
if ProjectileCastInstance then
if (ProjectileSpreadCastPosition - ProjectileCastPosition).Magnitude > 5 then
ProjectileSpreadCastPosition = ProjectileSpreadCastPosition - ((ProjectileSpreadRay.Origin - ProjectileSpreadCastPosition).Unit * -(ProjectileCastInstance.Position - ProjectileSpreadCastPosition).Magnitude)
end
return ProjectileSpreadCastPosition, {
ProjectileCastInstance.CFrame:PointToObjectSpace(ProjectileSpreadRay.Origin),
ProjectileCastInstance.CFrame:VectorToObjectSpace(ProjectileSpreadRay.Direction),
ProjectileCastInstance.CFrame:PointToObjectSpace(ProjectileSpreadCastPosition)
}
end
end]]
--[[local function BulletCast(ProjectileRay, Include)
local Params = RaycastParams.new()
Params.FilterDescendantsInstances = Include
Params.FilterType = Enum.RaycastFilterType.Include
local Raycast = workspace:Raycast(ProjectileRay.Origin, ProjectileRay.Direction, Params)
if Raycast then
return Raycast.Instance, Raycast.Position, Raycast.Normal, Raycast.Material
end
return nil, ProjectileRay.Origin + ProjectileRay.Direction, Vector3.yAxis, Enum.Material.Air
end]]
local function CastLocalBulletInstant(Origin, Direction, SpreadDirection)
local Velocity = Direction * ProjectileSpeed
local SpreadVelocity = SpreadDirection * ProjectileSpeed
local ProjectilePosition = Origin
local ProjectileSpreadPosition = Origin
local ProjectileRay = nil
local ProjectileCastInstance = nil
local ProjectileCastPosition = Vector3.zero
local ProjectileSpreadRay = nil
local Frame = 1 / 60
local TravelTime = 0
local TravelDistance = 0
local Exclude = {
Effects,
Sounds,
PlayerClass.Character.Instance
}
while true do
TravelTime += Frame
ProjectileRay = Ray.new(ProjectilePosition, Origin + Velocity * TravelTime + ProjectileGravity * Vector3.yAxis * TravelTime ^ 2 - ProjectilePosition)
ProjectileSpreadRay = Ray.new(ProjectileSpreadPosition, Origin + SpreadVelocity * TravelTime + ProjectileGravity * Vector3.yAxis * TravelTime ^ 2 - ProjectileSpreadPosition)
ProjectileCastInstance, ProjectileCastPosition = Raycasting:BulletCast(ProjectileRay, true, Exclude)
ProjectileSpreadPosition = ProjectileSpreadRay.Origin + ProjectileSpreadRay.Direction
TravelDistance = TravelDistance + (ProjectilePosition - ProjectileCastPosition).Magnitude
ProjectilePosition = ProjectileCastPosition
if ProjectileCastInstance or TravelDistance > ShotMaxDistance then
break
end
end
if ProjectileCastInstance then
local Distance = (ProjectileSpreadPosition - ProjectileCastPosition).Magnitude
local Unit = (ProjectileSpreadPosition - ProjectileSpreadRay.Origin).Unit
ProjectileSpreadPosition = ProjectileSpreadPosition - Unit * Distance
Parvus.Utilities.MakeBeam(ProjectileSpreadRay.Origin, ProjectileSpreadPosition, Window.Flags["AR2/BulletTracer/Color"])
return ProjectileSpreadPosition, {
ProjectileCastInstance.CFrame:PointToObjectSpace(ProjectileSpreadRay.Origin),
ProjectileCastInstance.CFrame:VectorToObjectSpace(ProjectileSpreadRay.Direction),
ProjectileCastInstance.CFrame:PointToObjectSpace(ProjectileSpreadPosition)
}
end
end
local function SwingMelee(Enemies)
local Character = PlayerClass.Character
if not Character then return end
local EquippedItem = Character.EquippedItem
if not EquippedItem then return end
if EquippedItem.Type ~= "Melee" then return end
local AttackConfig = EquippedItem.AttackConfig[1]
local Time = Workspace:GetServerTimeNow()
Network:Send("Melee Swing", Time, EquippedItem.Id, 1)
local Stopped = Character.Animator:PlayAnimation(AttackConfig.Animation, 0.05, AttackConfig.PlaybackSpeedMod)
local Track = Character.Animator:GetTrack(AttackConfig.Animation)
if Track then
local Maid = Maids.new()
Maid:Give(Track:GetMarkerReachedSignal("Swing"):Connect(function(State)
if State ~= "Begin" then return end
for Index, Enemy in pairs(Enemies) do
Network:Send("Melee Hit Register", EquippedItem.Id, Time, Enemy, "Flesh", false)
if not AttackConfig.CanHitMultipleTargets then break end
end
Maid:Destroy()
Maid = nil
end))
Stopped:Wait()
end
end
local function GetEnemyForMelee(CountPlayers, CountZombies)
local PlayerCharacter = PlayerClass.Character
if not PlayerCharacter then return end
local Distance, Closest = 10, {}
if CountZombies then
for Index, Zombie in pairs(Zombies.Mobs:GetChildren()) do
local PrimaryPart = Zombie.PrimaryPart
if not PrimaryPart then continue end
local Magnitude = (PrimaryPart.Position - PlayerCharacter.RootPart.Position).Magnitude
if Distance > Magnitude then Distance = Magnitude table.insert(Closest, PrimaryPart) end
end
end
if CountPlayers then
Distance = 10
for Index, Character in pairs(Characters:GetChildren()) do
local Player = PlayerService:GetPlayerFromCharacter(Character)
if Player == LocalPlayer then continue end
if not InEnemyTeam(true, Player) then continue end