-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
MURDER MYSTERY 2.luau
823 lines (768 loc) · 25.9 KB
/
MURDER MYSTERY 2.luau
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
--<>----<>----<>----<>----<>----<>----<>--
repeat wait() until game:IsLoaded() wait()
game:GetService("Players").LocalPlayer.Idled:connect(function()
game:GetService("VirtualUser"):ClickButton2(Vector2.new());
end);
--<>----<>----<>----<>----<>----<>----<>--
local Library = loadstring(game:HttpGetAsync("https://raw.githubusercontent.com/Drifter0507/Shamrock/main/MainLibrary", true))();
--<>----<>----<>----<>----<>----<>----<>--
pcall(function()
for i, v in pairs(getconnections(game:GetService("ScriptContext").Error)) do
v:Disable();
end;
end);
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
local Workspace = game:GetService('Workspace');
local ReplicatedStorage = game:GetService('ReplicatedStorage');
local Players = game:GetService('Players');
local Client = Players.LocalPlayer;
local RunService = game:GetService('RunService');
local Workspace = game:GetService("Workspace");
local Lighting = game:GetService("Lighting");
local UIS = game:GetService("UserInputService");
local Teams = game:GetService("Teams");
local ScriptContext = game:GetService("ScriptContext");
local CoreGui = game:GetService("CoreGui");
local Camera = Workspace.CurrentCamera;
local Mouse = Client:GetMouse();
local Terrain = Workspace.Terrain;
local VirtualUser = game:GetService("VirtualUser");
--<>----<>----<>----<>----<>----<>----<>--
local Modules = ReplicatedStorage.Modules;
local EmoteModule = Modules.EmoteModule;
local Emotes = Client.PlayerGui.MainGUI.Game:FindFirstChild("Emotes");
local EmoteList = {"headless","zombie","zen","ninja","floss","dab"};
local CanGrab
CanGrab = false;
local Origins = {{2,0,0},{-2,0,0},{0,2,0},{0,-2,0},{0,0,1},{0,0,-1}};
local GunHighlight = Instance.new("Highlight");
local GunHandleAdornment = Instance.new("SphereHandleAdornment");
GunHighlight.FillColor = Color3.fromRGB(248, 241, 174);
GunHighlight.Adornee = Workspace:FindFirstChild("GunDrop");
GunHighlight.OutlineTransparency = 1;
GunHighlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop;
GunHighlight.RobloxLocked = true;
GunHandleAdornment.Color3 = Color3.fromRGB(248, 241, 174);
GunHandleAdornment.Transparency = 0.2;
GunHandleAdornment.Adornee = Workspace:FindFirstChild("GunDrop");
GunHandleAdornment.AlwaysOnTop = true;
GunHandleAdornment.AdornCullingMode = Enum.AdornCullingMode.Never;
GunHandleAdornment.RobloxLocked = true;
GunHighlight.Parent = CoreGui;
GunHandleAdornment.Parent = CoreGui;
local TeleportDict = {
["Lobby"] = Vector3.new(-121.12338256836, 138.27394104004, 38.946128845215),
["Map"] = Vector3.new(-107.90824127197266, 138.34988403320312, -10.622464179992676),
};
local TeleportTable = {}
for i, v in pairs(TeleportDict) do
table.insert(TeleportTable,i);
end;
local Murderer, Sheriff = nil, nil;
function GetMurderer()
for i,v in pairs(Players:GetChildren()) do
if v.Backpack:FindFirstChild("Knife") or v.Character:FindFirstChild("Knife") and v.Name == "Tool" then
return v.Name;
end;
end;
return nil;
end;
function GetSheriff()
for i,v in pairs(Players:GetChildren()) do
if v.Backpack:FindFirstChild("Gun") or v.Character:FindFirstChild("Gun") and v.Name == "Tool" then
return v.Name;
end;
return nil;
end;
end;
--<>----<>----<>----<>----<>----<>----<>--
local Character = nil;
local RootPart = nil;
local Humanoid = nil;
getgenv().WS = 16
getgenv().JP = 50
function SetCharVars()
Character = Client.Character;
Humanoid = Character:FindFirstChild("Humanoid") or Character:WaitForChild("Humanoid");
RootPart = Character:FindFirstChild("HumanoidRootPart") or Character:WaitForChild("HumanoidRootPart");
if getgenv().Speed then
Humanoid.WalkSpeed = getgenv().WS;
end;
Humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
if getgenv().Speed then
Humanoid.WalkSpeed = getgenv().WS;
end;
end);
if getgenv().Jump then
Humanoid.WalkSpeed = getgenv().JP;
end;
Humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
if getgenv().Jump then
Humanoid.WalkSpeed = getgenv().JP;
end;
end);
end;
SetCharVars();
Client.CharacterAdded:Connect(SetCharVars);
local Ws;
Ws = hookmetamethod(game, "__index", function(self, Value)
if tostring(self) == "Humanoid" and tostring(Value) == "WalkSpeed" then
return 16;
end;
return Ws(self, Value);
end);
local Jp;
Jp = hookmetamethod(game, "__index", function(self, Value)
if tostring(self) == "Humanoid" and tostring(Value) == "WalkSpeed" then
return 16;
end;
return Jp(self, Value);
end);
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
local Window = Library:CreateWindow({Title = "Murder Mystery 2"});
local Tab1 = Window:CreateTab({Title = "Main", ScrollBar = false});
local Tab2 = Window:CreateTab({Title = "Economy", ScrollBar = false});
local Tab3 = Window:CreateTab({Title = "Roles", ScrollBar = false});
--<>----<>----<>----<>----<>----<>----<>--
local ClientSection = Tab1:CreateSection({
Title = "Client"
});
--<>----<>----<>----<>----<>----<>----<>--
local WorldSection = Tab1:CreateSection({
Title = "World"
});
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
local AutofarmSection = Tab2:CreateSection({
Title = "Autofarm"
});
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
local MurderSection = Tab3:CreateSection({
Title = "Murderer"
});
--<>----<>----<>----<>----<>----<>----<>--
local SheriffSection = Tab3:CreateSection({
Title = "Sheriff"
});
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
ClientSection:CreateToggle({
Title = "CTRL click tp",
Default = false,
Callback = function(state)
getgenv().ClickTP = state;
end;
});
Mouse.Button1Down:connect(function()
if not game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then return end;
if not Mouse.Target then return end;
if not getgenv().ClickTP then return end;
Character:MoveTo(Mouse.Hit.p);
end)
--<>----<>----<>----<>----<>----<>----<>--
ClientSection:CreateSlider({
Title = "WalkSpeed",
Min = 16,
Max = 200,
Default = 16,
Callback = function(val)
getgenv().WS = tonumber(val)--tonumber(val / 10) or 0;
Humanoid.WalkSpeed = val;
end
});
--<>----<>----<>----<>----<>----<>----<>--
ClientSection:CreateSlider({
Title = "JumpPower",
Min = 50,
Max = 200,
Default = 50,
Callback = function(val)
getgenv().JP = tonumber(val)--tonumber(val / 10) or 0;
Humanoid.JumpPower = val;
end
});
--<>----<>----<>----<>----<>----<>----<>--
local c;
local h;
local bv;
local bav;
local cam;
local flying;
local p = Client;
local buttons = {W = false, S = false, A = false, D = false, Moving = false};
local StartFly = function ()
if not Client.Character or not Character.Head or flying then return end;
c = Character;
h = Humanoid;
h.PlatformStand = true;
cam = workspace:WaitForChild('Camera');
bv = Instance.new("BodyVelocity");
bav = Instance.new("BodyAngularVelocity");
bv.Velocity, bv.MaxForce, bv.P = Vector3.new(0, 0, 0), Vector3.new(10000, 10000, 10000), 1000;
bav.AngularVelocity, bav.MaxTorque, bav.P = Vector3.new(0, 0, 0), Vector3.new(10000, 10000, 10000), 1000;
bv.Parent = c.Head;
bav.Parent = c.Head;
flying = true;
h.Died:connect(function() flying = false end);
end;
local EndFly = function ()
if not p.Character or not flying then return end
h.PlatformStand = false;
bv:Destroy();
bav:Destroy();
flying = false;
end;
game:GetService("UserInputService").InputBegan:connect(function (input, GPE)
if GPE then return end;
for i, e in pairs(buttons) do
if i ~= "Moving" and input.KeyCode == Enum.KeyCode[i] then
buttons[i] = true;
buttons.Moving = true;
end;
end;
end);
game:GetService("UserInputService").InputEnded:connect(function (input, GPE)
if GPE then return end;
local a = false;
for i, e in pairs(buttons) do
if i ~= "Moving" then
if input.KeyCode == Enum.KeyCode[i] then
buttons[i] = false;
end;
if buttons[i] then a = true end;
end;
end;
buttons.Moving = a;
end);
local setVec = function (vec)
return vec * ((getgenv().FlySpeed or 50) / vec.Magnitude);
end;
game:GetService("RunService").Heartbeat:connect(function (step) -- The actual fly function, called every frame
if flying and c and c.PrimaryPart then
local p = c.PrimaryPart.Position;
local cf = cam.CFrame;
local ax, ay, az = cf:toEulerAnglesXYZ();
c:SetPrimaryPartCFrame(CFrame.new(p.x, p.y, p.z) * CFrame.Angles(ax, ay, az));
if buttons.Moving then
local t = Vector3.new();
if buttons.W then t = t + (setVec(cf.lookVector)) end;
if buttons.S then t = t - (setVec(cf.lookVector)) end;
if buttons.A then t = t - (setVec(cf.rightVector)) end;
if buttons.D then t = t + (setVec(cf.rightVector)) end;
c:TranslateBy(t * step);
end;
end;
end);
ClientSection:CreateToggle({
Title = "Fly",
Default = false,
Callback = function(state)
getgenv().Flying = state;
if getgenv().Flying then
StartFly();
else
EndFly();
end;
end
});
ClientSection:CreateSlider({
Title = "Fly speed",
Min = 20,
Max = 150,
Default = 50,
Callback = function(val)
getgenv().FlySpeed = tonumber(val) or 50;
end
});
--<>----<>----<>----<>----<>----<>----<>--
ClientSection:CreateButton({
Title = "Btools",
Callback = function()
if not Client.Backpack:FindFirstChildOfClass("HopperBun") then
local tool1 = Instance.new("HopperBin",Client.Backpack);
local tool2 = Instance.new("HopperBin",Client.Backpack);
local tool3 = Instance.new("HopperBin",Client.Backpack);
local tool4 = Instance.new("HopperBin",Client.Backpack);
local tool5 = Instance.new("HopperBin",Client.Backpack);
tool1.BinType = "Clone";
tool2.BinType = "GameTool";
tool3.BinType = "Hammer";
tool4.BinType = "Script";
tool5.BinType = "Grab";
end
end
})
--<>----<>----<>----<>----<>----<>----<>--
local accessories = {}
function GodMode()
if game.Players.LocalPlayer.Character then
if game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
for _, accessory in pairs(game.Players.LocalPlayer.Character.Humanoid:GetAccessories()) do
table.insert(accessories, accessory:Clone())
end
game.Players.LocalPlayer.Character.Humanoid.Name = "boop"
end
local v = game.Players.LocalPlayer.Character["boop"]:Clone()
v.Parent = game.Players.LocalPlayer.Character
v.Name = "Humanoid"
wait(0.1)
game.Players.LocalPlayer.Character["boop"]:Destroy()
workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
for _, accessory in pairs(accessories) do
game.Players.LocalPlayer.Character.Humanoid:AddAccessory(accessory)
end
game.Players.LocalPlayer.Character.Animate.Disabled = true
wait(0.1)
game.Players.LocalPlayer.Character.Animate.Disabled = false
end
end
ClientSection:CreateButton({
Title = "Godmode",
Callback = function()
GodMode()
end
})
ClientSection:CreateButton({
Title = "Force respawn",
Callback = function(state)
Character.Head:Remove();
Humanoid.BreakJointsOnDeath = false;
Humanoid.Health = 0;
end;
});
--<>----<>----<>----<>----<>----<>----<>--
ClientSection:CreateButton({
Title = "Get all emotes",
Callback = function()
require(EmoteModule).GeneratePage(EmoteList,Emotes,'Free Emotes');
end
})
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
local folder = Instance.new("Folder",CoreGui);
folder.Name = "ESP Holder";
local function AddBillboard(player)
local billboard = Instance.new("BillboardGui",folder);
billboard.Name = player.Name;
billboard.AlwaysOnTop = true;
billboard.Size = UDim2.fromOffset(200,50);
billboard.ExtentsOffset = Vector3.new(0,3,0);
billboard.Enabled = false
local textLabel = Instance.new("TextLabel",billboard);
textLabel.TextSize = 20;
textLabel.Text = player.Name;
textLabel.Font = Enum.Font.SourceSans;
textLabel.BackgroundTransparency = 1;
textLabel.Size = UDim2.fromScale(1,1);
if getgenv().AllEsp then
billboard.Enabled = true
end
repeat
wait()
pcall(function()
billboard.Adornee = player.Character.Head;
if player.Character:FindFirstChild("Knife") or player.Backpack:FindFirstChild("Knife") then
textLabel.TextColor3 = Color3.new(1,0,0);
if not billboard.Enabled and getgenv().MurderEsp then
billboard.Enabled = true
end
elseif player.Character:FindFirstChild("Gun") or player.Backpack:FindFirstChild("Gun") then
textLabel.TextColor3 = Color3.new(0,0,1);
if not billboard.Enabled and getgenv().SheriffEsp then
billboard.Enabled = true
end
else
textLabel.TextColor3 = Color3.new(0,1,0);
end;
end);
until not player.Parent;
end;
for _,player in pairs(Players:GetPlayers()) do
if player ~= Client then
coroutine.wrap(AddBillboard)(player);
end;
end;
Players.PlayerAdded:Connect(AddBillboard);
Players.PlayerRemoving:Connect(function(player)
folder[player.Name]:Destroy();
end);
WorldSection:CreateToggle({
Title = "Player ESP",
Default = false,
Callback = function(state)
getgenv().AllEsp = state;
for i, v in pairs(folder:GetChildren()) do
if v:IsA("BillboardGui") and Players[tostring(v.Name)] then
if getgenv().AllEsp then
v.Enabled = true;
else
v.Enabled = false;
end;
end;
end;
end
});
WorldSection:CreateToggle({
Title = "Murderer ESP",
Default = false,
Callback = function(state)
getgenv().MurderEsp = state;
while getgenv().MurderEsp do
wait()
pcall(function()
for i, v in pairs(folder:GetChildren()) do
if v:IsA("BillboardGui") and Players[tostring(v.Name)] then
if Players[tostring(v.Name)].Character:FindFirstChild("Knife") or Players[tostring(v.Name)].Backpack:FindFirstChild("Knife") then
if getgenv().MurderEsp then
v.Enabled = true;
else
v.Enabled = false;
end;
end
end;
end;
end);
end;
end
});
WorldSection:CreateToggle({
Title = "Sheriff ESP",
Default = false,
Callback = function(state)
getgenv().SheriffEsp = state;
while getgenv().SheriffEsp do
wait()
pcall(function()
for i, v in pairs(folder:GetChildren()) do
if v:IsA("BillboardGui") and Players[tostring(v.Name)] then
if Players[tostring(v.Name)].Character:FindFirstChild("Gun") or Players[tostring(v.Name)].Backpack:FindFirstChild("Gun") then
if getgenv().SheriffEsp then
v.Enabled = true;
else
v.Enabled = false;
end;
end
end;
end;
end);
end;
end
});
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
SheriffSection:CreateToggle({
Title = "Gun ESP",
Default = false,
Order = 50,
Callback = function(state)
getgenv().GunESP = state;
end
});
coroutine.wrap(function()
RunService.RenderStepped:Connect(function()
pcall(function()
if getgenv().GunESP then
local gundrop = Workspace:FindFirstChild("GunDrop");
GunHighlight.Adornee = gundrop;
GunHandleAdornment.Adornee = gundrop;
if gundrop then
GunHandleAdornment.Size = gundrop.Size + Vector3.new(0.05, 0.05, 0.05) ;
end;
GunHighlight.Enabled = getgenv().GunESP;
GunHandleAdornment.Visible = getgenv().GunESP;
end;
end);
end);
end)();
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
function XrayOn(obj)
for _,v in pairs(obj:GetChildren()) do
if (v:IsA("BasePart")) and not v.Parent:FindFirstChild("Humanoid") then
v.LocalTransparencyModifier = 0.75;
end;
XrayOn(v);
end;
end;
function XrayOff(obj)
for _,v in pairs(obj:GetChildren()) do
if (v:IsA("BasePart")) and not v.Parent:FindFirstChild("Humanoid") then
v.LocalTransparencyModifier = 0;
end ;
XrayOff(v);
end;
end;
WorldSection:CreateToggle({
Title = "Xray",
Default = false,
Callback = function(state)
getgenv().Xray = state;
if getgenv().Xray then
XrayOn(Workspace);
else
XrayOff(Workspace);
end;
end
});
--<>----<>----<>----<>----<>----<>----<>--
WorldSection:CreateButton({
Title = "Unlock workspace",
Callback = function()
function unlock(obj)
for i,v in pairs(obj:GetChildren()) do
if v:IsA("BasePart") then
v.Locked = false;
end;
unlock(v);
end;
end;
unlock(workspace);
end
})
--<>----<>----<>----<>----<>----<>----<>--
WorldSection:CreateDropdown({
Text = "Teleports",
Array = TeleportTable,
Callback = function(val)
if val == "Map" then
for _,child in pairs(Workspace:GetDescendants()) do
if child:IsA("BasePart") and child.Name == "Coin_Server" then
RootPart.CFrame = CFrame.new(child.Parent.Parent.Map:FindFirstChild("Part").Position);
end;
end;
else
pcall(function()
RootPart.CFrame = CFrame.new(TeleportDict[val]);
end)
end;
end
})
--<>----<>----<>----<>----<>----<>----<>--
AutofarmSection:CreateToggle({
Title = "Autofarm",
Default = false,
Callback = function(state)
getgenv().Autofarm = state;
if not getgenv().AutofarmMethod then return end;
if getgenv().AutofarmMethod == "Coins" then
while getgenv().Autofarm do
task.wait();
local CoinContainer = Workspace:FindFirstChild("CoinContainer", true);
if CoinContainer and Client.PlayerGui.MainGUI.Game.CashBag.Visible == true then
local coin = CoinContainer:FindFirstChild("Coin_Server");
if coin then
repeat
RootPart.CFrame = CFrame.new(coin.Position - Vector3.new(0, 2.5, 0)) * CFrame.Angles(0, 0, math.rad(180));
RunService.Stepped:Wait();
if not getgenv().Autofarm then break end;
until not coin:IsDescendantOf(Workspace) or coin.Name ~= "Coin_Server";
task.wait(1.8);
end;
else
task.wait(1.5);
end;
end;
else
while getgenv().Autofarm do
wait();
if Client.PlayerGui.MainGUI.Game.CashBag.Visible == true then
RootPart.CFrame = CFrame.new(-121.12338256836, 138.27394104004, 38.946128845215);
end;
end;
end;
end
});
AutofarmSection:CreateDropdown({
Text = "Autofarm method",
Array = {"XP","Coins"},
Callback = function(val)
getgenv().AutofarmMethod = val;
end,
});
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
getgenv().SheriffAim = false;
SheriffSection:CreateToggle({
Title = "Silent aim",
Default = false,
Callback = function(state)
getgenv().SheriffAim = state;
print(getgenv().SheriffAim);
end
});
getgenv().GunAccuracy = 25;
SheriffSection:CreateSlider({
Title = "Accuracy",
Min = 0,
Max = 100,
Default = 25,
Callback = function(val)
getgenv().GunAccuracy = tonumber(val) or 25;
end
});
--<>----<>----<>----<>----<>----<>----<>--
local GunLabel = SheriffSection:CreateLabel({
Title = "Gun Not Dropped",
});
coroutine.wrap(function()
while wait(1) do
if Workspace:FindFirstChild("GunDrop") then
SheriffSection:updateLabel(GunLabel,"Gun Dropped",Color3.fromRGB(0,170,126));
else
SheriffSection:updateLabel(GunLabel,"Gun Not Dropped",Color3.fromRGB(254, 86, 86));
end;
end;
end)();
--<>----<>----<>----<>----<>----<>----<>--
local lastCFrame;
SheriffSection:CreateKeybind({
Title = "Get gun",
Default = "Y",
Callback = function()
if not CanGrab then return end
local gundrop = Workspace:FindFirstChild("GunDrop");
if gundrop and not lastCFrame then
lastCFrame = RootPart.CFrame;
pcall(function()
repeat
RootPart.CFrame = gundrop.CFrame;
RunService.Stepped:Wait();
until not gundrop:IsDescendantOf(Workspace);
RootPart.CFrame = lastCFrame;
lastCFrame = false;
end);
end;
end
})
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
getgenv().KnifeRange = 25;
MurderSection:CreateToggle({
Title = "Kill aura",
Default = false,
Callback = function(state)
getgenv().KnifeAura = state;
end
});
MurderSection:CreateSlider({
Title = "Knife Range",
Min = 5,
Max = 250,
Default = 25,
Callback = function(val)
getgenv().KnifeRange = tonumber(val) or 25;
end
});
local lastAttack = tick();
RunService.Heartbeat:Connect(function()
if (tick() - lastAttack) < 0.1 then
return;
end;
pcall(function()
local Knife = Client.Backpack:FindFirstChild("Knife") or Client.Character:FindFirstChild("Knife");
if Knife and Knife:IsA("Tool") then
for i, v in ipairs(Players:GetPlayers()) do
if v ~= Client and v.Character ~= nil and not table.find(getgenv().Whitelisted,v.Name) then
local EnemyRoot = v.Character.HumanoidRootPart;
local EnemyPosition = EnemyRoot.Position;
local Distance = (EnemyPosition - RootPart.Position).Magnitude;
if (Distance <= getgenv().KnifeRange) then
VirtualUser:ClickButton1(Vector2.new());
firetouchinterest(EnemyRoot, Knife.Handle, 1);
firetouchinterest(EnemyRoot, Knife.Handle, 0);
lastAttack = tick();
end;
end;
end;
end;
end);
end);
local GameOver = nil;
local Blocked = nil;
MurderSection:CreateKeybind({
Text = "Kill all",
Default = "K",
Callback = function()
pcall(function()
local Knife = Client.Backpack:FindFirstChild("Knife") or Client.Character:FindFirstChild("Knife");
if Knife.Parent.Name == "Backpack" then
Humanoid:EquipTool(Knife);
end;
if Knife then
if Knife:IsA("Tool") then
for i, v in ipairs(Players:GetPlayers()) do
if v ~= Client and v.Character ~= nil and not table.find(getgenv().Whitelisted,v.Name) then
local EnemyRoot = v.Character.HumanoidRootPart;
local EnemyPosition = EnemyRoot.Position;
VirtualUser:ClickButton1(Vector2.new());
firetouchinterest(EnemyRoot, Knife.Handle, 1);
firetouchinterest(EnemyRoot, Knife.Handle, 0);
lastAttack = tick();
end;
end;
end;
end;
end);
end
});
MurderSection:CreateButton({
Title = "Print whitelisted",
Callback = function()
print("----------WHITELISTED----------");
for _,v in pairs(getgenv().Whitelisted) do
print(v);
end;
print("-------------------------------");
end
});
coroutine.wrap(function()
repeat wait()
pcall(function()
Murderer = GetMurderer();
Sheriff = GetSheriff();
end);
until Murderer and Sheriff;
end)();
--<>----<>----<>----<>----<>----<>----<>--
--<>----<>----<>----<>----<>----<>----<>--
ReplicatedStorage.UpdatePlayerData.OnClientEvent:Connect(function()
CanGrab = false;
end);
local GunHook
GunHook = hookmetamethod(game, "__namecall", function(self, ...)
local method = getnamecallmethod()
local args = { ... }
if not checkcaller() then
if typeof(self) == "Instance" then
if self.Name == "ShootGun" and method == "InvokeServer" then
if getgenv().SheriffAim and getgenv().GunAccuracy then
if Murderer then
local Root = Players[tostring(Murderer)].Character.PrimaryPart;
local Veloc = Root.AssemblyLinearVelocity;
local Pos = Root.Position + (Veloc * Vector3.new(getgenv().GunAccuracy / 200, 0, getgenv().GunAccuracy/ 200));
args[2] = Pos;
end;
end;
end;
end;
end;
return GunHook(self, unpack(args));
end);
local __namecall
__namecall = hookmetamethod(game, "__namecall", function(self, ...)
local method = getnamecallmethod();
local args = { ... };
if not checkcaller() then
if tostring(method) == "InvokeServer" and tostring(self) == "GetChance" then
wait(13);
Murderer = GetMurderer();
Sheriff = GetSheriff();
CanGrab = true;
end;
end;
return __namecall(self, unpack(args));
end);