slot0 = require("samp.events")
slot1 = require("imgui")
slot1.ToggleButton = require("imgui_addons").ToggleButton
slot2 = require("faIcons")
slot3 = require("encoding")
slot4 = require("vkeys")
http = require("copas.http")
os = require("os")
slot3.default = "CP1251"
u8 = slot3.UTF8
slot7 = require("ffi").cast("int (__thiscall*)(void*, float*, int, bool)", 6177408)
slot8 = slot1.ImBool(false)
slot27 = {}
slot28 = {
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0)
}
slot29 = {
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0),
slot1.ImFloat(0)
}
slot30 = require("inicfg").load({
settings = {
infState = slot1.ImBool(false).v,
infFov = slot1.ImFloat(0).v,
infAng = slot1.ImBool(false).v,
infObj = slot1.ImBool(false).v,
infVeh = slot1.ImBool(false).v,
infLine = slot1.ImBool(false).v,
infBlood = slot1.ImFloat(0).v,
infRand = slot1.ImFloat(0).v,
infCust = slot1.ImBool(false).v,
infClist = slot1.ImBool(false).v,
infKey2 = slot1.ImBool(false).v,
infKey3 = slot1.ImBool(false).v,
infKeyQ = slot1.ImBool(false).v,
infKeyE = slot1.ImBool(false).v,
infKeyX = slot1.ImBool(false).v,
infTorso = slot1.ImBool(false).v,
infGroin = slot1.ImBool(false).v,
infHead = slot1.ImBool(false).v,
infFovN1 = slot28[1].v,
infFovN2 = slot28[2].v,
infFovN3 = slot28[3].v,
infFovN4 = slot28[4].v,
infFovN5 = slot28[5].v,
infFovN6 = slot28[6].v,
infFovN7 = slot28[7].v,
infFovN8 = slot28[8].v,
infFovN9 = slot28[9].v,
infFovN10 = slot28[10].v,
infFovN11 = slot28[11].v,
infFovN12 = slot28[12].v,
infFovN13 = slot28[13].v,
infFovN14 = slot28[14].v,
infRandN1 = slot29[1].v,
infRandN2 = slot29[2].v,
infRandN3 = slot29[3].v,
infRandN4 = slot29[4].v,
infRandN5 = slot29[5].v,
infRandN6 = slot29[6].v,
infRandN7 = slot29[7].v,
infRandN8 = slot29[8].v,
infRandN9 = slot29[9].v,
infRandN10 = slot29[10].v,
infRandN11 = slot29[11].v,
infRandN12 = slot29[12].v,
infRandN13 = slot29[13].v,
infRandN14 = slot29[14].v
}
})
function LoadSettings()
if uv0.load(uv1, script.this.filename .. ".ini") == nil then
return
end
uv2.v = slot0.settings.infState
uv3.v = slot0.settings.infFov
uv4.v = slot0.settings.infAng
uv5.v = not slot0.settings.infObj
uv6.v = not slot0.settings.infVeh
uv7.v = slot0.settings.infLine
uv8.v = slot0.settings.infBlood
uv9.v = slot0.settings.infRand
uv10.v = slot0.settings.infCust
uv11.v = slot0.settings.infClist
uv12.v = slot0.settings.infKey2
uv13.v = slot0.settings.infKey3
uv14.v = slot0.settings.infKeyQ
uv15.v = slot0.settings.infKeyE
uv16.v = slot0.settings.infKeyX
uv17.v = slot0.settings.infTorso
uv18.v = slot0.settings.infGroin
uv19.v = slot0.settings.infHead
uv20[1].v = slot0.settings.infFovN1
uv20[2].v = slot0.settings.infFovN2
uv20[3].v = slot0.settings.infFovN3
uv20[4].v = slot0.settings.infFovN4
uv20[5].v = slot0.settings.infFovN5
uv20[6].v = slot0.settings.infFovN6
uv20[7].v = slot0.settings.infFovN7
uv20[8].v = slot0.settings.infFovN8
uv20[9].v = slot0.settings.infFovN9
uv20[10].v = slot0.settings.infFovN10
uv20[11].v = slot0.settings.infFovN11
uv20[12].v = slot0.settings.infFovN12
uv20[13].v = slot0.settings.infFovN13
uv20[14].v = slot0.settings.infFovN14
uv21[1].v = slot0.settings.infRandN1
uv21[2].v = slot0.settings.infRandN2
uv21[3].v = slot0.settings.infRandN3
uv21[4].v = slot0.settings.infRandN4
uv21[5].v = slot0.settings.infRandN5
uv21[6].v = slot0.settings.infRandN6
uv21[7].v = slot0.settings.infRandN7
uv21[8].v = slot0.settings.infRandN8
uv21[9].v = slot0.settings.infRandN9
uv21[10].v = slot0.settings.infRandN10
uv21[11].v = slot0.settings.infRandN11
uv21[12].v = slot0.settings.infRandN12
uv21[13].v = slot0.settings.infRandN13
uv21[14].v = slot0.settings.infRandN14
end
function SaveSettings()
end
function DisableAllBody(slot0, slot1, slot2)
uv0.v = slot0
uv1.settings.infTorso = slot0
uv2.v = slot1
uv1.settings.infGroin = slot1
uv3.v = slot2
uv1.settings.infHead = slot2
SaveSettings()
end
function DisableAllKey(slot0, slot1, slot2, slot3, slot4)
uv0.settings.infKey2 = slot0
uv1.v = slot0
uv0.settings.infKey3 = slot1
uv2.v = slot1
uv0.settings.infKeyQ = slot2
uv3.v = slot2
uv0.settings.infKeyE = slot3
uv4.v = slot3
uv0.settings.infKeyX = slot4
uv5.v = slot4
SaveSettings()
end
function GetBodyPartCoordinates(slot0, slot1)
slot3 = uv0.new("float[3]")
uv1(uv0.cast("void*", getCharPointer(slot1)), slot3, slot0, true)
return slot3[0], slot3[1], slot3[2]
end
slot31 = nil
slot32 = slot1.ImGlyphRanges({
slot2.min_range,
slot2.max_range
})
function slot1.BeforeDrawFrame()
if uv0 == nil then
slot0 = uv1.ImFontConfig()
slot0.MergeMode = true
uv0 = uv1.GetIO().Fonts:AddFontFromFileTTF("moonloader/lib/fontawesome-webfont.ttf", 14, slot0, uv2)
end
end
function slot1.CenterText(slot0)
uv0.SetCursorPosX(uv0.GetWindowWidth() / 2 - uv0.CalcTextSize(slot0).x / 2)
uv0.Text(slot0)
end
Speed = slot1.ImFloat(1)
Dist = slot1.ImFloat(1)
Fov = slot1.ImFloat(1)
slot33 = slot1.ImBool(false)
slot34 = slot1.ImBool(false)
slot35 = slot1.ImBool(false)
slot36 = slot1.ImBool(false)
slot37 = slot1.ImBool(false)
slot38 = 8
slot39 = slot1.ImBool(false)
function main()
repeat
wait(0)
until isSampAvailable()
sampRegisterChatCommand("saim", function ()
uv0.v = not uv0.v
uv1.Process = uv0.v
end)
lua_thread.create(SmoothAimBot)
while true do
wait(0)
if not uv0.v then
uv1.Process = false
end
if uv2.v then
uv3 = 8
end
if uv4.v then
uv3 = 3
end
if uv5.v then
uv3 = 42
end
if uv6.v then
uv3 = 54
end
end
end
slot40 = 1
slot41 = 1
slot42 = slot1.CreateTextureFromFile(getGameDirectory() .. "\\moonloader\\sadfi aim\\discord.png")
function slot1.OnDrawFrame()
if uv0.v then
slot0, slot1 = getScreenResolution()
uv1.SetNextWindowPos(uv1.ImVec2(slot0 / 2, slot1 / 2), uv1.Cond.FirstUseEver, uv1.ImVec2(0.5, 0.5))
uv1.SetNextWindowSize(uv1.ImVec2(413, 303), uv1.Cond.FirstUseEver)
uv1.Begin("SADFI Aim Tools V1", uv0, uv1.WindowFlags.NoCollapse + uv1.WindowFlags.NoResize + uv1.WindowFlags.ShowBorders)
uv1.BeginChild("##left", uv1.ImVec2(100, 0), true)
img = uv1.CreateTextureFromFile(getGameDirectory() .. "\\moonloader\\sadfi aim\\AIM.png")
uv1.Image(img, uv1.ImVec2(92, 22))
uv1.Separator()
if uv1.Button(" " .. uv2.ICON_CROSSHAIRS .. " Main", uv1.ImVec2((uv1.GetWindowWidth() - 8) / 1, 31)) then
uv3 = 1
end
if uv1.Button(" " .. uv2.ICON_COG .. " Settings", uv1.ImVec2((uv1.GetWindowWidth() - 8) / 1, 31)) then
uv3 = 2
end
if uv1.Button(" " .. uv2.ICON_INFO_CIRCLE .. " About", uv1.ImVec2((uv1.GetWindowWidth() - 8) / 1, 31)) then
uv3 = 3
end
if uv1.ImageButton(uv4, uv1.ImVec2(87, 124)) then
os.execute("explorer \"https://discord.gg/jKM58kQy3q\"")
end
uv1.EndChild()
uv1.SameLine()
uv1.BeginChild("##right", uv1.ImVec2(0, 0), true)
if uv3 == 1 then
if uv1.Checkbox("SmoothAim", uv5) then
-- Nothing
end
if uv1.Checkbox(u8("SilentAim"), uv6) then
tarPed = -1
uv7.settings.infState = uv6.v
end
end
if uv3 == 2 then
if uv1.Button("SmoothAim", uv1.ImVec2((uv1.GetWindowWidth() - 13) / 2, 25)) then
uv8 = 1
end
uv1.SameLine()
if uv1.Button("SilentAim", uv1.ImVec2((uv1.GetWindowWidth() - 13) / 2, 25)) then
uv8 = 2
end
uv1.Separator()
if uv8 == 1 then
uv1.BeginGroup()
uv1.PushItemWidth(170)
uv1.SliderFloat("Speed", Speed, 0, 50, "%.1f")
uv1.PopItemWidth()
uv1.PushItemWidth(170)
uv1.SliderFloat("Dist", Dist, 0, 100, "%.1f")
uv1.PopItemWidth()
uv1.PushItemWidth(170)
uv1.SliderFloat("Fov", Fov, 0, 100, "%.1f")
uv1.PopItemWidth()
uv1.EndGroup()
uv1.BeginGroup()
if uv1.Checkbox("Aiming Head", uv9) then
-- Nothing
end
if uv1.Checkbox("Aiming Tors", uv10) then
-- Nothing
end
if uv1.Checkbox("Aiming Foot", uv11) then
-- Nothing
end
if uv1.Checkbox("Aiming Leg", uv12) then
-- Nothing
end
uv1.EndGroup()
end
if uv8 == 2 then
if uv1.CollapsingHeader(u8("Body Parts")) then
if uv1.Checkbox(u8("Head"), uv13) then
DisableAllBody(false, false, true)
end
if uv1.Checkbox(u8("Torso"), uv14) then
DisableAllBody(true, false, false)
end
if uv1.Checkbox(u8("Groin"), uv15) then
DisableAllBody(false, true, false)
end
end
uv1.Separator()
if uv1.SliderFloat("Fov", uv16, 0, 80) then
uv7.settings.infFov = uv16.v
SaveSettings()
end
if uv1.SliderFloat("Hit", uv17, 0, 100) then
uv7.settings.infRand = uv17.v
SaveSettings()
end
uv1.Separator()
if uv1.Checkbox(u8("Dovorot to the player on sync"), uv18) then
uv7.settings.infAng = uv18.v
SaveSettings()
end
if uv1.Checkbox(u8("Ignore objects"), uv19) then
uv7.settings.infObj = not uv19.v
SaveSettings()
end
if uv1.Checkbox(u8("Ignore vehicles"), uv20) then
uv7.settings.infVeh = not uv20.v
SaveSettings()
end
if uv1.Checkbox(u8("Ignore players with my color"), uv21) then
uv7.settings.infClist = uv21.v
SaveSettings()
end
if uv1.Checkbox(u8("Draw lines"), uv22) then
uv7.settings.infLine = uv22.v
SaveSettings()
end
if uv1.SliderFloat(u8("Blood Density"), uv23, 0, 100) then
uv7.settings.infBlood = uv23.v
SaveSettings()
end
uv1.Separator()
if uv1.Checkbox(u8("Individual Fov/Hit"), uv24) then
uv7.settings.infCust = uv24.v
SaveSettings()
end
if uv7.settings.infCust then
if uv1.CollapsingHeader(GetWeaponName(22)) then
if uv1.SliderFloat("Fov##" .. 1, uv25[1], 0, 80) then
uv7.settings.infFovN1 = uv25[1].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 1, uv26[1], 0, 100) then
uv7.settings.infRandN1 = uv26[1].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(23)) then
if uv1.SliderFloat("Fov##" .. 2, uv25[2], 0, 80) then
uv7.settings.infFovN2 = uv25[2].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 2, uv26[2], 0, 100) then
uv7.settings.infRandN2 = uv26[2].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(24)) then
if uv1.SliderFloat("Fov##" .. 3, uv25[3], 0, 80) then
uv7.settings.infFovN3 = uv25[3].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 3, uv26[3], 0, 100) then
uv7.settings.infRandN3 = uv26[3].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(25)) then
if uv1.SliderFloat("Fov##" .. 4, uv25[4], 0, 80) then
uv7.settings.infFovN4 = uv25[4].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 4, uv26[4], 0, 100) then
uv7.settings.infRandN4 = uv26[4].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(26)) then
if uv1.SliderFloat("Fov##" .. 5, uv25[5], 0, 80) then
uv7.settings.infFovN5 = uv25[5].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 5, uv26[5], 0, 100) then
uv7.settings.infRandN5 = uv26[5].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(27)) then
if uv1.SliderFloat("Fov##" .. 6, uv25[6], 0, 80) then
uv7.settings.infFovN6 = uv25[6].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 6, uv26[6], 0, 100) then
uv7.settings.infRandN6 = uv26[6].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(28)) then
if uv1.SliderFloat("Fov##" .. 7, uv25[7], 0, 80) then
uv7.settings.infFovN7 = uv25[7].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 7, uv26[7], 0, 100) then
uv7.settings.infRandN7 = uv26[7].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(29)) then
if uv1.SliderFloat("Fov##" .. 8, uv25[8], 0, 80) then
uv7.settings.infFovN8 = uv25[8].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 8, uv26[8], 0, 100) then
uv7.settings.infRandN8 = uv26[8].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(30)) then
if uv1.SliderFloat("Fov##" .. 9, uv25[9], 0, 80) then
uv7.settings.infFovN9 = uv25[9].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 9, uv26[9], 0, 100) then
uv7.settings.infRandN9 = uv26[9].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(31)) then
if uv1.SliderFloat("Fov##" .. 10, uv25[10], 0, 80) then
uv7.settings.infFovN10 = uv25[10].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 10, uv26[10], 0, 100) then
uv7.settings.infRandN10 = uv26[10].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(32)) then
if uv1.SliderFloat("Fov##" .. 11, uv25[11], 0, 80) then
uv7.settings.infFovN11 = uv25[11].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 11, uv26[11], 0, 100) then
uv7.settings.infRandN11 = uv26[11].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(33)) then
if uv1.SliderFloat("Fov##" .. 12, uv25[12], 0, 80) then
uv7.settings.infFovN12 = uv25[12].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 12, uv26[12], 0, 100) then
uv7.settings.infRandN12 = uv26[12].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(34)) then
if uv1.SliderFloat("Fov##" .. 13, uv25[13], 0, 80) then
uv7.settings.infFovN13 = uv25[13].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 13, uv26[13], 0, 100) then
uv7.settings.infRandN13 = uv26[13].v
SaveSettings()
end
end
if uv1.CollapsingHeader(GetWeaponName(38)) then
if uv1.SliderFloat("Fov##" .. 14, uv25[14], 0, 80) then
uv7.settings.infFovN14 = uv25[14].v
SaveSettings()
end
if uv1.SliderFloat("Hit##" .. 14, uv26[14], 0, 100) then
uv7.settings.infRandN14 = uv26[14].v
SaveSettings()
end
end
end
end
end
if uv3 == 3 then
BIO1 = uv1.CreateTextureFromFile(getGameDirectory() .. "\\moonloader\\sadfi resource\\resource\\acc\\bg\\sadfi.png")
uv1.Image(BIO1, uv1.ImVec2(292, 90))
uv1.SetCursorPosY(65)
uv1.SetCursorPosX(6)
SADBOY = uv1.CreateTextureFromFile(getGameDirectory() .. "\\moonloader\\sadfi resource\\resource\\acc\\bg\\sadfiAV.png")
uv1.Image(SADBOY, uv1.ImVec2(60, 60))
uv1.SameLine()
uv1.SetCursorPosY(100)
uv1.PushStyleColor(uv1.Col.ChildWindowBg, uv1.ImVec4(0.4, 0, 0, 1))
uv1.BeginChild("##sadfi", uv1.ImVec2(-0.1, 22), true)
uv1.Text("DEVLOPER: SADFI2259X")
uv1.EndChild()
uv1.PopStyleColor(1)
uv1.SetCursorPosY(128)
uv1.Separator()
uv1.Text("BIO:")
uv1.Text("- I love pizza :)")
uv1.Separator()
if uv1.Button(uv2.ICON_FACEBOOK_SQUARE .. " FaceBook", uv1.ImVec2((uv1.GetWindowWidth() - 8) / 1, 30)) then
os.execute("explorer \"https://www.facebook.com/sadfi.hack/\"")
end
if uv1.Button(uv2.ICON_YOUTUBE_PLAY .. " TouTube", uv1.ImVec2((uv1.GetWindowWidth() - 8) / 1, 30)) then
os.execute("explorer \"https://www.youtube.com/channel/UCtgbcct1S_WHOok34IHaIog\"")
end
if uv1.Button(uv2.ICON_COFFEE .. " Donate", uv1.ImVec2((uv1.GetWindowWidth() - 8) / 1, 30)) then
os.execute("explorer \"https://ko-fi.com/sadfi2259x\"")
end
end
uv1.EndChild()
uv1.End()
end
end
function fix(slot0)
if math.pi < slot0 then
slot0 = slot0 - math.pi * 2
elseif slot0 < -math.pi then
slot0 = slot0 + math.pi * 2
end
return slot0
end
function GetNearestPed(slot0)
slot1 = Dist.v
slot2 = -1
for slot6 = 0, sampGetMaxPlayerId(true) do
if sampIsPlayerConnected(slot6) then
slot7, slot8 = sampGetCharHandleBySampPlayerId(slot6)
if slot7 and isCharOnScreen(slot8) and not isCharDead(slot8) then
slot9, slot10 = sampGetPlayerIdByCharHandle(PLAYER_PED)
slot11 = {
GetBodyPartCoordinates(uv0, slot8)
}
slot12 = {
getActiveCameraCoordinates()
}
slot13 = {
slot12[1] - slot11[1],
slot12[2] - slot11[2],
slot12[3] - slot11[3]
}
if isWidescreenOnInOptions() then
coefficentZ = 0.0778
else
coefficentZ = 0.103
end
slot14 = {
math.atan2(slot13[2], slot13[1]) + 0.04253,
math.atan2(math.sqrt(math.pow(slot13[1], 2) + math.pow(slot13[2], 2)), slot13[3]) - math.pi / 2 - coefficentZ
}
slot15 = {
fix(representIntAsFloat(readMemory(11989592, 4, false))),
fix(representIntAsFloat(readMemory(11989576, 4, false)))
}
if slot0 < math.sqrt(math.pow(slot14[1] - slot15[1], 2) + math.pow(slot14[2] - slot15[2], 2)) * 57.2957795131 then
check = true
else
check = false
end
if not check then
slot17 = {
getCharCoordinates(PLAYER_PED)
}
if math.sqrt(math.pow(slot11[1] - slot17[1], 2) + math.pow(slot11[2] - slot17[2], 2) + math.pow(slot11[3] - slot17[3], 2)) < slot1 then
slot2 = slot8
slot1 = slot18
end
end
end
end
end
return slot2
end
function SmoothAimBot()
if uv0.v and isKeyDown(uv1.VK_RBUTTON) and isKeyDown(uv1.VK_LBUTTON) and GetNearestPed(Fov.v) ~= -1 then
slot1 = {
getActiveCameraCoordinates()
}
slot2 = {
GetBodyPartCoordinates(uv2, slot0)
}
slot3 = {
slot1[1] - slot2[1],
slot1[2] - slot2[2],
slot1[3] - slot2[3]
}
if isWidescreenOnInOptions() then
coefficentZ = 0.0778
else
coefficentZ = 0.103
end
slot4 = {
math.atan2(slot3[2], slot3[1]) + 0.04253,
math.atan2(math.sqrt(math.pow(slot3[1], 2) + math.pow(slot3[2], 2)), slot3[3]) - math.pi / 2 - coefficentZ
}
slot5 = {
fix(representIntAsFloat(readMemory(11989592, 4, false))),
fix(representIntAsFloat(readMemory(11989576, 4, false)))
}
slot6 = {
slot4[1] - slot5[1],
slot4[2] - slot5[2]
}
slot7 = {
slot6[1] / Speed.v,
slot6[2] / Speed.v
}
setCameraPositionUnfixed(slot5[2] + slot7[2], slot5[1] + slot7[1])
end
return false
end
function theme()
uv0.SwitchContext()
slot0 = uv0.GetStyle()
slot1 = slot0.Colors
slot2 = uv0.Col
slot3 = uv0.ImVec4
slot4 = uv0.ImVec2
slot0.WindowRounding = 3
slot0.WindowTitleAlign = uv0.ImVec2(0.5, 0.5)
slot0.ChildWindowRounding = 3
slot0.FrameRounding = 3
slot0.ItemSpacing = uv0.ImVec2(5, 4)
slot0.ScrollbarSize = 13
slot0.ScrollbarRounding = 1
slot0.GrabMinSize = 8
slot0.GrabRounding = 3
slot0.WindowPadding = uv0.ImVec2(4, 4)
slot0.FramePadding = uv0.ImVec2(2.5, 3.5)
slot0.ButtonTextAlign = uv0.ImVec2(0.02, 0.4)
slot1[slot2.Text] = slot3(1, 1, 1, 1)
slot1[slot2.TextDisabled] = slot3(0.5, 0.5, 0.5, 1)
slot1[slot2.WindowBg] = uv0.ImColor(0, 0, 0, 255):GetVec4()
slot1[slot2.ChildWindowBg] = slot3(1, 1, 1, 0)
slot1[slot2.PopupBg] = slot3(0.08, 0.08, 0.08, 0.94)
slot1[slot2.ComboBg] = slot1[slot2.PopupBg]
slot1[slot2.Border] = slot3(0.43, 0.43, 0.5, 0.5)
slot1[slot2.BorderShadow] = slot3(0, 0, 0, 0)
slot1[slot2.FrameBg] = slot3(0.12, 0.12, 0.12, 0.94)
slot1[slot2.FrameBgHovered] = slot3(0.45, 0.45, 0.45, 0.85)
slot1[slot2.FrameBgActive] = slot3(0.63, 0.63, 0.63, 0.63)
slot1[slot2.TitleBg] = slot3(0.13, 0.13, 0.13, 0.99)
slot1[slot2.TitleBgActive] = slot3(0.13, 0.13, 0.13, 0.99)
slot1[slot2.TitleBgCollapsed] = slot3(0.05, 0.05, 0.05, 0.79)
slot1[slot2.MenuBarBg] = slot3(0.14, 0.14, 0.14, 1)
slot1[slot2.ScrollbarBg] = slot3(0.02, 0.02, 0.02, 0.53)
slot1[slot2.ScrollbarGrab] = slot3(0.31, 0.31, 0.31, 1)
slot1[slot2.ScrollbarGrabHovered] = slot3(0.41, 0.41, 0.41, 1)
slot1[slot2.ScrollbarGrabActive] = slot3(0.51, 0.51, 0.51, 1)
slot1[slot2.CheckMark] = slot3(1, 1, 1, 1)
slot1[slot2.SliderGrab] = slot3(0.28, 0.28, 0.28, 1)
slot1[slot2.SliderGrabActive] = slot3(0.35, 0.35, 0.35, 1)
slot1[slot2.Button] = slot3(0.12, 0.12, 0.12, 0.94)
slot1[slot2.ButtonHovered] = slot3(0.34, 0.34, 0.35, 0.89)
slot1[slot2.ButtonActive] = slot3(0.21, 0.21, 0.21, 0.81)
slot1[slot2.Header] = slot3(0.12, 0.12, 0.12, 0.94)
slot1[slot2.HeaderHovered] = slot3(0.34, 0.34, 0.35, 0.89)
slot1[slot2.HeaderActive] = slot3(0.12, 0.12, 0.12, 0.94)
slot1[slot2.Separator] = slot1[slot2.Border]
slot1[slot2.SeparatorHovered] = slot3(0.26, 0.59, 0.98, 0.78)
slot1[slot2.SeparatorActive] = slot3(0.26, 0.59, 0.98, 1)
slot1[slot2.ResizeGrip] = slot3(0.26, 0.59, 0.98, 0.25)
slot1[slot2.ResizeGripHovered] = slot3(0.26, 0.59, 0.98, 0.67)
slot1[slot2.ResizeGripActive] = slot3(0.26, 0.59, 0.98, 0.95)
slot1[slot2.CloseButton] = slot3(0.41, 0.41, 0.41, 0.5)
slot1[slot2.CloseButtonHovered] = slot3(0.98, 0.39, 0.36, 1)
slot1[slot2.CloseButtonActive] = slot3(0.98, 0.39, 0.36, 1)
slot1[slot2.PlotLines] = slot3(0.61, 0.61, 0.61, 1)
slot1[slot2.PlotLinesHovered] = slot3(1, 0.43, 0.35, 1)
slot1[slot2.PlotHistogram] = slot3(0.9, 0.7, 0, 1)
slot1[slot2.PlotHistogramHovered] = slot3(1, 0.6, 0, 1)
slot1[slot2.TextSelectedBg] = slot3(0.26, 0.59, 0.98, 0.35)
slot1[slot2.ModalWindowDarkening] = slot3(0.8, 0.8, 0.8, 0.35)
end
theme()
function StartInKey()
tarPed = -1
uv0.settings.infState = not uv0.settings.infState
uv1.v = uv0.settings.infState
SaveSettings()
end
function slot0.onPlayerQuit(slot0, slot1)
for slot5 = 1, 200 do
if uv0[slot5] == slot0 then
uv0[slot5] = nil
sampAddChatMessage(string.format("{3E8BFE}[SilentAim] {FFFFFF}%i \\xf3\\xe4\\xe0\\xeb\\xe5\\xed \\xe8\\xe7 \\xf7\\xb8\\xf0\\xed\\xee\\xe3\\xee \\xf1\\xef\\xe8\\xf1\\xea\\xe0", slot0), -1)
break
end
end
end
function slot0.onSendPlayerSync(slot0)
if uv0.settings.infState and uv0.settings.infAng and camMode == 53 and tarPed ~= -1 then
slot1, slot2 = sampGetPlayerIdByCharHandle(tarPed)
if slot1 then
slot3, slot4, slot5 = getCharCoordinates(tarPed)
slot0.quaternion[0], slot8, slot9, slot10 = CalculateQuat(0, 0, getHeadingFromVector2d(slot3 - slot0.position.x, slot4 - slot0.position.y))
slot0.keysData = 2
slot0.quaternion[3] = -slot10
end
end
end
function slot0.onSendAimSync(slot0)
camMode = slot0.camMode
if uv0.settings.infState then
slot2, slot3 = sampGetPlayerIdByCharHandle(PLAYER_PED)
if getCurrentCharWeapon(PLAYER_PED) ~= nil and GetWeaponOkay(slot1) and not isCharDead(PLAYER_PED) and not sampIsPlayerPaused(slot3) then
camX = slot0.camPos.x
camY = slot0.camPos.y
camZ = slot0.camPos.z
frontX = slot0.camFront.x
frontY = slot0.camFront.y
frontZ = slot0.camFront.z
CheckTarget()
end
end
end
function slot0.onSendBulletSync(slot0)
if uv0.settings.infState and tarPed ~= -1 and stopwork ~= 1 and slot0.targetType ~= 1 and slot0.weaponId ~= nil and GetWeaponOkay(slot0.weaponId) then
slot1, slot2 = sampGetPlayerIdByCharHandle(tarPed)
if slot1 then
slot3 = 0
if uv0.settings.infClist then
slot4, slot5 = sampGetPlayerIdByCharHandle(PLAYER_PED)
slot7 = sampGetPlayerColor(slot2)
if sampGetPlayerColor(slot5) ~= nil and slot7 ~= nil and slot6 == slot7 then
slot3 = 1
end
end
for slot7 = 1, 200 do
if uv1[slot7] == slot2 then
slot3 = 1
end
end
if slot3 == 0 then
slot4, slot5, slot6 = getCharCoordinates(tarPed)
slot7, slot8, slot9 = getCharCoordinates(PLAYER_PED)
slot10 = getDistanceBetweenCoords3d(slot7, slot8, slot9, slot4, slot5, slot6)
slot11 = GetWeaponDist(slot0.weaponId)
slot12 = uv0.settings.infRand
if uv0.settings.infCust then
slot12 = (slot0.weaponId ~= 22 or uv0.settings.infRandN1) and (slot0.weaponId ~= 23 or uv0.settings.infRandN2) and (slot0.weaponId ~= 24 or uv0.settings.infRandN3) and (slot0.weaponId ~= 25 or uv0.settings.infRandN4) and (slot0.weaponId ~= 26 or uv0.settings.infRandN5) and (slot0.weaponId ~= 27 or uv0.settings.infRandN6) and (slot0.weaponId ~= 28 or uv0.settings.infRandN7) and (slot0.weaponId ~= 29 or uv0.settings.infRandN8) and (slot0.weaponId ~= 30 or uv0.settings.infRandN9) and (slot0.weaponId ~= 31 or uv0.settings.infRandN10) and (slot0.weaponId ~= 32 or uv0.settings.infRandN11) and (slot0.weaponId ~= 33 or uv0.settings.infRandN12) and (slot0.weaponId ~= 34 or uv0.settings.infRandN13) and (slot0.weaponId ~= 38 or uv0.settings.infRandN14) and uv0.settings.infRand
end
if slot12 ~= nil and slot10 ~= nil and slot11 ~= nil and slot10 > 0 and slot10 < slot11 and math.random(100) < slot12 and isCharDead(tarPed) == false and sampIsPlayerPaused(slot2) == false then
slot14 = RandomFloat(-0.25, 0.25)
slot15 = RandomFloat(-0.8, 0.8)
if math.abs(RandomFloat(-0.25, 0.25)) < 0.01 then
slot13 = 0.01
end
if math.abs(slot14) < 0.01 then
slot14 = 0.01
end
if math.abs(slot15) < 0.01 then
slot15 = 0.01
end
slot0.targetType = 1
slot0.targetId = slot2
slot0.origin = {
x = slot7 + slot13,
y = slot8 + slot14,
z = slot9 + slot15
}
slot0.target = {
x = slot4 + slot13,
y = slot5 + slot14,
z = slot6 + slot15
}
slot0.center = {
x = slot13,
y = slot14,
z = slot15
}
slot16, slot17 = nil
if uv0.settings.infHead then
slot16 = 9
slot17 = RandomFloat(0.7, 0.8)
elseif uv0.settings.infGroin then
slot16 = 4
slot17 = RandomFloat(-0.3, -0.2)
else
slot16 = 3
slot17 = RandomFloat(-0.1, 0.6)
end
sampSendGiveDamage(slot2, GetWeaponDamage(slot0.weaponId), slot0.weaponId, slot16)
if uv0.settings.infLine then
fireSingleBullet(slot7, slot8, slot9 + RandomFloat(0.5, 0.7), slot4 + slot13, slot5 + slot14, slot6 + slot17, 1)
end
if uv0.settings.infBlood > 0 then
addBlood(slot4 + slot13, slot5 + slot14, slot6 + slot17, 0, 0, 0, uv0.settings.infBlood, tarPed)
end
end
end
end
end
end
function CheckTarget()
slot0 = getAllChars()
slot1, slot2, slot3 = getCharCoordinates(PLAYER_PED)
slot4 = uv0.settings.infFov
slot6 = GetWeaponDist(getCurrentCharWeapon(PLAYER_PED))
if uv0.settings.infCust then
slot4 = (slot5 ~= 22 or uv0.settings.infFovN1) and (slot5 ~= 23 or uv0.settings.infFovN2) and (slot5 ~= 24 or uv0.settings.infFovN3) and (slot5 ~= 25 or uv0.settings.infFovN4) and (slot5 ~= 26 or uv0.settings.infFovN5) and (slot5 ~= 27 or uv0.settings.infFovN6) and (slot5 ~= 28 or uv0.settings.infFovN7) and (slot5 ~= 29 or uv0.settings.infFovN8) and (slot5 ~= 30 or uv0.settings.infFovN9) and (slot5 ~= 31 or uv0.settings.infFovN10) and (slot5 ~= 32 or uv0.settings.infFovN11) and (slot5 ~= 33 or uv0.settings.infFovN12) and (slot5 ~= 34 or uv0.settings.infFovN13) and (slot5 ~= 38 or uv0.settings.infFovN14) and uv0.settings.infFov
end
if slot4 == nil or slot5 == nil or slot6 == nil then
return
end
tarPed = -1
for slot10, slot11 in pairs(slot0) do
if slot11 ~= PLAYER_PED then
slot12, slot13, slot14 = getCharCoordinates(slot11)
if isLineOfSightClear(slot1, slot2, slot3, slot12, slot13, slot14, uv0.settings.infObj, uv0.settings.infVeh, false, uv0.settings.infObj, false) then
slot15, slot16 = sampGetPlayerIdByCharHandle(slot11)
if slot15 then
slot18 = getDistanceBetweenCoords3d(slot1, slot2, slot3, slot12, slot13, slot14)
if FacingToCoords(slot12, slot13, slot4) ~= nil and slot18 ~= nil and slot17 < slot4 and slot18 and slot18 < slot6 and not isCharDead(slot11) and not sampIsPlayerPaused(slot16) then
tarPed = slot11
slot4 = slot17
end
end
end
end
end
end
function RandomFloat(slot0, slot1)
return slot0 + math.random() * (slot1 - slot0)
end
function VectorySize(slot0, slot1, slot2)
return math.sqrt(slot0 * slot0 + slot1 * slot1, slot2 * slot2)
end
function GetWeaponOkay(slot0)
if slot0 >= 22 and slot0 <= 34 or slot0 == 38 then
return 1
end
return 0
end
function GetWeaponName(slot0)
return ({
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
"9mm",
"Silenced 9mm",
"Desert Eagle",
"Shotgun",
"Sawnoff Shotgun",
"Combat Shotgun",
"Micro SMG/Uzi",
"MP5",
"AK-47",
"M4",
"Tec-9",
[38.0] = "Minigun",
[34.0] = "Sniper Rifle",
[33.0] = "Country Rifle"
})[slot0]
end
function GetWeaponDamage(slot0)
return ({
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
8.25,
13.2,
46.2,
3.3,
3.3,
4.95,
6.6,
8.25,
9.9,
9.9,
6.6,
[38.0] = 46.2,
[34.0] = 41.25,
[33.0] = 24.75
})[slot0]
end
function GetWeaponDist(slot0)
return ({
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
35,
35,
35,
40,
35,
40,
35,
45,
70,
90,
35,
[38.0] = 75,
[34.0] = 320,
[33.0] = 95
})[slot0]
end
function FacingToCoords(slot0, slot1, slot2)
slot3 = camX + frontX * 50
slot4 = camY + frontY * 50
slot5, slot6, slot7 = getCharCoordinates(PLAYER_PED)
if 7 - VectorySize(slot5 - slot0, slot6 - slot1, 0) / 5 < 0 then
slot9 = 0
end
if math.deg(math.atan2(slot5 - slot3, slot6 - slot4)) + slot9 > math.deg(math.atan2(slot5 - slot0, slot6 - slot1)) - slot2 and slot12 < slot13 + slot2 then
if slot13 < slot12 then
return slot12 - slot13
else
return slot13 - slot12
end
end
return nil
end
function CalculateQuat(slot0, slot1, slot2)
slot3 = slot0 * math.pi / 360
slot4 = slot1 * math.pi / 360
slot5 = slot2 * math.pi / 360
slot6 = math.cos(slot4)
slot7 = math.cos(slot5)
slot8 = math.cos(slot3)
slot9 = math.sin(slot4)
slot10 = math.sin(slot5)
slot11 = math.sin(slot3)
return slot6 * slot7 * slot8 - slot9 * slot10 * slot11, slot9 * slot10 * slot8 + slot6 * slot7 * slot11, slot9 * slot7 * slot8 + slot6 * slot10 * slot11, slot6 * slot10 * slot8 - slot9 * slot7 * slot11
end
function join_argb(slot0, slot1, slot2, slot3)
return bit.bor(bit.bor(bit.bor(slot3, bit.lshift(slot2, 8)), bit.lshift(slot1, 16)), bit.lshift(slot0, 24))
end
function explode_argb(slot0)
return bit.band(bit.rshift(slot0, 24), 255), bit.band(bit.rshift(slot0, 16), 255), bit.band(bit.rshift(slot0, 8), 255), bit.band(slot0, 255)
end
function rainbow(slot0, slot1, slot2)
slot2 = slot2 or 0
slot3 = os.clock()
return math.floor(math.sin(slot3 * slot0) * 127 + 128), math.floor(math.sin(slot3 * slot0 + 2) * 127 + 128), math.floor(math.sin(slot3 * slot0 + 4) * 127 + 128), slot1
end
function slot1.TextColoredRGB(slot0, slot1)
slot3 = uv0.GetStyle().Colors
slot4 = uv0.Col
slot5 = require("encoding").UTF8
function slot6(slot0)
if slot0:upper():sub(1, 6) == "SSSSSS" then
return uv0.ImVec4(uv1[uv2.Text].x, uv1[uv2.Text].y, uv1[uv2.Text].z, tonumber(slot0:sub(7, 8), 16) and tonumber(slot0:sub(7, 8), 16) / 255 or uv1[uv2.Text].w)
end
slot1 = type(slot0) == "number" and ("%X"):format(slot0):upper() or slot0:upper()
slot2 = {}
for slot6 = 1, #slot1 / 2 do
slot2[#slot2 + 1] = tonumber(slot1:sub(2 * slot6 - 1, 2 * slot6), 16)
end
return uv0.ImVec4(slot2[1] / 255, slot2[2] / 255, slot2[3] / 255, slot2[4] and slot2[4] / 255 or uv1[uv2.Text].w)
end
function (slot0)
for slot4 in slot0:gmatch("[^\r\n]+") do
slot5 = {}
slot6 = {}
slot7 = 1
slot8 = 1
if slot4:sub(1, 8) == "[center]" then
slot7 = 2
slot4 = slot4:sub(9)
elseif slot4:sub(1, 7) == "[right]" then
slot7 = 3
slot4 = slot4:sub(8)
end
slot4 = slot4:gsub("{(......)}", "{%1FF}")
while slot4:find("{........}") do
slot9, slot10 = slot4:find("{........}")
if tonumber(slot4:sub(slot9 + 1, slot10 - 1), 16) or slot4:sub(slot9 + 1, slot10 - 3):upper() == "SSSSSS" and tonumber(slot4:sub(slot10 - 2, slot10 - 1), 16) or slot4:sub(slot10 - 2, slot10 - 1):upper() == "SS" then
slot5[#slot5 + 1] = slot4:sub(slot10 + 1, #slot4)
slot5[#slot5] = slot4:sub(slot8, slot9 - 1)
slot6[#slot6 + 1] = uv0(slot4:sub(slot9 + 1, slot10 - 1))
slot4 = slot4:sub(1, slot9 - 1) .. slot4:sub(slot10 + 1, #slot4)
slot8 = slot9
else
slot4 = slot4:sub(1, slot9 - 1) .. slot4:sub(slot9, slot10 - 3) .. "}" .. slot4:sub(slot10 + 1, #slot4)
end
end
if slot7 == 2 then
uv1.NewLine()
uv1.SameLine(uv3 / 2 - uv1.CalcTextSize(uv2(slot4)).x / 2)
elseif slot7 == 3 then
uv1.NewLine()
uv1.SameLine(uv3 - slot9.x - 5)
end
if slot5[0] then
for slot13, slot14 in pairs(slot5) do
uv1.TextColored(slot6[slot13] or uv4[uv5.Text], uv2(slot14))
uv1.SameLine(nil, 0)
end
uv1.NewLine()
else
uv1.Text(uv2(slot4))
end
end
end(slot0)
end