[go: up one dir, main page]

0% found this document useful (0 votes)
9 views2 pages

Message (1) 2

Uploaded by

kiszony09plplus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Message (1) 2

Uploaded by

kiszony09plplus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

local HttpService = game:GetService("HttpService")

local Players = game:GetService("Players")

local webhookURL = "https://discord.com/api/webhooks/XXX/YYY" -- Wstaw swój


webhook

local whitelistedUserIds = {
-- Tutaj wpisz UserId, którzy mają immunitet, np.
-- 12345678,
}

local function IsWhitelisted(player)


return table.find(whitelistedUserIds, player.UserId) ~= nil
end

local function SendDiscordLog(msg)


local data = { content = msg }
local jsonData = HttpService:JSONEncode(data)

local success, err = pcall(function()


HttpService:PostAsync(webhookURL, jsonData,
Enum.HttpContentType.ApplicationJson)
end)

if not success then


warn("Błąd webhooka Discorda: " .. tostring(err))
end
end

local function BanPlayer(player)


local reason = "Próba cheatowania na grze"
if IsWhitelisted(player) then return end

player:Kick("Zostałeś zbanowany z gry: " .. reason)


print(player.Name .. " został zbanowany za: " .. reason)
SendDiscordLog("🚫 **BANNED:** " .. player.Name .. " | Powód: " .. reason)
end

local suspiciousObjects = {
"FakeScript",
"Injector",
"ExploitModule",
"RemoteSpy",
"SpeedHackModule",
}

local function DetectExploitAttach(player)


if not player.Character then return end
for _, name in ipairs(suspiciousObjects) do
if player.Character:FindFirstChild(name) then
BanPlayer(player)
return true
end
end
return false
end

local function MonitorMovement(player)


if not player.Character then return end
local hrp = player.Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end

local lastPos = hrp.Position


local lastTime = tick()

while player.Character and hrp.Parent do


task.wait(1)
local newPos = hrp.Position
local newTime = tick()
local dist = (newPos - lastPos).Magnitude
local deltaTime = newTime - lastTime
local speed = dist / deltaTime

if dist > 150 then


BanPlayer(player)
return
end

if speed > 120 then


BanPlayer(player)
return
end

lastPos = newPos
lastTime = newTime
end
end

local function MonitorHealth(player)


if not player.Character then return end
local humanoid = player.Character:FindFirstChild("Humanoid")
if not humanoid then return end

local maxHealth = humanoid.MaxHealth

humanoid.HealthChanged:Connect(function(hp)
if hp > maxHealth + 10 then
BanPlayer(player)
end
end)
end

Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
task.wait(1)

if DetectExploitAttach(player) then return end


MonitorMovement(player)
MonitorHealth(player)
end)
end)

You might also like