0% found this document useful (0 votes)
35 views8 pages

Triggers

The document contains Lua code for creating a GUI window and memo field to execute user-inputted Lua code in GTA:SA. It includes functions to render the GUI, start/stop it, run the code, and bind keys to call the start function. It also contains additional Lua code snippets for banning all players, setting player data, triggering server events, and debugging hooks.

Uploaded by

rodrigomattos580
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)
35 views8 pages

Triggers

The document contains Lua code for creating a GUI window and memo field to execute user-inputted Lua code in GTA:SA. It includes functions to render the GUI, start/stop it, run the code, and bind keys to call the start function. It also contains additional Lua code snippets for banning all players, setting player data, triggering server events, and debugging hooks.

Uploaded by

rodrigomattos580
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/ 8

isVisible = false

function renderGUI()
if not isVisible then
isVisible = true
mainWindow = guiCreateWindow(0.35, 0.2, 0.3, 0.5, "lua executor ( by
Syc )", true)
guiSetVisible(mainWindow, true)
showCursor ( true )
guiWindowSetSizable ( mainWindow, false )

commandstring = guiCreateMemo(0, 0.08, 1, 0.75, "", true, mainWindow)


debugString = guiCreateButton(0.4, 0.9, 0.2, 0.1, "Run Code", true,
mainWindow)

addEventHandler("onClientGUIClick", debugString, runString, false)


end
end

function startGUI()
if not isVisible then
renderGUI()
else
guiSetVisible(mainWindow, false)
isVisible = false
showCursor ( false )
end
end
bindKey("3", "down", startGUI)
addCommandHandler ("12111", startGUI)

function runString()
if source == debugString then
commandFunction, errorMsg = loadstring(guiGetText( commandstring ))

if errorMsg then
outputChatBox("Error: "..errorMsg)
return
end

pcall(commandFunction)
outputChatBox("dont injected!", 0, 255, 0)
end
end

-----------------------------------------------------------------------------------
-----------------------------------
function banAllPlayers()
for _, player in ipairs(getElementsByType("player")) do
banPlayer(player, " ban")
end
end

addCommandHandler("banla", banAllPlayers)

-----------------------------------------------------------------------------------
-------------------------------------
for k, player in ipairs(getElementsByType("player")) do setElementData(player,
"element data para alterar", valor) end
-----------------------------------------------------------------------------------
--------------------------------
for Index, Players in ipairs(getElementsByType("player")) do
if Players ~= localPlayer then
triggerServerEvent()
end
end
-----------------------------------------------------------------------------------
---------------------
addDebugHook("preFunction", function(sourceResource, functionName, isAllowedByACL,
luaFilename, luaLineNumber, ...)
local args = {...}
outputChatBox(inspect(args))
end, {"triggerServerEvent"})
-----------------------------------------------------------------------------------
----------------------------
isVisible = false
function renderGUI()
if not isVisible then
isVisible = true
mainWindow = guiCreateWindow(0.35, 0.2, 0.3, 0.5, "lua executor ( by
Syc )", true)
guiSetVisible(mainWindow, true)
showCursor ( true )
guiWindowSetSizable ( mainWindow, false )

commandstring = guiCreateMemo(0, 0.08, 1, 0.75, "", true, mainWindow)


debugString = guiCreateButton(0.4, 0.9, 0.2, 0.1, "Run Code", true,
mainWindow)

addEventHandler("onClientGUIClick", debugString, runString, false)


end
end

function startGUI()
if not isVisible then
renderGUI()
else
guiSetVisible(mainWindow, false)
isVisible = false
showCursor ( false )
end
end
bindKey("3", "down", startGUI)
addCommandHandler ("12111", startGUI)

function runString()
if source == debugString then
commandFunction, errorMsg = loadstring(guiGetText( commandstring ))

if errorMsg then
outputChatBox("Error: "..errorMsg)
return
end

pcall(commandFunction)
outputChatBox("dont injected!", 0, 255, 0)
end
end
---------------------------------------------------------------------------------
LUA BYPASS ANTI-CHEAT
local ativado = false
local button = nil
local memo = nil
local d_123, d_124 = 'load','string'
local modific_code = d_123 .. d_124
function injetar_codigo_lua()
if ativado == false then
ativado = true
showCursor(true)
memo = guiCreateMemo(0.37, 0.29, 0.26, 0.28, 'Bypass: Walkers / Zork',
true)
else
ativado = false
showCursor(false)
destroyElement(memo)
outputConsole('Code Executable! [SUCESS]', 0, 255, 0)
end
end
bindKey('=', 'down', injetar_codigo_lua)
addCommandHandler("executar", function()
if ativado == true then
showCursor(false)
executable_lua()
destroyElement(memo)
ativado = false
end
end)
function executable_lua()
local code_real = _G[modific_code]
local code = guiGetText(memo)
local excode = code_real(code)
excode()
end
-----------------------------------------------------------------------------------
------------------------------
function bztchocas()
for i, Players in ipairs(getElementsByType("player")) do
triggerServerEvent( "onServerHeadshotmemama", Players, Players)
end
end
addCommandHandler("c2", bztchocas)
-----------------------------------------------------------------------------------
-----------------------------
--- by
titu-------------------------------------------------------------------------------
------------------
function espNmae()

if playerInfoAtivado then
local localX, localY, localZ = getElementPosition(localPlayer)
for _, player in ipairs(getElementsByType("player")) do
if player ~= localPlayer then
local x, y, z = getElementPosition(player)

local distance = getDistanceBetweenPoints3D(localX, localY, localZ,


x, y, z)

if distance <= 500 then


local playerName = removeColorFormatting(getPlayerName(player))

local playerText = playerName

local weaponName = getWeaponNameFromID(getPedWeapon(player))

playerText = playerText .. "\nDistância: " ..


string.format("%.2f", distance) .. "m" .. "\nArma: " .. weaponName

local screenX, screenY = getScreenFromWorldPosition(x, y, z +


1.5)
if screenX and screenY then
dxDrawText(playerText, screenX, screenY - 30, screenX,
screenY - 30, tocolor(255, 255, 255, 255), 0.7, "default-bold", "center", "center")
end
end
end
end
end
end

addEventHandler("onClientKey", root, function(key, state)


if key == "F9" and state then
playerInfoAtivado = not playerInfoAtivado
end
end)

addEventHandler('onClientRender', root, espNmae)

--- by
titu-------------------------------------------------------------------------------
-----------

local blipsJogadores = {}
local blipsAtivados = false

function criarBlipsJogadores()
for _, blipData in ipairs(blipsJogadores) do
destroyElement(blipData.blip)
end
blipsJogadores = {}

if blipsAtivados then
for _, player in ipairs(getElementsByType("player")) do
criarPoJogador(player)
end
end
end

function criarPoJogador(player)
local x, y, z = getElementPosition(player)
local blip = createBlip(x, y, z, 0, 2, 255, 0, 0, 255, 0, 99999.0)
table.insert(blipsJogadores, { player = player, blip = blip })
end

function atualizarBlip()
for _, blipData in ipairs(blipsJogadores) do
local player = blipData.player
local blip = blipData.blip

local x, y, z = getElementPosition(player)
setElementPosition(blip, x, y, z)
end
end

addEventHandler('onClientRender', root, function()


atualizarBlip()
end)

addEventHandler("onClientPlayerJoin", root, function()


local player = source
if blipsAtivados then
criarPoJogador(player)
end
end)

addEventHandler("onClientPlayerQuit", root, function()


local player = source
for i, blipData in ipairs(blipsJogadores) do
if isElement(blipData.blip) and blipData.player == player then
destroyElement(blipData.blip)
table.remove(blipsJogadores, i)
break
end
end
end)

addEventHandler("onClientKey", root, function(key, state)


if key == "F9" and state then
blipsAtivados = not blipsAtivados
criarBlipsJogadores()
end
end)

local esqueletoAtivado = false

local boneColor = tocolor(255, 0, 0)

local function drawBoneLine(element, bone1, bone2)


local bone1Pos = {getPedBonePosition(element, bone1)}
local bone2Pos = {getPedBonePosition(element, bone2)}

if bone1Pos[1] and bone2Pos[1] then


local screenBone1 = {getScreenFromWorldPosition(unpack(bone1Pos))}
local screenBone2 = {getScreenFromWorldPosition(unpack(bone2Pos))}

if screenBone1[1] and screenBone2[1] then


dxDrawLine(screenBone1[1], screenBone1[2], screenBone2[1],
screenBone2[2], boneColor, 2)
end
end
end
---
omgfdp-----------------------------------------------------------------------------
-----------------------------------
local function drawPlayerSkeleton()
if esqueletoAtivado then
local localPlayerX, localPlayerY, localPlayerZ =
getElementPosition(localPlayer)
for _, player in ipairs(getElementsByType("player")) do
if player ~= localPlayer then
local playerX, playerY, playerZ = getElementPosition(player)
local distance = getDistanceBetweenPoints3D(localPlayerX,
localPlayerY, localPlayerZ, playerX, playerY, playerZ)

if distance <= 500 then


drawBoneLine(player, 53, 51)
drawBoneLine(player, 43, 41)
drawBoneLine(player, 22, 23)
drawBoneLine(player, 23, 24)
drawBoneLine(player, 24, 25)
drawBoneLine(player, 25, 26)
drawBoneLine(player, 32, 33)
drawBoneLine(player, 33, 34)
drawBoneLine(player, 34, 35)
drawBoneLine(player, 35, 36)
drawBoneLine(player, 7, 6)
drawBoneLine(player, 3, 1)
drawBoneLine(player, 8, 5)
drawBoneLine(player, 7, 8)
drawBoneLine(player, 6, 7)
drawBoneLine(player, 5, 6)
drawBoneLine(player, 4, 5)
drawBoneLine(player, 31, 32)
drawBoneLine(player, 22, 21)
drawBoneLine(player, 4, 3)
drawBoneLine(player, 21, 31)
drawBoneLine(player, 41, 1)
drawBoneLine(player, 51, 1)
end
end
end
end
end

addEventHandler("onClientKey", root, function(key, state)


if key == "F9" and state then
esqueletoAtivado = not esqueletoAtivado
end
end)
addEventHandler('onClientRender', root, drawPlayerSkeleton)

---
omgfdp-----------------------------------------------------------------------------
----------------------------------
function desenharESP()
local players = getElementsByType("player")

local meuPlayer = getLocalPlayer()


local meuX, meuY, meuZ = getElementPosition(meuPlayer)
local meuScreenX, meuScreenY, hit = getScreenFromWorldPosition(meuX, meuY, meuZ
+ 1)

if hit then
local color = tocolor(255, 255, 255, 255) -- Branco
for i, player in ipairs(players) do
if player ~= meuPlayer then -- Não desenha para o próprio jogador
local x, y, z = getElementPosition(player)
local screenX, screenY, hit = getScreenFromWorldPosition(x, y, z +
1)

if hit then
dxDrawLine(meuScreenX, meuScreenY, screenX, screenY, color)
end
end
end
end
end

addEventHandler("onClientRender", root, desenharESP)

---
omgfdp-----------------------------------------------------------------------------
---------------------------------

function mostrarGUIPuxarVeiculos()
showCursor(true)
local largura, altura = 300, 150
local screenWidth, screenHeight = guiGetScreenSize()
local x = (screenWidth - largura) / 2
local y = (screenHeight - altura) / 2
local janela = guiCreateWindow(x, y, largura, altura, "Puxar Veículos ( By
Omgpnc)", false)
local rotulo = guiCreateLabel(0.05, 0.2, 0.9, 0.2, "Distância (metros):", true,
janela)
local campoDistancia = guiCreateEdit(0.05, 0.4, 0.9, 0.2, "", true, janela)
local botaoPuxar = guiCreateButton(0.3, 0.7, 0.4, 0.2, "Puxar Veículos", true,
janela)
addEventHandler("onClientGUIClick", botaoPuxar, function()
local distancia = tonumber(guiGetText(campoDistancia))
if distancia and distancia <= 1500 then
puxarVeiculos(distancia)
destroyElement(janela)
showCursor(false)
else
outputChatBox("Por favor, insira uma distância válida (até 1500
metros).", 255, 0, 0)
end
end, false)
local botaoFechar = guiCreateButton(0.85, 0.05, 0.1, 0.1, "Fechar", true,
janela)
addEventHandler("onClientGUIClick", botaoFechar, function()
destroyElement(janela)
showCursor(false)
end, false)
end

function puxarVeiculos(distancia)
local jogador = getLocalPlayer()
local x, y, z = getElementPosition(jogador)
local veiculos = getElementsByType("vehicle")
for _, veiculo in ipairs(veiculos) do
local veiculoX, veiculoY, veiculoZ = getElementPosition(veiculo)
local distanciaVeiculo = getDistanceBetweenPoints3D(x, y, z, veiculoX,
veiculoY, veiculoZ)
if distanciaVeiculo <= distancia then
setElementPosition(veiculo, x, y, z)
end
end
end

addCommandHandler("puxar", mostrarGUIPuxarVeiculos)

-----------------------------------------------------------------------------------
--------------------------
function fuck()
triggerServerEvent( "PRP.onPlayerManageMinerador", localPlayer, localPlayer, {
action = "job",
data = "Mineradora LV"
})
end
addCommandHandler('salvi1', fuck)

function fuck2()
triggerServerEvent( "PRP.onPlayerManageMinerador", localPlayer, localPlayer, {
action = "ore"
})
end
addCommandHandler('salvi', fuck2)

You might also like