-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaim.lua
849 lines (847 loc) · 27.2 KB
/
aim.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
local enabledddd = true
if not enabledddd then return end
--[[if game.PlaceId == 286090429 then
local req
req = hookfunction(getrenv().require, newcclosure(function(arg)
if arg.Name == "NewMouse" then
print("successfully spoofed mouse!")
return nil--game.Players.LocalPlayer:GetMouse()
end
return req(arg)
end))
end]]--
--[[local function formattbl(tbl)
local text = ""
local indexed2 = false
if tbl[1] then indexed2 = true end
local layer = 0
local index
index = function(tbl2)
layer = layer + 1
local indexed = false
if tbl[1] then indexed = true end
if indexed then
for i, v in ipairs(tbl2) do
for i = 1, layer do text = text.." " end
if type(v) == "table" then
local indexed3 = false
if v[1] then indexed3 = true end
if indexed3 then
text = text.."index: "..i.." value: [\n"..index(v).."] (type: "..type(v)..")\n"
else
text = text.."index: "..i.." value: {\n"..index(v).."} (type: "..type(v)..")\n"
end
else
text = text.."index: "..i.." value: "..v.." (type: "..type(v)..")\n"
end
for i = 1, layer do text = text.." " end
end
else
for i, v in pairs(tbl2) do
for i = 1, layer do text = text.." " end
if type(v) == "table" then
local indexed3 = false
if v[1] then indexed3 = true end
if indexed3 then
text = text.."key: "..i.." (type: "..type(i)..") value: [\n"..index(v).."] (type: "..type(v)..")\n"
else
text = text.."key: "..i.." (type: "..type(i)..") value: {\n"..index(v).."} (type: "..type(v)..")\n"
end
else
text = text.."key: "..i.." (type: "..type(i)..") value: "..v.." (type: "..type(v)..")\n"
end
end
end
layer = layer - 1
end
if indexed2 then
text = text.."[\n"
else
text = text.."{\n"
end
if indexed2 then
text = text.."]\n"
else
text = text.."}\n"
end
return text
end]]
--[[local getmt
getmt = hookfunction(getrenv().getmetatable, newcclosure(function(self, arg)
spawn(function()
wait(.2)
for i, v in pairs(self) do
print("getmt", "self", formattbl(self), i, v, type(v))
end
end)
print(getcallingscript())
if not checkcaller() and arg == game then
return nil
end
return getmt(self, arg)
end))
local setmt
setmt = hookfunction(getrenv().setmetatable, newcclosure(function(self, arg)
spawn(function()
wait(.2)
for i, v in pairs(self) do
print("setmt", "self", formattbl(self), i, v, type(v))
end
for i, v in pairs(arg) do
print("setmt", "arg", formattbl(arg), i, v, type(v))
end
end)
print(getcallingscript())
if not checkcaller() and arg == game then
return nil
end
return setmt(self, arg)
end))]]
local gameids = {
{286090429},
{155615604},
{6158075274},
{5817894209},
{621129760},
{6514923093},
{142823291},
{6407649031}
}
local isacs = false
if game.ReplicatedStorage:FindFirstChild("ACS_Engine") then
isacs = true
end
print(isacs)
local lopus = false
for i, v in pairs(gameids) do
if v[1] == game.PlaceId then
lopus = true
break
end
end
if lopus == false or isacs then print("fail") return nil end
while not game:IsLoaded() do wait() end
local aimforhead = true
local showtarget = true
local toggle = false
local teamcheck = true
local wallbang = false
local vischeck = true
local islocked = true
local key = Enum.KeyCode.F
local ismidclick = false
local function getRoot(char, forcehum)
if not char then return nil end
if aimforhead and not forcehum then
return char:FindFirstChild("Head")
else
return char:FindFirstChild("HumanoidRootPart")
end
end
local getcharfrompart
getcharfrompart = function(part)
if part.Parent == game then return end
local parent = part.Parent
if parent.ClassName == "Model" then
local ffind = game.Players:GetPlayerFromCharacter(parent)
if not ffind then
return getcharfrompart(parent)
else
return ffind
end
else
return getcharfrompart(parent)
end
end
local function isvisible(player)
if not vischeck then return true end
if not game.Players.LocalPlayer.Character then return end
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {game.Players.LocalPlayer.Character}
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
local ffind = game.Workspace.CurrentCamera.CFrame.Position
local thrp = getRoot(player.Character)
if not thrp and not ffind then return end
local unit = (thrp.Position-ffind).Unit
local magnitude = (thrp.Position-ffind).Magnitude
local ray = game.Workspace:Raycast(ffind, unit * magnitude, raycastParams)
if ray then
local lol = getcharfrompart(ray.Instance)
if lol then
if getRoot(lol.Character) then
return true
end
end
end
return false
end
local function findpartwithname(part, name)
if part.Parent == game then return end
local parent = part.Parent
local ffind = parent:FindFirstChild(name)
if not ffind then
return findpartwithname(parent, name)
else
return ffind
end
end
local function getplayer(name)
name = string.lower(name)
local target
for _, v in pairs(game.Players:GetPlayers()) do
if string.find(string.lower(v.Name), name) or string.find(string.lower(v.DisplayName), name) then
target = v
end
end
return target
end
local function get2d(camera, pos)
local pos, vis = camera:WorldToViewportPoint(pos)
if vis then return pos.X, pos.Y end
end
local function calcdistsize(start, endd, divider1, divider2)
if not divider1 then divider1 = 50 end
if not divider2 then divider2 = 10 end
local magnitude = (endd-start).Magnitude
local size = Vector2.new(divider1/(magnitude/divider2), divider1/(magnitude/divider2))
return size.X, size.Y
end
local target = nil
local hrp = nil
local localhrp = nil
local fart = Instance.new("ScreenGui", game.CoreGui)
syn.protect_gui(fart)
fart.IgnoreGuiInset = true
local square = Instance.new("Frame", fart)
square.Size = UDim2.new(0, 50, 0, 50)
square.BackgroundColor3 = Color3.fromRGB(0, 100, 255)
square.BorderSizePixel = 0
square.AnchorPoint = Vector2.new(0.5, 0.5)
local isenabled = false
game:GetService("UserInputService").InputBegan:Connect(function(input)
if ((ismidclick and input.UserInputType == Enum.UserInputType.MouseButton3) or (input.KeyCode == key and not ismidclick)) and not game:GetService("UserInputService"):GetFocusedTextBox() then
if not toggle then
isenabled = true
else
isenabled = (not isenabled)
end
end
end)
game:GetService("UserInputService").InputEnded:Connect(function(input)
if ((ismidclick and input.UserInputType == Enum.UserInputType.MouseButton3) or (input.KeyCode == key and not ismidclick)) and not game:GetService("UserInputService"):GetFocusedTextBox() then
if not toggle then
isenabled = false
end
end
end)
local label = Instance.new("TextLabel", fart)
label.BackgroundTransparency = 1
label.BorderSizePixel = 0
label.AnchorPoint = Vector2.new(0.5, 0.5)
label.TextColor3 = Color3.fromRGB(0, 100, 255)
label.Position = UDim2.new(0.5, 0, 0.9, 0)
label.Font = Enum.Font.SourceSansBold
label.TextSize = 24
local magnitude
local unit
local origsort = function(playertable, x, y)
local tmpprior = nil
local lastmagnitude = nil
repeat
for i, v in ipairs(playertable) do
if v.Character then
local hrp = getRoot(v.Character)
if hrp then
local xx, yy = get2d(game.Workspace.CurrentCamera, hrp.Position)
if xx and yy then
local magnitude = (Vector2.new(xx, yy)-Vector2.new(x, y)).Magnitude
if lastmagnitude then
if lastmagnitude < magnitude then
table.remove(playertable, i)
else
lastmagnitude = magnitude
tmpprior = v
end
else
tmpprior = v
lastmagnitude = magnitude
end
else
table.remove(playertable, i)
end
else
table.remove(playertable, i)
end
else
table.remove(playertable, i)
end
end
until table.getn(playertable) ~= 1 or table.getn(playertable) ~= 0
return tmpprior
end
local customsort = nil
game["Run Service"].RenderStepped:Connect(function()
if isenabled then
label.Text = "AimLock Enabled"
else
label.Text = "AimLock Disabled"
end
if (not isenabled or not islocked) or key == nil then
local playertable = {}
local mouse = game.Players.LocalPlayer:GetMouse()
local x, y = mouse.X, mouse.Y
for _, v in pairs(game.Players:GetPlayers()) do
if v ~= game.Players.LocalPlayer and v.Character then
if getRoot(v.Character) and getRoot(game.Players.LocalPlayer.Character) then
if get2d(game.Workspace.CurrentCamera, getRoot(v.Character).Position) and isvisible(v) then
if not teamcheck then
table.insert(playertable, v)
else
if v.Team ~= game.Players.LocalPlayer.Team then
table.insert(playertable, v)
end
end
end
end
end
end
if not customsort then
target = origsort(playertable, x, y)
else
target = customsort(playertable, x, y)
end
pcall(function()
if target.Character then
hrp = getRoot(target.Character)
else
hrp = nil
end
end)
pcall(function()
if getRoot(game.Players.LocalPlayer.Character) then
localhrp = getRoot(game.Players.LocalPlayer.Character)
else
localhrp = nil
end
end)
end
if hrp and localhrp then
magnitude = (hrp.Position-localhrp.Position).Magnitude
unit = (hrp.Position-localhrp.Position).Unit
end
if target and showtarget and getRoot(target.Character) then
local pos = getRoot(target.Character).Position
local x, y = get2d(game.Workspace.CurrentCamera, pos)
if x and y and game.Players.LocalPlayer.Character then
square.BackgroundTransparency = 0
local xx, yy = calcdistsize(game.Workspace.CurrentCamera.CFrame.Position, pos)
square.Size = UDim2.new(0, xx, 0, yy)
square.Position = UDim2.new(0, x, 0, y)
else
square.BackgroundTransparency = 1
end
else
square.BackgroundTransparency = 1
end
end)
gameids[1][2] = function()
key = Enum.KeyCode.E
local dostuff = true
local MT = getrawmetatable(game)
setreadonly(MT, false)
local namecall = MT.__namecall
MT.__namecall = function(self, ...)
local method = getnamecallmethod()
local args = {...}
if dostuff and not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and method == "FindPartOnRayWithIgnoreList" then
local newargs = {}
newargs[1] = Ray.new(localhrp.Position, magnitude * unit)
newargs[2] = args[2]
if wallbang then
table.insert(newargs[2], game.Workspace.Map)
end
newargs[3] = args[3]
newargs[4] = args[4]
return namecall(self, table.unpack(newargs))
--[[print("raycast called")
local newargs = {}
local p = hrp.CFrame:ToWorldSpace(CFrame.new(0, 0, -3)).Position
local dest = hrp.Position
local u = (dest-p).Unit
local m = (dest-p).Magnitude
setnamecallmethod("Raycast")
local ray = namecall(workspacee, p, u*m)
setnamecallmethod(method)
if ray then
if ray.Instance == hrp then
print("raycast spoofed")
newargs[1] = Ray.new(p, u * m)
newargs[2] = args[2]
if wallbang then
table.insert(newargs[2], game.Workspace.Map)
end
newargs[3] = args[3]
newargs[4] = args[4]
return namecall(self, table.unpack(newargs))
else
print("didn't hit")
end
else
print("failed to cast")
end]]--
end
return namecall(self, ...)
end
local func
local antiloop = false
local assfunc = MT.__index
local workspacee = game.workspace
local ass = Instance.new("NumberValue")
ass.Value = 0
local assfunc2 = function(self, key, lolus)
--if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and key == "CFrame" and func(self, "ClassName") == "Camera" then
--print("camera cframe asked")
--return assfunc(hrp, "CFrame"):ToWorldSpace(CFrame.new(0, 0, -3))
--end
--[[if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and self == Ray and key == "new" then
print("called ray new")
return function(orig, direction)
orig = assfunc(localhrp, "Position")
direction = unit * magnitude
return assfunc(Ray, "new")(orig, direction)
end
end]]--
if not checkcaller() then
if --[[key == "Spread" or key == "SpreadRecovery" or ]]key == "RecoilControl" then
return ass
elseif key == "SpreadRecovery" then
return assfunc(self, "Spread")
end
end
if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and key == "Hit" then
return assfunc(hrp, "CFrame")
elseif not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and key == "UnitRay" then
elseif not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and key == "Target" then
return hrp
end
return assfunc(self, key)
end
MT.__index = assfunc2
local gayfunc
end
gameids[2][2] = function()
local gmt = getrawmetatable(game)
setreadonly(gmt, false)
local old = gmt.__namecall
local localplayer = game.Players.LocalPlayer
local lolspace = game.Workspace
local index
local fart = game.Workspace
local function gethrp()
return hrp
end
local namecall
local function callfromnamecall(nc, inst, method, ...)
local pastme = getnamecallmethod()
setnamecallmethod(method)
local val = nc(inst, ...)
setnamecallmethod(pastme)
return val
end
local req
req = hookfunction(getrenv().require, function(self, ...)
local args = {...}
if self.Name == "GunStates" then
local fart = req(self, ...)
fart.FireRate = 0.01
fart.Spread = 20
--fart.AutoFire = true
fart.Damage = 100
fart.Bullets = fart.Bullets*5
--fart.ReloadTime = 0.1
--fart.MaxAmmo = 9999
--fart.CurrentAmmo = 9999
--fart.StoredAmmo = 9999*10
return fart
end
return req(self, ...)
end)
namecall = hookmetamethod(game, "__namecall", function(self, ...)
local method = getnamecallmethod()
if self == game.Workspace and method == "FindPartOnRay" and not checkcaller() and isenabled and hrp and localhrp and magnitude and unit then
--[[local ray = callfromnamecall(namecall, game.Workspace, "Raycast", localhrp.Position, unit * magnitude)
if ray then
return ray.Instance, ray.Position
end]]
return hrp, hrp.Position
end
return namecall(self, ...)
end)
--index = hookmetamethod(game, "__index", function(self, key)
--local method = getnamecallmethod()
--local gay = findpartwithname(self, game.Name)
--[[if not checkcaller() and self.Name == "ShootEvent" and method == "FireServer" and isenabled and target then
local tbl = ({...})[1][1]
local arg2 = ({...})[2]
print("lolled")
local hrppos = hrp.Position
local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
local muzzle = tool.Muzzle
local magnitude = (hrppos-muzzle.Position).Magnitude
local ray = Ray.new(muzzle.Position, (hrppos-muzzle.Position).Unit * magnitude)
local v24 = Instance.new("Part", muzzle);
Instance.new("BlockMesh", v24).Scale = Vector3.new(0.5, 0.5, 1);
v24.Name = "RayPart";
v24.BrickColor = BrickColor.Yellow();
v24.Material = Enum.Material.Neon;
v24.Anchored = true;
v24.CanCollide = false;
v24.Transparency = 0.5;
v24.formFactor = Enum.FormFactor.Custom;
v24.Size = Vector3.new(0.2, 0.2, magnitude);
v24.CFrame = CFrame.new(hrppos, muzzle.Position) * CFrame.new(0, 0, -magnitude / 2);
spawn(function()
wait(0.05)
v24:Destroy()
end)
local farttable = {
{
Hit = hrp,
Distance = tbl.Distance,
Cframe = CFrame.new(hrp.Position),
RayObject = tbl.RayObject
}
}
--tbl.Hit = hrp
--tbl.Distance = magnitude
--tbl.Cframe = v24.CFrame
--tbl.RayObject = ray
return index(self, farttable, arg2)
if target.Character then
local hrp = getRoot(target.Character)
if hrp then
end
end]]
--[[ elseif self == game.Debris and method == "AddItem" then
if ({...})[1].Name == "RayPart" and ({...})[1].Parent.Parent.Parent.Name == game.Players.LocalPlayer.Name then
print(({...})[1], 2)
return old(({...})[1], 2)
end
return old(self, ...)]]--
--if index(self, "ClassName") == "Mouse" and key == "Hit" and isenabled and hrp and localhrp and not checkcaller() then
--local ray = game.Workspace:Raycast(localhrp.Position, unit * magnitude)
--if ray then
--return CFrame.new(ray.Instance.Position)
--end
--end
--return index(self, key)
--end)
end
gameids[3][2] = function()
key = Enum.KeyCode.E
local dostuff = true
local namecall
namecall = hookmetamethod(game, "__namecall", function(self, ...)
local method = getnamecallmethod()
local args = {...}
if dostuff and not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and method == "FindPartOnRayWithIgnoreList" then
local newargs = {}
newargs[1] = Ray.new(localhrp.Position, magnitude * unit)
newargs[2] = args[2]
if wallbang then
table.insert(newargs[2], game.Workspace.Map)
end
newargs[3] = args[3]
newargs[4] = args[4]
return namecall(self, table.unpack(newargs))
--[[print("raycast called")
local newargs = {}
local p = hrp.CFrame:ToWorldSpace(CFrame.new(0, 0, -3)).Position
local dest = hrp.Position
local u = (dest-p).Unit
local m = (dest-p).Magnitude
setnamecallmethod("Raycast")
local ray = namecall(workspacee, p, u*m)
setnamecallmethod(method)
if ray then
if ray.Instance == hrp then
print("raycast spoofed")
newargs[1] = Ray.new(p, u * m)
newargs[2] = args[2]
if wallbang then
table.insert(newargs[2], game.Workspace.Map)
end
newargs[3] = args[3]
newargs[4] = args[4]
return namecall(self, table.unpack(newargs))
else
print("didn't hit")
end
else
print("failed to cast")
end]]--
end
return namecall(self, ...)
end)
local func
local antiloop = false
local assfunc
local workspacee = game.workspace
assfunc = function(self, key, lolus)
--if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and key == "CFrame" and func(self, "ClassName") == "Camera" then
--print("camera cframe asked")
--return func(hrp, "CFrame"):ToWorldSpace(CFrame.new(0, 0, -3))
--end
--[[if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and self == Ray and key == "new" then
print("called ray new")
return function(orig, direction)
orig = func(localhrp, "Position")
direction = unit * magnitude
return func(Ray, "new")(orig, direction)
end
end]]--
if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and key == "Hit" then
return func(hrp, "CFrame")
elseif not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and key == "UnitRay" then
elseif not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and key == "Target" then
return hrp
end
return func(self, key)
end
func = hookmetamethod(game, "__index", assfunc)
end
local function acs()
ismidclick = true
teamcheck = false
vischeck = false
local oldindex
local workspacee = game.workspace
--[[oldindex = hookmetamethod(game, "__index", newcclosure(function(self, key)
end))]]
local oldrequire
oldrequire = hookfunction(getrenv().require, function(module)
if not checkcaller() and ((module.Name == "ACS_Settings" and module.Parent.ClassName == "Tool") or (module.Name == "Settings" and module.Parent.Name == "Variaveis")) then
local tbl = oldrequire(module)
tbl.StoredAmmo = math.huge
tbl.Jammed = false
tbl.CanBreak = false
local rectbl = {
camRecoilUp = {0,0}
,camRecoilTilt = {0,0}
,camRecoilLeft = {0,0}
,camRecoilRight = {0,0}
}
tbl.camRecoil = rectbl
tbl.gunRecoil = rectbl
local dmgtbl = {200,200}
tbl.LimbDamage = dmgtbl
tbl.TorsoDamage = dmgtbl
tbl.HeadDamage = dmgtbl
if tbl.ShootType ~= 3 then
tbl.ShootType = 1
end
return tbl
end
return oldrequire(module)
end)
local func
local assfunc
assfunc = function(Self, ...)
local args = {...}
local NamecallMethod = getnamecallmethod()
if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and Self == workspacee and NamecallMethod == "FindPartOnRayWithIgnoreList" then
local ray = args[1]
local ignores = args[2]
local terrainCellsAreCubes = args[3]
local ignoreWater = args[4]
local fray = Ray.new(localhrp.Position, unit * magnitude)
setnamecallmethod("FindPartOnRayWithWhitelist")
local data = {func(Self, fray, {hrp,localhrp}, true)}
setnamecallmethod("FindPartOnRayWithIgnoreList")
return Self, unpack(data)
end
return func(Self, ...)
end
func = hookmetamethod(game, "__namecall", assfunc)
local func2
local assfunc2
local huge = math.huge
assfunc2 = function(Self, key)
if Self == game then return func2(Self,key) end
local selfname = func2(Self, "Name")
local parent = func2(Self, "Parent")
local parentname
if parent then
parentname = func2(parent, "Name")
else
return func2(Self, key)
end
if (selfname == "LauncherAmmo" or selfname == "StoredAmmo") and parentname == "Variaveis" and key == "Value" then
return 9999999
end
return func2(Self, key)
end
func2 = hookmetamethod(game, "__index", assfunc2)
end
gameids[4][2] = acs
gameids[5][2] = function()
teamcheck = false
vischeck = false
local func
local assfunc
local workspacee = game.workspace
assfunc = function(Self, ...)
local args = {...}
local NamecallMethod = getnamecallmethod()
if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and Self == workspacee and NamecallMethod == "FindPartOnRayWithIgnoreList" then
local ray = args[1]
local ignores = args[2]
local terrainCellsAreCubes = args[3]
local ignoreWater = args[4]
local fray = Ray.new(localhrp.Position, unit * magnitude)
--local data = {func(fray, ignores, terrainCellsAreCubes, ignoreWater)}
return func(Self, fray, ignores, terrainCellsAreCubes, ignoreWater)
end
return func(Self, ...)
end
func = hookmetamethod(game, "__namecall", assfunc)
end
gameids[6][2] = function()
teamcheck = false
local func
local assfunc
local workspacee = game.workspace
assfunc = function(Self, ...)
local args = {...}
local NamecallMethod = getnamecallmethod()
if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and Self == workspacee and NamecallMethod == "FindPartOnRayWithIgnoreList" then
local ray = args[1]
local ignores = args[2]
local terrainCellsAreCubes = args[3]
local ignoreWater = args[4]
local fray = Ray.new(localhrp.Position, unit * magnitude)
--local data = {func(fray, ignores, terrainCellsAreCubes, ignoreWater)}
return func(Self, fray, ignores, terrainCellsAreCubes, ignoreWater)
end
return func(Self, ...)
end
func = hookmetamethod(game, "__namecall", assfunc)
end
gameids[7][2] = function()
key = Enum.KeyCode.E
teamcheck = false
local func
local assfunc
local workspacee = game.workspace
assfunc = function(Self, ...)
local args = {...}
local NamecallMethod = getnamecallmethod()
local call = getcallingscript()
if not call then
return func(Self, ...)
end
if call.Name ~= "ControlModule" and not checkcaller() and isenabled and hrp and localhrp and magnitude and unit and Self == workspacee and NamecallMethod == "FindPartOnRayWithIgnoreList" then
local ray = args[1]
local ignores = args[2]
local terrainCellsAreCubes = args[3]
local ignoreWater = args[4]
local fray = Ray.new(localhrp.Position, unit * magnitude)
setnamecallmethod("FindPartOnRayWithWhitelist")
local data = {func(Self, fray, {hrp,localhrp}, ignoreWater)}
setnamecallmethod("FindPartOnRayWithIgnoreList")
return unpack(data)
end
return func(Self, ...)
end
func = hookmetamethod(game, "__namecall", assfunc)
local murdname = ""
local sheriffname = ""
local murdsquare = Instance.new("Frame", fart)
murdsquare.Size = UDim2.new(0, 50, 0, 50)
murdsquare.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
murdsquare.BorderSizePixel = 0
murdsquare.AnchorPoint = Vector2.new(0.5, 0.5)
murdsquare.BackgroundTransparency = 1
local sheriffsquare = Instance.new("Frame", fart)
sheriffsquare.Size = UDim2.new(0, 50, 0, 50)
sheriffsquare.BackgroundColor3 = Color3.fromRGB(0, 100, 255)
sheriffsquare.BorderSizePixel = 0
sheriffsquare.AnchorPoint = Vector2.new(0.5, 0.5)
sheriffsquare.BackgroundTransparency = 1
game["Run Service"].RenderStepped:Connect(function()
local foundmurd = false
local foundsherrif = false
for _, v in pairs(game.Players:GetPlayers()) do
if v ~= game.Players.LocalPlayer and v.Character then
if v.Backpack:FindFirstChild("Knife") or v.Character:FindFirstChild("Knife") then
if murdname ~= v.Name then
game.StarterGui:SetCore( "ChatMakeSystemMessage", { Text = "[Glebux's MM2 Module] "..v.DisplayName.." is the murderer!", Color = Color3.fromRGB( 255,0,0 ), Font = Enum.Font.Arial, FontSize = Enum.FontSize.Size24 } )
end
murdname = v.Name
murdsquare.BackgroundTransparency = 0
foundmurd = true
local x,y = get2d(game.Workspace.CurrentCamera, v.Character.HumanoidRootPart.Position)
local xx,yy = calcdistsize(game.Workspace.CurrentCamera.CFrame.Position, v.Character.HumanoidRootPart.Position, 70)
murdsquare.Size = UDim2.new(0, xx, 0, yy)
murdsquare.Position = UDim2.new(0, x, 0, y)
end
if v.Backpack:FindFirstChild("Gun") or v.Character:FindFirstChild("Gun") then
if sheriffname ~= v.Name then
game.StarterGui:SetCore( "ChatMakeSystemMessage", { Text = "[Glebux's MM2 Module] "..v.DisplayName.." is the sherif!", Color = Color3.fromRGB( 0,0,255 ), Font = Enum.Font.Arial, FontSize = Enum.FontSize.Size24 } )
end
sheriffname = v.Name
sheriffsquare.BackgroundTransparency = 0
foundsherrif = true
local x,y = get2d(game.Workspace.CurrentCamera, v.Character.HumanoidRootPart.Position)
local xx,yy = calcdistsize(game.Workspace.CurrentCamera.CFrame.Position, v.Character.HumanoidRootPart.Position, 70)
sheriffsquare.Size = UDim2.new(0, xx, 0, yy)
sheriffsquare.Position = UDim2.new(0, x, 0, y)
end
end
end
if not foundmurd then
murdsquare.BackgroundTransparency = 1
end
if not foundsherrif then
sheriffsquare.BackgroundTransparency = 1
end
end)
end
gameids[8][2] = function()
key = Enum.KeyCode.E
teamcheck = false
vischeck = false
local namecall
namecall = hookmetamethod(game, "__namecall", function(self, ...)
local method = getnamecallmethod()
local args = {...}
if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit then
if method == "Raycast" then
local res = namecall(self, localhrp.Position, magnitude * unit, args[3])
return {Distance = magnitude, Instance = hrp, Material = Enum.Material.Neon, Position = hrp.Position, Normal = res.Normal}
end
if method == "FindPartsInRegion3WithIgnoreList" then
local res = namecall(self, ...)
table.insert(res, hrp)
return res
end
end
return namecall(self, ...)
end)
local index
index = hookmetamethod(game, "__index", function(self, key)
if not checkcaller() and isenabled and hrp and localhrp and magnitude and unit then
if string.lower(key) == "hit" then
return hrp.Position
end
end
return index(self,key)
end)
end
for _, v in pairs(gameids) do
if isacs then
acs()
elseif v[1] == game.PlaceId then
v[2]()
end
end