forked from MirayXS/DarkHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProject_Lazarus
368 lines (337 loc) · 11.6 KB
/
Project_Lazarus
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
local Settings = {
Aimbot = false,
Silent = false,
Vis = false,
HeadShot = false,
FovUsed = false,
Fov = 100,
Boxes = false,
Walkspeed = 1,
Instakill = false,
InstaReload = false,
Recoil = false,
Wallbang = false,
Firerate = false,
InfAmmo = false,
Spread = false
}
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Camera = game:GetService("Workspace").CurrentCamera
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()
local Zombies = game:GetService("Workspace").Baddies
local Map = game:GetService("Workspace").Map
local Interact = game:GetService("Workspace").Interact
local Ignore = game:GetService("Workspace").Ignore
local SendData = game:GetService("ReplicatedStorage").ClientRemotes.SendData
local Metatable = getrawmetatable(game)
local Index = Metatable.__index
local Namecall = Metatable.__namecall
local Lib = loadstring(game:HttpGet("https://raw.githubusercontent.com/RandomAdamYT/DarkHub/master/NewUI"))()
local Window = Lib:Window()
local Main = Window:Tab('Main')
local Gun = Window:Tab('Gun')
local TargetPos = false
local Circle = Drawing.new("Circle")
Circle.Color = Color3.new(1, 1, 1)
Circle.Thickness = 1
Circle.Radius = Settings.Fov
Circle.Visible = Settings.FovUsed
Circle.NumSides = 1000
Circle.Filled = false
Circle.Transparency = 1
Main:Toggle('Aimbot', function(Bool)
Settings.Aimbot = Bool
end)
Main:Toggle('Silent Aim', function(Bool)
Settings.Silent = Bool
end)
Main:Toggle('Visable Check', function(Bool)
Settings.Vis = Bool
end)
Main:Toggle('Head Shots', function(Bool)
Settings.HeadShot = Bool
end)
Main:Toggle('Use Fov', function(Bool)
Settings.FovUsed = Bool
Circle.Visible = Bool
end)
Main:Slider('Fov', 1, 1000, function(Number)
Settings.Fov = Number
Circle.Radius = Number
end)
Main:Toggle('Box Esp', function(Bool)
Settings.Boxes = Bool
end)
Main:Slider('Walkspeed', 1, 20, function(Number)
Settings.Walkspeed = Number
for i, v in pairs(Player.Backpack:GetChildren()) do
if v.Name == "Weapon1" or v.Name == "Weapon2" or v.Name == "Weapon3" then
local Data = require(v)
Data.MoveSpeed = Number
Data.AimMoveSpeed = Number
end
end
end)
Main:Label("cum")
Gun:Toggle('Wallbang', function(Bool)
Settings.Wallbang = Bool
for i, v in pairs(Player.Backpack:GetChildren()) do
if v.Name == "Weapon1" or v.Name == "Weapon2" or v.Name == "Weapon3" then
local Data = require(v)
Data.BulletPenetration = 420
end
end
end)
Gun:Toggle('No Recoil', function(Bool)
Settings.Recoil = Bool
for i, v in pairs(Player.Backpack:GetChildren()) do
if v.Name == "Weapon1" or v.Name == "Weapon2" or v.Name == "Weapon3" then
local Data = require(v)
Data.GunKick = 0
Data.ViewKick.Pitch.Min = 0
Data.ViewKick.Pitch.Max = 0
Data.ViewKick.Yaw.Min = 0
Data.ViewKick.Yaw.Max = 0
end
end
end)
Gun:Toggle('No Spread', function(Bool)
Settings.Spread = Bool
for i, v in pairs(Player.Backpack:GetChildren()) do
if v.Name == "Weapon1" or v.Name == "Weapon2" or v.Name == "Weapon3" then
local Data = require(v)
Data.Spread.Min = 0
Data.Spread.Max = 0
end
end
end)
Gun:Toggle('Insta Kill', function(Bool)
Settings.Instakill = Bool
end)
Gun:Toggle('Insta Reload', function(Bool)
Settings.InstaReload = Bool
for i, v in pairs(Player.Backpack:GetChildren()) do
if v.Name == "Weapon1" or v.Name == "Weapon2" or v.Name == "Weapon3" then
local Data = require(v)
for o, b in pairs(Data.ReloadSequence) do
getfenv(b).wait = function(time)
if Settings.InstaReload then
return
else
return wait(time)
end
end
end
end
end
end)
Gun:Toggle('Inf Ammo', function(Bool)
Settings.InfAmmo = Bool
for i, v in pairs(Player.Backpack:GetChildren()) do
if v.Name == "Weapon1" or v.Name == "Weapon2" or v.Name == "Weapon3" then
local Data = require(v)
Data.MagSize = math.huge
Data.StoredAmmo = math.huge
Data.MaxAmmo = math.huge
end
end
end)
Gun:Toggle('Firerate', function(Bool)
Settings.Firerate = Bool
for i, v in pairs(Player.Backpack:GetChildren()) do
if v.Name == "Weapon1" or v.Name == "Weapon2" or v.Name == "Weapon3" then
local Data = require(v)
Data.Semi = false
Data.FireTime = 0
end
end
end)
function DrawSquare()
local Box = Drawing.new("Square")
Box.Color = Color3.fromRGB(190, 190, 0)
Box.Thickness = 0.5
Box.Filled = false
Box.Transparency = 1
return Box
end
function GetOffset(part, pos)
local FarPosition = Camera:WorldToViewportPoint(Vector3.new(part.Position.X, part.Position.Y + (part.Size.Y / 2), part.Position.Z))
return FarPosition.Y - pos.Y
end
function GetCorners(Char)
local TopY = math.huge
local BottomY = -math.huge
local RightX = -math.huge
local LeftX = math.huge
local Offsets
local Positions = {}
for i, v in next, Char:GetChildren() do
if v.ClassName == "Part" and v.Name ~= "HumanoidRootPart" then
local Position, OnScreen = Camera:WorldToViewportPoint(v.Position)
Positions[v.Name] = Position
Offsets = GetOffset(v, Position)
if OnScreen then
if Position.Y < TopY then
TopY = Position.Y
end
if Position.Y > BottomY then
BottomY = Position.Y
end
if Position.X < LeftX then
LeftX = Position.X
end
if Position.X > RightX then
RightX = Position.X
end
end
end
end
return {TopLeft = Vector2.new(LeftX + Offsets, TopY + Offsets), TopRight = Vector2.new(RightX - Offsets, TopY + Offsets), BottomLeft = Vector2.new(LeftX + Offsets, BottomY - Offsets), BottomRight = Vector2.new(RightX - Offsets, BottomY - Offsets), Positions = Positions}
end
function VisCheck(Pos)
local Parts = Camera:GetPartsObscuringTarget({Player.Character.Head.Position, Pos}, {Ignore, Zombies})
if #Parts == 0 then
return true
end
end
function GetClosest()
local Closest = nil
local Pos = nil
local Magnitude = math.huge
for i, v in next, Zombies:GetChildren() do
if Player.Character and Player.Character:FindFirstChild("Head") and v:FindFirstChild("Head") and v:FindFirstChild("Torso") then
if Settings.Vis and VisCheck(v.Head.Position) or not Settings.Vis then
local Position, Visible = Camera:WorldToViewportPoint(v.Head.Position)
if Visible then
local Mouse = Player:GetMouse()
local Distance = (Vector2.new(Mouse.X, Mouse.Y) - Vector2.new(Position.X, Position.Y)).Magnitude
if not Settings.FovUsed and Distance < Magnitude or Settings.FovUsed and Distance < Magnitude and Distance < Settings.Fov then
Closest = v
Magnitude = Distance
Pos = Position
end
end
end
end
end
return Closest, Pos
end
setreadonly(Metatable, false)
Metatable.__index = newcclosure(function(self, Property)
if Settings.Silent and TargetPos then
if self == Mouse and Property == "Hit" or tostring(self) == "AimPart" and Property == "CFrame" then
return CFrame.new(TargetPos)
end
end
return Index(self, Property)
end)
Metatable.__namecall = function(self, ...)
local Meth = getnamecallmethod()
local Args = {...}
if Settings.Instakill and Meth == "FireServer" and tostring(self) == "Damage" then
Args[1].Damage = 9999
return Namecall(self, unpack(Args))
end
if Settings.Wallbang and Meth == "FindPartOnRayWithIgnoreList" then
table.insert(Args[2], Map)
table.insert(Args[2], Interact)
return Namecall(self, unpack(Args))
end
if Meth == "FireServer" and self == SendData then -- anti cheat bypass btw
return
end
return Namecall(self, ...)
end
setreadonly(Metatable, true)
Player.Backpack.ChildAdded:Connect(function(Module)
if Module.Name == "Weapon1" or Module.Name == "Weapon2" or Module.Name == "Weapon3" then
local Data = require(Module)
if Settings.Walkspeed ~= 1 then
Data.MoveSpeed = Settings.Walkspeed
Data.AimMoveSpeed = Settings.Walkspeed
end
if Settings.InstaReload then
for o, b in pairs(Data.ReloadSequence) do
getfenv(b).wait = function(time)
if Settings.InstaReload then
return
else
return wait(time)
end
end
end
end
if Settings.Wallbang then
Data.BulletPenetration = 420
end
if Settings.Firerate then
Data.Semi = false
Data.FireTime = 0
end
if Settings.Recoil then
Data.GunKick = 0
Data.ViewKick.Pitch.Min = 0
Data.ViewKick.Pitch.Max = 0
Data.ViewKick.Yaw.Min = 0
Data.ViewKick.Yaw.Max = 0
end
if Settings.Spread then
Data.Spread.Min = 0
Data.Spread.Max = 0
end
if Settings.InfAmmo then
Data.MagSize = math.huge
Data.StoredAmmo = math.huge
Data.MaxAmmo = math.huge
end
if Settings.Firerate then
Data.Semi = false
Data.FireTime = 0
end
end
end)
function AddEsp(Zombie)
local Random = tostring(math.random(0, 9999999))
local Box = DrawSquare()
RunService:BindToRenderStep(Random, 1, function()
local Exist = Zombie:IsDescendantOf(Zombies)
if Exist and Zombie:FindFirstChild("HumanoidRootPart") then
local Corners = GetCorners(Zombie)
local Positions = Corners.Positions
local xDist = Corners.BottomRight.X - Corners.TopLeft.X
local yDist = Corners.BottomRight.Y - Corners.TopLeft.Y
local RootPosition, OnScreen = Camera:WorldToViewportPoint(Zombie.HumanoidRootPart.Position)
if Settings.Boxes then
Box.Visible = OnScreen
Box.Size = Vector2.new(xDist, yDist)
Box.Position = Corners.TopLeft
end
else
Box.Visible = false
Box:Remove()
RunService:UnbindFromRenderStep(Random)
end
end)
end
for i, v in pairs(Zombies:GetChildren()) do
AddEsp(v)
end
Zombies.ChildAdded:Connect(function(Zombie)
AddEsp(Zombie)
end)
RunService.RenderStepped:Connect(function()
local Mouse = UserInputService:GetMouseLocation()
Circle.Position = Vector2.new(Mouse.X, Mouse.Y)
end)
while wait() do
local Target, Pos = GetClosest()
local TargetP = Target and Settings.HeadShot and Target.Head.Position or Target and not Settings.HeadShot and Target.Torso.Position or false
TargetPos = Target and TargetP or false
if Settings.Aimbot and Target and UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
local Mouse = UserInputService:GetMouseLocation()
mousemoverel((Pos.X - Mouse.X) / 6, (Pos.Y - Mouse.Y) / 6)
end
end