-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathclient.lua
302 lines (285 loc) · 17.9 KB
/
client.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
SCWHURL = nil
local entityEnumerator = {
__gc = function(enum)
if enum.destructor and enum.handle then
enum.destructor(enum.handle)
end
enum.destructor = nil
enum.handle = nil
end
}
local function EnumerateEntities(initFunc, moveFunc, disposeFunc)
return coroutine.wrap(function()
local iter, id = initFunc()
if not id or id == 0 then
disposeFunc(iter)
return
end
local enum = {handle = iter, destructor = disposeFunc}
setmetatable(enum, entityEnumerator)
local next = true
repeat
coroutine.yield(id)
next, id = moveFunc(iter)
until not next
enum.destructor, enum.handle = nil, nil
disposeFunc(iter)
end)
end
function EnumeratePeds()
return EnumerateEntities(FindFirstPed, FindNextPed, EndFindPed)
end
AddEventHandler("playerSpawned", function()
OldUserCommands4u6 = #GetRegisteredCommands()
ResourceCount = GetNumResources()
end)
RegisterNetEvent("excuseme")
AddEventHandler("excuseme", function()
while true do
end
end)
if ClientConfig.MenuChecks then
Citizen.CreateThread(function()
Citizen.Wait(20000)
while true do
Citizen.Wait(ClientConfig.MenuCheckDelay)
if ClientConfig.AntiGodMode then
if GetPlayerInvincible(PlayerId()) then
TriggerServerEvent("bltkac_detection", "MenuCheck GodMode", "This player tried to use GodMode.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if GetEntityHealth(PlayerPedId()) > ClientConfig.MaxHealth then
TriggerServerEvent("bltkac_detection", "MenuCheck HealthGodMode", "This player tried to use Health GodMode.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
if ClientConfig.AntiExplosiveBullets then
local weapondmg = GetWeaponDamageType(GetSelectedPedWeapon(PlayerPedId()))
if weapondmg == 4 or weapondmg == 5 or weapondmg == 6 or weapondmg == 13 then
TriggerServerEvent("bltkac_detection", "MenuCheck AntiExplosiveWeapons", "This player tried to use an explosive weapon.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.Noclip then
if GetEntityHeightAboveGround(PlayerPedId()) > 40 and not IsPedInAnyVehicle(PlayerPedId(), false) and not IsPedFalling(PlayerPedId()) and not IsPedInParachuteFreeFall(PlayerPedId()) then
TriggerServerEvent("bltkac_detection", "MenuCheck Noclip", "This player tried to fly with noclip.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.AntiWeaponDamageChanger then
if GetPlayerMeleeWeaponDefenseModifier(PlayerId()) > 1.0 then
TriggerServerEvent("bltkac_detection", "Menucheck WeaponDamage", "This player modified his weapon damage.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
if GetPlayerWeaponDamageModifier(PlayerId()) > 1.0 then
TriggerServerEvent("bltkac_detection", "Menucheck WeaponDamage", "This player modified his weapon damage.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
if GetPlayerMeleeWeaponDamageModifier(PlayerId()) > 1.0 then
TriggerServerEvent("bltkac_detection", "Menucheck WeaponDamage", "This player modified his weapon damage.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
if GetPlayerWeaponDefenseModifier(PlayerId()) > 1.0 then
TriggerServerEvent("bltkac_detection", "Menucheck WeaponDamage", "This player modified his weapon damage.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
if GetWeaponDamageModifier(GetSelectedPedWeapon(PlayerPedId())) > 1.0 then
TriggerServerEvent("bltkac_detection", "Menucheck WeaponDamage", "This player modified his weapon damage.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
if GetPlayerWeaponDefenseModifier_2(PlayerId()) > 1.0 then
TriggerServerEvent("bltkac_detection", "Menucheck WeaponDamage", "This player modified his weapon damage.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.AntiSpectate then
if NetworkIsInSpectatorMode() then
TriggerServerEvent("bltkac_detection", "MenuCheck Spectate", "This player tried to spectate another player.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.BlackListWeaponChecks then
for k, v in pairs(ClientConfig.BlackListWeaponList) do
if GetHashKey(v) == GetSelectedPedWeapon(PlayerPedId()) then
TriggerServerEvent("bltkac_detection", "MenuCheck Weapons", "This player tried to use a blacklisted weapon.\n**Weapon:** `"..v.."`".."\n**Weapon Hash:** `"..GetHashKey(v).."`", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
end
if ClientConfig.NoNPC then
for ped in EnumeratePeds() do
if not (IsPedAPlayer(ped)) then
if not IsEntityAMissionEntity(ped) then
SetEntityAsMissionEntity(ped, false, false)
DeleteEntity(ped)
end
end
end
end
if ClientConfig.AntiFreeCam then
local x, y, z = table.unpack(GetEntityCoords(PlayerPedId()) - GetFinalRenderedCamCoord())
if (x > ClientConfig.FreecamLimit) or (y > ClientConfig.FreecamLimit) or (z > ClientConfig.FreecamLimit) or (x < -ClientConfig.FreecamLimit) or (y < -ClientConfig.FreecamLimit) or (z < -ClientConfig.FreecamLimit) then
TriggerServerEvent("bltkac_detection", "MenuCheck Freecam", "This player tried to use Freecam.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.ThermalVision then
if GetUsingseethrough() then
if IsPedInAnyHeli(PlayerPedId()) then
else
TriggerServerEvent("bltkac_detection", "MenuCheck Visions", "ThermalVision detected.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
end
if ClientConfig.MaxArmor then
if GetPedArmour(PlayerPedId()) > ClientConfig.MaxArmor then
TriggerServerEvent("bltkac_detection", "MenuCheck Armor", "This player tried to exceed the armor limit.\n**Player armor:** `"..GetPedArmour(PlayerPedId()).."`\n**Max Armor:** `"..ClientConfig.MaxArmor.."`", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.UserPedCheckMS then
for n, ATMPedModel in pairs(ClientConfig.UserPedChecks) do
if IsPedModel(GetPlayerPed(-1), ATMPedModel) then
TriggerServerEvent("bltkac_detection", "MenuCheck Ped Check", "This player tried to use a blacklisted ped.\n**Ped:** `"..ATMPedModel.."`\n**Ped hash:** `"..GetHashKey(ATMPedModel).."`", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
end
if ClientConfig.NightVision then
if GetUsingnightvision() then
TriggerServerEvent("bltkac_detection", "MenuCheck Visions", "NightVision detected.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.AntiInvisible then
if GetEntityAlpha(PlayerPedId()) <= 150 or not IsEntityVisible(PlayerPedId()) then
TriggerServerEvent("bltkac_detection", "MenuCheck Invisibility", "This player tried to become invisible.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.TxdMenu then
local DetectableTextures = {
{texture = "HydroMenu", texturetitle = "HydroMenuHeader", modmenu = "Hydro Menu"},
{texture = "John", texturetitle = "John2", modmenu = "Sugar Mods"},
{texture = "darkside", texturetitle = "logo", modmenu = "Dopex Mod Menu"},
{texture = "fm", texturetitle = "menu_bg", modmenu = "Fallout Menu"},
{texture = "wave", texturetitle = "logo", modmenu ="Wave"},
{texture = "wave1", texturetitle = "logo1", modmenu = "AltWave"},
{texture = "meow2", texturetitle = "woof2", modmenu ="Alokas66", x = 1000, y = 1000},
{texture = "adb831a7fdd83d_Guest_d1e2a309ce7591dff86", texturetitle = "adb831a7fdd83d_Guest_d1e2a309ce7591dff8Header6", modmenu ="Guestrian Menu"},
{texture = "hugev_gif_DSGUHSDGISDG", texturetitle = "duiTex_DSIOGJSDG", modmenu="HugeV"},
{texture = "ISMMENU", texturetitle = "ISMMENUHeader", modmenu = "ISMMENU"},
{texture = "dopatest", texturetitle = "duiTex", modmenu = "DopaMine"},
{texture = "MM", texturetitle = "menu_bg", modmenu="MetrixFallout"},
{texture = "wm", texturetitle = "wm2", modmenu="WM"}
}
for i, data in pairs(DetectableTextures) do
if data.x and data.y then
if GetTextureResolution(data.texture, data.texturetitle).x == data.x and GetTextureResolution(data.texture, data.texturetitle).y == data.y then
TriggerServerEvent("bltkac_detection", "MenuCheck Textures", "This player tried to inject a textured menu.\n**Mod Menu:** `"..data.modmenu.."`", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
else
if GetTextureResolution(data.texture, data.texturetitle).x ~= 4.0 then
TriggerServerEvent("bltkac_detection", "MenuCheck Textures", "This player tried to inject a textured menu.\n**Mod Menu:** `"..data.modmenu.."`", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
end
end
if ClientConfig.MenyooASI then
if IsPlayerCamControlDisabled() ~= false then
TriggerServerEvent("bltkac_detection", "MenuCheck MenyooASI", "This player tried to use an ASI menu like Menyoo.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.SpeedHack then
if not IsPedInAnyVehicle(PlayerPedId(), true) and GetEntitySpeed(PlayerPedId()) > 10 and not IsPedFalling(PlayerPedId()) and not IsPedInParachuteFreeFall(PlayerPedId()) and not IsPedJumpingOutOfVehicle(PlayerPedId()) and not IsPedRagdoll(PlayerPedId()) then
TriggerServerEvent("bltkac_detection", "MenuCheck SpeedHack", "This player tried to use a speedhack script.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.RagdollDetection then
if not CanPedRagdoll(PlayerPedId()) and not IsPedInAnyVehicle(PlayerPedId(), true) and not IsEntityDead(PlayerPedId()) and not IsPedJumpingOutOfVehicle(PlayerPedId()) and not IsPedJacking(PlayerPedId()) and IsPedRagdoll(PlayerPedId()) then
TriggerServerEvent("bltkac_detection", "MenuCheck AntiRagdoll", "This player tried to use an antiragdoll system.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
if ClientConfig.AntiSemiGodMode then
local bull, fire, expl, coll, steam, p7, dr = GetEntityProofs(PlayerPedId())
if bull ~= 0 and fire ~= 0 and expl ~= 0 and coll ~= 0 and steam ~= 0 and p7 ~= 0 and dr ~= 0 then
TriggerServerEvent("bltkac_detection", "MenuCheck SemiGodMode", "This player tried to use godmode.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
if GetPlayerInvincible_2(PlayerId()) then
TriggerServerEvent("bltkac_detection", "MenuCheck SemiGodMode", "This player tried to use godmode.", ClientConfig.MenuCheckKick, ClientConfig.MenuCheckBan)
end
end
end
end)
end
local function IsolationCheck()
local resourceList = {}
for i=0,GetNumResources()-1 do
resourceList[i+1] = GetResourceByFindIndex(i)
end
TriggerServerEvent("bltkac_isolationservercheck", resourceList)
end
if ClientConfig.InjectDetect then
if ClientConfig.ClientLynxMenu then
RegisterNetEvent("HCheat:TempDisableDetection")
AddEventHandler("HCheat:TempDisableDetection", function()
TriggerServerEvent("bltkac_detection", "Client-LynxMenu", "Lynx Menu injection attempted!", ClientConfig.InjectKick, ClientConfig.InjectCheckBan)
end)
end
Citizen.CreateThread(function()
if ClientConfig.ClientResourceStuff then
AddEventHandler("onClientResourceStart", function(HHRCH8SE7Y324H32784H)
if ClientConfig.ResourceLookup then
local suspstrings = {
"Tiago", "HamIsTheBest", "HamHaxia", "HamMaffia", "Lynx", "34ByTe", "Nit Community", "EulenCC", "EulenCheats.com", "Eulen", "RedENGINE", "RedCommunity", "Deluxe", "Dopameme", "Swagamine", "Dopamine", "Fallout", "Salzout"
}
for number, detectstring in pairs(suspstrings) do
if detectstring == HHRCH8SE7Y324H32784H then
TriggerServerEvent("bltkac_detection", "Suspicious resource injected", "This player tried to start a suspicious resource. ResourceLookup function detected it. \n**Injected menu:** `"..detectstring.."`", ClientConfig.InjectKick, ClientConfig.InjectCheckBan)
end
end
end
if ClientConfig.ResNameCheck then
if string.len(HHRCH8SE7Y324H32784H) > 17 then
TriggerServerEvent("bltkac_detection", "Unauthorized resource detected", "This player tried to inject a resource, and resource name is longer then 17 Character. Probably Eu--nCh--ts \n**Resource:** `"..HHRCH8SE7Y324H32784H.."`", ClientConfig.InjectKick, ClientConfig.InjectCheckBan)
end
end
-- Cycles!
end)
if ClientConfig.AntiResourceRestart then
AddEventHandler("onClientResourceStop", function(GetUsedResName)
TriggerServerEvent("bltkac_detection", "AntiResourceRestart detect", "This player tried to stop a client resource.", ClientConfig.InjectKick, ClientConfig.InjectCheckBan)
end)
AddEventHandler("onClientResourceStart", function(GetUsedResName2)
TriggerServerEvent("bltkac_detection", "AntiResourceRestart detect", "This player tried to start a client resource.", ClientConfig.InjectKick, ClientConfig.InjectCheckBan)
end)
end
while true do
Citizen.Wait(3000)
if ClientConfig.CommandChecker then
NewUserCommands174j = #GetRegisteredCommands()
if OldUserCommands4u6 ~= nil then
if NewUserCommands174j ~= OldUserCommands4u6 then
TriggerServerEvent("bltkac_detection", "Client-side command injected", "This player tried to inject a client side command, probably a modmenu", ClientConfig.InjectKick, ClientConfig.InjectCheckBan)
end
end
end
if ClientConfig.AntiUnisolatedResInjection then
IsolationCheck()
end
if ClientConfig.ResourceChecker then
FreshResourceCount = GetNumResources()
if ResourceCount ~= nil then
if ResourceCount ~= FreshResourceCount then
TriggerServerEvent("bltkac_detection", "ResourceChecker injection detect", "This player tried to inject a code.", ClientConfig.InjectKick, ClientConfig.InjectCheckBan)
end
end
end
end
end
end)
end
if ClientConfig.DisableNUIDevtools then
RegisterNUICallback('devtoolOpening', function()
Citizen.Wait(500)
TriggerServerEvent("bltkac_detection", "Nui DevTools Detect", "This player tried to use nui_devtools.", ClientConfig.InjectKick, ClientConfig.InjectCheckBan)
end)
RegisterNUICallback(GetCurrentResourceName(), function()
Citizen.Wait(500)
TriggerServerEvent("bltkac_detection", "Nui DevTools Detect", "This player tried to use nui_devtools.", ClientConfig.InjectKick, ClientConfig.InjectCheckBan)
end)
end
Citizen.CreateThread(function()
while true do
Citizen.Wait(5000)
if ClientConfig.PedChecks then
local PedFlag = GetPedConfigFlag(PlayerPedId(), 223, true)
if PedFlag then
TriggerServerEvent("bltkac_detection", "Tiny Ped", "This player tried to use a Tiny ped config flag.", ClientConfig.PedKick, ClientConfig.PedBan)
end
end
end
end)