├── README.md ├── anti_teamkill ├── README.md └── anti_teamkill.lua ├── bomb_esp ├── README.md └── bomb_esp.lua ├── bomb_timer ├── README.md └── bomb_timer.lua ├── bullet_impacts ├── README.md └── bullet_impacts.lua ├── change_chicken ├── README.md └── change_chicken_size_model.lua ├── change_mindmghc ├── README.md └── change_min_dmg_hc_on_key.lua ├── change_pingspike ├── README.md └── change_pingspike_on_key.lua ├── chicken_esp ├── README.md └── chicken_esp.lua ├── coinesp ├── README.md └── coinesp.lua ├── create_lua_from_clipboard ├── README.md └── create_lua_from_clipboard.lua ├── csgo_stats ├── README.md ├── achievements_unlocker.lua └── stats_changer.lua ├── custom_alerts ├── README.md ├── custom_alerts.lua └── example.lua ├── disable esp distance ├── README.md └── disable esp distance.lua ├── disable jammer └── disable jammer.lua ├── disable_rendering ├── README.md └── disable_rendering.lua ├── dlights_elights ├── README.md ├── dlights.lua └── dlights_elights.lua ├── dmg_taken ├── README.md └── dmg_taken.lua ├── drone_aimbot ├── README.md └── drone_aimbot.lua ├── esp_builder ├── README.md └── esp_builder.lua ├── export_config_to_hastebin └── export_config_to_hastebin.lua ├── fake_yaw_jitter ├── README.md └── fake_yaw_jitter.lua ├── free_cam ├── README.md └── free_cam.lua ├── gamma ├── README.md └── force_monitorgamma.lua ├── health_based_glow ├── README.md └── health_based_glow.lua ├── hitchance ├── README.md └── increase_hitchance.lua ├── hostage_bar ├── README.md └── grabbing_hostage.lua ├── hudchat ├── README.md └── print_to_hudchat.lua ├── infobox ├── README.md └── infobox.lua ├── inputsys └── is_button_pressed.lua ├── killtracker ├── README.md └── killtracker.lua ├── knifechanger ├── README.md └── knifechanger.lua ├── legit_aa └── legit_aa.lua ├── libs └── Vector3D.lua ├── local_player_bullet_beams ├── README.md └── local_player_bullet_beams.lua ├── local_player_glow ├── README.md └── local_player_glow.lua ├── lua sdk ├── README.md ├── example.lua └── lua sdk.lua ├── medal_changer ├── README.md └── medal_changer.lua ├── menu_color ├── README.md └── menu_color.lua ├── model_changer ├── README.md └── model_changer.lua ├── multipoint ├── README.md └── decrease_multipoint.lua ├── no_sets ├── README.md └── no_sets.lua ├── old_skeet_esp ├── README.md └── old_skeet_esp.lua ├── panorama ├── access_panorama.lua ├── fortnite_emotes.zip ├── invite_friendcode.lua ├── lobby_chat.lua ├── main_menu_model_changer.lua ├── mass_invite.lua ├── remove_main_menu_model.lua └── unlock_loadout.lua ├── prevent_rage_settings ├── README.md └── prevent_loading_rage_settings.lua ├── ragdoll_launcher └── ragdoll launcher.lua ├── randomize_aa ├── README.md └── randomize_aa_on_hit_fire.lua ├── rankreveal └── rankreveal.lua ├── replace_materials ├── README.md └── replace_materials.lua ├── semi_rage_fix ├── README.md └── aaaaaaaaaa.lua ├── silent_backtrack └── silent_backtrack.lua ├── slidewalk ├── README.md └── slidewalk.lua ├── sound_esp ├── README.md └── sound_esp.lua ├── steam_api ├── README.md └── steam_api.lua ├── third_person_dead_key └── third_person_dead_key.lua ├── translator ├── README.md └── translator.lua └── x88 ├── README.md └── x88.lua /README.md: -------------------------------------------------------------------------------- 1 | # lua-scripts 2 | -------------------------------------------------------------------------------- /anti_teamkill/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/mNr5bVC.png) 2 | ![video](https://youtu.be/ECakr-UrEVc) 3 | -------------------------------------------------------------------------------- /anti_teamkill/anti_teamkill.lua: -------------------------------------------------------------------------------- 1 | local vector3d, err = pcall(require, "libs/Vector3D") 2 | if err and vector3d == false then 3 | vector3d, err = pcall(require, "Vector3D") 4 | if err and vector3d == false then 5 | client.log("Please download https://gamesense.pub/forums/viewtopic.php?id=5464") 6 | client.log("or https://github.com/Aviarita/lua-scripts/blob/master/libs/Vector3D.lua to use this script") 7 | client.log(err) 8 | return 9 | end 10 | end 11 | 12 | local GetUi = ui.get 13 | local NewCheckbox = ui.new_checkbox 14 | local NewRef = ui.reference 15 | local SetVisible = ui.set_visible 16 | local SetCallback = ui.set_callback 17 | 18 | local Log = client.log 19 | local AddEvent = client.set_event_callback 20 | local GetLocalPlayer = entity.get_local_player 21 | local GetProp = entity.get_prop 22 | local SetProp = entity.set_prop 23 | 24 | local ui = { 25 | enabled = NewCheckbox("misc","miscellaneous", "Anti-teamkill"), 26 | ignore_while_spraying = NewCheckbox("misc", "miscellaneous", "Ignore while spraying"), 27 | ragebot = NewRef("rage", "aimbot", "enabled"), 28 | } 29 | 30 | -- credits to sapphyrus 31 | local function get_crosshair_entity(skip_entindex, max_distance) 32 | local skip_entindex = skip_entindex ~= nil and skip_entindex or GetLocalPlayer() 33 | local max_distance = max_distance ~= nil and max_distance or 8192 34 | 35 | local pitch, yaw = client.camera_angles() 36 | 37 | local fwd = angle_forward(Vector3(pitch, yaw, 0)) 38 | local start_pos = Vector3(client.eye_position()) 39 | local end_pos = start_pos + (fwd * max_distance) 40 | 41 | local x1, y1, z1 = start_pos:unpack() 42 | 43 | local fraction, entindex_hit = client.trace_line(skip_entindex, x1, y1, z1, end_pos:unpack()) 44 | return entindex_hit, fraction 45 | end 46 | 47 | -- credits end -- 48 | 49 | SetVisible(ui.ignore_while_spraying, false) 50 | SetCallback(ui.enabled, function() 51 | SetVisible(ui.ignore_while_spraying, GetUi(ui.enabled)) 52 | end) 53 | 54 | local function is_grenade_or_bomb(weapon_id) 55 | local weapon_item_index = GetProp(weapon_id, "m_iItemDefinitionIndex") 56 | if weapon_item_index == 43 then -- flashbang 57 | return true 58 | 59 | elseif weapon_item_index == 44 then -- he 60 | return true 61 | 62 | elseif weapon_item_index == 45 then -- smoke 63 | return true 64 | 65 | elseif weapon_item_index == 46 then -- molotov 66 | return true 67 | 68 | elseif weapon_item_index == 47 then -- decoy 69 | return true 70 | 71 | elseif weapon_item_index == 48 then -- incendiary 72 | return true 73 | 74 | elseif weapon_item_index == 49 then -- bomb 75 | return true 76 | else 77 | return false 78 | end 79 | end 80 | 81 | AddEvent("setup_command", function(cmd) 82 | if not GetUi(ui.enabled) then 83 | return 84 | end 85 | if GetUi(ui.ragebot) then return end 86 | 87 | local shots_fired = GetProp(GetLocalPlayer(), "m_iShotsFired") 88 | 89 | if shots_fired > 2 and GetUi(ui.ignore_while_spraying) then return end 90 | 91 | local is_grenade = is_grenade_or_bomb(entity.get_player_weapon(GetLocalPlayer())) 92 | 93 | if is_grenade then 94 | return 95 | end 96 | 97 | local player = get_crosshair_entity() 98 | if not player then return end 99 | 100 | if GetProp(player, "m_iTeamNum") == GetProp(GetLocalPlayer(), "m_iTeamNum") then 101 | cmd.in_attack = 0 102 | end 103 | end) 104 | -------------------------------------------------------------------------------- /bomb_esp/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://third-rei.ch/qqOaYNdruM.png) 2 | ![screen](https://third-rei.ch/OWRp4enSNN.png) 3 | -------------------------------------------------------------------------------- /bomb_esp/bomb_esp.lua: -------------------------------------------------------------------------------- 1 | local bomb_cb, bomb_color = ui.reference("visuals", "other esp", "bomb") 2 | local dropped_weapons = ui.reference("visuals", "other esp", "dropped weapons") 3 | 4 | local function get_bomb_time(bomb) 5 | local bomb_time = entity.get_prop(bomb, "m_flC4Blow") - globals.curtime() 6 | return bomb_time or 0 7 | end 8 | 9 | local function GetDistanceInFeet(a_x, a_y, a_z, b_x, b_y, b_z) 10 | return math.ceil(math.sqrt(math.pow(a_x - b_x, 2) + math.pow(a_y - b_y, 2) + math.pow(a_z - b_z, 2)) * 0.0254 / 0.3048) 11 | end 12 | 13 | local function round(b, c) 14 | local d = 10 ^ (c or 0) 15 | return math.floor(b * d + 0.5) / d 16 | end 17 | 18 | local function round_to_fifth(num) 19 | num = round(num, 0) 20 | num = num / 5 21 | num = round(num, 0) 22 | num = num * 5 23 | return num 24 | end 25 | 26 | client.set_event_callback("paint", function(ctx) 27 | if not ui.get(bomb_cb) then return end 28 | 29 | local c4 = entity.get_all("CC4")[1] 30 | if c4 ~= nil then 31 | local r, g, b, a = ui.get(bomb_color) 32 | local epx, epy, epz = entity.get_prop(c4, "m_vecOrigin") 33 | local lpx, lpy, lpz = entity.get_prop(entity.get_local_player(), "m_vecOrigin") 34 | if epx == 0 and epy == 0 and epz == 0 then return end 35 | local wx, wy = client.world_to_screen(ctx, epx, epy, epz) 36 | if wx ~= nil then 37 | if ui.get(dropped_weapons) == "Off" then 38 | client.draw_text(ctx, wx, wy, r, g, b, a, "c-", 0, "BOMB") 39 | end 40 | wy = wy - 10 41 | client.draw_text(ctx, wx, wy, r, g, b, a, "c-", 0, round_to_fifth(GetDistanceInFeet(lpx, lpy, lpz, epx, epy, epz)) .. "FT") 42 | end 43 | end 44 | 45 | local c4_planted = entity.get_all("CPlantedC4")[1] 46 | if c4_planted ~= nil and entity.get_prop(c4_planted, "m_bBombDefused") == 0 and get_bomb_time(c4_planted) > 0 then 47 | local r, g, b, a = ui.get(bomb_color) 48 | local epx, epy, epz = entity.get_prop(c4_planted, "m_vecOrigin") 49 | local lpx, lpy, lpz = entity.get_prop(entity.get_local_player(), "m_vecOrigin") 50 | epz = epz + 4 51 | local wx, wy = client.world_to_screen(ctx, epx, epy, epz) 52 | if wx ~= nil then 53 | client.draw_text(ctx, wx, wy, r, g, b, a, "c-", 0, "BOMB") 54 | wy = wy - 10 55 | client.draw_text(ctx, wx, wy, r, g, b, a, "c-", 0, round_to_fifth(GetDistanceInFeet(lpx, lpy, lpz, epx, epy, epz)) .. "FT") 56 | end 57 | end 58 | end) 59 | -------------------------------------------------------------------------------- /bomb_timer/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://third-rei.ch/R7kDz8ArRL.png) 2 | ![menu](https://i.imgur.com/4MOxSS2.png) 3 | 4 | -------------------------------------------------------------------------------- /bomb_timer/bomb_timer.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local NewCheckbox = ui.new_checkbox 3 | local GetLocalPlayer = entity.get_local_player 4 | local checkbox = NewCheckbox("visuals", "other esp", "Bomb timer") 5 | local AddEvent = client.set_event_callback 6 | local GetProp = entity.get_prop 7 | local GetAll = entity.get_all 8 | 9 | local screen = { 10 | x, y, 11 | left, 12 | right, 13 | bottom, 14 | top 15 | } 16 | 17 | local DrawText = client.draw_text 18 | local DrawRect = client.draw_rectangle 19 | 20 | -- ghetto but works GetProp(player, "m_bHasDefuser") didnt really gave me the result i wanted -- 21 | -- this only breaks when you reload the script after someone already got a defuser 22 | 23 | local defusers = 0 24 | 25 | AddEvent("item_pickup", function(e) 26 | if e.item == "defuser" then 27 | defusers = defusers + 1 28 | end 29 | end) 30 | 31 | AddEvent("item_remove", function(e) 32 | if e.item == "defuser" and defusers >= 1 then 33 | defusers = defusers - 1 34 | end 35 | end) 36 | 37 | local function get_bomb_time(bomb) 38 | local bomb_time = GetProp(bomb, "m_flC4Blow") - globals.curtime() 39 | if bomb_time == nil then return 0 end 40 | if bomb_time > 0 then 41 | return bomb_time 42 | end 43 | return 0 44 | end 45 | 46 | local function can_not_defuse(player, bomb) 47 | local bomb_time = GetProp(bomb, "m_flC4Blow") - globals.curtime() 48 | if bomb_time == nil then return false end 49 | return (bomb_time < 5 and defusers >= 1) or (bomb_time < 10 and defusers == 0) 50 | end 51 | 52 | local function get_defuser(bomb) 53 | return GetProp(bomb, "m_hBombDefuser") 54 | end 55 | 56 | AddEvent("paint", function(ctx) 57 | 58 | screen.x, screen.y = client.screen_size() 59 | screen.left = screen.x - screen.x 60 | screen.right = screen.x 61 | screen.bottom = screen.y 62 | screen.top = screen.y - screen.y 63 | 64 | local bomb = GetAll("CPlantedC4")[1] 65 | if bomb == nil then return false end 66 | 67 | if GetProp(bomb, "m_bBombDefused") == 1 then return end 68 | 69 | local players = entity.get_players(false) 70 | for i = 0, #players do 71 | local player = players[i] 72 | 73 | local r, g, b = 0, 255, 0 74 | 75 | if can_not_defuse(player, bomb) then 76 | r, g, b = 255, 0, 0 77 | else 78 | r, g, b = 75, 230, 64 79 | end 80 | 81 | if GetUi(checkbox) and get_bomb_time(bomb) ~= 0 then 82 | if get_defuser(bomb) ~= nil then return end 83 | local bomb_time = get_bomb_time(bomb) 84 | local bomb_time_max = client.get_cvar("mp_c4timer") 85 | local height = ((math.abs((screen.bottom) - screen.top) * bomb_time) / bomb_time_max) 86 | DrawRect(ctx, screen.left, 0, screen.left + 20, screen.bottom, 32, 32, 32, 50) 87 | DrawRect(ctx, screen.left + 1, screen.bottom - height, screen.left + 18, screen.bottom, r, g, b, 80) 88 | end 89 | end 90 | end) 91 | -------------------------------------------------------------------------------- /bullet_impacts/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://third-rei.ch/bvqUwre6AN.png) 2 | -------------------------------------------------------------------------------- /bullet_impacts/bullet_impacts.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | 3 | local bullet_impacts = ui.new_checkbox("visuals", "effects", "Bullet impacts") 4 | local server_color = ui.new_color_picker("visuals", "effects", "Server impacts", 0, 0, 255, 127) 5 | local bullet_impacts_duration = ui.new_slider("visuals", "effects", "\nbullet_impacts_duration", 1, 20, 4, true, "s") 6 | local client_color = ui.new_color_picker("visuals", "effects", "Client impacts", 255, 0, 0, 127) 7 | 8 | ui.set_callback(bullet_impacts, function(s) 9 | local state = ui.get(s) 10 | ui.set_visible(server_color, state) 11 | ui.set_visible(bullet_impacts_duration, state) 12 | ui.set_visible(client_color, state) 13 | end) 14 | 15 | ffi.cdef[[ 16 | struct vec3_t_piajndfhijnad8fnh8uandfh { 17 | float x; 18 | float y; 19 | float z; 20 | }; 21 | struct CCSWeaponData_t_anuihjzfdhnadf8zuhadfnh { 22 | char _0x0000[0x108]; 23 | float flRange; 24 | }; 25 | typedef struct CCSWeaponData_t_anuihjzfdhnadf8zuhadfnh*(__thiscall* get_ccs_weapon_info_t)(void*); 26 | typedef void*(__thiscall* get_client_entity_t)(void*, int); 27 | typedef void(__thiscall* add_box_overlay_t)(void*, const struct vec3_t_piajndfhijnad8fnh8uandfh&, const struct vec3_t_piajndfhijnad8fnh8uandfh&, const struct vec3_t_piajndfhijnad8fnh8uandfh&, struct vec3_t_piajndfhijnad8fnh8uandfh const&, int, int, int, int, float); 28 | ]] 29 | 30 | local get = ui.get 31 | local new, cast = ffi.new, ffi.cast 32 | local get_local_player, get_player_weapon, get_prop = entity.get_local_player, entity.get_player_weapon, entity.get_prop 33 | local weapon_accuracy_nospread, weapon_recoil_scale = cvar.weapon_accuracy_nospread, cvar.weapon_recoil_scale 34 | local userid_to_entindex, key_state, camera_angles, eye_position, trace_line = client.userid_to_entindex, client.key_state, client.camera_angles, client.eye_position, client.trace_line 35 | 36 | local voidptr = ffi.typeof("void***") 37 | local rawientitylist = client.create_interface("client_panorama.dll", "VClientEntityList003") or error("VClientEntityList003 wasnt found", 2) 38 | local ientitylist = cast(voidptr, rawientitylist) or error("rawientitylist is nil", 2) 39 | local get_client_entity = cast("get_client_entity_t", ientitylist[0][3]) or error("get_client_entity is nil", 2) 40 | 41 | local debug_overlay = cast(voidptr, client.create_interface("engine.dll", "VDebugOverlay004")) 42 | local add_box_overlay = cast("add_box_overlay_t", debug_overlay[0][1]) 43 | local nrcl = ui.reference("rage", "other", "remove recoil") 44 | local rbot, rbothk = ui.reference("rage", "aimbot", "enabled") 45 | 46 | local sin, cos, rad = math.sin, math.cos, math.rad 47 | function angle_forward( angle ) -- angle -> direction vector (forward) 48 | if angle[1] ~= nil and angle[2] ~= nil then 49 | local sin_pitch = sin( rad( angle[1] ) ) 50 | local cos_pitch = cos( rad( angle[1] ) ) 51 | local sin_yaw = sin( rad( angle[2] ) ) 52 | local cos_yaw = cos( rad( angle[2] ) ) 53 | 54 | return { 55 | cos_pitch * cos_yaw, 56 | cos_pitch * sin_yaw, 57 | -sin_pitch 58 | } 59 | end 60 | return { 61 | nil 62 | } 63 | end 64 | 65 | local function draw_impact(x,y,z, color) 66 | local r,g,b,a = get(color) 67 | local dur = get(bullet_impacts_duration) 68 | 69 | local position = new("struct vec3_t_piajndfhijnad8fnh8uandfh") 70 | position.x = x position.y = y position.z = z 71 | local mins = new("struct vec3_t_piajndfhijnad8fnh8uandfh") 72 | mins.x = -2 mins.y = -2 mins.z = -2 73 | local maxs = new("struct vec3_t_piajndfhijnad8fnh8uandfh") 74 | maxs.x = 2 maxs.y = 2 maxs.z = 2 75 | local ori = new("struct vec3_t_piajndfhijnad8fnh8uandfh") 76 | ori.x = 0 ori.y = 0 ori.z = 0 77 | 78 | add_box_overlay(debug_overlay, position, mins, maxs, ori, r, g, b, a, dur) 79 | end 80 | 81 | client.set_event_callback("aim_fire", function(e) 82 | if get(bullet_impacts) then 83 | draw_impact(e.x,e.y,e.z, client_color) 84 | end 85 | end) 86 | 87 | client.set_event_callback("bullet_impact", function(e) 88 | local entindex = userid_to_entindex(e.userid) 89 | local me = get_local_player() 90 | if entindex == me and get(bullet_impacts) then 91 | draw_impact(e.x,e.y,e.z, server_color) 92 | end 93 | end) 94 | 95 | client.set_event_callback("weapon_fire", function(e) 96 | local entindex = userid_to_entindex(e.userid) 97 | local me = get_local_player() 98 | 99 | if entindex == me and key_state(0x01) and get(bullet_impacts) and not e.weapon:find("knife") then 100 | local pitch, yaw = camera_angles() 101 | local punch = {get_prop(me, "m_aimPunchAngle")} 102 | 103 | if weapon_accuracy_nospread:get_int() == 0 and not get(nrcl) then 104 | pitch = pitch + (punch[1] * weapon_recoil_scale:get_float()) 105 | yaw = yaw + (punch[2] * weapon_recoil_scale:get_float()) 106 | end 107 | 108 | local wpnent = cast(voidptr, get_client_entity(ientitylist, get_player_weapon(me))) 109 | if wpnent == nil then return end 110 | local get_ccs_weapon_info = cast("get_ccs_weapon_info_t", wpnent[0][460]) 111 | local ccsweaponinfo = get_ccs_weapon_info(wpnent) 112 | local range = ccsweaponinfo.flRange 113 | 114 | local fwd = angle_forward( { pitch, yaw } ) 115 | if fwd[1] == nil then 116 | return 117 | end 118 | local start_pos = { eye_position() } 119 | local fraction = trace_line(me, 120 | start_pos[1], 121 | start_pos[2], 122 | start_pos[3], 123 | start_pos[1] + (fwd[1] * range), 124 | start_pos[2] + (fwd[2] * range), 125 | start_pos[3] + (fwd[3] * range)) 126 | 127 | if fraction < 1 then 128 | local end_pos = { 129 | start_pos[1] + (fwd[1] * (range * fraction)), 130 | start_pos[2] + (fwd[2] * (range * fraction)), 131 | start_pos[3] + (fwd[3] * (range * fraction)), 132 | } 133 | draw_impact(end_pos[1],end_pos[2],end_pos[3], client_color) 134 | end 135 | end 136 | end) 137 | -------------------------------------------------------------------------------- /change_chicken/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/eSZukoe.png) 2 | ![screen](https://i.imgur.com/GrajIl7.png) 3 | -------------------------------------------------------------------------------- /change_chicken/change_chicken_size_model.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local NewCombo = ui.new_combobox 3 | local NewSlider = ui.new_slider 4 | local GetAll = entity.get_all 5 | local GetProp = entity.get_prop 6 | local SetProp = entity.set_prop 7 | local AddEvent = client.set_event_callback 8 | 9 | local chicken_outfit = NewCombo("visuals", "effects", "Chicken outfit", { 10 | "Default Chicken", 11 | "Party Chicken", 12 | "Ghost Chicken", 13 | "Festive Chicken", 14 | "Easter Chicken", 15 | "Jack-o'-Chicken" 16 | }) 17 | 18 | local chicken_size = NewSlider("visuals", "effects", "Chicken size", 10, 1500, 100, true, "", .01) 19 | 20 | AddEvent("paint", function() 21 | 22 | local chickens = GetAll("CChicken") 23 | 24 | if chickens == nil then return end 25 | 26 | for i = 1, #chickens do 27 | local chicken = chickens[i] 28 | local outfit = GetUi(chicken_outfit) 29 | 30 | SetProp(chicken, "m_flModelScale", GetUi(chicken_size) * .01) 31 | 32 | if outfit == "Default Chicken" then 33 | SetProp(chicken, "m_nBody", 0) 34 | 35 | elseif outfit == "Party Chicken" then 36 | SetProp(chicken, "m_nBody", 1) 37 | 38 | elseif outfit == "Ghost Chicken" then 39 | SetProp(chicken, "m_nBody", 2) 40 | 41 | elseif outfit == "Festive Chicken" then 42 | SetProp(chicken, "m_nBody", 3) 43 | 44 | elseif outfit == "Easter Chicken" then 45 | SetProp(chicken, "m_nBody", 4) 46 | 47 | elseif outfit == "Jack-o'-Chicken" then 48 | SetProp(chicken, "m_nBody", 5) 49 | end 50 | end 51 | end) 52 | -------------------------------------------------------------------------------- /change_mindmghc/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/6mihgKt.png) 2 | ![console](https://i.imgur.com/fjuNvGb.png) 3 | -------------------------------------------------------------------------------- /change_mindmghc/change_min_dmg_hc_on_key.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local SetUi = ui.set 3 | local NewSlider = ui.new_slider 4 | local NewCheckbox = ui.new_checkbox 5 | local NewHotkey = ui.new_hotkey 6 | local NewRef = ui.reference 7 | local SetVisible = ui.set_visible 8 | local SetCallback = ui.set_callback 9 | 10 | local GetLocalPlayer = entity.get_local_player 11 | 12 | local Log = client.log 13 | 14 | local AddEvent = client.set_event_callback 15 | 16 | local rage, aimbot = "rage", "aimbot" 17 | 18 | local ui = { 19 | ref = { 20 | hc = NewRef(rage, aimbot, "minimum hit chance"), 21 | min_dmg = NewRef(rage, aimbot, "minimum damage") 22 | }, 23 | 24 | enabled = NewCheckbox(rage, aimbot, "Enable in/decrease hotkeys"), 25 | 26 | hitchance = NewSlider(rage, aimbot, "In/decrease hit chance by", 0, 15, 5), 27 | hitchance_increase_key = NewHotkey(rage, aimbot, "Increase key"), 28 | hitchance_decrease_key = NewHotkey(rage, aimbot, "Decrease key"), 29 | 30 | min_dmg = NewSlider(rage, aimbot, "In/decrease minimum damage by", 0, 15, 5), 31 | min_dmg_increase_key = NewHotkey(rage, aimbot, "Increase key"), 32 | min_dmg_decrease_key = NewHotkey(rage, aimbot, "Decrease key") 33 | } 34 | 35 | local function clamp(min, max, current) 36 | if current > max then 37 | current = max 38 | elseif current < min then 39 | current = min 40 | end 41 | return math.floor(current) 42 | end 43 | 44 | local tickcount = globals.tickcount 45 | local lasttick = tickcount() 46 | 47 | local function timer(delay, f) 48 | local now = tickcount() 49 | if lasttick < now - delay then 50 | f() 51 | lasttick = now 52 | end 53 | end 54 | 55 | SetVisible(ui.hitchance, false) 56 | SetVisible(ui.hitchance_increase_key, false) 57 | SetVisible(ui.hitchance_decrease_key, false) 58 | SetVisible(ui.min_dmg, false) 59 | SetVisible(ui.min_dmg_increase_key, false) 60 | SetVisible(ui.min_dmg_decrease_key, false) 61 | 62 | SetCallback(ui.enabled, function() 63 | SetVisible(ui.hitchance, GetUi(ui.enabled)) 64 | SetVisible(ui.hitchance_increase_key, GetUi(ui.enabled)) 65 | SetVisible(ui.hitchance_decrease_key, GetUi(ui.enabled)) 66 | SetVisible(ui.min_dmg, GetUi(ui.enabled)) 67 | SetVisible(ui.min_dmg_increase_key, GetUi(ui.enabled)) 68 | SetVisible(ui.min_dmg_decrease_key, GetUi(ui.enabled)) 69 | end) 70 | 71 | client.set_event_callback('paint', function(ctx) 72 | if GetUi(ui.enabled) == false then return end 73 | 74 | local now = tickcount() 75 | 76 | local cur_hc = GetUi(ui.ref.hc) 77 | local cur_min_dmg = GetUi(ui.ref.min_dmg) 78 | 79 | if GetUi(ui.hitchance_increase_key) == true and GetUi(ui.hitchance_decrease_key) == false then 80 | timer(10, function() 81 | local new_hc = clamp(0, 100, cur_hc + GetUi(ui.hitchance)) 82 | SetUi(ui.ref.hc, new_hc) 83 | Log("Set hitchance to: ", new_hc) 84 | end) 85 | elseif GetUi(ui.hitchance_decrease_key) == true and GetUi(ui.hitchance_increase_key) == false then 86 | timer(10, function() 87 | local new_hc = clamp(0, 100, cur_hc - GetUi(ui.hitchance)) 88 | SetUi(ui.ref.hc, new_hc) 89 | Log("Set hitchance to: ", new_hc) 90 | end) 91 | elseif GetUi(ui.hitchance_decrease_key) == true and GetUi(ui.hitchance_increase_key) == true then 92 | timer(10, function() 93 | Log("You can't do both at once.") 94 | end) 95 | end 96 | 97 | if GetUi(ui.min_dmg_increase_key) == true and GetUi(ui.min_dmg_decrease_key) == false then 98 | timer(10, function() 99 | local new_min_dmg = clamp(0, 126, cur_min_dmg + GetUi(ui.min_dmg)) 100 | SetUi(ui.ref.min_dmg, new_min_dmg) 101 | Log("Set minimum damage to: ", new_min_dmg) 102 | end) 103 | elseif GetUi(ui.min_dmg_decrease_key) == true and GetUi(ui.min_dmg_increase_key) == false then 104 | timer(10, function() 105 | local new_min_dmg = clamp(0, 126, cur_min_dmg - GetUi(ui.min_dmg)) 106 | SetUi(ui.ref.min_dmg, new_min_dmg) 107 | Log("Set minimum damage to: ", new_min_dmg) 108 | end) 109 | elseif GetUi(ui.min_dmg_decrease_key) == true and GetUi(ui.min_dmg_increase_key) == true then 110 | timer(10, function() 111 | Log("You can't do both at once.") 112 | end) 113 | end 114 | 115 | 116 | end) 117 | client.set_event_callback('cs_game_disconnected', function() 118 | lasttick = -1 119 | end) 120 | -------------------------------------------------------------------------------- /change_pingspike/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/IZU6H2K.gif) 2 | ![indicators](https://third-rei.ch/ZMg6PSNC61.png) 3 | -------------------------------------------------------------------------------- /change_pingspike/change_pingspike_on_key.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local SetUi = ui.set 3 | local NewSlider = ui.new_slider 4 | local NewKey = ui.new_hotkey 5 | local NewRef = ui.reference 6 | local SetVisible = ui.set_visible 7 | local AddEvent = client.set_event_callback 8 | 9 | local GetLocalPlayer = entity.get_local_player 10 | local GetAll = entity.get_all 11 | local GetProp = entity.get_prop 12 | 13 | local pingspike_cb, _, pingspike_slider = NewRef("misc", "miscellaneous", "ping spike") 14 | local new_pingspike_key = NewKey("misc", "miscellaneous", "New ping spike (on key press)") 15 | local new_pingspike_value = NewSlider("misc", "miscellaneous", "New ping spike (on key press)", 1, 750, 200) 16 | 17 | local old_value = GetUi(pingspike_slider) 18 | 19 | local should_change = 0 20 | 21 | SetVisible(new_pingspike_key, GetUi(pingspike_cb)) 22 | SetVisible(new_pingspike_value, GetUi(pingspike_cb)) 23 | 24 | AddEvent("run_command", function() 25 | if GetUi(new_pingspike_key) then 26 | SetUi(pingspike_slider, GetUi(new_pingspike_value)) 27 | should_change = 1 28 | elseif GetUi(pingspike_slider) ~= old_value and should_change == 1 then 29 | should_change = 0 30 | SetUi(pingspike_slider, old_value) 31 | elseif GetUi(new_pingspike_key) ~= true then 32 | old_value = GetUi(pingspike_slider) 33 | end 34 | 35 | SetVisible(new_pingspike_key, GetUi(pingspike_cb)) 36 | SetVisible(new_pingspike_value, GetUi(pingspike_cb)) 37 | end) 38 | 39 | -- credits to chay -- 40 | 41 | time_start = globals.realtime() 42 | 43 | local function rgb_percents(percentage) 44 | local r = 124 * 2 - 165 * percentage 45 | local g = 260 * percentage 46 | local b = 13 47 | return r, g, b 48 | end 49 | 50 | AddEvent("paint", function(ctx) 51 | 52 | if GetLocalPlayer() == nil then return end 53 | 54 | if diff_old == nil then 55 | diff_old = 0 56 | end 57 | 58 | local player_resource = GetAll("CCSPlayerResource")[1] 59 | if player_resource == nil then return end 60 | local ping = GetProp(player_resource, "m_iPing", GetLocalPlayer()) 61 | if ping == nil then return end 62 | local maxping = GetUi(new_pingspike_value) 63 | if maxping == nil then return end 64 | local diff = math.floor(ping / maxping * 100) 65 | if diff == nil then return end 66 | 67 | if diff_old ~= diff and globals.realtime() - time_start > 0.03 then 68 | time_start = globals.realtime() 69 | if diff_old > diff then i = -1 else i = 1 end 70 | diff_old = diff_old + i 71 | end 72 | 73 | local r, g, b = rgb_percents(diff_old / 100) 74 | 75 | if diff < 75 and diff > 0 then 76 | r, g, b = rgb_percents(diff_old / 100) 77 | elseif diff >= 75 then 78 | r, g, b = 124, 195, 13 79 | elseif diff < 0 then 80 | r, g, b = 237, 27, 3 81 | end 82 | 83 | client.draw_indicator(ctx, r, g, b, 255, "Cur: " .. ping) 84 | 85 | if GetUi(new_pingspike_key) == false then return end 86 | client.draw_indicator(ctx, 124, 195, 13, 255, "Max: " .. maxping) 87 | end) 88 | 89 | -------------------------------------------------------------------------------- /chicken_esp/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://third-rei.ch/LAidrIImBJ.png) 2 | -------------------------------------------------------------------------------- /chicken_esp/chicken_esp.lua: -------------------------------------------------------------------------------- 1 | local vector3d, err = pcall(require, "libs/Vector3D") 2 | if err and vector3d == false then 3 | vector3d, err = pcall(require, "Vector3D") 4 | if err and vector3d == false then 5 | client.log("Please download https://gamesense.pub/forums/viewtopic.php?id=5464 to use this script") 6 | client.log(err) 7 | return 8 | end 9 | end 10 | 11 | local enabled = ui.new_checkbox("visuals", "other esp", "Chickens") 12 | local color = ui.new_color_picker("visuals", "other esp", "Chickens", 255, 255, 255, 255) 13 | 14 | client.set_event_callback("paint", function(ctx) 15 | 16 | local chickens = entity.get_all("CChicken") 17 | 18 | if chickens == nil or not ui.get(enabled) then return end 19 | 20 | for i = 1, #chickens do 21 | local chicken = chickens[i] 22 | 23 | local origin = Vector3(entity.get_prop(chicken, "m_vecOrigin")) 24 | local min = Vector3(entity.get_prop(chicken, "m_vecMins")) + origin 25 | local max = Vector3(entity.get_prop(chicken, "m_vecMaxs")) + origin 26 | 27 | local points = { 28 | Vector3(min.x, min.y, min.z), 29 | Vector3(min.x, max.y, min.z), 30 | Vector3(max.x, max.y, min.z), 31 | Vector3(max.x, min.y, min.z), 32 | Vector3(min.x, min.y, max.z), 33 | Vector3(min.x, max.y, max.z), 34 | Vector3(max.x, max.y, max.z), 35 | Vector3(max.x, min.y, max.z), 36 | } 37 | 38 | local edges = { 39 | {0, 1}, {1, 2}, {2, 3}, {3, 0}, 40 | {5, 6}, {6, 7}, {1, 4}, {4, 8}, 41 | {0, 4}, {1, 5}, {2, 6}, {3, 7}, 42 | {5, 8}, {7, 8}, {3, 4}, 43 | } 44 | 45 | local r, g, b, a = ui.get(color) 46 | 47 | for i = 1, #edges do 48 | if points[edges[i][1]] ~= nil and points[edges[i][2]] ~= nil then 49 | local p1 = Vector3(client.world_to_screen(ctx, points[edges[i][1]].x, points[edges[i][1]].y, points[edges[i][1]].z)) 50 | local p2 = Vector3(client.world_to_screen(ctx, points[edges[i][2]].x, points[edges[i][2]].y, points[edges[i][2]].z)) 51 | client.draw_line(ctx, p1.x, p1.y, p2.x, p2.y, r, g, b, a) 52 | end 53 | end 54 | 55 | local entity_pos = Vector3(entity.get_prop(chicken, "m_vecOrigin")) 56 | entity_pos = entity_pos + Vector3(0, 0, 28) 57 | local wx, wy = client.world_to_screen(ctx, entity_pos:unpack()) 58 | if wx ~= nil then 59 | client.draw_text(ctx, wx, wy, 255,255,255,a, "c", 0, "Chicken") 60 | end 61 | end 62 | end) 63 | -------------------------------------------------------------------------------- /coinesp/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://i.imgur.com/DdvUpDL.png) 2 | -------------------------------------------------------------------------------- /coinesp/coinesp.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | 3 | ffi.cdef[[ 4 | struct glow_object_definition_t { 5 | void *m_ent; 6 | float r; 7 | float g; 8 | float b; 9 | float a; 10 | char pad0x4[4]; 11 | float unk1; 12 | char pad0x8[8]; 13 | bool m_render_when_occluded; 14 | bool m_render_when_unoccluded; 15 | bool m_full_bloom_render; 16 | char pad0x1[1]; 17 | int m_full_bloom_stencil_test_value; 18 | int m_style; 19 | int m_split_screen_slot; 20 | int m_next_free_slot; 21 | 22 | static const int END_OF_FREE_LIST = -1; 23 | static const int ENTRY_IN_USE = -2; 24 | }; 25 | struct c_glow_object_mngr { 26 | struct glow_object_definition_t *m_glow_object_definitions; 27 | int m_max_size; 28 | int m_pad; 29 | int m_size; 30 | struct glow_object_definition_t *m_glow_object_definitions2; 31 | int m_current_objects; 32 | }; 33 | typedef void*(__thiscall* get_client_entity_t)(void*, int); 34 | typedef int(__thiscall* get_highest_entity_by_index_t)(void*); 35 | ]] 36 | 37 | local ientitylist = ffi.cast(ffi.typeof("void***"), client.create_interface("client_panorama.dll", "VClientEntityList003")) 38 | local get_client_entity = ffi.cast("get_client_entity_t", ientitylist[0][3]) 39 | local get_highest_entity_by_index = ffi.cast("get_highest_entity_by_index_t", ientitylist[0][6]) 40 | 41 | local glow_object_manager = ffi.cast("struct c_glow_object_mngr**", ffi.cast("char*", client.find_signature("client_panorama.dll", "\x0F\x11\x05\xCC\xCC\xCC\xCC\x83\xC8\x01") ) + 3)[0] 42 | client.set_event_callback("paint", function(ctx) 43 | local coinEnts = {} 44 | 45 | for i=1, get_highest_entity_by_index(ientitylist) do 46 | local classname = entity.get_classname(i) 47 | if classname == "CDynamicProp" then 48 | local materials = materialsystem.get_model_materials(i) 49 | for j=1, #materials do 50 | local model = materials[j]:get_name() 51 | if model:find("coop/challenge_coin") then 52 | table.insert(coinEnts, get_client_entity(ientitylist, i)) 53 | local pos = {entity.get_prop(i, "m_vecOrigin")} 54 | if pos[1] ~= nil and pos[1] ~= 0 then 55 | local wx, wy = renderer.world_to_screen(pos[1], pos[2], pos[3]) 56 | if wx ~= nil then 57 | renderer.text(wx, wy, 255, 255, 255, 255, "c-", 999, "COIN") 58 | end 59 | end 60 | end 61 | end 62 | end 63 | end 64 | 65 | if #coinEnts > 1 then 66 | for j=1, #coinEnts do 67 | for i=0, glow_object_manager.m_size do 68 | if glow_object_manager.m_glow_object_definitions[i].m_next_free_slot == -2 and glow_object_manager.m_glow_object_definitions[i].m_ent then 69 | local glowobject = ffi.cast("struct glow_object_definition_t&", glow_object_manager.m_glow_object_definitions[i]) 70 | if glowobject.m_ent == coinEnts[j] then 71 | glowobject.r = 1 72 | glowobject.g = 1 73 | glowobject.b = 1 74 | glowobject.a = 0.7 75 | glowobject.m_style = 0 76 | glowobject.m_render_when_occluded = true 77 | glowobject.m_render_when_unoccluded = false 78 | end 79 | end 80 | end 81 | end 82 | end 83 | coinEnts = {} 84 | end) 85 | -------------------------------------------------------------------------------- /create_lua_from_clipboard/README.md: -------------------------------------------------------------------------------- 1 | This lua allows you to create a lua file using the content of your clipboard. Simply load the lua, copy any lua code to your clipboard and press the "create lua from clipboard" button thats located in the "Lua" groupbox in the "misc" tab. 2 | 3 | With the console command "mv" you can rename the previously created lua, simply type "mv " in the console. 4 | For example 5 | 6 | ``` 7 | [gamesense] Created jaifpqlcrykuongj.lua 8 | ] mv jaifpqlcrykuongj.lua new_file.lua 9 | [gamesense] successfully renamed jaifpqlcrykuongj.lua to new_file.lua 10 | ``` 11 | 12 | With the console command "ls" you can see all the file's you've created in the current session. 13 | For example 14 | ``` 15 | ] ls 16 | [gamesense] jaifpqlcrykuongj.lua 17 | [gamesense] otjvipgyqnrwywdz.lua 18 | [gamesense] igkkhfjaezcmumvp.lua 19 | [gamesense] ijawckzchgqcjzec.lua 20 | [gamesense] kjcitbvaszyhszgz.lua 21 | [gamesense] juqqnffcsrmllzwt.lua 22 | ``` 23 | 24 | ### Required: 25 | 26 | [My filesystem library](https://github.com/Aviarita/filesystem) 27 | -------------------------------------------------------------------------------- /create_lua_from_clipboard/create_lua_from_clipboard.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | package.path = package.path .. ".\\?.lua;.\\?.ljbc;.\\lib\\?.lua;.\\libs\\?.lua;.\\lib\\?.ljbc;.\\libs\\?.ljbc;" 3 | local filesystem = require("filesystem") 4 | 5 | ffi.cdef[[ 6 | typedef void(__thiscall* asp_t)(void*, const char*, const char*, int); 7 | typedef bool(__thiscall* rsp_t)(void*, const char*, const char*); 8 | typedef int(__thiscall* gcpbs_t)(void*); 9 | typedef int(__thiscall* gcpbt_t)(void*, int, char*, int); 10 | typedef char(__thiscall* gcd_t)(void*, char*, int); 11 | typedef bool(__thiscall* mv_t)(void*, const char*, const char*, const char*); 12 | ]] 13 | 14 | local fs = ffi.cast(ffi.typeof("void***"), client.create_interface("filesystem_stdio.dll", "VFileSystem017")) 15 | local asp = ffi.cast("asp_t", client.find_signature("filesystem_stdio.dll", "\x55\x8B\xEC\x81\xEC\xCC\xCC\xCC\xCC\x8B\x55\x08\x53\x56\x57")) 16 | local rsp = ffi.cast("rsp_t", client.find_signature("filesystem_stdio.dll", "\x55\x8B\xEC\x81\xEC\xCC\xCC\xCC\xCC\x8B\x55\x08\x53\x8B")) 17 | local gcd = ffi.cast("gcd_t", client.find_signature("filesystem_stdio.dll", "\x55\x8B\xEC\x56\x8B\x75\x08\x56\xFF")) 18 | local mv = ffi.cast("mv_t", client.find_signature("filesystem_stdio.dll", "\x55\x8B\xEC\x81\xEC\xCC\xCC\xCC\xCC\x8B\x55\x10")) 19 | 20 | local isystem = ffi.cast(ffi.typeof("void***"), client.create_interface("vgui2.dll", "VGUI_System010")) 21 | local gcpbs = ffi.cast("gcpbs_t", isystem[0][7]) 22 | local gcpbt = ffi.cast("gcpbt_t", isystem[0][11]) 23 | 24 | local function random_file_name(len) 25 | local res, len = "", len or 32 26 | for i=1, len do 27 | res = res .. string.char(client.random_int(97, 122)) 28 | end 29 | return res 30 | end 31 | 32 | local p = ffi.new("char[260]") 33 | gcd(fs, p, ffi.sizeof(p)) 34 | asp(fs, p, "XGAME", 0) 35 | 36 | local created_files = {} 37 | 38 | local filename = nil 39 | local randomize_filename = ui.new_checkbox("config", "lua", "Randomize file name") 40 | ui.new_button("config", "Lua", "Create lua from clipboard", function() 41 | local fileName = ui.get(randomize_filename) and random_file_name(16) or ui.get(filename) 42 | if fileName:len() < 1 then 43 | error("you need to enter a file name") 44 | end 45 | if fileName:find(".lua") then 46 | fileName = fileName:gsub(".lua", "") 47 | end 48 | fileName = fileName .. ".lua" 49 | 50 | local bufferSize = gcpbs(isystem) 51 | local char = ffi.new("char[?]", bufferSize) 52 | gcpbt(isystem, 0, char, bufferSize * ffi.sizeof("char[?]", bufferSize)) 53 | local source = ffi.string(char) 54 | print("Created " .. fileName) 55 | table.insert(created_files, fileName) 56 | local file = filesystem.open_file(fileName, "XGAME", "w") 57 | file:write(source) 58 | file:close() 59 | end) 60 | filename = ui.new_textbox("config", "lua", "Create lua from clipboard") 61 | 62 | ui.set_callback(randomize_filename, function(self) 63 | ui.set_visible(filename, not ui.get(self)) 64 | end) 65 | ui.set_visible(filename, not ui.get(randomize_filename)) 66 | 67 | function string:split(sep) 68 | local sep, fields = sep or ":", {} 69 | local pattern = string.format("([^%s]+)", sep) 70 | self:gsub(pattern, function(c) fields[#fields+1] = c end) 71 | return fields 72 | end 73 | 74 | client.set_event_callback("console_input", function(cmd) 75 | local tmpCmd = string.sub(cmd, 1, 3) 76 | if tmpCmd == "mv " then 77 | if cmd:len() > string.len("mv ") then 78 | local cmd = cmd:gsub("mv ", "") 79 | local args = cmd:split(" ") 80 | if #args < 2 then 81 | print("usage mv ") 82 | return true 83 | end 84 | local curFile = args[1] local newFile = args[2] 85 | if mv(fs, curFile, newFile, "XGAME") then 86 | print("successfully renamed " .. curFile .. " to " .. newFile) 87 | else 88 | error("something wen't wrong when trying to rename the lua, please check the entered arguments.") 89 | end 90 | 91 | end 92 | return true 93 | elseif tmpCmd == "ls" then 94 | if #created_files < 1 then 95 | print("you haven't created any files yet.") 96 | return true 97 | end 98 | for i=1, #created_files do 99 | print(created_files[i]) 100 | end 101 | return true 102 | end 103 | end) 104 | 105 | client.set_event_callback("shutdown", function(cmd) 106 | rsp(fs, p, "XGAME") 107 | end) 108 | -------------------------------------------------------------------------------- /csgo_stats/README.md: -------------------------------------------------------------------------------- 1 | ## Achievement unlocker 2 | ![s](https://i.imgur.com/KwxDbGW.png) 3 | 4 | ## Stats changer 5 | ![s](https://i.imgur.com/ukaWs6X.png) 6 | -------------------------------------------------------------------------------- /csgo_stats/achievements_unlocker.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | 3 | ffi.cdef[[ 4 | typedef unsigned char wchar_t; 5 | 6 | typedef struct { 7 | void* pad[5]; 8 | void* steam_user_stats; // 5 9 | } achievements_unlocker_steam_ctx_t; 10 | 11 | typedef bool(__thiscall* get_achievement_t)(void*, const char*, bool*); // 6 12 | typedef bool(__thiscall* set_achievement_t)(void*, const char*); // 7 13 | typedef bool(__thiscall* clear_achievement_t)(void*, const char*); // 8 14 | typedef bool(__thiscall* store_stats_t)(void*); // 10 15 | typedef uint32_t(__thiscall* get_num_achievements_t)(void*); // 14 16 | typedef const char*(__thiscall* get_achievement_name_t)(void*, uint32_t); // 15 17 | 18 | typedef wchar_t*(__thiscall* find_safe_t)(void*, const char*); 19 | typedef int(__thiscall* convert_unicode_to_ansi_t)(void*, const wchar_t*, char*, int); 20 | 21 | typedef const char*(__thiscall* get_command_line_t)(void*); 22 | ]] 23 | 24 | local isystem = ffi.cast(ffi.typeof("void***"), client.create_interface("vgui2.dll", "VGUI_System010")) 25 | local get_command_line = ffi.cast("get_command_line_t", isystem[0][23]) 26 | 27 | -- DO NOT EDIT THIS LINE AS THE STATS CHANGER MAY CAUSE VAC BANS WHEN USED OUTSIDE OF THE INSECURE MODE 28 | if not ffi.string(get_command_line(isystem)):find("-insecure") then 29 | error("-insecure wasnt detected, stopping the cheat from loading the lua") 30 | end 31 | 32 | 33 | local steam_ctx_match = client.find_signature("client_panorama.dll", "\xFF\x15\xCC\xCC\xCC\xCC\xB9\xCC\xCC\xCC\xCC\xE8\xCC\xCC\xCC\xCC\x6A") or error("steam_ctx") 34 | local steam_ctx = ffi.cast("achievements_unlocker_steam_ctx_t**", ffi.cast("char*", steam_ctx_match) + 7)[0] or error("steam_ctx not found") 35 | local steam_user_stats = steam_ctx.steam_user_stats 36 | local steam_user_stats_vtable = ffi.cast("void***", steam_user_stats)[0] or error("steam_user_stats error") 37 | 38 | local get_achievement = ffi.cast("get_achievement_t", steam_user_stats_vtable[6]) 39 | local set_achievement = ffi.cast("set_achievement_t", steam_user_stats_vtable[7]) 40 | local clear_achievement = ffi.cast("clear_achievement_t", steam_user_stats_vtable[8]) 41 | local store_stats = ffi.cast("store_stats_t", steam_user_stats_vtable[10]) 42 | local get_num_achievements = ffi.cast("get_num_achievements_t", steam_user_stats_vtable[14]) 43 | local get_achievement_name = ffi.cast("get_achievement_name_t", steam_user_stats_vtable[15]) 44 | 45 | local localize = ffi.cast(ffi.typeof('void***'), client.create_interface("localize.dll", "Localize_001")) 46 | 47 | local find_safe = ffi.cast("find_safe_t", localize[0][12]) 48 | local convert_unicode_to_ansi = ffi.cast("convert_unicode_to_ansi_t", localize[0][16]) 49 | 50 | local function get_localized_string(text) 51 | text = "#" .. text .. "_NAME" 52 | local localized_string = find_safe(localize, text) 53 | local char_buffer = ffi.new('char[1024]') 54 | convert_unicode_to_ansi(localize, localized_string, char_buffer, 1024) 55 | return ffi.string(char_buffer) 56 | end 57 | 58 | ui.new_button("lua", "b", "Get Achievements", function() 59 | local num = get_num_achievements(steam_user_stats) 60 | for i=0, num do 61 | local name = ffi.string(get_achievement_name(steam_user_stats, i)) 62 | if name:len() > 2 then 63 | local localized_name = get_localized_string(name) 64 | local unlocked = ffi.new("bool[1]") 65 | get_achievement(steam_user_stats, name, unlocked) 66 | print(localized_name .. " (" .. name .. ") : unlocked: ", unlocked[0]) 67 | end 68 | end 69 | end) 70 | 71 | ui.new_button("lua", "b", "Unlock Achievements", function() 72 | local num = get_num_achievements(steam_user_stats) 73 | for i=0, num do 74 | local name = ffi.string(get_achievement_name(steam_user_stats, i)) 75 | local unlocked = ffi.new("bool[1]") 76 | get_achievement(steam_user_stats, name, unlocked) 77 | if not unlocked[0] then 78 | set_achievement(steam_user_stats, name) 79 | end 80 | end 81 | store_stats(steam_user_stats) 82 | print("Successfully unlocked all achievements") 83 | end) 84 | 85 | ui.new_button("lua", "b", "Lock Achievements", function() 86 | local num = get_num_achievements(steam_user_stats) 87 | for i=0, num do 88 | local name = ffi.string(get_achievement_name(steam_user_stats, i)) 89 | local unlocked = ffi.new("bool[1]") 90 | get_achievement(steam_user_stats, name, unlocked) 91 | if unlocked[0] then 92 | clear_achievement(steam_user_stats, name) 93 | end 94 | end 95 | store_stats(steam_user_stats) 96 | print("Successfully locked all achievements") 97 | end) 98 | -------------------------------------------------------------------------------- /csgo_stats/stats_changer.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | 3 | ffi.cdef[[ 4 | typedef struct { 5 | void* pad[5]; 6 | void* steam_user_stats; // 5 7 | } csgo_stats_changer_steam_ctx_t; 8 | 9 | typedef bool(__thiscall* get_stat_t)(void*, const char*, int32_t*); 10 | typedef bool(__thiscall* set_stat_t)(void*, const char*, int32_t); 11 | typedef bool(__thiscall* store_stats_t)(void*); 12 | 13 | typedef const char*(__thiscall* get_command_line_t)(void*); 14 | ]] 15 | 16 | local isystem = ffi.cast(ffi.typeof("void***"), client.create_interface("vgui2.dll", "VGUI_System010")) 17 | local get_command_line = ffi.cast("get_command_line_t", isystem[0][23]) 18 | 19 | -- DO NOT EDIT THIS LINE AS THE STATS CHANGER MAY CAUSE VAC BANS WHEN USED OUTSIDE OF THE INSECURE MODE 20 | if not ffi.string(get_command_line(isystem)):find("-insecure") then 21 | error("-insecure wasnt detected, stopping the cheat from loading the lua") 22 | end 23 | 24 | local steam_ctx_match = client.find_signature("client_panorama.dll", "\xFF\x15\xCC\xCC\xCC\xCC\xB9\xCC\xCC\xCC\xCC\xE8\xCC\xCC\xCC\xCC\x6A") or error("steam_ctx") 25 | local steam_ctx = ffi.cast("csgo_stats_changer_steam_ctx_t**", ffi.cast("char*", steam_ctx_match) + 7)[0] or error("steam_ctx not found") 26 | local steam_user_stats = steam_ctx.steam_user_stats 27 | local steam_user_stats_vtable = ffi.cast("void***", steam_user_stats)[0] or error("steam_user_stats error") 28 | 29 | local get_stat = ffi.cast("get_stat_t", steam_user_stats_vtable[2]) 30 | local set_stat = ffi.cast("set_stat_t", steam_user_stats_vtable[4]) 31 | local store_stats = ffi.cast("store_stats_t", steam_user_stats_vtable[10]) 32 | 33 | local stats = { 34 | "GI_lesson_Csgo_cycle_weapons_kb", 35 | "GI_lesson_bomb_sites_A", 36 | "GI_lesson_bomb_sites_B", 37 | "GI_lesson_csgo_instr_explain_bomb_carrier", 38 | "GI_lesson_csgo_instr_explain_buyarmor", 39 | "GI_lesson_csgo_instr_explain_buymenu", 40 | "GI_lesson_csgo_instr_explain_follow_bomber", 41 | "GI_lesson_csgo_instr_explain_inspect", 42 | "GI_lesson_csgo_instr_explain_pickup_bomb", 43 | "GI_lesson_csgo_instr_explain_plant_bomb", 44 | "GI_lesson_csgo_instr_explain_prevent_bomb_pickup", 45 | "GI_lesson_csgo_instr_explain_reload", 46 | "GI_lesson_csgo_instr_explain_zoom", 47 | "GI_lesson_defuse_planted_bomb", 48 | "GI_lesson_find_planted_bomb", 49 | "GI_lesson_tr_explain_plant_bomb", 50 | "GI_lesson_version_number", 51 | "last_match_contribution_score", 52 | "last_match_ct_wins", 53 | "last_match_damage", 54 | "last_match_deaths", 55 | "last_match_favweapon_hits", 56 | "last_match_favweapon_id", 57 | "last_match_favweapon_kills", 58 | "last_match_favweapon_shots", 59 | "last_match_kills", 60 | "last_match_max_players", 61 | "last_match_money_spent", 62 | "last_match_mvps", 63 | "last_match_rounds", 64 | "last_match_t_wins", 65 | "last_match_wins", 66 | "total_contribution_score", 67 | "total_damage_done", 68 | "total_deaths", 69 | "total_defused_bombs", 70 | "total_gg_matches_played", 71 | "total_gun_game_rounds_played", 72 | "total_gun_game_rounds_won", 73 | "total_hits_ak47", 74 | "total_hits_aug", 75 | "total_hits_bizon", 76 | "total_hits_deagle", 77 | "total_hits_famas", 78 | "total_hits_fiveseven", 79 | "total_hits_g3sg1", 80 | "total_hits_galilar", 81 | "total_hits_glock", 82 | "total_hits_hkp2000", 83 | "total_hits_m249", 84 | "total_hits_m4a1", 85 | "total_hits_mac10", 86 | "total_hits_mag7", 87 | "total_hits_mp7", 88 | "total_hits_mp9", 89 | "total_hits_negev", 90 | "total_hits_nova", 91 | "total_hits_p250", 92 | "total_hits_p90", 93 | "total_hits_sg556", 94 | "total_hits_ssg08", 95 | "total_hits_ump45", 96 | "total_hits_xm1014", 97 | "total_kills", 98 | "total_kills_against_zoomed_sniper", 99 | "total_kills_ak47", 100 | "total_kills_aug", 101 | "total_kills_bizon", 102 | "total_kills_deagle", 103 | "total_kills_enemy_blinded", 104 | "total_kills_famas", 105 | "total_kills_fiveseven", 106 | "total_kills_g3sg1", 107 | "total_kills_galilar", 108 | "total_kills_glock", 109 | "total_kills_headshot", 110 | "total_kills_hkp2000", 111 | "total_kills_m249", 112 | "total_kills_m4a1", 113 | "total_kills_mac10", 114 | "total_kills_mp7", 115 | "total_kills_mp9", 116 | "total_kills_negev", 117 | "total_kills_nova", 118 | "total_kills_p250", 119 | "total_kills_p90", 120 | "total_kills_sg556", 121 | "total_kills_ssg08", 122 | "total_kills_ump45", 123 | "total_kills_xm1014", 124 | "total_matches_played", 125 | "total_matches_won", 126 | "total_money_earned", 127 | "total_mvps", 128 | "total_planted_bombs", 129 | "total_rounds_map_cs_italy", 130 | "total_rounds_map_de_cbble", 131 | "total_rounds_map_de_dust2", 132 | "total_rounds_map_de_nuke", 133 | "total_rounds_map_de_train", 134 | "total_rounds_played", 135 | "total_shots_ak47", 136 | "total_shots_aug", 137 | "total_shots_awp", 138 | "total_shots_bizon", 139 | "total_shots_deagle", 140 | "total_shots_famas", 141 | "total_shots_fired", 142 | "total_shots_fiveseven", 143 | "total_shots_g3sg1", 144 | "total_shots_galilar", 145 | "total_shots_glock", 146 | "total_shots_hit", 147 | "total_shots_hkp2000", 148 | "total_shots_m249", 149 | "total_shots_m4a1", 150 | "total_shots_mac10", 151 | "total_shots_mag7", 152 | "total_shots_mp7", 153 | "total_shots_mp9", 154 | "total_shots_negev", 155 | "total_shots_nova", 156 | "total_shots_p250", 157 | "total_shots_p90", 158 | "total_shots_sawedoff", 159 | "total_shots_scar20", 160 | "total_shots_sg556", 161 | "total_shots_ssg08", 162 | "total_shots_ump45", 163 | "total_shots_xm1014", 164 | "total_time_played", 165 | "total_weapons_donated", 166 | "total_wins", 167 | "total_wins_map_cs_italy", 168 | "total_wins_map_de_cbble", 169 | "total_wins_map_de_dust2", 170 | "total_wins_map_de_nuke", 171 | "total_wins_map_de_train", 172 | "total_wins_pistolround" 173 | } 174 | 175 | ui.new_button("lua", "b", "Get stats", function() 176 | for i=1, #stats do 177 | local data = ffi.new("int32_t[1]") 178 | if get_stat(steam_user_stats, stats[i], data) then 179 | print(stats[i] .. " : " .. data[0]) 180 | end 181 | end 182 | end) 183 | 184 | local show_stat_changer = ui.new_checkbox("lua", "b", "Show stat changer") 185 | 186 | local sliders = {} 187 | for i=1, #stats do 188 | local data = ffi.new("int32_t[1]") 189 | if get_stat(steam_user_stats, stats[i], data) then 190 | local slider = ui.new_slider("lua", "b", stats[i], 0, 999999, data[0]) 191 | table.insert(sliders, slider) 192 | end 193 | end 194 | 195 | for i=1, #sliders do 196 | ui.set_callback(sliders[i], function(self) 197 | local name = ui.name(self) 198 | local value = ui.get(self) 199 | set_stat(steam_user_stats, name, value) 200 | store_stats(steam_user_stats) 201 | end) 202 | end 203 | 204 | for i=1, #sliders do 205 | ui.set_visible(sliders[i], ui.get(show_stat_changer)) 206 | end 207 | ui.set_callback(show_stat_changer, function(self) 208 | for i=1, #sliders do 209 | ui.set_visible(sliders[i], ui.get(self)) 210 | end 211 | end) 212 | -------------------------------------------------------------------------------- /custom_alerts/README.md: -------------------------------------------------------------------------------- 1 | ![s](https://i.imgur.com/IQxZyNi.png) 2 | -------------------------------------------------------------------------------- /custom_alerts/custom_alerts.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | 3 | ffi.cdef[[ 4 | typedef void***(__thiscall* FindHudElement_t)(void*, const char*); 5 | typedef void( __thiscall* ShowAlert_t)( void*, const char*, int ); 6 | typedef void( __thiscall* HidePanel_t)( void*, bool ); 7 | 8 | struct CHudElement { 9 | char pad0x20[0x20]; 10 | const char* m_pName; 11 | }; 12 | ]] 13 | 14 | local match = client.find_signature("client_panorama.dll", "\xB9\xCC\xCC\xCC\xCC\x88\x46\x09") or error("Hud not found") 15 | local char_match = ffi.cast("char*", match) + 1 16 | local hud = ffi.cast("void**", char_match)[0] or error("hud is nil") 17 | 18 | match = client.find_signature("client_panorama.dll", "\x55\x8B\xEC\x53\x8B\x5D\x08\x56\x57\x8B\xF9\x33\xF6\x39\x77\x28") or error("FindHudElement not found") 19 | local find_hud_element = ffi.cast("FindHudElement_t", match) 20 | 21 | local alerts = find_hud_element(hud, "CCSGO_HudUniqueAlerts") or error("Couldn't find CCSGO_HudUniqueAlerts") 22 | 23 | local function GetPanel2D(hudelement) 24 | return ffi.cast("void***", ffi.cast("char*", hudelement) - 0x14) 25 | end 26 | 27 | local function ShowAlert(panel, text, mode) 28 | local thisptr = GetPanel2D(panel) 29 | local match = client.find_signature("client_panorama.dll", "\x55\x8B\xEC\xA1\xCC\xCC\xCC\xCC\x83\xEC\x08\x56\x8B\xF1\x57\xA8\x01\x75\x26\x8B\x0D\xCC\xCC\xCC\xCC\x83\xC8\x01\xA3\xCC\xCC\xCC\xCC\x68\xCC\xCC\xCC\xCC\x8B\x01\xFF\x90\xCC\xCC\xCC\xCC\x66\xA3\xCC\xCC\xCC\xCC\xA1") or error("ShowAlert not found") 30 | local fn = ffi.cast("ShowAlert_t", match) 31 | fn(thisptr, text, mode) 32 | end 33 | 34 | local function follow_relative_jump(address) 35 | return ffi.cast("uintptr_t", ffi.cast("uintptr_t*", ffi.cast("char*", address) + 1)[0] + ffi.cast("uintptr_t", ffi.cast("char*", address) + 5)) 36 | end 37 | 38 | local function HidePanel(panel) 39 | local thisptr = GetPanel2D(panel) 40 | local match = client.find_signature("client_panorama.dll", "\xE8\xCC\xCC\xCC\xCC\x5F\x5E\x5B\x8B\xE5\x5D\xC2\x04\x00\x8B\xD3\xB9\xCC\xCC\xCC\xCC\xE8\xCC\xCC\xCC\xCC\x85\xC0\x0F\x85\xCC\xCC\xCC\xCC\x8B\x44\x24\x14") or error("HidePanel not found") 41 | local fn = ffi.cast("HidePanel_t", follow_relative_jump(match)) 42 | fn(thisptr, false) 43 | end 44 | 45 | local alerts_mt = {} 46 | alerts_mt.__index = alerts_mt 47 | 48 | local function create_alert(text) 49 | local panel = find_hud_element(hud, "CCSGO_HudUniqueAlerts") or error("Couldn't find CCSGO_HudUniqueAlerts") 50 | 51 | alerts_mt.panel = panel 52 | alerts_mt.text = text 53 | 54 | alerts_mt.show = function() 55 | local thisptr = GetPanel2D(alerts_mt.panel) 56 | local match = client.find_signature("client_panorama.dll", "\x55\x8B\xEC\xA1\xCC\xCC\xCC\xCC\x83\xEC\x08\x56\x8B\xF1\x57\xA8\x01\x75\x26\x8B\x0D\xCC\xCC\xCC\xCC\x83\xC8\x01\xA3\xCC\xCC\xCC\xCC\x68\xCC\xCC\xCC\xCC\x8B\x01\xFF\x90\xCC\xCC\xCC\xCC\x66\xA3\xCC\xCC\xCC\xCC\xA1") or error("ShowAlert not found") 57 | local fn = ffi.cast("ShowAlert_t", match) 58 | fn(thisptr, alerts_mt.text, 1) 59 | end 60 | 61 | alerts_mt.hide = function() 62 | local thisptr = GetPanel2D(alerts_mt.panel) 63 | local match = client.find_signature("client_panorama.dll", "\xE8\xCC\xCC\xCC\xCC\x5F\x5E\x5B\x8B\xE5\x5D\xC2\x04\x00\x8B\xD3\xB9\xCC\xCC\xCC\xCC\xE8\xCC\xCC\xCC\xCC\x85\xC0\x0F\x85\xCC\xCC\xCC\xCC\x8B\x44\x24\x14") or error("HidePanel not found") 64 | local fn = ffi.cast("HidePanel_t", follow_relative_jump(match)) 65 | fn(thisptr, false) 66 | end 67 | return setmetatable({}, alerts_mt) 68 | end 69 | 70 | return { 71 | create_alert = create_alert 72 | } 73 | -------------------------------------------------------------------------------- /custom_alerts/example.lua: -------------------------------------------------------------------------------- 1 | local alerts = require("custom alerts") 2 | local alert = alerts.create_alert("gamesense.pub") 3 | alert.show() 4 | client.delay_call(5, alert.hide) 5 | -------------------------------------------------------------------------------- /disable esp distance/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://third-rei.ch/mzviEFbtcv.png) 2 | ![menu](https://third-rei.ch/kJxjoQFjCn.png) 3 | -------------------------------------------------------------------------------- /disable esp distance/disable esp distance.lua: -------------------------------------------------------------------------------- 1 | local plist_ref = ui.reference("players", "players", "player list") 2 | local disable_vis = ui.reference("players", "adjustments", "disable visuals") 3 | local max_distance = ui.new_slider("visuals", "player esp", "Max distance", 0, 500, 250, true, "ft") 4 | 5 | local se = ui.reference("VISUALS", "Other ESP", "Shared ESP") 6 | local se_strict = ui.reference("VISUALS", "Other ESP", "Restrict shared ESP updates") 7 | 8 | local function get_distance_in_feet(a_x, a_y, a_z, b_x, b_y, b_z) 9 | return math.ceil(math.sqrt(math.pow(a_x - b_x, 2) + math.pow(a_y - b_y, 2) + math.pow(a_z - b_z, 2)) * 0.0254 / 0.3048) 10 | end 11 | 12 | client.set_event_callback("paint", function(ctx) 13 | local players = entity.get_players(true) 14 | 15 | local lpo = {x,y,z} 16 | lpo.x, lpo.y, lpo.z = entity.get_prop(entity.get_local_player(), "m_vecOrigin") 17 | 18 | ui.set(se, true) 19 | ui.set(se_strict, true) 20 | 21 | for i=1, #players do 22 | local eo = {x,y,z} 23 | eo.x, eo.y, eo.z = entity.get_prop(players[i], "m_vecOrigin") 24 | 25 | if eo.x == nil then return end 26 | 27 | local distance = get_distance_in_feet(lpo.x,lpo.y,lpo.z,eo.x,eo.y,eo.z) 28 | 29 | if distance > ui.get(max_distance) then 30 | ui.set(plist_ref, players[i]) 31 | ui.set(disable_vis, true) 32 | else 33 | ui.set(plist_ref, players[i]) 34 | ui.set(disable_vis, false) 35 | end 36 | end 37 | end) 38 | -------------------------------------------------------------------------------- /disable jammer/disable jammer.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | credits: 3 | https://www.unknowncheats.me/forum/counterstrike-global-offensive/310708-danger-zone-bypass-radar-jammer-healthshot-visuals-removal.html 4 | ]] 5 | local activated = ui.new_checkbox("visuals", "effects", "Disabled tablet jammer") 6 | local getprop, setprop, getall, me = entity.get_prop, entity.set_prop, entity.get_all, entity.get_local_player 7 | client.set_event_callback("run_command", function() 8 | local tablets = getall("CTablet") 9 | for i=1, #tablets do 10 | local tablet = tablets[i] 11 | local m_hOwner = getprop(tablet, "m_hOwner") 12 | if m_hOwner == me() then 13 | setprop(tablet, "m_bTabletReceptionIsBlocked", not ui.get(activated)) 14 | end 15 | end 16 | end) 17 | -------------------------------------------------------------------------------- /disable_rendering/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/xamrjE3.png) 2 | ![screen](https://third-rei.ch/CvZ62HbbjK.png) 3 | -------------------------------------------------------------------------------- /disable_rendering/disable_rendering.lua: -------------------------------------------------------------------------------- 1 | local activation = ui.new_checkbox("visuals", "effects", "Disable rendering of enemies") 2 | client.set_event_callback("paint", function() 3 | local players = entity.get_players(false) 4 | for i=1, #players do 5 | local player = players[i] 6 | if entity.get_prop(player, "m_iTeamNum") ~= entity.get_prop(entity.get_local_player(), "m_iTeamNum") and ui.get(activation) then 7 | entity.set_prop(player, "m_nRenderMode", 6) 8 | elseif not ui.get(activation) then 9 | entity.set_prop(player, "m_nRenderMode", 0) 10 | end 11 | end 12 | end) 13 | -------------------------------------------------------------------------------- /dlights_elights/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://i.imgur.com/1dGxhLu.png) 2 | -------------------------------------------------------------------------------- /dlights_elights/dlights.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | 3 | ffi.cdef[[ 4 | struct vec3_t { 5 | float x; 6 | float y; 7 | float z; 8 | }; 9 | 10 | struct ColorRGBExp32{ 11 | unsigned char r, g, b; 12 | signed char exponent; 13 | }; 14 | 15 | struct dlight_t { 16 | int flags; 17 | struct vec3_t origin; 18 | float radius; 19 | struct ColorRGBExp32 color; 20 | float die; 21 | float decay; 22 | float minlight; 23 | int key; 24 | int style; 25 | struct vec3_t direction; 26 | float innerAngle; 27 | float outerAngle; 28 | }; 29 | 30 | enum DlightFlags { 31 | DLIGHT_NO_WORLD_ILLUMINATION = 0x1, 32 | DLIGHT_NO_MODEL_ILLUMINATION = 0x2, 33 | }; 34 | 35 | typedef bool(__thiscall* is_weapon_t)(void*); 36 | ]] 37 | 38 | local function uuid(len) 39 | local res, len = "", len or 32 40 | for i=1, len do 41 | res = res .. string.char(client.random_int(97, 122)) 42 | end 43 | return res 44 | end 45 | 46 | local interface_mt = {} 47 | 48 | function interface_mt.get_function(self, index, ret, args) 49 | local ct = uuid() .. "_t" 50 | 51 | args = args or {} 52 | if type(args) == "table" then 53 | table.insert(args, 1, "void*") 54 | else 55 | return error("args has to be of type table", 2) 56 | end 57 | local success, res = pcall(ffi.cdef, "typedef " .. ret .. " (__thiscall* " .. ct .. ")(" .. table.concat(args, ", ") .. ");") 58 | if not success then 59 | error("invalid typedef: " .. res, 2) 60 | end 61 | 62 | local interface = self[1] 63 | local success, func = pcall(ffi.cast, ct, interface[0][index]) 64 | if not success then 65 | return error("failed to cast: " .. func, 2) 66 | end 67 | 68 | return function(...) 69 | local success, res = pcall(func, interface, ...) 70 | 71 | if not success then 72 | return error("call: " .. res, 2) 73 | end 74 | 75 | if ret == "const char*" then 76 | return res ~= nil and ffi.string(res) or nil 77 | end 78 | return res 79 | end 80 | end 81 | 82 | local function create_interface(dll, interface_name) 83 | local interface = (type(dll) == "string" and type(interface_name) == "string") and client.create_interface(dll, interface_name) or dll 84 | return setmetatable({ffi.cast(ffi.typeof("void***"), interface)}, {__index = interface_mt}) 85 | end 86 | 87 | local effects = create_interface("engine.dll", "VEngineEffects001") 88 | local alloc_dlight = effects:get_function(4, "struct dlight_t*", {"int"}) 89 | local alloc_elight = effects:get_function(5, "struct dlight_t*", {"int"}) 90 | local get_elight_by_key = effects:get_function(8, "struct dlight_t*", {"int"}) 91 | 92 | local entity_list = create_interface("client_panorama.dll", "VClientEntityList003") 93 | local get_client_entity = entity_list:get_function(3, "void*", {"int"}) 94 | local get_highest_entity_by_index = entity_list:get_function(6, "int") 95 | 96 | local class_ptr = ffi.typeof("void***") 97 | 98 | local enable_dlights = ui.new_checkbox("visuals", "effects", "Show dlights") 99 | local enable_elights = ui.new_checkbox("visuals", "effects", "Show elights") 100 | local players = { 101 | dlights = { 102 | enable = ui.new_checkbox("visuals", "effects", "Player dlights"), 103 | color = ui.new_color_picker("visuals", "effects", "dlights_color", 255,255,255,80), 104 | radius = ui.new_slider("visuals", "effects", "\ndlight_radius", 0, 250, 50, true, "ft"), 105 | style = ui.new_slider("visuals", "effects", "\ndlight_style", 1, 11, 1) 106 | }, 107 | elights = { 108 | enable = ui.new_checkbox("visuals", "effects", "Player elights"), 109 | color = ui.new_color_picker("visuals", "effects", "elights_color", 255,255,255,80), 110 | style = ui.new_slider("visuals", "effects", "\nelight_style", 1, 11, 1) 111 | } 112 | } 113 | local entites = { 114 | dlights = { 115 | enable = ui.new_checkbox("visuals", "effects", "Entity dlights"), 116 | color = ui.new_color_picker("visuals", "effects", "dlights_color", 255,255,255,80), 117 | radius = ui.new_slider("visuals", "effects", "\ndlight_radius", 0, 250, 50, true, "ft"), 118 | style = ui.new_slider("visuals", "effects", "\ndlight_style", 1, 11, 1) 119 | } 120 | } 121 | 122 | for i,v in pairs(players.dlights) do 123 | ui.set_visible(v, false) 124 | end 125 | for i,v in pairs(players.elights) do 126 | ui.set_visible(v, false) 127 | end 128 | for i,v in pairs(entites.dlights) do 129 | ui.set_visible(v, false) 130 | end 131 | 132 | ui.set_callback(enable_dlights, function(self) 133 | local state = ui.get(self) 134 | for i,v in pairs(players.dlights) do 135 | ui.set_visible(v, state) 136 | end 137 | for i,v in pairs(entites.dlights) do 138 | ui.set_visible(v, state) 139 | end 140 | end) 141 | ui.set_callback(enable_elights, function(self) 142 | local state = ui.get(self) 143 | for i,v in pairs(players.elights) do 144 | ui.set_visible(v, state) 145 | end 146 | end) 147 | 148 | local function draw_dlight(settings) 149 | local dlight = alloc_dlight(settings.index) 150 | dlight.key = settings.index 151 | 152 | dlight.color.r = settings.clr[1] 153 | dlight.color.g = settings.clr[2] 154 | dlight.color.b = settings.clr[3] 155 | dlight.color.exponent = settings.clr[4] / 8.5 156 | 157 | dlight.flags = settings.flags 158 | 159 | dlight.style = settings.stl 160 | 161 | dlight.direction = settings.pos 162 | dlight.origin = settings.pos 163 | 164 | dlight.radius = settings.rad 165 | 166 | dlight.die = globals.curtime() + 0.1 167 | 168 | dlight.decay = settings.rad / 5 169 | end 170 | local function draw_elight(settings) 171 | local elight = alloc_elight(settings.index) 172 | elight.key = settings.index 173 | elight.color.r = settings.clr[1] 174 | elight.color.g = settings.clr[2] 175 | elight.color.b = settings.clr[3] 176 | elight.color.exponent = settings.clr[4] / 8.5 177 | elight.flags = 0 178 | elight.style = settings.stl 179 | elight.direction = settings.pos 180 | elight.origin = settings.pos 181 | elight.radius = settings.rad 182 | elight.die = globals.curtime() + 0.1 183 | elight.decay = settings.rad / 5 184 | end 185 | 186 | client.set_event_callback("paint", function(ctx) 187 | 188 | local dli = { 189 | clr = {ui.get(players.dlights.color)}, 190 | rad = ui.get(players.dlights.radius), 191 | stl = ui.get(players.dlights.style) 192 | } 193 | local eli = { 194 | clr = {ui.get(players.elights.color)}, 195 | rad = 75, 196 | stl = ui.get(players.elights.style) 197 | } 198 | 199 | local pos = ffi.new("struct vec3_t") 200 | 201 | local niggers = entity.get_players(true) 202 | for i=1, #niggers do 203 | local ent = niggers[i] 204 | 205 | if ui.get(players.dlights.enable) then 206 | local pos_l = {entity.get_prop(ent, "m_vecOrigin")} 207 | pos.x = pos_l[1] 208 | pos.y = pos_l[2] 209 | pos.z = pos_l[3] 210 | 211 | local settings = { 212 | index = ent, 213 | clr = dli.clr, 214 | flags = 0x2, 215 | stl = dli.stl, 216 | pos = pos, 217 | rad = dli.rad 218 | } 219 | draw_dlight(settings) 220 | end 221 | 222 | if ui.get(players.elights.enable) then 223 | local pos_l = {entity.hitbox_position(ent, 0)} 224 | pos_l[3] = pos_l[3] + 35 225 | pos.x = pos_l[1] 226 | pos.y = pos_l[2] 227 | pos.z = pos_l[3] 228 | 229 | local settings = { 230 | index = ent, 231 | clr = eli.clr, 232 | flags = 0, 233 | stl = eli.stl, 234 | pos = pos, 235 | rad = eli.rad 236 | } 237 | draw_elight(settings) 238 | end 239 | end 240 | 241 | local dli = { 242 | clr = {ui.get(entites.dlights.color)}, 243 | rad = ui.get(entites.dlights.radius), 244 | stl = ui.get(entites.dlights.style) 245 | } 246 | for i=1, get_highest_entity_by_index() do 247 | local rawent = get_client_entity(i) 248 | local ent = ffi.cast(class_ptr, rawent) 249 | if ent ~= nil then 250 | local is_weapon = ffi.cast("is_weapon_t", ent[0][164]) 251 | if is_weapon(ent) then 252 | if ui.get(entites.dlights.enable) then 253 | local pos_l = {entity.get_prop(i, "m_vecOrigin")} 254 | pos.x = pos_l[1] 255 | pos.y = pos_l[2] 256 | pos.z = pos_l[3] 257 | 258 | local settings = { 259 | index = i, 260 | clr = dli.clr, 261 | flags = 0x2, 262 | stl = dli.stl, 263 | pos = pos, 264 | rad = dli.rad 265 | } 266 | draw_dlight(settings) 267 | end 268 | end 269 | end 270 | end 271 | end) -------------------------------------------------------------------------------- /dlights_elights/dlights_elights.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aviarita/lua-scripts/2f084ffab6ffbf1abca0c0e6cefdc7c79acb7714/dlights_elights/dlights_elights.lua -------------------------------------------------------------------------------- /dmg_taken/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://third-rei.ch/0DLpjxYfTI.png) 2 | ![screen](https://third-rei.ch/1giTbmA244.png) 3 | ![video](https://www.youtube.com/watch?v=DA0-ubrmVHM) 4 | -------------------------------------------------------------------------------- /drone_aimbot/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://i.imgur.com/mkZ7g8l.png) 2 | -------------------------------------------------------------------------------- /drone_aimbot/drone_aimbot.lua: -------------------------------------------------------------------------------- 1 | local drone_aimbot = ui.new_checkbox("lua", "b", "Drone aimbot") 2 | local aimbot_hotkey = ui.new_hotkey("lua", "b", "Drone aimbot", true) 3 | local aimbot_silent_aim = ui.new_checkbox("lua", "b", "Silent aim") 4 | 5 | local eye_position, camera_angles, visible, trace_line = client.eye_position, client.camera_angles, client.visible, client.trace_line 6 | local text, world_to_screen = renderer.text, renderer.world_to_screen 7 | local get_prop, get_all, get_local_player = entity.get_prop, entity.get_all, entity.get_local_player 8 | local deg, atan2, sqrt = math.deg, math.atan2, math.sqrt 9 | local get = ui.get 10 | 11 | local function vector_angles(x1, y1, z1, x2, y2, z2) 12 | --https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/mathlib/mathlib_base.cpp#L535-L563 13 | local origin_x, origin_y, origin_z 14 | local target_x, target_y, target_z 15 | if x2 == nil then 16 | target_x, target_y, target_z = x1, y1, z1 17 | origin_x, origin_y, origin_z = eye_position() 18 | if origin_x == nil then 19 | return 20 | end 21 | else 22 | origin_x, origin_y, origin_z = x1, y1, z1 23 | target_x, target_y, target_z = x2, y2, z2 24 | end 25 | 26 | --calculate delta of vectors 27 | local delta_x, delta_y, delta_z = target_x-origin_x, target_y-origin_y, target_z-origin_z 28 | 29 | if delta_x == 0 and delta_y == 0 then 30 | return (delta_z > 0 and 270 or 90), 0 31 | else 32 | --calculate yaw 33 | local yaw = deg(atan2(delta_y, delta_x)) 34 | 35 | --calculate pitch 36 | local hyp = sqrt(delta_x*delta_x + delta_y*delta_y) 37 | local pitch = deg(atan2(-delta_z, hyp)) 38 | 39 | return pitch, yaw 40 | end 41 | end 42 | 43 | local function get_dist(a_x, a_y, a_z, b_x, b_y, b_z) 44 | return math.sqrt(math.pow(a_x - b_x, 2) + math.pow(a_y - b_y, 2) + math.pow(a_z - b_z, 2)) 45 | end 46 | 47 | local function get_closest_drone() 48 | local target = nil 49 | local min_distance = 8192 50 | local me = get_local_player() 51 | local mx,my,mz = get_prop(me, "m_vecAbsOrigin") 52 | for _, ent in pairs(get_all("CDrone")) do 53 | local x,y,z = get_prop(ent, "m_vecOrigin") 54 | local distance = get_dist(mx,my,mz,x,y,z) 55 | local frac = trace_line(me, mx,my,mz,x,y,z) 56 | if distance < min_distance and frac < 1 and frac > 0.9 then 57 | min_distance = distance 58 | target =ent 59 | end 60 | end 61 | return target 62 | end 63 | 64 | local cur_target = nil 65 | client.set_event_callback("setup_command", function(cmd) 66 | if get(drone_aimbot) then 67 | local target = get_closest_drone() 68 | if target then 69 | local x,y,z = get_prop(target, "m_vecOrigin") 70 | local pitch, yaw = vector_angles(x,y,z) 71 | if get(aimbot_hotkey) then 72 | cur_target = target 73 | if get(aimbot_silent_aim) then 74 | cmd.pitch = pitch 75 | cmd.yaw = yaw 76 | else 77 | camera_angles(pitch, yaw) 78 | end 79 | end 80 | end 81 | end 82 | end) 83 | client.set_event_callback("paint", function(ctx) 84 | if get(drone_aimbot) then 85 | for _, ent in pairs(get_all("CDrone")) do 86 | local x,y,z = get_prop(ent, "m_vecOrigin") 87 | local wx, wy = world_to_screen(x, y, z) 88 | if get(aimbot_hotkey) then 89 | if wx then 90 | local r,g,b = 255,255,255 91 | if ent == cur_target then 92 | r,g,b = 255,0,0 93 | end 94 | text(wx, wy, r, g, b, 255, "-", 999, "DRONE") 95 | end 96 | end 97 | end 98 | end 99 | end) 100 | -------------------------------------------------------------------------------- /esp_builder/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/X5ecJfq.png) 2 | ![screen](https://i.imgur.com/2ZFrGL6.png) 3 | ![gradient](https://third-rei.ch/UNLdSaFLn9.png) 4 | -------------------------------------------------------------------------------- /export_config_to_hastebin/export_config_to_hastebin.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aviarita/lua-scripts/2f084ffab6ffbf1abca0c0e6cefdc7c79acb7714/export_config_to_hastebin/export_config_to_hastebin.lua -------------------------------------------------------------------------------- /fake_yaw_jitter/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/icTe1kl.png) 2 | 3 | [A gif of the script in action](https://third-rei.ch/O5221hB6QU.gif) 4 | -------------------------------------------------------------------------------- /fake_yaw_jitter/fake_yaw_jitter.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local SetUi = ui.set 3 | local NewSlider = ui.new_slider 4 | local NewCombo = ui.new_combobox 5 | local NewRef = ui.reference 6 | local SetVisible = ui.set_visible 7 | local SetCallback = ui.set_callback 8 | 9 | local AddEvent = client.set_event_callback 10 | 11 | local aa, aaa = "AA", "Anti-aimbot angles" 12 | 13 | local ui = { 14 | yaw_jitter = NewCombo(aa, aaa, "Fake Yaw Jitter", {"Off", "Offset", "Center", "Random"}), 15 | yaw_jitter_slider = NewSlider(aa, aaa, "Fake Yaw Jitter Value", -180, 180, 0), 16 | } 17 | 18 | menu_fakeyaw_ref, menu_fakeyaw_offset_ref = NewRef(aa, aaa, "Fake yaw") 19 | 20 | local tickcount = globals.tickcount 21 | local lasttick = tickcount() 22 | 23 | local function timer(delay, f) 24 | local now = tickcount() 25 | if lasttick < now - delay then 26 | f() 27 | lasttick = now 28 | end 29 | end 30 | 31 | local function clamp(min, max, current) 32 | if current > max then 33 | current = max 34 | elseif current < min then 35 | current = min 36 | end 37 | return math.floor(current) 38 | end 39 | 40 | function IsNumberNegative(intNumber) 41 | if(string.sub(tostring(intNumber), 1, 1) == "-") then 42 | return true; 43 | else 44 | return false 45 | end 46 | return nil 47 | end 48 | 49 | local fake_yaw = 0 50 | 51 | local offset_jitter = 0 52 | local center_jitter = 0 53 | AddEvent("run_command", function() 54 | 55 | SetVisible(ui.yaw_jitter, GetUi(menu_fakeyaw_ref) ~= "Off") 56 | SetVisible(ui.yaw_jitter_slider, GetUi(ui.yaw_jitter) ~= "Off" and GetUi(menu_fakeyaw_ref) ~= "Off") 57 | 58 | if GetUi(menu_fakeyaw_ref) == "Sideways" then 59 | if IsNumberNegative(GetUi(ui.yaw_jitter_slider)) then 60 | if GetUi(ui.yaw_jitter) == "Offset" then 61 | fake_yaw = 90 62 | elseif GetUi(ui.yaw_jitter) == "Random" then 63 | fake_yaw = -90 64 | else 65 | fake_yaw = -90 66 | end 67 | else 68 | if GetUi(ui.yaw_jitter) == "Offset" then 69 | fake_yaw = -90 70 | elseif GetUi(ui.yaw_jitter) == "Random" then 71 | fake_yaw = 90 72 | else 73 | fake_yaw = 90 74 | end 75 | end 76 | elseif GetUi(menu_fakeyaw_ref) == "180" then 77 | fake_yaw = 0 78 | else 79 | fake_yaw = 0 80 | end 81 | 82 | if GetUi(menu_fakeyaw_ref) ~= "Off" then 83 | if GetUi(ui.yaw_jitter) == "Offset" then 84 | if offset_jitter == 0 then 85 | timer(1, function() 86 | SetUi(menu_fakeyaw_offset_ref, fake_yaw) 87 | offset_jitter = 1 88 | end) 89 | 90 | elseif offset_jitter == 1 then 91 | timer(1, function() 92 | SetUi(menu_fakeyaw_offset_ref, GetUi(ui.yaw_jitter_slider)) 93 | offset_jitter = 0 94 | end) 95 | end 96 | 97 | elseif GetUi(ui.yaw_jitter) == "Center" then 98 | 99 | if center_jitter == 0 then 100 | timer(1, function() 101 | SetUi(menu_fakeyaw_offset_ref, clamp(-180, 180, fake_yaw + GetUi(ui.yaw_jitter_slider))) 102 | center_jitter = 1 103 | end) 104 | 105 | elseif center_jitter == 1 then 106 | timer(1, function() 107 | SetUi(menu_fakeyaw_offset_ref, clamp(-180, 180, fake_yaw + (-GetUi(ui.yaw_jitter_slider)))) 108 | center_jitter = 0 109 | end) 110 | end 111 | 112 | elseif GetUi(ui.yaw_jitter) == "Random" then 113 | if IsNumberNegative(GetUi(ui.yaw_jitter_slider)) then 114 | local jitter = client.random_int(GetUi(ui.yaw_jitter_slider), (GetUi(ui.yaw_jitter_slider) - GetUi(ui.yaw_jitter_slider) - GetUi(ui.yaw_jitter_slider))) 115 | SetUi(menu_fakeyaw_offset_ref, clamp(-180, 180, fake_yaw + jitter)) 116 | else 117 | local jitter = client.random_int(-GetUi(ui.yaw_jitter_slider), GetUi(ui.yaw_jitter_slider)) 118 | SetUi(menu_fakeyaw_offset_ref, clamp(-180, 180, fake_yaw + jitter)) 119 | end 120 | 121 | end 122 | else 123 | 124 | end 125 | 126 | end) 127 | -------------------------------------------------------------------------------- /free_cam/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/yF163vr.png) 2 | 3 | Hotkey: Key to activate free cam 4 | Slider: Free cam speed 5 | Update angles: Update the angles of the real position in the world. If activated your real position will always look whereever you look in the free cam. 6 | 7 | Keybinds: 8 | 9 | W - Forward 10 | A - Left 11 | S - Backwards 12 | D - Right 13 | Shift - Faster 14 | Ctrl - Down 15 | Space - Up 16 | -------------------------------------------------------------------------------- /free_cam/free_cam.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------ FFI STUFF ------------------------------------ 2 | local ffi = require("ffi") 3 | local rawientitylist = client.create_interface("client_panorama.dll", "VClientEntityList003") or error("VClientEntityList003 wasnt found", 2) 4 | local ientitylist = ffi.cast(ffi.typeof("void***"), rawientitylist) or error("rawientitylist is nil", 2) 5 | local get_client_entity = ffi.cast(ffi.typeof("void*(__thiscall*)(void*, int)"), ientitylist[0][3]) or error("get_client_entity is nil", 2) 6 | 7 | local sig = client.find_signature("client_panorama.dll", "\x55\x8B\xEC\x83\xE4\xF8\x51\x53\x56\x57\x8B\xF1\xE8") 8 | local a_set_abs_origin = ffi.cast(ffi.typeof("void( __thiscall*)(void*, const void&)"), sig) 9 | 10 | local vec3_struct = ffi.typeof("struct { float x, y, z; }") 11 | 12 | local function set_abs_origin(entity, x, y, z) 13 | local pos = ffi.new(vec3_struct, {x, y, z}) 14 | a_set_abs_origin(get_client_entity(ientitylist, entity), pos) 15 | end 16 | 17 | ------------------------------------ MENU STUFF ------------------------------------ 18 | 19 | local free_cam_speed = ui.new_slider("misc", "movement", "Free cam", 0, 100, 0, 50, "%") 20 | local free_cam_hotkey = ui.new_hotkey("misc", "movement", "Free cam", true) 21 | local update_angles = ui.new_checkbox("misc", "movement", "Update angles") 22 | 23 | ------------------------------------ LOCALIZING STUFF ------------------------------------ 24 | 25 | local key_state = client.key_state 26 | local get_local_player, get_prop, hitbox_position = entity.get_local_player, entity.get_prop, entity.hitbox_position 27 | local camera_angles, eye_position, trace_line = client.camera_angles, client.eye_position, client.trace_line 28 | local world_to_screen, text, line = renderer.world_to_screen, renderer.text, renderer.line 29 | local cos, sin, rad, atan2, deg, sqrt = math.cos, math.sin, math.rad, math.atan2, math.deg, math.sqrt 30 | local get = ui.get 31 | 32 | local VK_SHIFT, VK_CTRL, VK_SPACE, VK_LEFT, VK_UP, VK_RIGHT, VK_DOWN = 0x10, 0x11, 0x20, 0x41, 0x57, 0x44, 0x53 33 | 34 | ------------------------------------ FUNCTIONS ------------------------------------ 35 | 36 | 37 | local function rotate(point, center, yaw) 38 | local rad = rad(yaw) 39 | local sin = sin(rad) 40 | local cos = cos(rad) 41 | 42 | point[1] = point[1] - center[1] 43 | point[2] = point[2] - center[2] 44 | 45 | local nx = point[1] * cos - point[2] * sin 46 | local ny = point[1] * sin + point[2] * cos 47 | 48 | return nx + center[1], ny + center[2] 49 | end 50 | 51 | function angle_forward( angle ) -- angle -> direction vector (forward) 52 | local sin_pitch = sin( rad( angle[1] ) ) 53 | local cos_pitch = cos( rad( angle[1] ) ) 54 | local sin_yaw = sin( rad( angle[2] ) ) 55 | local cos_yaw = cos( rad( angle[2] ) ) 56 | 57 | return { 58 | cos_pitch * cos_yaw, 59 | cos_pitch * sin_yaw, 60 | -sin_pitch 61 | } 62 | end 63 | 64 | local function vector_angles(x1, y1, z1, x2, y2, z2) 65 | --https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/mathlib/mathlib_base.cpp#L535-L563 66 | local origin_x, origin_y, origin_z 67 | local target_x, target_y, target_z 68 | if x2 == nil then 69 | target_x, target_y, target_z = x1, y1, z1 70 | origin_x, origin_y, origin_z = eye_position() 71 | if origin_x == nil then 72 | return 73 | end 74 | else 75 | origin_x, origin_y, origin_z = x1, y1, z1 76 | target_x, target_y, target_z = x2, y2, z2 77 | end 78 | 79 | --calculate delta of vectors 80 | local delta_x, delta_y, delta_z = target_x-origin_x, target_y-origin_y, target_z-origin_z 81 | 82 | if delta_x == 0 and delta_y == 0 then 83 | return (delta_z > 0 and 270 or 90), 0 84 | else 85 | --calculate yaw 86 | local yaw = deg(atan2(delta_y, delta_x)) 87 | 88 | --calculate pitch 89 | local hyp = sqrt(delta_x*delta_x + delta_y*delta_y) 90 | local pitch = deg(atan2(-delta_z, hyp)) 91 | 92 | return pitch, yaw 93 | end 94 | end 95 | 96 | local function valid(self, indices) 97 | local v = {} 98 | for i=1, #indices do 99 | if self[indices[i]] ~= nil then 100 | table.insert(v, true) 101 | end 102 | end 103 | return #v == #indices 104 | end 105 | 106 | local w2s_table = {} 107 | local hb_pos = {} 108 | 109 | local x, y, z = 0,0,0 110 | local sx, sy, sz = 0,0,0 111 | local cachedYaw = 0 112 | 113 | local function fwd_to_angle(me) 114 | local pitch, yaw = camera_angles() 115 | 116 | local fwd = angle_forward( { pitch, yaw, 0 } ) 117 | local start_pos = { eye_position() } 118 | local fraction = trace_line(me, 119 | start_pos[1], 120 | start_pos[2], 121 | start_pos[3], 122 | start_pos[1] + (fwd[1] * 8192), 123 | start_pos[2] + (fwd[2] * 8192), 124 | start_pos[3] + (fwd[3] * 8192)) 125 | 126 | local end_pos = { 127 | start_pos[1] + (fwd[1] * (8192 * fraction)), 128 | start_pos[2] + (fwd[2] * (8192 * fraction)), 129 | start_pos[3] + (fwd[3] * (8192 * fraction)), 130 | } 131 | 132 | local viewOffset = get_prop(me, "m_vecViewOffset[2]") 133 | end_pos[3] = end_pos[3] - viewOffset 134 | 135 | local pitch, yaw = vector_angles(sx, sy, sz, end_pos[1], end_pos[2], end_pos[3]) 136 | return pitch, yaw, end_pos 137 | end 138 | 139 | client.set_event_callback("paint", function(ctx) 140 | local me = get_local_player() 141 | if not ui.get(free_cam_hotkey) then 142 | for i = 0, 18 do 143 | local ax, ay, az = hitbox_position(me, i) 144 | hb_pos[i] = {ax,ay,az} 145 | end 146 | else 147 | local pitch, yaw, end_pos = fwd_to_angle(me) 148 | 149 | for i=0, #hb_pos do 150 | local x,y,z = unpack(hb_pos[i]) 151 | 152 | if get(update_angles) then 153 | x, y = rotate({ x, y }, { sx, sy }, yaw - cachedYaw) 154 | end 155 | 156 | local x_w2s, y_w2s = world_to_screen(x, y, z) 157 | if x_w2s ~= nil then 158 | w2s_table[i] = { x_w2s, y_w2s } 159 | end 160 | end 161 | 162 | local w2s = {world_to_screen(sx,sy,sz)} 163 | 164 | if valid(w2s, {1, 2}) then 165 | if valid(w2s_table, {0}) then 166 | text(w2s_table[0][1], w2s_table[0][2]-5, 255, 255, 255, 255, "cb", 0, "You") 167 | end 168 | 169 | if valid(w2s_table, {0, 1, 6}) then 170 | --head and neck 171 | line(w2s_table[0][1], w2s_table[0][2], w2s_table[1][1], w2s_table[1][2], 255, 255, 255, 255) 172 | line(w2s_table[1][1], w2s_table[1][2], w2s_table[6][1], w2s_table[6][2], 255, 255, 255, 255) 173 | end 174 | if valid(w2s_table, {6, 17, 15, 4, 2}) then 175 | --arms 176 | line(w2s_table[6][1], w2s_table[6][2], w2s_table[17][1], w2s_table[17][2], 255, 255, 255, 255) 177 | line(w2s_table[6][1], w2s_table[6][2], w2s_table[15][1], w2s_table[15][2], 255, 255, 255, 255) 178 | line(w2s_table[6][1], w2s_table[6][2], w2s_table[4][1], w2s_table[4][2], 255, 255, 255, 255) 179 | line(w2s_table[4][1], w2s_table[4][2], w2s_table[2][1], w2s_table[2][2], 255, 255, 255, 255) 180 | end 181 | if valid(w2s_table, {2, 7, 8})then 182 | --waist 183 | line(w2s_table[2][1], w2s_table[2][2], w2s_table[7][1], w2s_table[7][2], 255, 255, 255, 255) 184 | line(w2s_table[2][1], w2s_table[2][2], w2s_table[8][1], w2s_table[8][2], 255, 255, 255, 255) 185 | end 186 | if valid(w2s_table, {7, 9, 11}) then 187 | --left leg 188 | line(w2s_table[7][1], w2s_table[7][2], w2s_table[9][1], w2s_table[9][2], 255, 255, 255, 255) 189 | line(w2s_table[9][1], w2s_table[9][2], w2s_table[11][1], w2s_table[11][2], 255, 255, 255, 255) 190 | end 191 | if valid(w2s_table, {8, 10, 12}) then 192 | --right leg 193 | line(w2s_table[8][1], w2s_table[8][2], w2s_table[10][1], w2s_table[10][2], 255, 255, 255, 255) 194 | line(w2s_table[10][1], w2s_table[10][2], w2s_table[12][1], w2s_table[12][2], 255, 255, 255, 255) 195 | end 196 | if valid(w2s_table, {17, 18, 14}) then 197 | --left arm 198 | line(w2s_table[17][1], w2s_table[17][2], w2s_table[18][1], w2s_table[18][2], 255, 255, 255, 255) 199 | line(w2s_table[18][1], w2s_table[18][2], w2s_table[14][1], w2s_table[14][2], 255, 255, 255, 255) 200 | end 201 | if valid(w2s_table, {15, 16, 13}) then 202 | --right arm 203 | line(w2s_table[15][1], w2s_table[15][2], w2s_table[16][1], w2s_table[16][2], 255, 255, 255, 255) 204 | line(w2s_table[16][1], w2s_table[16][2], w2s_table[13][1], w2s_table[13][2], 255, 255, 255, 255) 205 | end 206 | end 207 | end 208 | end) 209 | 210 | local wasDucking = false 211 | 212 | client.set_event_callback("predict_command", function() 213 | local me = get_local_player() 214 | 215 | if not ui.get(free_cam_hotkey) then 216 | x, y, z = get_prop(me, "m_vecOrigin") 217 | sx, sy, sz = get_prop(me, "m_vecOrigin") 218 | cachedYaw = select(2, camera_angles()) 219 | else 220 | local pitch, yaw = camera_angles() 221 | 222 | local nx = cos(rad(yaw)) * cos(rad(pitch)) 223 | local ny = sin(rad(yaw)) * cos(rad(pitch)) 224 | 225 | local lrnx = cos(rad(yaw)) 226 | local lrny = sin(rad(yaw)) 227 | 228 | local nz = sin(rad(pitch)) 229 | 230 | local speed = get(free_cam_speed) * 0.15 231 | 232 | if key_state(VK_SHIFT) then 233 | speed = speed + (speed * 0.75) 234 | end 235 | 236 | nx = nx * speed 237 | ny = ny * speed 238 | lrny = lrny * speed 239 | lrnx = lrnx * speed 240 | nz = nz * speed 241 | 242 | x = x - 0.0001 y = y - 0.0001 243 | x = x + 0.0002 y = y + 0.0002 244 | 245 | if wasDucking and not key_state(VK_CTRL) then 246 | wasDucking = false 247 | end 248 | 249 | if key_state(VK_UP) then 250 | x = x + nx 251 | y = y + ny 252 | z = z - nz 253 | end 254 | if key_state(VK_DOWN) then 255 | x = x - nx 256 | y = y - ny 257 | z = z + nz 258 | end 259 | if key_state(VK_RIGHT) then 260 | x = x + lrny 261 | y = y - lrnx 262 | end 263 | if key_state(VK_LEFT) then 264 | x = x - lrny 265 | y = y + lrnx 266 | end 267 | if key_state(VK_SPACE) then 268 | z = z + speed 269 | end 270 | if key_state(VK_CTRL) and not wasDucking then 271 | z = z - speed 272 | end 273 | 274 | set_abs_origin(me, x, y, z) 275 | end 276 | end) 277 | 278 | local o_pitch = 0 279 | local o_yaw = 0 280 | local revertAngles = false 281 | client.set_event_callback("setup_command", function(cmd) 282 | if not get(free_cam_hotkey) then 283 | if revertAngles then 284 | camera_angles(o_pitch, o_yaw) 285 | revertAngles = false 286 | end 287 | o_pitch = cmd.pitch 288 | o_yaw = cmd.yaw 289 | wasDucking = cmd.in_duck 290 | else 291 | local me = get_local_player() 292 | 293 | if get(update_angles) then 294 | local pitch, yaw = fwd_to_angle(me) 295 | cmd.pitch = pitch 296 | cmd.yaw = yaw 297 | o_pitch = pitch 298 | o_yaw = yaw 299 | revertAngles = true 300 | else 301 | cmd.pitch = o_pitch 302 | cmd.yaw = o_yaw 303 | revertAngles = true 304 | end 305 | 306 | cmd.forwardmove = 0 307 | cmd.sidemove = 0 308 | cmd.in_jump = 0 309 | cmd.in_duck = wasDucking 310 | end 311 | end) 312 | 313 | ui.set_callback(update_angles, function(self) 314 | if get(free_cam_hotkey) and not get(self) then 315 | o_pitch, o_yaw = camera_angles() 316 | cachedYaw = o_yaw 317 | end 318 | end) 319 | -------------------------------------------------------------------------------- /gamma/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/Zwpb6n6.png) 2 | -------------------------------------------------------------------------------- /gamma/force_monitorgamma.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local NewSlider = ui.new_slider 3 | local AddEvent = client.set_event_callback 4 | local GetCVar = client.get_cvar 5 | local SetCVar = client.set_cvar 6 | local brightness = NewSlider("visuals", "effects", "Force brightness", 50, 350, GetCVar("mat_monitorgamma") * 100, true, "", .01) 7 | AddEvent("run_command", function() 8 | SetCVar("mat_monitorgamma", GetUi(brightness) *.01) 9 | end) 10 | -------------------------------------------------------------------------------- /health_based_glow/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://i.imgur.com/YRqxesL.png) 2 | -------------------------------------------------------------------------------- /health_based_glow/health_based_glow.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | 3 | ffi.cdef[[ 4 | struct glow_object_definition_t { 5 | void *m_ent; 6 | float r; 7 | float g; 8 | float b; 9 | float a; 10 | char pad0x8[8]; 11 | float m_bloom_amount; 12 | float m_localplayeriszeropoint3; 13 | bool m_render_when_occluded; 14 | bool m_render_when_unoccluded; 15 | bool m_full_bloom_render; 16 | char pad0x1[1]; 17 | int m_full_bloom_stencil_test_value; 18 | int m_style; 19 | int m_split_screen_slot; 20 | int m_next_free_slot; 21 | 22 | static const int END_OF_FREE_LIST = -1; 23 | static const int ENTRY_IN_USE = -2; 24 | }; 25 | struct c_glow_object_mngr { 26 | struct glow_object_definition_t *m_glow_object_definitions; 27 | int m_max_size; 28 | int m_pad; 29 | int m_size; 30 | struct glow_object_definition_t *m_glow_object_definitions2; 31 | int m_current_objects; 32 | }; 33 | typedef void*(__thiscall* get_client_entity_t)(void*, int); 34 | ]] 35 | 36 | local cast = ffi.cast 37 | local get_players, get_prop, get_local_player, is_alive = entity.get_players, entity.get_prop, entity.get_local_player, entity.is_alive 38 | local get, set, vis = ui.get, ui.set, ui.set_visible 39 | local insert = table.insert 40 | 41 | local glow_object_manager_sig = "\x0F\x11\x05\xCC\xCC\xCC\xCC\x83\xC8\x01" 42 | local match = client.find_signature("client_panorama.dll", glow_object_manager_sig) or error("sig not found") 43 | local glow_object_manager = cast("struct c_glow_object_mngr**", cast("char*", match) + 3)[0] or error("glow_object_manager is nil") 44 | 45 | local rawientitylist = client.create_interface("client_panorama.dll", "VClientEntityList003") or error("VClientEntityList003 wasnt found", 2) 46 | local ientitylist = cast(ffi.typeof("void***"), rawientitylist) or error("rawientitylist is nil", 2) 47 | local get_client_entity = cast("get_client_entity_t", ientitylist[0][3]) or error("get_client_entity is nil", 2) 48 | 49 | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 50 | 51 | local teammates = ui.reference("visuals", "player esp", "Teammates") 52 | local glow, glow_clr = ui.reference("visuals", "player esp", "Glow") 53 | local c_glow = ui.new_combobox("visuals", "player esp", "Custom glow", "Off", "Default", "Health based") 54 | local c_glow_clr = ui.new_color_picker("visuals", "player esp", "Custom glow color", 180, 60, 120, 170) 55 | local c_glow_style = ui.new_combobox("visuals", "player esp", "\nglow style", { 56 | "Normal", 57 | "Overlay pulse", 58 | "Inline", 59 | "Inline pulse" 60 | }) 61 | 62 | local styles = { 63 | ["Normal"] = 0, 64 | ["Overlay pulse"] = 1, 65 | ["Inline"] = 2, 66 | ["Inline pulse"] = 3 67 | } 68 | 69 | local clr = {} 70 | clr.r, clr.g, clr.b, clr.a = get(c_glow_clr) 71 | ui.set_callback(c_glow_clr, function(self) 72 | clr.r, clr.g, clr.b, clr.a = get(self) 73 | set(glow_clr, get(self)) 74 | end) 75 | 76 | ui.set_callback(c_glow, function(self) 77 | set(glow, get(self) == "Default") 78 | vis(glow, get(self) == "Off") 79 | vis(glow_clr, get(self) == "Off") 80 | vis(c_glow_style, get(self) == "Health based") 81 | end) 82 | 83 | 84 | client.set_event_callback("paint", function(ctx) 85 | if get(c_glow) == "Health based" then 86 | local players = get_players(not get(teammates)) 87 | local me = get_local_player() 88 | for i=0, glow_object_manager.m_size do 89 | if glow_object_manager.m_glow_object_definitions[i].m_next_free_slot == -2 and glow_object_manager.m_glow_object_definitions[i].m_ent then 90 | local glowobject = cast("struct glow_object_definition_t&", glow_object_manager.m_glow_object_definitions[i]) 91 | local glowent = glowobject.m_ent 92 | for i=1, #players do 93 | local player = players[i] 94 | if is_alive(player) and player ~= me then 95 | local ent = get_client_entity(ientitylist, player) 96 | local health = get_prop(player, "m_iHealth") 97 | local red = 255 - (health*2) 98 | local green = health*2 99 | if glowent == ent then 100 | glowobject.r = red / 255 101 | glowobject.g = green / 255 102 | glowobject.b = 0 103 | glowobject.a = clr.a / 255 104 | glowobject.m_style = styles[get(c_glow_style)] 105 | glowobject.m_render_when_occluded = true 106 | glowobject.m_render_when_unoccluded = false 107 | end 108 | end 109 | end 110 | end 111 | end 112 | end 113 | end) 114 | -------------------------------------------------------------------------------- /hitchance/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/Q8zgjUj.png) 2 | ![console](https://i.imgur.com/Pz3qOhL.png) 3 | -------------------------------------------------------------------------------- /hitchance/increase_hitchance.lua: -------------------------------------------------------------------------------- 1 | local get = ui.get 2 | local set = ui.set 3 | local ref, cb, sld = ui.reference, ui.new_checkbox, ui.new_slider 4 | local setvis = ui.set_visible 5 | local cllbck = ui.set_callback 6 | 7 | local AddEvent = client.set_event_callback 8 | 9 | local hitchance_ref = ref("rage", "aimbot", "minimum hit chance") 10 | local increase_hit_chance_on_miss = cb("RAGE", "Other", "Increase hit chance on miss") 11 | local max_missed_shots = sld("RAGE", "Other", "Max misses before increasing", 1, 5, 1) 12 | local increase_hit_chance = sld("RAGE", "Other", "Increase hit chance by", 1, 15, 1, true, "%") 13 | local logs = cb("rage", "other", "Enable logging") 14 | 15 | local missed_shots, old_hitchance, new_hitchance = 0, get(hitchance_ref), 1 16 | 17 | local function clamp(min, max, current) 18 | if current > max then current = max 19 | elseif current < min then current = min end 20 | return math.floor(current) 21 | end 22 | 23 | local function on_aim_miss(event) 24 | if not get(increase_hit_chance_on_miss) then return end 25 | new_hitchance = get(hitchance_ref) + get(increase_hit_chance) 26 | missed_shots = missed_shots + 1 27 | if missed_shots >= get(max_missed_shots) and get(hitchance_ref) ~= 100 then 28 | if get(logs) then 29 | print("Set hit chance to " .. clamp(0, 100, new_hitchance)) 30 | end 31 | set(hitchance_ref, clamp(0, 100, new_hitchance)) 32 | end 33 | end 34 | 35 | local function on_aim_hit(event) 36 | if not get(increase_hit_chance_on_miss) then return end 37 | missed_shots = 0 38 | if get(hitchance_ref) ~= old_hitchance then 39 | if get(logs) then 40 | print("Set hit chance to " .. old_hitchance) 41 | end 42 | set(hitchance_ref, old_hitchance) 43 | end 44 | end 45 | 46 | AddEvent("aim_miss", on_aim_miss) 47 | AddEvent("aim_hit", on_aim_hit) 48 | 49 | setvis(max_missed_shots, false) 50 | setvis(increase_hit_chance, false) 51 | setvis(logs, false) 52 | cllbck(increase_hit_chance_on_miss, function() 53 | setvis(max_missed_shots, get(increase_hit_chance_on_miss)) 54 | setvis(increase_hit_chance, get(increase_hit_chance_on_miss)) 55 | setvis(logs, get(increase_hit_chance_on_miss)) 56 | end) 57 | 58 | client.set_event_callback("paint", function(ctx) 59 | if get(hitchance_ref) ~= old_hitchance and get(hitchance_ref) ~= clamp(0, 100, new_hitchance) then 60 | old_hitchance = get(hitchance_ref) 61 | end 62 | end) 63 | -------------------------------------------------------------------------------- /hostage_bar/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://cdn.discordapp.com/attachments/484835345154834464/495780690168643586/unknown.png) 2 | -------------------------------------------------------------------------------- /hostage_bar/grabbing_hostage.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local NewRef = ui.reference 3 | local hostage_cb, hostage_clr = NewRef("visuals", "other esp", "hostages") 4 | local AddEvent = client.set_event_callback 5 | local GetProp = entity.get_prop 6 | local GetAll = entity.get_all 7 | local DrawRect = client.draw_rectangle 8 | local DrawText = client.draw_text 9 | 10 | local screen = { 11 | x, y, 12 | left, 13 | right, 14 | bottom, 15 | top 16 | } 17 | 18 | local curtime = globals.curtime 19 | 20 | local function round(b, c) 21 | local d = 10 ^ (c or 0) 22 | return math.floor(b * d + 0.5) / d 23 | end 24 | 25 | AddEvent("paint", function(ctx) 26 | screen.x, screen.y = client.screen_size() 27 | screen.left = screen.x - screen.x 28 | screen.right = screen.x 29 | screen.bottom = screen.y 30 | screen.top = screen.y - screen.y 31 | 32 | local players = entity.get_players(false) 33 | for i = 1, #players do 34 | local player = players[i] 35 | local got_cutter = GetProp(player, "m_bHasDefuser") 36 | local is_grabbing_hostage = GetProp(player, "m_bIsGrabbingHostage") 37 | 38 | local hostages = GetAll("CHostage") 39 | for j = 1, #hostages do 40 | local hostage = hostages[j] 41 | local state = GetProp(hostage, "m_nHostageState") 42 | local grab_success_time = GetProp(hostage, "m_flGrabSuccessTime") 43 | 44 | local rescue_time = grab_success_time - curtime() 45 | --[[ 46 | need to hardcode rescue_time_max, dont know any good way on how to get it dynamically 47 | but that should be a problem because the max rescue time only changes when you dont have a kit and the hostage was already picked up once 48 | ]] 49 | local rescue_time_max = 4 50 | 51 | if got_cutter == 1 then rescue_time_max = 1 else rescue_time_max = 4 end 52 | 53 | local grabber = "" 54 | if is_grabbing_hostage == 1 then grabber = entity.get_player_name(player) end 55 | 56 | local r, g, b, a = GetUi(hostage_clr) 57 | 58 | if GetUi(hostage_cb) and state == 1 then 59 | local height = ((math.abs((screen.bottom) - screen.top) * rescue_time) / rescue_time_max) 60 | DrawRect(ctx, screen.left + 1, 0, screen.left + 20, screen.bottom, 32, 32, 32, 50) 61 | local s = 128 if a < 128 then s = a end 62 | DrawRect(ctx, screen.left + 1, screen.bottom - height, screen.left + 18, screen.bottom, r, g, b, s) 63 | DrawText(ctx, screen.left + 5, screen.top + 5, r, g, b, a, "+", 999, "Grabbing hostage: " .. round(rescue_time, 1)) 64 | DrawText(ctx, screen.left + 5, screen.top + 30, r, g, b, a, "+", 999, grabber) 65 | end 66 | end 67 | end 68 | end) 69 | -------------------------------------------------------------------------------- /hudchat/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://i.imgur.com/M4xWTNy.png) 2 | -------------------------------------------------------------------------------- /hudchat/print_to_hudchat.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | ffi.cdef[[ 3 | // create cdata typedef 4 | typedef void***(__thiscall* FindHudElement_t)(void*, const char*); 5 | typedef void(__cdecl* ChatPrintf_t)(void*, int, int, const char*, ...); 6 | ]] 7 | 8 | 9 | local signature_gHud = "\xB9\xCC\xCC\xCC\xCC\x88\x46\x09" 10 | local signature_FindElement = "\x55\x8B\xEC\x53\x8B\x5D\x08\x56\x57\x8B\xF9\x33\xF6\x39\x77\x28" 11 | 12 | -- find signature_gHud in client_panorama.dll 13 | local match = client.find_signature("client_panorama.dll", signature_gHud) or error("sig1 not found") -- returns void*** 14 | -- cast the match from find_signature to a char* so it can be used for addition and add 1 to it 15 | local char_match = ffi.cast("char*", match) + 1 16 | -- cast match + 1 back to a void***, so it can be dereferenced to get its vtable 17 | local hud = ffi.cast("void**", char_match)[0] or error("hud is nil") -- returns void** 18 | 19 | -- find signature_FindElement in client_panorama.dll 20 | match = client.find_signature("client_panorama.dll", signature_FindElement) or error("FindHudElement not found") 21 | -- cast the lightuserdata to a type that we can dereference 22 | local find_hud_element = ffi.cast("FindHudElement_t", match) 23 | -- use the returned cfunc find_hud_element with the parameter hud and "CHudChat" to get the CHudChat class pointer 24 | local hudchat = find_hud_element(hud, "CHudChat") or error("CHudChat not found") 25 | -- dereference the pointer to get its vtable 26 | local chudchat_vtbl = hudchat[0] or error("CHudChat instance vtable is nil") 27 | 28 | -- vtable is an array of functions, the 27th is ChatPrintf 29 | local raw_print_to_chat = chudchat_vtbl[27] -- void* 30 | 31 | -- cast the function pointer to a callable type 32 | local print_to_chat = ffi.cast('ChatPrintf_t', raw_print_to_chat) 33 | 34 | --[[ 35 | \x01 - white 36 | \x02 - red 37 | \x03 - purple 38 | \x04 - green 39 | \x05 - yellow green 40 | \x06 - light green 41 | \x07 - light red 42 | \x08 - gray 43 | \x09 - light yellow 44 | \x0A - gray 45 | \x0C - dark blue 46 | \x10 - gold 47 | ]] 48 | 49 | print_to_chat(hudchat, entity.get_local_player(), 0, " \x02".."dank memes") 50 | -------------------------------------------------------------------------------- /infobox/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://i.imgur.com/IIqGzxq.png) 2 | -------------------------------------------------------------------------------- /inputsys/is_button_pressed.lua: -------------------------------------------------------------------------------- 1 | local ffi = require 'ffi' 2 | ffi.cdef[[ 3 | typedef unsigned char wchar_t; 4 | 5 | typedef bool (__thiscall *IsButtonDown_t)(void*, int); 6 | ]] 7 | local interface_ptr = ffi.typeof('void***') 8 | 9 | local raw_inputsystem = client.create_interface('inputsystem.dll', 'InputSystemVersion001') 10 | 11 | -- cast the lightuserdata to a type that we can dereference 12 | local inputsystem = ffi.cast(interface_ptr, raw_inputsystem) -- void*** 13 | 14 | -- dereference the interface pointer to get its vtable 15 | local inputsystem_vtbl = inputsystem[0] -- void** 16 | 17 | -- vtable is an array of functions, the 15th is IsButtonDown 18 | local raw_IsButtonDown = inputsystem_vtbl[15] -- void* 19 | 20 | -- cast the function pointer to a callable type 21 | local is_button_pressed = ffi.cast('IsButtonDown_t', raw_IsButtonDown) 22 | 23 | local button_codes = { 24 | KEY_0 = 1, 25 | KEY_1 = 2, 26 | KEY_2 = 3, 27 | KEY_3 = 4, 28 | KEY_4 = 5, 29 | KEY_5 = 6, 30 | KEY_6 = 7, 31 | KEY_7 = 8, 32 | KEY_8 = 9, 33 | KEY_9 = 10, 34 | KEY_A = 11, 35 | KEY_B = 12, 36 | KEY_C = 13, 37 | KEY_D = 14, 38 | KEY_E = 15, 39 | KEY_F = 16, 40 | KEY_G = 17, 41 | KEY_H = 18, 42 | KEY_I = 19, 43 | KEY_J = 20, 44 | KEY_K = 21, 45 | KEY_L = 22, 46 | KEY_M = 23, 47 | KEY_N = 24, 48 | KEY_O = 25, 49 | KEY_P = 26, 50 | KEY_Q = 27, 51 | KEY_R = 28, 52 | KEY_S = 29, 53 | KEY_T = 30, 54 | KEY_U = 31, 55 | KEY_V = 32, 56 | KEY_W = 33, 57 | KEY_X = 34, 58 | KEY_Y = 35, 59 | KEY_Z = 36, 60 | KEY_PAD_0 = 37, 61 | KEY_PAD_1 = 38, 62 | KEY_PAD_2 = 39, 63 | KEY_PAD_3 = 40, 64 | KEY_PAD_4 = 41, 65 | KEY_PAD_5 = 42, 66 | KEY_PAD_6 = 43, 67 | KEY_PAD_7 = 44, 68 | KEY_PAD_8 = 45, 69 | KEY_PAD_9 = 46, 70 | KEY_PAD_DIVIDE = 47, 71 | KEY_PAD_MULTIPLY = 48, 72 | KEY_PAD_MINUS = 49, 73 | KEY_PAD_PLUS = 50, 74 | KEY_PAD_ENTER = 51, 75 | KEY_PAD_DECIMAL = 52, 76 | KEY_LBRACKET = 53, 77 | KEY_RBRACKET = 54, 78 | KEY_SEMICOLON = 55, 79 | KEY_APOSTROPHE = 56, 80 | KEY_BACKQUOTE = 57, 81 | KEY_COMMA = 58, 82 | KEY_PERIOD = 59, 83 | KEY_SLASH = 60, 84 | KEY_BACKSLASH = 61, 85 | KEY_MINUS = 62, 86 | KEY_EQUAL = 63, 87 | KEY_ENTER = 64, 88 | KEY_SPACE = 65, 89 | KEY_BACKSPACE = 66, 90 | KEY_TAB = 67, 91 | KEY_CAPSLOCK = 68, 92 | KEY_NUMLOCK = 69, 93 | KEY_ESCAPE = 70, 94 | KEY_SCROLLLOCK = 71, 95 | KEY_INSERT = 72, 96 | KEY_DELETE = 73, 97 | KEY_HOME = 74, 98 | KEY_END = 75, 99 | KEY_PAGEUP = 76, 100 | KEY_PAGEDOWN = 77, 101 | KEY_BREAK = 78, 102 | KEY_LSHIFT = 79, 103 | KEY_RSHIFT = 80, 104 | KEY_LALT = 81, 105 | KEY_RALT = 82, 106 | KEY_LCONTROL = 83, 107 | KEY_RCONTROL = 84, 108 | KEY_LWIN = 85, 109 | KEY_RWIN = 86, 110 | KEY_APP = 87, 111 | KEY_UP = 88, 112 | KEY_LEFT = 89, 113 | KEY_DOWN = 90, 114 | KEY_RIGHT = 91, 115 | KEY_F1 = 92, 116 | KEY_F2 = 93, 117 | KEY_F3 = 94, 118 | KEY_F4 = 95, 119 | KEY_F5 = 96, 120 | KEY_F6 = 97, 121 | KEY_F7 = 98, 122 | KEY_F8 = 99, 123 | KEY_F9 = 100, 124 | KEY_F10 = 101, 125 | KEY_F11 = 102, 126 | KEY_F12 = 103, 127 | KEY_CAPSLOCKTOGGLE = 104, 128 | KEY_NUMLOCKTOGGLE = 105, 129 | KEY_SCROLLLOCKTOGGLE = 106, 130 | -- Mouse 131 | MOUSE_LEFT = 107, 132 | MOUSE_RIGHT = 108, 133 | MOUSE_MIDDLE = 109, 134 | MOUSE_4 = 110, 135 | MOUSE_5 = 111, 136 | MOUSE_WHEEL_UP = 112, -- A fake button which is 'pressed' and 'released' when the wheel is moved up 137 | MOUSE_WHEEL_DOWN = 113, -- A fake button which is 'pressed' and 'released' when the wheel is moved down 138 | } 139 | 140 | local function run_command(cmd) 141 | if is_button_pressed(inputsystem, 36) then -- ButtonCode_t for Z 142 | print('Z is pressed') 143 | end 144 | return false 145 | end 146 | -------------------------------------------------------------------------------- /killtracker/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://i.imgur.com/gZ0j81c.png) 2 | -------------------------------------------------------------------------------- /killtracker/killtracker.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local SetUi = ui.set 3 | local SetVisible = ui.set_visible 4 | local GetLocalPlayer = entity.get_local_player 5 | 6 | local screenx, screeny = client.screen_size() 7 | local left = screenx - screenx 8 | local right = screenx 9 | local top = screeny - screeny 10 | local bottom = screeny 11 | 12 | local GetAll = entity.get_all 13 | local GetProp = entity.get_prop 14 | 15 | local AddEvent = client.set_event_callback 16 | 17 | local uidToEntIndex = client.userid_to_entindex 18 | 19 | -- client.draw_text(paint_ctx, x, y, r, g, b, a, flags, max_width, ...) -- 20 | local DrawText = client.draw_text 21 | local DrawRect = client.draw_rectangle 22 | 23 | local kill_tracker = ui.new_checkbox("VISUALS", "Other ESP", "Kill Tracker") 24 | local kill_tracker_text_color_mode = ui.new_combobox("VISUALS", "Other ESP", "Text Color", "Header", "Text", "Values", "Lines") 25 | local kill_tracker_colorpicker_header = ui.new_color_picker("VISUALS", "Other ESP", "Header Color", 159, 202, 43, 255) 26 | local kill_tracker_colorpicker_text = ui.new_color_picker("VISUALS", "Other ESP", "Text Color", 255, 255, 255, 255) 27 | local kill_tracker_colorpicker_values = ui.new_color_picker("VISUALS", "Other ESP", "Value Color", 255, 0, 60, 255) 28 | local kill_tracker_colorpicker_lines = ui.new_color_picker("VISUALS", "Other ESP", "Lines", 255, 0, 60, 255) 29 | 30 | local x_pos = ui.new_slider("VISUALS", "Other ESP", "Pos X", 0, screenx, 0) 31 | local y_pos = ui.new_slider("VISUALS", "Other ESP", "Pos Y", 0, screeny, 300) 32 | 33 | local function m_iTeamNum(entity_index) 34 | return entity.get_prop(entity_index, "m_iTeamNum") 35 | end 36 | 37 | local function draw_container(ctx, x, y, w, h) 38 | local c = {10, 60, 40, 40, 40, 60, 20} 39 | for i = 0,6,1 do 40 | client.draw_rectangle(ctx, x + i, y + i, w - (i * 2), h - (i * 2), c[i + 1], c[i + 1], c[i + 1], 255) 41 | end 42 | end 43 | 44 | local function round(b,c)local d=10^(c or 0)return math.floor(b*d+0.5)/d end 45 | 46 | local function disable_menu_functions() 47 | SetVisible(x_pos, GetUi(kill_tracker)) 48 | SetVisible(y_pos, GetUi(kill_tracker)) 49 | SetVisible(kill_tracker_text_color_mode, GetUi(kill_tracker)) 50 | SetVisible(kill_tracker_colorpicker_header, GetUi(kill_tracker_text_color_mode) == "Header") 51 | SetVisible(kill_tracker_colorpicker_text, GetUi(kill_tracker_text_color_mode) == "Text") 52 | SetVisible(kill_tracker_colorpicker_values, GetUi(kill_tracker_text_color_mode) == "Values") 53 | SetVisible(kill_tracker_colorpicker_lines, GetUi(kill_tracker_text_color_mode) == "Lines") 54 | 55 | if GetUi(kill_tracker) == false then 56 | SetVisible(kill_tracker_colorpicker_header, false) 57 | SetVisible(kill_tracker_colorpicker_text, false) 58 | SetVisible(kill_tracker_colorpicker_values, false) 59 | SetVisible(kill_tracker_colorpicker_lines, false) 60 | end 61 | end 62 | 63 | local headshots = 0 64 | local non_headshots = 0 65 | 66 | AddEvent("paint", function(ctx) 67 | disable_menu_functions() 68 | 69 | local playerresource = GetAll("CCSPlayerResource")[1] 70 | local m_iKills = GetProp(playerresource, "m_iKills", GetLocalPlayer()) 71 | local m_iDeaths = GetProp(playerresource, "m_iDeaths", GetLocalPlayer()) 72 | 73 | local kdr_converted = 0 74 | if m_iDeaths ~= 0 then 75 | local temp = m_iKills / m_iDeaths 76 | kdr_converted = round(temp, 2) 77 | elseif m_iKills ~= 0 then 78 | kdr_converted = m_iKills 79 | end 80 | 81 | local headshot_percentage = 0 82 | 83 | if headshots ~= 0 then 84 | local temp = headshots / m_iKills 85 | headshot_percentage = round(temp, 2) * 100 86 | elseif m_iKills ~= 0 then 87 | headshot_percentage = 0 88 | end 89 | 90 | local header_r, header_g, header_b, header_a = GetUi(kill_tracker_colorpicker_header) 91 | local text_r, text_g, text_b, text_a = GetUi(kill_tracker_colorpicker_text) 92 | local values_r, values_g, values_b, values_a = GetUi(kill_tracker_colorpicker_values) 93 | local lines_r, lines_g, lines_b, lines_a = GetUi(kill_tracker_colorpicker_lines) 94 | 95 | 96 | local box_x = left + GetUi(x_pos) 97 | local box_y = top + GetUi(y_pos) 98 | local box_height = 88 99 | local box_width = 140 100 | 101 | local index = 1 102 | local value = 4 103 | 104 | if GetUi(kill_tracker) then 105 | 106 | draw_container(ctx, box_x, box_y, box_width, box_height) 107 | 108 | DrawText(ctx, box_x + (box_width / 2), box_y + ((index + 1 )* 5) + 1, header_r, header_g, header_b, header_a, "c", box_width, "Kill Tracker") 109 | 110 | DrawRect(ctx, box_x + 9, box_y + (index * 10) + 6, box_width - 18, 1, lines_r, lines_g, lines_b, lines_a) 111 | index = index + 1 112 | 113 | DrawText(ctx, box_x + 10, box_y + (index * 10) - value, text_r, text_g, text_b, text_a, "", box_width, "Kills:") 114 | DrawText(ctx, box_x + (box_width - 9), box_y + (index * 10) - value, values_r, values_g, values_b, values_a, "r", box_width, m_iKills) 115 | index = index + 1 116 | 117 | DrawText(ctx, box_x + 10, box_y + (index * 10) - value, text_r, text_g, text_b, text_a, "", box_width, "Deaths:") 118 | DrawText(ctx, box_x + (box_width - 9), box_y + (index * 10) - value, values_r, values_g, values_b, values_a, "r", box_width, m_iDeaths) 119 | index = index + 1 120 | 121 | DrawText(ctx, box_x + 10, box_y + (index * 10) - value, text_r, text_g, text_b, text_a, "", box_width, "KDR:") 122 | DrawText(ctx, box_x + (box_width - 9), box_y + (index * 10) - value, values_r, values_g, values_b, values_a, "r", box_width, kdr_converted) 123 | index = index + 1 124 | 125 | DrawText(ctx, box_x + 10, box_y + (index * 10) - value, text_r, text_g, text_b, text_a, "", box_width, "HS:") 126 | DrawText(ctx, box_x + (box_width - 9), box_y + (index * 10) - value, values_r, values_g, values_b, values_a, "r", box_width,headshot_percentage, "%") 127 | index = index + 1 128 | 129 | DrawText(ctx, box_x + 10, box_y + (index * 10) - value, text_r, text_g, text_b, text_a, "", box_width, "Headshots:") 130 | DrawText(ctx, box_x + (box_width - 9), box_y + (index * 10) - value, values_r, values_g, values_b, values_a, "r", box_width, headshots) 131 | index = index + 1 132 | 133 | DrawText(ctx, box_x + 10, box_y + (index * 10) - value, text_r, text_g, text_b, text_a, "", box_width, "Baim kills:") 134 | DrawText(ctx, box_x + (box_width - 9), box_y + (index * 10) - value, values_r, values_g, values_b, values_a, "r", box_width, non_headshots) 135 | index = index + 1 136 | 137 | DrawRect(ctx, box_x + 9, box_y + (index * 10) - value + 2, box_width - 18, 1, lines_r, lines_g, lines_b, lines_a) 138 | index = index + 1 139 | end 140 | end) 141 | 142 | AddEvent("begin_new_match", function() -- getho way so it resets baim kills and headshots after a new match begins or a game is restarted 143 | headshots = 0 144 | non_headshots = 0 145 | end) 146 | 147 | -- credits to sapphyrus for finding the event because im to dumb to do proper search -.- 148 | AddEvent("player_connect_full", function(event) 149 | if uidToEntIndex(event.userid) == GetLocalPlayer() then 150 | headshots = 0 151 | non_headshots = 0 152 | end 153 | end) 154 | -------------------------------------------------------------------------------- /knifechanger/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://third-rei.ch/5wcCvWeFtl.png) 2 | -------------------------------------------------------------------------------- /knifechanger/knifechanger.lua: -------------------------------------------------------------------------------- 1 | -- local variables for API functions. any changes to the line below will be lost on re-generation 2 | local bit_band, client_create_interface, client_set_event_callback, entity_is_alive, entity_get_local_player, entity_get_prop, entity_set_prop, require, ui_get, ui_new_checkbox, ui_new_combobox, ui_new_textbox, ui_reference, ui_set, ui_set_callback, ui_set_visible = bit.band, client.create_interface, client.set_event_callback, entity.is_alive, entity.get_local_player, entity.get_prop, entity.set_prop, require, ui.get, ui.new_checkbox, ui.new_combobox, ui.new_textbox, ui.reference, ui.set, ui.set_callback, ui.set_visible 3 | 4 | local ffi = require("ffi") 5 | ffi.cdef("typedef int(__thiscall* get_model_index_t)(void*, const char*)") 6 | local ivmodelinfo = ffi.cast(ffi.typeof("void***"), client_create_interface("engine.dll", "VModelInfoClient004")) 7 | local get_model_index = ffi.cast("get_model_index_t", ivmodelinfo[0][2]) 8 | 9 | local knife_options_ref_cb, knife_options_ref_cm = ui_reference("skins", "knife options", "override knife") 10 | ui_set_visible(knife_options_ref_cb, false) 11 | ui_set_visible(knife_options_ref_cm, false) 12 | 13 | local knifiesc = { 14 | "Bayonet", "Flip", "Gut", 15 | "Karambit", "M9 Bayonet", 16 | "Tactical", "Butterfly", 17 | "Falchion", "Shadow dagger", 18 | "Survival bowie", "Ursus", 19 | "Navaja", "Stiletto", "Talon", 20 | "Spectral shiv", "Classic Knife" 21 | } 22 | 23 | local models = { 24 | ["Spectral shiv"] = "models/weapons/v_knife_ghost.mdl", 25 | ["Classic Knife"] = "models/weapons/v_knife_css.mdl", 26 | } 27 | 28 | local indices = { 29 | ["Spectral shiv"] = 505, 30 | ["Classic Knife"] = 503, 31 | } 32 | 33 | local knife_options_cb = ui_new_checkbox("skins", "knife options", "Override knife") 34 | local knife_options_cmb = ui_new_combobox("skins", "knife options", "\nknife models", knifiesc) 35 | local weaponkit_enable = ui_reference("skins", "weapon skin", "enabled") 36 | local weaponkit_stattrack = ui_reference("skins", "weapon skin", "stattrak") 37 | 38 | ui_set_callback(knife_options_cmb, function(self) 39 | local cur = ui_get(self) 40 | if models[cur] == nil then 41 | if ui_get(knife_options_cb) then 42 | ui_set(knife_options_ref_cb, true) 43 | end 44 | ui_set(knife_options_ref_cm, cur) 45 | else 46 | cvar.cl_fullupdate:invoke_callback() 47 | ui_set(knife_options_ref_cb, false) 48 | end 49 | end) 50 | 51 | ui_set_callback(knife_options_cb, function(self) 52 | if models[ui_get(knife_options_cmb)] == nil then 53 | ui_set(knife_options_ref_cb, ui_get(self)) 54 | end 55 | end) 56 | 57 | local knifes = { 58 | [41] = true, -- Knife 59 | [42] = true, -- Knife 60 | [59] = true, -- Knife 61 | [80] = true, -- spectral knife 62 | [500] = true, -- Bayonet 63 | [503] = true, -- CSS Knife 64 | [505] = true, -- Flip Knife 65 | [506] = true, -- Gut Knife 66 | [507] = true, -- Karambit 67 | [508] = true, -- M9 Bayonet 68 | [509] = true, -- Huntsman Knife 69 | [512] = true, -- Falchion Knife 70 | [514] = true, -- Bowie Knife 71 | [515] = true, -- Butterfly Knife 72 | [516] = true, -- Shadow Daggers 73 | [519] = true, -- Ursus Knife 74 | [520] = true, -- Navaja Knife 75 | [522] = true, -- Siletto Knife 76 | [523] = true, -- Talon Knife 77 | } 78 | 79 | local function get_all_weapons(ent) 80 | local weapons = {} 81 | for i=0, 64 do 82 | local weapon = entity_get_prop(ent, "m_hMyWeapons", i) 83 | if weapon ~= nil then 84 | table.insert(weapons, weapon) 85 | end 86 | end 87 | return weapons 88 | end 89 | 90 | local update_skins = false 91 | local function update_knife_model(m_hWeapon, m_hViewModel, model_index, wpn_idx) 92 | entity_set_prop(m_hWeapon, "m_iItemDefinitionIndex", wpn_idx) 93 | if ui_get(weaponkit_enable) and ui_get(weaponkit_stattrack) then 94 | entity_set_prop(m_hWeapon, "m_iEntityQuality", 3) 95 | end 96 | entity_set_prop(m_hViewModel, "m_nModelIndex", model_index) 97 | 98 | if update_skins then 99 | cvar.cl_fullupdate:invoke_callback() 100 | update_skins = false 101 | end 102 | end 103 | 104 | client_set_event_callback("net_update_end", function() 105 | local me = entity_get_local_player() 106 | if me == nil then return end 107 | 108 | local m_hViewModel = entity_get_prop(me, "m_hViewModel[0]") 109 | if m_hViewModel == nil then return end 110 | 111 | local m_hWeapon = entity_get_prop(m_hViewModel, "m_hWeapon") 112 | if m_hWeapon == nil then return end 113 | 114 | if entity_is_alive(me) == false then return end 115 | 116 | local wpn_idx = bit_band(entity_get_prop(m_hWeapon, "m_iItemDefinitionIndex") or 0, 0xFFFF) 117 | if wpn_idx == nil then return end 118 | 119 | if ui_get(knife_options_cb) then 120 | if knifes[wpn_idx] then 121 | local m_iItemDefinitionIndex = indices[ui_get(knife_options_cmb)] or wpn_idx 122 | local model_index = get_model_index(ivmodelinfo, models[ui_get(knife_options_cmb)]) 123 | update_knife_model(m_hWeapon, m_hViewModel, model_index, m_iItemDefinitionIndex) 124 | else 125 | update_skins = true 126 | end 127 | end 128 | end) 129 | 130 | client.set_event_callback("shutdown", function() 131 | ui_set_visible(knife_options_ref_cb, true) 132 | ui_set_visible(knife_options_ref_cm, true) 133 | end) 134 | -------------------------------------------------------------------------------- /legit_aa/legit_aa.lua: -------------------------------------------------------------------------------- 1 | local enabled = ui.new_checkbox("aa", "anti-aimbot angles", "Legit AA") 2 | local swap_sides = ui.new_hotkey("aa", "anti-aimbot angles", "Legit AA", true) 3 | local disable_when_moving = ui.new_slider("aa", "anti-aimbot angles", "Velocity threshold", 1, 250, 10) 4 | local display_angles = ui.new_checkbox("aa", "anti-aimbot angles", "Display angles(Ragebot)") 5 | 6 | local aa_master = ui.reference("aa", "anti-aimbot angles", "enabled") 7 | local yaw, yaw_slider = ui.reference("aa", "anti-aimbot angles", "yaw") 8 | local body_yaw, body_yaw_slider = ui.reference("aa", "anti-aimbot angles", "body yaw") 9 | local lby_target = ui.reference("aa", "anti-aimbot angles", "lower body yaw target") 10 | local flag_limit = ui.reference("aa", "fake lag", "Limit") 11 | 12 | local ragebot = ui.reference("rage", "aimbot", "enabled") 13 | local target_hitbox = ui.reference("rage", "aimbot", "target hitbox") 14 | local minimum_hitchance = ui.reference("rage", "aimbot", "minimum hit chance") 15 | local minimum_minimum_damage = ui.reference("rage", "aimbot", "minimum damage") 16 | local fov = ui.reference("rage", "aimbot", "maximum fov") 17 | local fake_shadow = ui.reference("visuals", "colored models", "local player fake") 18 | 19 | local set, get, vis = ui.set, ui.get, ui.set_visible 20 | local floor, min, sqrt = math.floor, math.min, math.sqrt 21 | local get_prop, get_lp = entity.get_prop, entity.get_local_player 22 | local indicator = renderer.indicator 23 | 24 | local function length3d(self) 25 | return floor(min(10000, sqrt( 26 | ( self[1] * self[1] ) + 27 | ( self[2] * self[2] ) + 28 | ( self[3] * self[3] ))+ 0.5) 29 | ) 30 | end 31 | 32 | vis(disable_when_moving, false) 33 | vis(display_angles, false) 34 | 35 | ui.set_callback(enabled, function(self) 36 | if get(self) then 37 | set(aa_master, true) 38 | set(yaw, "180") 39 | set(yaw_slider, -180) 40 | set(body_yaw, "Static") 41 | set(body_yaw_slider, -180) 42 | set(lby_target, "Opposite") 43 | set(flag_limit, 4) 44 | else 45 | set(aa_master, false) 46 | set(yaw, "Off") 47 | set(yaw_slider, 0) 48 | set(body_yaw, "Off") 49 | set(body_yaw_slider, 0) 50 | set(lby_target, "Off") 51 | end 52 | vis(disable_when_moving, get(self)) 53 | vis(display_angles, get(self)) 54 | end) 55 | 56 | ui.set_callback(display_angles, function(self) 57 | if get(enabled) then 58 | local state = get(self) 59 | set(ragebot, state) 60 | set(fake_shadow, state) 61 | if state then 62 | set(target_hitbox, "feet") 63 | set(minimum_hitchance, 100) 64 | set(minimum_minimum_damage, 126) 65 | set(fov, 1) 66 | end 67 | end 68 | end) 69 | 70 | local disabled_aa = false 71 | client.set_event_callback("setup_command", function(cmd) 72 | if get(enabled) == false then return end 73 | local me = get_lp() 74 | local my_vel = length3d({get_prop(me, "m_vecVelocity")}) 75 | if my_vel > get(disable_when_moving) or (cmd.in_use or cmd.in_attack2 or cmd.in_attack) == 1 then 76 | set(aa_master, false) 77 | disabled_aa = true 78 | else 79 | if disabled_aa then 80 | set(aa_master, true) 81 | disabled_aa = false 82 | end 83 | end 84 | 85 | if disabled_aa == false then 86 | if get(swap_sides) then 87 | set(body_yaw_slider, 180) 88 | else 89 | set(body_yaw_slider, -180) 90 | end 91 | end 92 | end) 93 | 94 | client.set_event_callback("paint", function() 95 | if get(enabled) == false then return end 96 | if get(body_yaw_slider) == -180 then 97 | indicator(255, 255,255, 255, "RIGHT") 98 | elseif get(body_yaw_slider) == 180 then 99 | indicator(255, 255,255, 255, "LEFT") 100 | end 101 | end) 102 | 103 | client.set_event_callback("shutdown", function() 104 | if get(enabled) then 105 | set(aa_master, false) 106 | set(yaw, "Off") 107 | set(yaw_slider, 0) 108 | set(body_yaw, "Off") 109 | set(body_yaw_slider, 0) 110 | set(lby_target, "Off") 111 | set(ragebot, false) 112 | end 113 | end) 114 | -------------------------------------------------------------------------------- /libs/Vector3D.lua: -------------------------------------------------------------------------------- 1 | -- credits: Valve Corporation, lua.org, "none" 2 | 3 | -- 4 | -- todo; add asserts 5 | -- add handling for div by 0 6 | -- change vector normalize 7 | -- add Vector2 and Angle files / implementation 8 | -- 9 | 10 | -- localize vars 11 | local type = type; 12 | local setmetatable = setmetatable; 13 | local tostring = tostring; 14 | 15 | local math_pi = math.pi; 16 | local math_min = math.min; 17 | local math_max = math.max; 18 | local math_deg = math.deg; 19 | local math_rad = math.rad; 20 | local math_sqrt = math.sqrt; 21 | local math_sin = math.sin; 22 | local math_cos = math.cos; 23 | local math_atan = math.atan; 24 | local math_acos = math.acos; 25 | local math_fmod = math.fmod; 26 | 27 | -- set up vector3 metatable 28 | local _V3_MT = {}; 29 | _V3_MT.__index = _V3_MT; 30 | 31 | -- 32 | -- create Vector3 object 33 | -- 34 | function Vector3( x, y, z ) 35 | -- check args 36 | if( type( x ) ~= "number" ) then 37 | x = 0.0; 38 | end 39 | 40 | if( type( y ) ~= "number" ) then 41 | y = 0.0; 42 | end 43 | 44 | if( type( z ) ~= "number" ) then 45 | z = 0.0; 46 | end 47 | 48 | x = x or 0.0; 49 | y = y or 0.0; 50 | z = z or 0.0; 51 | 52 | return setmetatable( 53 | { 54 | x = x, 55 | y = y, 56 | z = z 57 | }, 58 | _V3_MT 59 | ); 60 | end 61 | 62 | -- 63 | -- metatable operators 64 | -- 65 | function _V3_MT.__eq( a, b ) -- equal to another vector 66 | return a.x == b.x and a.y == b.y and a.z == b.z; 67 | end 68 | 69 | function _V3_MT.__unm( a ) -- unary minus 70 | return Vector3( 71 | -a.x, 72 | -a.y, 73 | -a.z 74 | ); 75 | end 76 | 77 | function _V3_MT.__add( a, b ) -- add another vector or number 78 | local a_type = type( a ); 79 | local b_type = type( b ); 80 | 81 | if( a_type == "table" and b_type == "table" ) then 82 | return Vector3( 83 | a.x + b.x, 84 | a.y + b.y, 85 | a.z + b.z 86 | ); 87 | elseif( a_type == "table" and b_type == "number" ) then 88 | return Vector3( 89 | a.x + b, 90 | a.y + b, 91 | a.z + b 92 | ); 93 | elseif( a_type == "number" and b_type == "table" ) then 94 | return Vector3( 95 | a + b.x, 96 | a + b.y, 97 | a + b.z 98 | ); 99 | end 100 | end 101 | 102 | function _V3_MT.__sub( a, b ) -- subtract another vector or number 103 | local a_type = type( a ); 104 | local b_type = type( b ); 105 | 106 | if( a_type == "table" and b_type == "table" ) then 107 | return Vector3( 108 | a.x - b.x, 109 | a.y - b.y, 110 | a.z - b.z 111 | ); 112 | elseif( a_type == "table" and b_type == "number" ) then 113 | return Vector3( 114 | a.x - b, 115 | a.y - b, 116 | a.z - b 117 | ); 118 | elseif( a_type == "number" and b_type == "table" ) then 119 | return Vector3( 120 | a - b.x, 121 | a - b.y, 122 | a - b.z 123 | ); 124 | end 125 | end 126 | 127 | function _V3_MT.__mul( a, b ) -- multiply by another vector or number 128 | local a_type = type( a ); 129 | local b_type = type( b ); 130 | 131 | if( a_type == "table" and b_type == "table" ) then 132 | return Vector3( 133 | a.x * b.x, 134 | a.y * b.y, 135 | a.z * b.z 136 | ); 137 | elseif( a_type == "table" and b_type == "number" ) then 138 | return Vector3( 139 | a.x * b, 140 | a.y * b, 141 | a.z * b 142 | ); 143 | elseif( a_type == "number" and b_type == "table" ) then 144 | return Vector3( 145 | a * b.x, 146 | a * b.y, 147 | a * b.z 148 | ); 149 | end 150 | end 151 | 152 | function _V3_MT.__div( a, b ) -- divide by another vector or number 153 | local a_type = type( a ); 154 | local b_type = type( b ); 155 | 156 | if( a_type == "table" and b_type == "table" ) then 157 | return Vector3( 158 | a.x / b.x, 159 | a.y / b.y, 160 | a.z / b.z 161 | ); 162 | elseif( a_type == "table" and b_type == "number" ) then 163 | return Vector3( 164 | a.x / b, 165 | a.y / b, 166 | a.z / b 167 | ); 168 | elseif( a_type == "number" and b_type == "table" ) then 169 | return Vector3( 170 | a / b.x, 171 | a / b.y, 172 | a / b.z 173 | ); 174 | end 175 | end 176 | 177 | function _V3_MT.__tostring( a ) -- used for 'tostring( vector3_object )' 178 | return "( " .. a.x .. ", " .. a.y .. ", " .. a.z .. " )"; 179 | end 180 | 181 | -- 182 | -- metatable misc funcs 183 | -- 184 | function _V3_MT:clear() -- zero all vector vars 185 | self.x = 0.0; 186 | self.y = 0.0; 187 | self.z = 0.0; 188 | end 189 | 190 | function _V3_MT:unpack() -- returns axes as 3 seperate arguments 191 | return self.x, self.y, self.z; 192 | end 193 | 194 | function _V3_MT:length_2d_sqr() -- squared 2D length 195 | return ( self.x * self.x ) + ( self.y * self.y ); 196 | end 197 | 198 | function _V3_MT:length_sqr() -- squared 3D length 199 | return ( self.x * self.x ) + ( self.y * self.y ) + ( self.z * self.z ); 200 | end 201 | 202 | function _V3_MT:length_2d() -- 2D length 203 | return math_sqrt( self:length_2d_sqr() ); 204 | end 205 | 206 | function _V3_MT:length() -- 3D length 207 | return math_sqrt( self:length_sqr() ); 208 | end 209 | 210 | function _V3_MT:dot( other ) -- dot product 211 | return ( self.x * other.x ) + ( self.y * other.y ) + ( self.z * other.z ); 212 | end 213 | 214 | function _V3_MT:cross( other ) -- cross product 215 | return Vector3( 216 | ( self.y * other.z ) - ( self.z * other.y ), 217 | ( self.z * other.x ) - ( self.x * other.z ), 218 | ( self.x * other.y ) - ( self.y * other.x ) 219 | ); 220 | end 221 | 222 | function _V3_MT:dist_to( other ) -- 3D length to another vector 223 | return ( other - self ):length(); 224 | end 225 | 226 | function _V3_MT:is_zero( tolerance ) -- is the vector zero (within tolerance value, can pass no arg if desired)? 227 | tolerance = tolerance or 0.001; 228 | 229 | if( self.x < tolerance and self.x > -tolerance and 230 | self.y < tolerance and self.y > -tolerance and 231 | self.z < tolerance and self.z > -tolerance ) then 232 | return true; 233 | end 234 | 235 | return false; 236 | end 237 | 238 | function _V3_MT:normalize() -- normalizes this vector and returns the length 239 | local l = self:length(); 240 | if( l <= 0.0 ) then 241 | return 0.0; 242 | end 243 | 244 | self.x = self.x / l; 245 | self.y = self.y / l; 246 | self.z = self.z / l; 247 | 248 | return l; 249 | end 250 | 251 | function _V3_MT:normalize_no_len() -- normalizes this vector (no length returned) 252 | local l = self:length(); 253 | if( l <= 0.0 ) then 254 | return; 255 | end 256 | 257 | self.x = self.x / l; 258 | self.y = self.y / l; 259 | self.z = self.z / l; 260 | end 261 | 262 | function _V3_MT:normalized() -- returns a normalized unit vector 263 | local l = self:length(); 264 | if( l <= 0.0 ) then 265 | return Vector3(); 266 | end 267 | 268 | return Vector3( 269 | self.x / l, 270 | self.y / l, 271 | self.z / l 272 | ); 273 | end 274 | 275 | -- 276 | -- other math funcs 277 | -- 278 | function clamp( cur_val, min_val, max_val ) -- clamp number within 'min_val' and 'max_val' 279 | if( cur_val < min_val ) then 280 | return min_val; 281 | 282 | elseif( cur_val > max_val ) then 283 | return max_val; 284 | end 285 | 286 | return cur_val; 287 | end 288 | 289 | function normalize_angle( angle ) -- ensures angle axis is within [-180, 180] 290 | local out; 291 | local str; 292 | 293 | -- bad number 294 | str = tostring( angle ); 295 | if( str == "nan" or str == "inf" ) then 296 | return 0.0; 297 | end 298 | 299 | -- nothing to do, angle is in bounds 300 | if( angle >= -180.0 and angle <= 180.0 ) then 301 | return angle; 302 | end 303 | 304 | -- bring into range 305 | out = math_fmod( math_fmod( angle + 360.0, 360.0 ), 360.0 ); 306 | if( out > 180.0 ) then 307 | out = out - 360.0; 308 | end 309 | 310 | return out; 311 | end 312 | 313 | function vector_to_angle( forward ) -- vector -> euler angle 314 | local l; 315 | local pitch; 316 | local yaw; 317 | 318 | l = forward:length(); 319 | if( l > 0.0 ) then 320 | pitch = math_deg( math_atan( -forward.z, l ) ); 321 | yaw = math_deg( math_atan( forward.y, forward.x ) ); 322 | else 323 | if( forward.x > 0.0 ) then 324 | pitch = 270.0; 325 | else 326 | pitch = 90.0; 327 | end 328 | 329 | yaw = 0.0; 330 | end 331 | 332 | return Vector3( pitch, yaw, 0.0 ); 333 | end 334 | 335 | function angle_forward( angle ) -- angle -> direction vector (forward) 336 | local sin_pitch = math_sin( math_rad( angle.x ) ); 337 | local cos_pitch = math_cos( math_rad( angle.x ) ); 338 | local sin_yaw = math_sin( math_rad( angle.y ) ); 339 | local cos_yaw = math_cos( math_rad( angle.y ) ); 340 | 341 | return Vector3( 342 | cos_pitch * cos_yaw, 343 | cos_pitch * sin_yaw, 344 | -sin_pitch 345 | ); 346 | end 347 | 348 | function angle_right( angle ) -- angle -> direction vector (right) 349 | local sin_pitch = math_sin( math_rad( angle.x ) ); 350 | local cos_pitch = math_cos( math_rad( angle.x ) ); 351 | local sin_yaw = math_sin( math_rad( angle.y ) ); 352 | local cos_yaw = math_cos( math_rad( angle.y ) ); 353 | local sin_roll = math_sin( math_rad( angle.z ) ); 354 | local cos_roll = math_cos( math_rad( angle.z ) ); 355 | 356 | return Vector3( 357 | -1.0 * sin_roll * sin_pitch * cos_yaw + -1.0 * cos_roll * -sin_yaw, 358 | -1.0 * sin_roll * sin_pitch * sin_yaw + -1.0 * cos_roll * cos_yaw, 359 | -1.0 * sin_roll * cos_pitch 360 | ); 361 | end 362 | 363 | function angle_up( angle ) -- angle -> direction vector (up) 364 | local sin_pitch = math_sin( math_rad( angle.x ) ); 365 | local cos_pitch = math_cos( math_rad( angle.x ) ); 366 | local sin_yaw = math_sin( math_rad( angle.y ) ); 367 | local cos_yaw = math_cos( math_rad( angle.y ) ); 368 | local sin_roll = math_sin( math_rad( angle.z ) ); 369 | local cos_roll = math_cos( math_rad( angle.z ) ); 370 | 371 | return Vector3( 372 | cos_roll * sin_pitch * cos_yaw + -sin_roll * -sin_yaw, 373 | cos_roll * sin_pitch * sin_yaw + -sin_roll * cos_yaw, 374 | cos_roll * cos_pitch 375 | ); 376 | end 377 | 378 | function get_FOV( view_angles, start_pos, end_pos ) -- get fov to a vector (needs client view angles, start position (or client eye position for example) and the end position) 379 | local type_str; 380 | local fwd; 381 | local delta; 382 | local fov; 383 | 384 | fwd = angle_forward( view_angles ); 385 | delta = ( end_pos - start_pos ):normalized(); 386 | fov = math_acos( fwd:dot( delta ) / delta:length() ); 387 | 388 | return math_max( 0.0, math_deg( fov ) ); 389 | end 390 | -------------------------------------------------------------------------------- /local_player_bullet_beams/README.md: -------------------------------------------------------------------------------- 1 | https://youtu.be/RDneJt1vJJU 2 | -------------------------------------------------------------------------------- /local_player_bullet_beams/local_player_bullet_beams.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | ffi.cdef[[ 3 | typedef struct { 4 | float x; 5 | float y; 6 | float z; 7 | }vec3_t; 8 | struct beam_info_t { 9 | int m_type; 10 | void* m_start_ent; 11 | int m_start_attachment; 12 | void* m_end_ent; 13 | int m_end_attachment; 14 | vec3_t m_start; 15 | vec3_t m_end; 16 | int m_model_index; 17 | const char *m_model_name; 18 | int m_halo_index; 19 | const char *m_halo_name; 20 | float m_halo_scale; 21 | float m_life; 22 | float m_width; 23 | float m_end_width; 24 | float m_fade_length; 25 | float m_amplitude; 26 | float m_brightness; 27 | float m_speed; 28 | int m_start_frame; 29 | float m_frame_rate; 30 | float m_red; 31 | float m_green; 32 | float m_blue; 33 | bool m_renderable; 34 | int m_num_segments; 35 | int m_flags; 36 | vec3_t m_center; 37 | float m_start_radius; 38 | float m_end_radius; 39 | }; 40 | typedef void (__thiscall* draw_beams_t)(void*, void*); 41 | typedef void*(__thiscall* create_beam_points_t)(void*, struct beam_info_t&); 42 | ]] 43 | 44 | local render_beams_signature = "\xB9\xCC\xCC\xCC\xCC\xA1\xCC\xCC\xCC\xCC\xFF\x10\xA1\xCC\xCC\xCC\xCC\xB9" 45 | local match = client.find_signature("client_panorama.dll", render_beams_signature) or error("render_beams_signature not found") 46 | local render_beams = ffi.cast('void**', ffi.cast("char*", match) + 1)[0] or error("render_beams is nil") 47 | local render_beams_class = ffi.cast("void***", render_beams) 48 | local render_beams_vtbl = render_beams_class[0] 49 | 50 | local draw_beams = ffi.cast("draw_beams_t", render_beams_vtbl[6]) or error("couldn't cast draw_beams_t", 2) 51 | local create_beam_points = ffi.cast("create_beam_points_t", render_beams_vtbl[12]) or error("couldn't cast create_beam_points_t", 2) 52 | 53 | local local_player_bullet_beams = ui.new_checkbox("visuals", "Effects", "Local player bullet beams") 54 | local local_player_bullet_beams_color = ui.new_color_picker("visuals", "Effects", "Local player bullet beams color", 150, 130, 255, 255) 55 | local local_player_bullet_beams_style = ui.new_combobox("visuals", "effects", "\nstyle", {"Skeet", "Beam"}) 56 | local local_player_bullet_beams_thickness = ui.new_slider("visuals", "effects", "\nthickness", 10, 50, 20, true, nil, .1) 57 | 58 | local get_local_player = entity.get_local_player 59 | local get_prop = entity.get_prop 60 | local userid_to_entindex = client.userid_to_entindex 61 | local eye_position = client.eye_position 62 | local bor = bit.bor 63 | local new = ffi.new 64 | local get = ui.get 65 | 66 | local function create_beams(startpos, red, green, blue, alpha) 67 | local beam_info = new("struct beam_info_t") 68 | beam_info.m_type = 0x00 69 | beam_info.m_model_index = -1 70 | beam_info.m_halo_scale = 0 71 | 72 | beam_info.m_life = 2 73 | beam_info.m_fade_length = 1 74 | 75 | beam_info.m_width = get(local_player_bullet_beams_thickness) * .1 -- multiplication is faster than division 76 | beam_info.m_end_width = get(local_player_bullet_beams_thickness) * .1 -- multiplication is faster than division 77 | 78 | if get(local_player_bullet_beams_style) == "Skeet" then 79 | beam_info.m_model_name = "sprites/purplelaser1.vmt" 80 | elseif get(local_player_bullet_beams_style) == "Beam" then 81 | beam_info.m_model_name = "sprites/physbeam.vmt" 82 | end 83 | 84 | beam_info.m_amplitude = 2.3 85 | beam_info.m_speed = 0.2 86 | 87 | beam_info.m_start_frame = 0 88 | beam_info.m_frame_rate = 0 89 | 90 | beam_info.m_red = red 91 | beam_info.m_green = green 92 | beam_info.m_blue = blue 93 | beam_info.m_brightness = alpha 94 | 95 | beam_info.m_num_segments = 2 96 | beam_info.m_renderable = true 97 | 98 | beam_info.m_flags = bor(0x00000100 + 0x00000200 + 0x00008000) 99 | 100 | beam_info.m_start = startpos 101 | beam_info.m_end = { eye_position() } 102 | 103 | local beam = create_beam_points(render_beams_class, beam_info) 104 | if beam ~= nil then 105 | draw_beams(render_beams, beam) 106 | end 107 | end 108 | 109 | client.set_event_callback("bullet_impact", function(e) 110 | if userid_to_entindex(e.userid) == get_local_player() and get(local_player_bullet_beams) then 111 | local r,g,b,a = get(local_player_bullet_beams_color) 112 | create_beams({e.x, e.y, e.z}, r, g, b, a) 113 | end 114 | end) -------------------------------------------------------------------------------- /local_player_glow/README.md: -------------------------------------------------------------------------------- 1 | https://youtu.be/RETV_EEAKPE 2 | -------------------------------------------------------------------------------- /local_player_glow/local_player_glow.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | credits: 3 | v1ad / owen 4 | ]] 5 | 6 | local ffi = require("ffi") 7 | 8 | ffi.cdef[[ 9 | struct glow_object_definition_t { 10 | void *m_ent; 11 | float r; 12 | float g; 13 | float b; 14 | float a; 15 | char pad0x4[4]; 16 | float unk1; 17 | float m_bloom_amount; 18 | float m_localplayeriszeropoint3; 19 | bool m_render_when_occluded; 20 | bool m_render_when_unoccluded; 21 | bool m_full_bloom_render; 22 | char pad0x1[1]; 23 | int m_full_bloom_stencil_test_value; 24 | int m_style; 25 | int m_split_screen_slot; 26 | int m_next_free_slot; 27 | 28 | static const int END_OF_FREE_LIST = -1; 29 | static const int ENTRY_IN_USE = -2; 30 | }; 31 | struct c_glow_object_mngr { 32 | struct glow_object_definition_t *m_glow_object_definitions; 33 | int m_max_size; 34 | int m_pad; 35 | int m_size; 36 | struct glow_object_definition_t *m_glow_object_definitions2; 37 | int m_current_objects; 38 | }; 39 | typedef void*(__thiscall* get_client_entity_t)(void*, int); 40 | ]] 41 | 42 | local cast = ffi.cast 43 | local get_players = entity.get_players 44 | local get = ui.get 45 | local get_local_player = entity.get_local_player 46 | local is_alive = entity.is_alive 47 | 48 | local glow_object_manager_sig = "\x0F\x11\x05\xCC\xCC\xCC\xCC\x83\xC8\x01" 49 | local match = client.find_signature("client_panorama.dll", glow_object_manager_sig) or error("sig not found") 50 | local glow_object_manager = cast("struct c_glow_object_mngr**", cast("char*", match) + 3)[0] or error("glow_object_manager is nil") 51 | 52 | local rawientitylist = client.create_interface("client_panorama.dll", "VClientEntityList003") or error("VClientEntityList003 wasnt found", 2) 53 | local ientitylist = cast(ffi.typeof("void***"), rawientitylist) or error("rawientitylist is nil", 2) 54 | local get_client_entity = cast("get_client_entity_t", ientitylist[0][3]) or error("get_client_entity is nil", 2) 55 | 56 | -------------------------------------------------------------------------------------------------------------------- 57 | 58 | local local_player_glow = ui.new_checkbox("visuals", "player esp", "Local player glow") 59 | local local_player_glow_clr = ui.new_color_picker("visuals", "player esp", "Local player glow color", 180, 60, 120, 170) 60 | local local_player_glow_style = ui.new_combobox("visuals", "player esp", "\nLocal player glow style", { 61 | "Normal", 62 | "Overlay pulse", 63 | "Inline", 64 | "Inline pulse" 65 | }) 66 | 67 | local styles = { 68 | ["Normal"] = 0, 69 | ["Overlay pulse"] = 1, 70 | ["Inline"] = 2, 71 | ["Inline pulse"] = 3 72 | } 73 | 74 | client.set_event_callback("paint", function(ctx) 75 | local r,g,b,a = get(local_player_glow_clr) 76 | local me = get_local_player() 77 | local lpent = get_client_entity(ientitylist, me) 78 | if get(local_player_glow) then 79 | for i=0, glow_object_manager.m_size do 80 | if glow_object_manager.m_glow_object_definitions[i].m_next_free_slot == -2 and glow_object_manager.m_glow_object_definitions[i].m_ent then 81 | local glowobject = cast("struct glow_object_definition_t&", glow_object_manager.m_glow_object_definitions[i]) 82 | local glowent = glowobject.m_ent 83 | if is_alive(me) and glowent == lpent then 84 | glowobject.r = r / 255 85 | glowobject.g = g / 255 86 | glowobject.b = b / 255 87 | glowobject.a = a / 255 88 | glowobject.m_style = styles[get(local_player_glow_style)] 89 | glowobject.m_render_when_occluded = true 90 | glowobject.m_render_when_unoccluded = false 91 | end 92 | end 93 | end 94 | end 95 | end) -------------------------------------------------------------------------------- /lua sdk/README.md: -------------------------------------------------------------------------------- 1 | **Mini sdk for the gamesense lua api** 2 | 3 | This is a "mini sdk" i wrote for the gamesense lua api, it makes development of some scripts easier. 4 | 5 | Things this "sdk" got: 6 | 1. Entity class 7 | 2. Player class 8 | 3. Localplayer class 9 | 4. Weapon class 10 | 5. Playerresource class 11 | 6. Global playerresource class 12 | 7. Gamerulesproxy class 13 | 14 | ![screen](https://third-rei.ch/ycfN3YS8O4.png) 15 | **Used code in the screenshot** 16 | https://github.com/Aviarita/lua-scripts/blob/master/lua%20sdk/example.lua 17 | -------------------------------------------------------------------------------- /lua sdk/example.lua: -------------------------------------------------------------------------------- 1 | require( "lua sdk" ) 2 | 3 | local function draw_debug_infos(ctx, entity_index) 4 | local player = Player(entity_index) -- create a new player instance for entity_index 5 | local gbb = player:get_bounding_box(ctx) 6 | if gbb.botX == nil then return end 7 | 8 | local local_player = LocalPlayer() -- create a new instance for the local player 9 | 10 | local weapons = player:get_all_weapons() -- returns a table with the indexes of every weapon the player has equiped 11 | for i = 1, #weapons do 12 | local weapons = weapons[i] 13 | local r, g, b = 255, 255, 255 14 | -- checks if any weapon is the same as the active weapon of the player and changes the color 15 | if weapons:get_index() == player:get_active_weapon():get_index() then 16 | r, g, b = 215, 215, 0 17 | else 18 | r, g, b = 255, 255, 255 19 | end 20 | renderer.text(gbb.botX - (gbb.width / 1.5), gbb.botY + (i * 10), r, g, b, 255, "cb", 999, "", weapons:get_name()) 21 | renderer.text(gbb.botX - (gbb.width / 8), gbb.botY + (i * 10), r, g, b, 255, "cb", 999, "", weapons:get_current_ammo()) 22 | end 23 | 24 | renderer.text(gbb.botX + 5, gbb.topY, 255, 255, 255, gbb.alpha * 255, "b", 999, "Name: ", player:get_name()) 25 | renderer.text(gbb.botX + 5, gbb.topY + 10, 255, 255, 255, gbb.alpha * 255, "b", 999, "Entindex: ", player:get_index()) 26 | renderer.text(gbb.botX + 5, gbb.topY + 20, 255, 255, 255, gbb.alpha * 255, "b", 999, "Enemy: ", player:is_enemy()) 27 | renderer.text(gbb.botX + 5, gbb.topY + 30, 255, 255, 255, gbb.alpha * 255, "b", 999, "Health: ", player:get_health()) 28 | renderer.text(gbb.botX + 5, gbb.topY + 40, 255, 255, 255, gbb.alpha * 255, "b", 999, "Kills: ", player:playerresource():get_kills()) 29 | renderer.text(gbb.botX + 5, gbb.topY + 50, 255, 255, 255, gbb.alpha * 255, "b", 999, "Deaths: ", player:playerresource():get_deaths()) 30 | renderer.text(gbb.botX + 5, gbb.topY + 60, 255, 255, 255, gbb.alpha * 255, "b", 999, "Score: ", player:playerresource():get_score()) 31 | renderer.text(gbb.botX + 5, gbb.topY + 70, 255, 255, 255, gbb.alpha * 255, "b", 999, "MM Wins: ", player:playerresource():get_matchmaking_wins()) 32 | renderer.text(gbb.botX + 5, gbb.topY + 80, 255, 255, 255, gbb.alpha * 255, "b", 999, "MM Rank: ", player:playerresource():get_matchmaking_rank()) 33 | 34 | end 35 | client.set_event_callback("paint", function(ctx) 36 | local players = entity.get_players(true) 37 | for i=1, #players do 38 | local player = players[i] 39 | draw_debug_infos(ctx, player) 40 | end 41 | local gamerules = Gamerulesproxy() 42 | renderer.indicator(255, 255, 255, 255, "is_valve_ds: ", gamerules:is_valve_ds()) 43 | renderer.indicator(255, 255, 255, 255, "is_freezetime: ", gamerules:is_freezetime()) 44 | renderer.indicator(255, 255, 255, 255, "is_queued_for_matchmaking: ", gamerules:is_queued_for_matchmaking()) 45 | renderer.indicator(255, 255, 255, 255, "is_bomb_dropped: ", gamerules:is_bomb_dropped()) 46 | renderer.indicator(255, 255, 255, 255, "is_bomb_planted: ", gamerules:is_bomb_planted()) 47 | end) 48 | -------------------------------------------------------------------------------- /medal_changer/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/pUooInS.png) 2 | ![screen](https://i.imgur.com/mtqDHbg.png) 3 | -------------------------------------------------------------------------------- /medal_changer/medal_changer.lua: -------------------------------------------------------------------------------- 1 | local get_prop = entity.get_prop 2 | local set_prop = entity.set_prop 3 | local get_all = entity.get_all 4 | local get_lp = entity.get_local_player 5 | 6 | local vis = ui.set_visible 7 | local get = ui.get 8 | local set = ui.set 9 | local get_name = ui.name 10 | local new_checkbox = ui.new_checkbox 11 | local new_textbox = ui.new_textbox 12 | 13 | local settings = { 14 | { 15 | new_checkbox("lua", "b", "Enable coin Changer"), 16 | new_textbox("lua", "b", "\ncoin_changer"), 17 | "m_nActiveCoinRank", 18 | 0 19 | }, 20 | { 21 | new_checkbox("lua", "b", "Enable Private rank"), 22 | new_textbox("lua", "b", "\nprivate_rank"), 23 | "m_nPersonaDataPublicLevel", 24 | 0 25 | }, 26 | { 27 | new_checkbox("lua", "b", "Enable Music kit"), 28 | new_textbox("lua", "b", "\nmusic_kit"), 29 | "m_nMusicID", 30 | 0 31 | }, 32 | } 33 | 34 | for i=1,#settings do 35 | local setting = settings[i] 36 | vis(setting[2], get(setting[1])) 37 | ui.set_callback(setting[1], function(s) 38 | vis(setting[2], get(s)) 39 | end) 40 | end 41 | 42 | local function GetProp(prop) 43 | local player_resource = get_all("CCSPlayerResource")[1] 44 | return get_prop(player_resource, prop, get_lp()) 45 | end 46 | 47 | local function SetProp(prop, menu_item, value) 48 | local player_resource = get_all("CCSPlayerResource")[1] 49 | 50 | if menu_item ~= nil then 51 | set_prop(player_resource, prop, get(menu_item), get_lp()) 52 | elseif value ~= nil then 53 | set_prop(player_resource, prop, value, get_lp()) 54 | end 55 | end 56 | 57 | local backup_values = true 58 | 59 | local function on_net_update_end() 60 | 61 | if backup_values == true then 62 | for i=1,#settings do 63 | local setting = settings[i] 64 | setting[4] = GetProp(setting[3]) 65 | end 66 | backup_values = false 67 | end 68 | 69 | for i=1,#settings do 70 | local setting = settings[i] 71 | if get(setting[1]) == true then 72 | SetProp(setting[3], setting[2]) 73 | else 74 | SetProp(setting[3], nil, setting[4]) 75 | end 76 | end 77 | 78 | end 79 | client.set_event_callback("net_update_end", on_net_update_end) 80 | -------------------------------------------------------------------------------- /menu_color/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/jhTDoOF.png) 2 | -------------------------------------------------------------------------------- /menu_color/menu_color.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local SetUi = ui.set 3 | local SetCallback = ui.set_callback 4 | local NewCheckbox = ui.new_checkbox 5 | local NewColor = ui.new_color_picker 6 | local NewRef = ui.reference 7 | local SetVisible = ui.set_visible 8 | 9 | local AddEvent = client.set_event_callback 10 | 11 | local menu_color = NewRef("misc", "settings", "Menu color") 12 | local cc = { r, g, b, a } 13 | cc.r, cc.g, cc.b, cc.a = GetUi(menu_color) 14 | 15 | local new_menu_color_check = NewCheckbox("misc", "settings", "Menu Color") 16 | local new_menu_color = NewColor("misc", "settings", "Menu Color") 17 | 18 | SetVisible(menu_color, true) 19 | SetVisible(new_menu_color, false) 20 | 21 | local function change_menu_color() 22 | client.delay_call(0.0001, change_menu_color) 23 | if not GetUi(new_menu_color_check) then return end 24 | local r, g, b, a = GetUi(new_menu_color) 25 | SetUi(menu_color, r, g, b, a) 26 | end 27 | change_menu_color() 28 | 29 | SetCallback(new_menu_color_check, function() 30 | SetVisible(menu_color, not GetUi(new_menu_color_check)) 31 | SetVisible(new_menu_color, GetUi(new_menu_color_check)) 32 | SetUi(menu_color, cc.r,cc.g,cc.b,cc.a) 33 | cc.r, cc.g, cc.b, cc.a = GetUi(menu_color) 34 | end) 35 | -------------------------------------------------------------------------------- /model_changer/README.md: -------------------------------------------------------------------------------- 1 | ## Information 2 | 3 | Weapon models will flicker, player models shouldn't 4 | 5 | ## Steps to add your own models 6 | 1. Download them from [here](https://gamebanana.com/skins/games/4660) and follow the instructions in the readme files/threads. 7 | 2. Open the lua file 8 | 3. Find the tables **player_models** and **weapon_models** 9 | 4. If you have a custom player model add a new entry to **player_models**, if you have a custom weapon model add a new entry to **weapon_models** 10 | 5. Reload the lua 11 | 12 | A few examples: 13 | ```lua 14 | local player_models = { 15 | ["Emilia"] = "models/player/custom_player/maoling/re0/emilia_v2/emilia.mdl", 16 | ["Hitler"] = "models/player/custom_player/kuristaja/hitler/hitler.mdl", 17 | ["Neptunia"] = "models/player/custom_player/maoling/neptunia/adult_neptune/normal/adult.mdl", 18 | ["Freddy krueger"] = "models/player/freddykrueger/freddykrueger_update.mdl", 19 | ["Pokemon trainer"] = "models/player/pokemon/pokemon_trainer/pokemon_trainer.mdl", 20 | } 21 | 22 | local weapon_models = { 23 | [7] = "models/weapons/v_ak47royalguard.mdl", -- weapon_ak47 24 | [9] = "models/weapons/eminem/dsr_50/v_dsr_50_2.mdl", -- weapon_awp 25 | [35] = "models/weapons/eminem/gold_fararm_atf_12/v_gold_fararm_atf_12.mdl", -- weapon_nova 26 | [42] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 27 | [44] = "models/weapons/v_snowball.mdl", -- weapon_hegrenade 28 | [59] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 29 | [80] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 30 | [500] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 31 | [503] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 32 | [505] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 33 | [506] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 34 | [507] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 35 | [508] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 36 | [509] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 37 | [512] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 38 | [514] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 39 | [515] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 40 | [516] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 41 | [519] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 42 | [520] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 43 | [522] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 44 | [521] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 45 | [525] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 46 | [518] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 47 | [517] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 48 | [523] = "models/weapons/v_cfaxegold.mdl", -- weapon_knife 49 | } 50 | 51 | ``` 52 | -------------------------------------------------------------------------------- /model_changer/model_changer.lua: -------------------------------------------------------------------------------- 1 | local player_models = { 2 | -- [Menu name] = path to model 3 | ["Hitler"] = "models/player/custom_player/kuristaja/hitler/hitler.mdl", -- example line 4 | } 5 | 6 | local weapon_models = { 7 | -- [Weapon index] = path to model 8 | [1] = " ", -- weapon_deagle 9 | [2] = " ", -- weapon_elite 10 | [3] = " ", -- weapon_fiveseven 11 | [4] = " ", -- weapon_glock 12 | [7] = " ", -- weapon_ak47 13 | [8] = " ", -- weapon_aug 14 | [9] = " ", -- weapon_awp 15 | [10] = " ", -- weapon_famas 16 | [11] = " ", -- weapon_g3sg1 17 | [13] = " ", -- weapon_galilar 18 | [14] = " ", -- weapon_m249 19 | [16] = " ", -- weapon_m4a1 20 | [17] = " ", -- weapon_mac10 21 | [19] = " ", -- weapon_p90 22 | [23] = " ", -- weapon_mp7 23 | [24] = " ", -- weapon_ump45 24 | [25] = " ", -- weapon_xm1014 25 | [26] = " ", -- weapon_bizon 26 | [27] = " ", -- weapon_mag7 27 | [28] = " ", -- weapon_negev 28 | [29] = " ", -- weapon_sawedoff 29 | [30] = " ", -- weapon_tec9 30 | [31] = " ", -- weapon_taser 31 | [32] = " ", -- weapon_hkp2000 32 | [33] = " ", -- weapon_mp7 33 | [34] = " ", -- weapon_mp9 34 | [35] = " ", -- weapon_nova 35 | [36] = " ", -- weapon_p250 36 | [37] = " ", -- weapon_shield 37 | [38] = " ", -- weapon_scar20 38 | [39] = " ", -- weapon_sg556 39 | [40] = " ", -- weapon_ssg08 40 | [41] = " ", -- weapon_knifegg 41 | [42] = " ", -- weapon_knife 42 | [43] = " ", -- weapon_flashbang 43 | [44] = " ", -- weapon_hegrenade 44 | [45] = " ", -- weapon_smokegrenade 45 | [46] = " ", -- weapon_molotov 46 | [47] = " ", -- weapon_decoy 47 | [48] = " ", -- weapon_incgrenade 48 | [49] = " ", -- weapon_c4 49 | [57] = " ", -- weapon_healthshot 50 | [59] = " ", -- weapon_knife 51 | [60] = " ", -- weapon_m4a1 52 | [61] = " ", -- weapon_hkp2000 53 | [63] = " ", -- weapon_p250 54 | [64] = " ", -- weapon_deagle 55 | [68] = " ", -- weapon_tagrenade 56 | [70] = " ", -- weapon_breachcharge 57 | [72] = " ", -- weapon_tablet 58 | [74] = " ", -- weapon_melee 59 | [75] = " ", -- weapon_melee 60 | [76] = " ", -- weapon_melee 61 | [78] = " ", -- weapon_melee 62 | [80] = " ", -- weapon_knife 63 | [81] = " ", -- weapon_molotov 64 | [82] = " ", -- weapon_decoy 65 | [83] = " ", -- weapon_hegrenade 66 | [84] = " ", -- weapon_snowball 67 | [85] = " ", -- weapon_bumpmine 68 | [500] = " ", -- weapon_knife 69 | [503] = " ", -- weapon_knife 70 | [505] = " ", -- weapon_knife 71 | [506] = " ", -- weapon_knife 72 | [507] = " ", -- weapon_knife 73 | [508] = " ", -- weapon_knife 74 | [509] = " ", -- weapon_knife 75 | [512] = " ", -- weapon_knife 76 | [514] = " ", -- weapon_knife 77 | [515] = " ", -- weapon_knife 78 | [516] = " ", -- weapon_knife 79 | [519] = " ", -- weapon_knife 80 | [520] = " ", -- weapon_knife 81 | [522] = " ", -- weapon_knife 82 | [521] = " ", -- weapon_knife 83 | [525] = " ", -- weapon_knife 84 | [518] = " ", -- weapon_knife 85 | [517] = " ", -- weapon_knife 86 | [523] = " ", -- weapon_knife 87 | } 88 | 89 | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 90 | 91 | local ffi = require("ffi") 92 | 93 | ffi.cdef[[ 94 | typedef struct 95 | { 96 | void* fnHandle; 97 | char szName[260]; 98 | int nLoadFlags; 99 | int nServerCount; 100 | int type; 101 | int flags; 102 | float vecMins[3]; 103 | float vecMaxs[3]; 104 | float radius; 105 | char pad[0x1C]; 106 | }model_t; 107 | 108 | typedef int(__thiscall* get_model_index_t)(void*, const char*); 109 | typedef const model_t(__thiscall* find_or_load_model_t)(void*, const char*); 110 | typedef int(__thiscall* add_string_t)(void*, bool, const char*, int, const void*); 111 | typedef void*(__thiscall* find_table_t)(void*, const char*); 112 | typedef void(__thiscall* set_model_index_t)(void*, int); 113 | typedef int(__thiscall* precache_model_t)(void*, const char*, bool); 114 | typedef void*(__thiscall* get_client_entity_t)(void*, int); 115 | ]] 116 | 117 | local class_ptr = ffi.typeof("void***") 118 | 119 | local rawientitylist = client.create_interface("client_panorama.dll", "VClientEntityList003") or error("VClientEntityList003 wasnt found", 2) 120 | local ientitylist = ffi.cast(class_ptr, rawientitylist) or error("rawientitylist is nil", 2) 121 | local get_client_entity = ffi.cast("get_client_entity_t", ientitylist[0][3]) or error("get_client_entity is nil", 2) 122 | 123 | local rawivmodelinfo = client.create_interface("engine.dll", "VModelInfoClient004") or error("VModelInfoClient004 wasnt found", 2) 124 | local ivmodelinfo = ffi.cast(class_ptr, rawivmodelinfo) or error("rawivmodelinfo is nil", 2) 125 | local get_model_index = ffi.cast("get_model_index_t", ivmodelinfo[0][2]) or error("get_model_info is nil", 2) 126 | local find_or_load_model = ffi.cast("find_or_load_model_t", ivmodelinfo[0][39]) or error("find_or_load_model is nil", 2) 127 | 128 | local rawnetworkstringtablecontainer = client.create_interface("engine.dll", "VEngineClientStringTable001") or error("VEngineClientStringTable001 wasnt found", 2) 129 | local networkstringtablecontainer = ffi.cast(class_ptr, rawnetworkstringtablecontainer) or error("rawnetworkstringtablecontainer is nil", 2) 130 | local find_table = ffi.cast("find_table_t", networkstringtablecontainer[0][3]) or error("find_table is nil", 2) 131 | 132 | local cl_fullupdate = cvar.cl_fullupdate 133 | 134 | local model_names = {} 135 | for k,v in pairs(player_models) do 136 | table.insert(model_names, k) 137 | end 138 | 139 | local replace_models = ui.new_checkbox("lua", "a", "Replace weapon models") 140 | local replace_player_models = ui.new_checkbox("lua", "a", "Replace player models") 141 | local t_player_model = ui.new_combobox("lua", "a", "T model", model_names) 142 | local ct_player_model = ui.new_combobox("lua", "a", "CT model", model_names) 143 | local replace_localplayer_model = ui.new_checkbox("lua", "a", "Replace localplayer model") 144 | local localplayer_model = ui.new_combobox("lua", "a", "\nmodel", model_names) 145 | 146 | local function precache_model(modelname) 147 | local rawprecache_table = find_table(networkstringtablecontainer, "modelprecache") or error("couldnt find modelprecache", 2) 148 | if rawprecache_table then 149 | local precache_table = ffi.cast(class_ptr, rawprecache_table) or error("couldnt cast precache_table", 2) 150 | if precache_table then 151 | local add_string = ffi.cast("add_string_t", precache_table[0][8]) or error("add_string is nil", 2) 152 | 153 | find_or_load_model(ivmodelinfo, modelname) 154 | local idx = add_string(precache_table, false, modelname, -1, nil) 155 | if idx == -1 then 156 | return false 157 | end 158 | end 159 | end 160 | return true 161 | end 162 | 163 | local function set_model_index(entity, idx) 164 | local raw_entity = get_client_entity(ientitylist, entity) 165 | if raw_entity then 166 | local gce_entity = ffi.cast(class_ptr, raw_entity) 167 | local a_set_model_index = ffi.cast("set_model_index_t", gce_entity[0][75]) 168 | if a_set_model_index == nil then 169 | error("set_model_index is nil") 170 | end 171 | a_set_model_index(gce_entity, idx) 172 | end 173 | end 174 | 175 | local function change_model(ent, model) 176 | if model:len() > 5 then 177 | if precache_model(model) == false then 178 | error("invalid model", 2) 179 | end 180 | local idx = get_model_index(ivmodelinfo, model) 181 | if idx == -1 then 182 | return 183 | end 184 | set_model_index(ent, idx) 185 | end 186 | end 187 | 188 | local update_skins = true 189 | client.set_event_callback("net_update_start", function() 190 | 191 | local me = entity.get_local_player() 192 | if me == nil then return end 193 | 194 | if ui.get(replace_player_models) then 195 | local players = entity.get_players(false) 196 | for i=1, #players do 197 | local player = players[i] 198 | local teamnum = entity.get_prop(player, "m_iTeamNum") 199 | if entity.is_alive(player) and not entity.is_dormant(player) and player ~= me then 200 | if teamnum == 2 then 201 | change_model(player, player_models[ui.get(t_player_model)]) 202 | elseif teamnum == 3 then 203 | change_model(player, player_models[ui.get(ct_player_model)]) 204 | end 205 | end 206 | end 207 | end 208 | 209 | if ui.get(replace_localplayer_model) then 210 | change_model(me, player_models[ui.get(localplayer_model)]) 211 | end 212 | 213 | if ui.get(replace_models) then 214 | local m_hViewModel = entity.get_prop(me, "m_hViewModel[0]") 215 | if m_hViewModel == nil then return end 216 | 217 | local m_hWeapon = entity.get_prop(m_hViewModel, "m_hWeapon") 218 | if m_hWeapon == nil then return end 219 | 220 | if entity.get_prop(m_hWeapon, "m_iItemDefinitionIndex") == nil then return end 221 | local wpn_idx = bit.band(entity.get_prop(m_hWeapon, "m_iItemDefinitionIndex"), 0xFFFF) 222 | if wpn_idx == nil then return end 223 | 224 | if weapon_models[wpn_idx] ~= nil then 225 | change_model(m_hViewModel, weapon_models[wpn_idx]) 226 | change_model(m_hWeapon, weapon_models[wpn_idx]) 227 | if update_skins then 228 | cl_fullupdate:invoke_callback() 229 | update_skins = false 230 | end 231 | else 232 | update_skins = true 233 | end 234 | end 235 | end) 236 | -------------------------------------------------------------------------------- /multipoint/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/7jp5rnS.png) 2 | ![console](https://i.imgur.com/qsAYTXr.png) 3 | -------------------------------------------------------------------------------- /multipoint/decrease_multipoint.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local SetUi = ui.set 3 | local SetVisible = ui.set_visible 4 | 5 | local Log = client.log 6 | local cmd = client.exec 7 | local AddEvent = client.set_event_callback 8 | 9 | local pointscale_ref = ui.reference("RAGE", "Aimbot", "Multi-point scale") 10 | local decrease_pointscale_on_miss = ui.new_checkbox("RAGE", "Other", "Decrease multi-point on miss") 11 | local max_missed_shots = ui.new_slider("RAGE", "Other", "Max misses before decreasing", 1, 5, 0) 12 | local increase_hit_chance = ui.new_slider("RAGE", "Other", "Decrease multi-point by", 1, 15, 0, true, "%") 13 | local old_multi_point = ui.new_slider("RAGE", "Other", "Old multi-point scale", 0, 100, 0, true, "%") 14 | 15 | SetUi(old_multi_point, GetUi(pointscale_ref)) 16 | 17 | local missed_shots = 0 18 | 19 | local function clamp(min, max, current) 20 | if current > max then current = max 21 | elseif current < min then current = min end 22 | return math.floor(current) 23 | end 24 | 25 | local function on_aim_miss(event) 26 | if not GetUi(decrease_pointscale_on_miss) then return end 27 | local current_hitchance = GetUi(pointscale_ref) 28 | missed_shots = missed_shots + 1 29 | if missed_shots >= GetUi(max_missed_shots) and GetUi(pointscale_ref) ~= 0 then 30 | Log("Set multi-point to " .. clamp(24, 100, current_hitchance - GetUi(increase_hit_chance))) 31 | SetUi(pointscale_ref, clamp(24, 100, current_hitchance - GetUi(increase_hit_chance))) 32 | end 33 | end 34 | 35 | local function on_aim_hit(event) 36 | if not GetUi(decrease_pointscale_on_miss) then return end 37 | missed_shots = 0 38 | if GetUi(pointscale_ref) ~= GetUi(old_multi_point) then 39 | Log("Set multi-point to " .. GetUi(old_multi_point)) 40 | SetUi(pointscale_ref, GetUi(old_multi_point)) 41 | end 42 | end 43 | 44 | local function change_visibility(event) 45 | SetVisible(max_missed_shots, GetUi(decrease_pointscale_on_miss)) 46 | SetVisible(increase_hit_chance, GetUi(decrease_pointscale_on_miss)) 47 | SetVisible(old_multi_point, GetUi(decrease_pointscale_on_miss)) 48 | end 49 | 50 | AddEvent("run_command", change_visibility) 51 | AddEvent("aim_miss", on_aim_miss) 52 | AddEvent("aim_hit", on_aim_hit) 53 | -------------------------------------------------------------------------------- /no_sets/README.md: -------------------------------------------------------------------------------- 1 | https://i.imgur.com/eulBfQ8.gif 2 | -------------------------------------------------------------------------------- /old_skeet_esp/README.md: -------------------------------------------------------------------------------- 1 | This lua requries you to download [my surface library](https://github.com/Aviarita/surface) 2 | 3 | ![Preview](https://i.imgur.com/Aaz2b3a.png) 4 | -------------------------------------------------------------------------------- /old_skeet_esp/old_skeet_esp.lua: -------------------------------------------------------------------------------- 1 | package.path = package.path .. ".\\?.lua;.\\?.ljbc;.\\lib\\?.lua;.\\libs\\?.lua;.\\lib\\?.ljbc;.\\libs\\?.ljbc;" 2 | local bit = require("bit") 3 | local ffi = require("ffi") 4 | local surface, err = pcall(require, "surface") 5 | if err and surface == false then 6 | client.log(err) 7 | error("Please download the surface library and name it surface.ljbc/.lua to use this script") 8 | return 9 | end 10 | 11 | ffi.cdef[[ 12 | struct CCSWeaponInfo { 13 | char _0x0000[20]; 14 | int iMaxClip1; 15 | char _0x0070[0x70]; 16 | char* szHudName; 17 | char* szWeaponName; 18 | }; 19 | 20 | typedef bool(__thiscall* is_weapon_t)(void*); 21 | typedef struct CCSWeaponInfo*(__thiscall* get_ccs_weapon_info_t)(void*); 22 | typedef void*(__thiscall* get_client_entity_t)(void*, int); 23 | typedef int(__thiscall* get_highest_entity_by_index_t)(void*); 24 | ]] 25 | 26 | local rawientitylist = client.create_interface("client_panorama.dll", "VClientEntityList003") or error("VClientEntityList003 wasnt found", 2) 27 | local ientitylist = ffi.cast(ffi.typeof("void***"), rawientitylist) or error("rawientitylist is nil", 2) 28 | local get_client_entity = ffi.cast("get_client_entity_t", ientitylist[0][3]) or error("get_client_entity is nil", 2) 29 | local get_highest_entity_by_index = ffi.cast("get_highest_entity_by_index_t", ientitylist[0][6]) or error("get_highest_entity_by_index is nil", 2) 30 | 31 | local old_name = ui.new_checkbox("visuals", "player esp", "Old name") 32 | local old_name_clr = ui.new_color_picker("visuals", "player esp", "Old name color", 255, 255, 255, 255) 33 | local old_name_font = ui.new_combobox("visuals", "player esp", "\nfont", {"Normal", "Bold"}) 34 | local old_weapon_icons = ui.new_checkbox("visuals", "player esp", "Old Weapon Icons") 35 | local old_weapon_icons_clr = ui.new_color_picker("visuals", "player esp", "Old Weapon Icons color", 255, 255, 255, 255) 36 | 37 | local dropped_weapon_esp_checkbox = ui.new_checkbox("visuals", "other esp", "Old dropped weapons") 38 | local dropped_weapon_esp_color = ui.new_color_picker("visuals", "other esp", "Old dropped weapons", 255, 255, 255, 255) 39 | local dropped_weapon_ammo_esp_checkbox = ui.new_checkbox("visuals", "other esp", "Old dropped weapons ammo") 40 | local dropped_weapon_ammo_esp_color = ui.new_color_picker("visuals", "other esp", "Old dropped weapons ammo", 56, 159, 252, 200) 41 | 42 | local teammates_ref = ui.reference("visuals", "player esp", "teammates") 43 | 44 | local ammo_ref = ui.reference("visuals", "player esp", "ammo") 45 | local distance_ref = ui.reference("visuals", "player esp", "distance") 46 | local weapon_text_ref = ui.reference("visuals", "player esp", "weapon text") 47 | local weapon_icon_ref = ui.reference("visuals", "player esp", "weapon icon") 48 | local dpi_scale_ref = ui.reference("misc", "settings", "dpi scale") 49 | 50 | local weapon_icon_char = { 51 | [1] = "F", -- Deagle 52 | [2] = "S", -- Duals 53 | [3] = "U", -- five seven 54 | [4] = "C", -- glock 55 | [7] = "B", -- ak 56 | [8] = "E", -- aug 57 | [9] = "R", -- awp 58 | [10] = "T", -- famas 59 | [11] = "I", -- t auto 60 | [13] = "V", -- galil 61 | [14] = "Z", -- ms249 62 | [16] = "W", -- m4a4 63 | [17] = "L", -- mac 10 64 | [19] = "M", -- p90 65 | [23] = "X", -- mp5-sd 66 | [24] = "Q", -- ump 67 | [25] = "]", -- xm1014 68 | [26] = "D", -- bizon 69 | [27] = "K", -- mag7 70 | [28] = "Z", -- negev 71 | [29] = "K", -- sawed off 72 | [30] = "C", -- tec9 73 | [31] = "Y", -- Taser 74 | [32] = "A", -- p2k 75 | [33] = "X", -- mp7 76 | [34] = "D", -- mp9 77 | [35] = "K", -- nova 78 | [36] = "Y", -- p250 79 | [38] = "O", -- ct auto 80 | [39] = "[", -- sg553/sg556 81 | [40] = "N", -- scout 82 | [41] = "J", -- Knife 83 | [42] = "J", -- Knife 84 | [43] = "G", -- Flashbang 85 | [44] = "H", -- Grenade 86 | [45] = "P", -- Smoke 87 | [47] = "G", -- Decoy 88 | [49] = "j", -- C4 89 | [55] = "f", -- Defuser 90 | [59] = "J", -- Knife 91 | [60] = "W", -- m4a1s 92 | [61] = "A", -- usps 93 | [500] = "J", -- knife 94 | [505] = "J", -- knife 95 | [506] = "J", -- knife 96 | [507] = "J", -- knife 97 | [508] = "J", -- knife 98 | [509] = "J", -- knife 99 | [512] = "J", -- knife 100 | [514] = "J", -- knife 101 | [515] = "J", -- knife 102 | [516] = "J", -- knife 103 | [519] = "J", -- knife 104 | [520] = "J", -- knife 105 | [522] = "J", -- knife 106 | [523] = "J", -- knife 107 | } 108 | 109 | local function get_weapon_index(ent) 110 | local m_iItemDefinitionIndex = entity.get_prop(ent, "m_iItemDefinitionIndex") 111 | if m_iItemDefinitionIndex ~= nil then 112 | local weapon_item_index = bit.band(m_iItemDefinitionIndex, 0xFFFF) 113 | return weapon_item_index 114 | end 115 | end 116 | 117 | local function get_icon_for_weapon_index(ent) 118 | return weapon_icon_char[get_weapon_index(ent)] 119 | end 120 | 121 | local function round(b, c) local d = 10 ^ (c or 0) return math.floor(b * d + 0.5) / d end 122 | local function round_to_fifth(num) num = round(num, 0) num = num / 5 num = round(num, 0) num = num * 5 return num end 123 | 124 | local function get_distance_in_feet(a_x, a_y, a_z, b_x, b_y, b_z) 125 | return math.ceil(math.sqrt(math.pow(a_x - b_x, 2) + math.pow(a_y - b_y, 2) + math.pow(a_z - b_z, 2)) * 0.0254 / 0.3048) 126 | end 127 | 128 | local weapon_icons_font = renderer.create_font("Counter-Strike", 22, 400, {0x010,0x080}) 129 | local bomb_icon_font = renderer.create_font("Counter-Strike", 18, 400, {0x010,0x080}) 130 | local weapon_text_font = renderer.create_font("Small Fonts", 8, 350, {0x010,0x200}) 131 | local normal_font = renderer.create_font("Verdana", 12, 0, {0x080, 0x010}) 132 | local bold_font = renderer.create_font("Verdana", 12, 700, {0x080}) 133 | 134 | local function reinit_fonts(dpi, dpin) 135 | weapon_icons_font = renderer.create_font("Counter-Strike", 22 * dpi, 400, {0x010,0x080}) 136 | bomb_icon_font = renderer.create_font("Counter-Strike", 18 * dpi, 400, {0x010,0x080}) 137 | weapon_text_font = renderer.create_font("Small Fonts", 8 * dpi, 350, {0x010,0x200}) 138 | normal_font = renderer.create_font("Verdana", 12 * dpin, 0, {0x080, 0x010}) 139 | bold_font = renderer.create_font("Verdana", 12 * dpin, 700, {0x080}) 140 | end 141 | 142 | ui.set_callback(dpi_scale_ref, function(self) 143 | local value = ui.get(self) 144 | if value == "100%" then 145 | reinit_fonts(1, 1.05) 146 | elseif value == "125%" then 147 | reinit_fonts(1.5, 1.1) 148 | elseif value == "150%" then 149 | reinit_fonts(2, 1.2) 150 | elseif value == "175%" then 151 | reinit_fonts(2.5, 1.3) 152 | elseif value == "200%" then 153 | reinit_fonts(3, 1.4) 154 | end 155 | end) 156 | 157 | local function draw_weapon_icons(ent) 158 | 159 | local x0, y0, x1, y1, alpha = entity.get_bounding_box(ent) 160 | if x0 == nil or y0 == nil or x1 == nil or y1 == nil or alpha == nil or alpha == 0 then return end 161 | 162 | local plrwpn = entity.get_player_weapon(ent) 163 | iClip1 = entity.get_prop(plrwpn, "m_iClip1") 164 | 165 | if ui.get(ammo_ref) and iClip1 ~= -1 then 166 | y1 = y1 + 5 167 | end 168 | 169 | if ui.get(distance_ref) then 170 | y1 = y1 + 6 171 | end 172 | 173 | if ui.get(weapon_text_ref) then 174 | y1 = y1 + 11 175 | end 176 | 177 | if ui.get(weapon_icon_ref) then 178 | y1 = y1 + 16 179 | end 180 | 181 | local r, g, b, a = ui.get(old_weapon_icons_clr) 182 | a = a * alpha 183 | 184 | local weapon_char = get_icon_for_weapon_index(plrwpn) 185 | if weapon_char == nil then return end 186 | 187 | local text, font = "nil", weapon_icons_font 188 | 189 | if weapon_char:len() > 1 then 190 | font = weapon_text_font 191 | else 192 | font = weapon_icons_font 193 | end 194 | 195 | local tw,th = renderer.get_text_size(font, weapon_char) 196 | local middle_x = ((x0 - x1) / 2) + x1 - tw/2 197 | renderer.draw_text(middle_x, y1 + 1, r, g, b, a * alpha, font, weapon_char) 198 | end 199 | 200 | local function draw_name(ent) 201 | 202 | local x0, y0, x1, y1, alpha = entity.get_bounding_box(ent) 203 | if x0 == nil or y0 == nil or x1 == nil or y1 == nil or alpha == nil or alpha == 0 then 204 | return 205 | end 206 | 207 | local r, g, b, a = ui.get(old_name_clr) 208 | a = a * alpha 209 | local name = entity.get_player_name(ent) 210 | if name == nil then return end 211 | 212 | if name:len() > 15 then 213 | name = name:sub(0, 15) 214 | end 215 | 216 | local font = ui.get(old_name_font) == "Normal" and normal_font or bold_font 217 | 218 | local wide, tall = renderer.get_text_size(font, name) 219 | 220 | local middle_x = (x0 - x1) / 2 221 | x0 = x0 - wide / 2 222 | renderer.draw_text(x0 - middle_x, y0-tall, r, g, b, a, font, name) 223 | end 224 | 225 | local function draw_old_dropped_weapon_esp(ent, entptr) 226 | local epx, epy, epz = entity.get_prop(ent, "m_vecOrigin") 227 | local lpx, lpy, lpz = entity.get_prop(entity.get_local_player(), "m_vecOrigin") 228 | if epx == 0 and epy == 0 and epz == 0 then return end 229 | local wx, wy = renderer.world_to_screen(epx, epy, epz) 230 | 231 | if entptr == nil then return end 232 | 233 | local get_ccs_weapon_info = ffi.cast("get_ccs_weapon_info_t", entptr[0][459]) 234 | local ccsweaponinfo = get_ccs_weapon_info(entptr) 235 | 236 | local iClip1 = entity.get_prop(ent, "m_iClip1") 237 | local iMaxClip1 = tonumber(ccsweaponinfo.iMaxClip1) 238 | 239 | local weapon_char = get_icon_for_weapon_index(ent) 240 | if weapon_char == nil then 241 | weapon_char = renderer.localize_string(ccsweaponinfo.szHudName):upper() 242 | end 243 | 244 | local r,g,b,a = ui.get(dropped_weapon_esp_color) 245 | 246 | local ammo_percentage = math.min(1, iMaxClip1 == 0 and 1 or iClip1/iMaxClip1) 247 | 248 | local font = weapon_icons_font 249 | if weapon_char:len() > 1 then 250 | font = weapon_text_font 251 | else 252 | font = weapon_icons_font 253 | end 254 | 255 | if wx ~= nil then 256 | 257 | local tw,th = renderer.get_text_size(font, weapon_char) 258 | 259 | local dist = round_to_fifth(get_distance_in_feet(lpx, lpy, lpz, epx, epy, epz)) .. "FT" 260 | local dw, dh = renderer.get_text_size(weapon_text_font, dist) 261 | 262 | renderer.draw_text(wx - (dw*.5), wy, r, g, b, a, weapon_text_font, dist) 263 | 264 | local old_wy = wy 265 | if font == weapon_icons_font then 266 | wy = wy - (dh*.5) 267 | end 268 | 269 | renderer.draw_text(wx - (tw*.5), wy + dh, r, g, b, a, font, weapon_char) 270 | 271 | wy = old_wy 272 | 273 | if font == weapon_text_font then 274 | wy = wy + dh 275 | end 276 | 277 | if ui.get(dropped_weapon_ammo_esp_checkbox) and iClip1 ~= -1 then 278 | local width = tw * ammo_percentage 279 | local r,g,b,a = ui.get(dropped_weapon_ammo_esp_color) 280 | renderer.draw_filled_rect(wx - (tw*.5), wy + th, tw + 1, 4, 0, 0, 0, 200) 281 | renderer.draw_filled_rect(wx - (tw*.5) + 1, wy + th + 1, width - 1, 2, r, g, b, a) 282 | end 283 | end 284 | end 285 | 286 | client.set_event_callback("paint", function() 287 | for player=1, globals.maxplayers() do 288 | if entity.get_classname(player) == "CCSPlayer" and ((not entity.is_enemy(player) and ui.get(teammates_ref)) or entity.is_enemy(player)) and entity.is_alive(player) then 289 | if ui.get(old_weapon_icons) then 290 | draw_weapon_icons(player) 291 | end 292 | if ui.get(old_name) then 293 | draw_name(player) 294 | end 295 | end 296 | end 297 | for i=1, get_highest_entity_by_index(ientitylist) do 298 | local rawent = get_client_entity(ientitylist, i) 299 | if rawent ~= nil then 300 | local ent = ffi.cast(ffi.typeof("void***"), rawent) 301 | if ent ~= nil then 302 | local classname = entity.get_classname(i) 303 | if classname:find("CWeapon") 304 | or classname:find("CAK") 305 | or classname:find("CC4") 306 | or classname:find("Grenade") 307 | or classname:find("Flashbang") 308 | or classname:find("CDEagle") then 309 | local is_weapon = ffi.cast("is_weapon_t", ent[0][165]) 310 | if is_weapon(ent) then 311 | if ui.get(dropped_weapon_esp_checkbox) then 312 | draw_old_dropped_weapon_esp(i, ent) 313 | end 314 | end 315 | end 316 | end 317 | end 318 | end 319 | end) 320 | -------------------------------------------------------------------------------- /panorama/access_panorama.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | ffi.cdef[[ 3 | // UIEngine 4 | typedef void*(__thiscall* access_ui_engine_t)(void*, void); // 11 5 | typedef bool(__thiscall* is_valid_panel_ptr_t)(void*, void*); // 36 6 | typedef void*(__thiscall* get_last_target_panel_t)(void*); // 56 7 | typedef int (__thiscall *run_script_t)(void*, void*, char const*, char const*, int, int, bool, bool); // 113 8 | 9 | // IUIPanel 10 | typedef const char*(__thiscall* get_panel_id_t)(void*, void); // 9 11 | typedef void*(__thiscall* get_parent_t)(void*); // 25 12 | typedef void*(__thiscall* set_visible_t)(void*, bool); // 27 13 | ]] 14 | local interface_ptr = ffi.typeof("void***") 15 | local rawpanoramaengine = client.create_interface("panorama.dll", "PanoramaUIEngine001") 16 | local panoramaengine = ffi.cast(interface_ptr, rawpanoramaengine) -- void*** 17 | local panoramaengine_vtbl = panoramaengine[0] -- void** 18 | 19 | local access_ui_engine = ffi.cast("access_ui_engine_t", panoramaengine_vtbl[11]) -- void* 20 | 21 | local function get_last_target_panel(uiengineptr) 22 | local vtbl = uiengineptr[0] or error("uiengineptr is nil", 2) 23 | local func = vtbl[56] or error("uiengineptr_vtbl is nil", 2) 24 | local fn = ffi.cast("get_last_target_panel_t", func) 25 | return fn(uiengineptr) 26 | end 27 | 28 | local function is_valid_panel_ptr(uiengineptr, itr) 29 | if itr == nil then 30 | return false --error("itr is nil", 2) 31 | end 32 | local vtbl = uiengineptr[0] or error("uiengineptr is nil", 2) 33 | local func = vtbl[36] or error("uiengineptr_vtbl is nil", 2) 34 | local fn = ffi.cast("is_valid_panel_ptr_t", func) 35 | return fn(uiengineptr, itr) 36 | end 37 | 38 | local function get_panel_id(panelptr) 39 | local vtbl = panelptr[0] or error("panelptr is nil", 2) 40 | local func = vtbl[9] or error("panelptr_vtbl is nil", 2) 41 | local fn = ffi.cast("get_panel_id_t", func) 42 | return ffi.string(fn(panelptr)) 43 | end 44 | 45 | local function set_visible(panelptr, state) 46 | local vtbl = panelptr[0] or error("panelptr is nil", 2) 47 | local func = vtbl[27] or error("panelptr_vtbl is nil", 2) 48 | local fn = ffi.cast("set_visible_t", func) 49 | fn(panelptr, state) 50 | end 51 | 52 | local function get_parent(panelptr) 53 | local vtbl = panelptr[0] or error("panelptr is nil", 2) 54 | local func = vtbl[25] or error("panelptr_vtbl is nil", 2) 55 | local fn = ffi.cast("get_parent_t", func) 56 | return fn(panelptr) 57 | end 58 | 59 | local function get_root(uiengineptr, custompanel) 60 | local itr = get_last_target_panel(uiengineptr) 61 | if itr == nil then 62 | return 63 | end 64 | local ret = nil 65 | local panelptr = nil 66 | while itr ~= nil and is_valid_panel_ptr(uiengineptr, itr) do 67 | panelptr = ffi.cast("void***", itr) 68 | if custompanel and get_panel_id(panelptr) == custompanel then 69 | ret = itr 70 | break 71 | elseif get_panel_id(panelptr) == "CSGOHud" then 72 | ret = itr 73 | break 74 | elseif get_panel_id(panelptr) == "CSGOMainMenu" then 75 | ret = itr 76 | break 77 | end 78 | itr = get_parent(panelptr) or error("Couldn't get parent..", 2) 79 | end 80 | return ret 81 | end 82 | 83 | local uiengine = ffi.cast("void***", access_ui_engine(panoramaengine)) 84 | local run_script = ffi.cast("run_script_t", uiengine[0][113]) 85 | 86 | local rootpanel = get_root(uiengine) or error("Couldn't get root panel..", 2) 87 | 88 | local function eval(code, custompanel, customFile) 89 | if custompanel then 90 | rootpanel = custompanel 91 | else 92 | if rootpanel == nil then 93 | rootpanel = get_root(uiengine) or error("Couldn't get root panel..", 2) 94 | end 95 | end 96 | local file = customFile or "panorama/layout/base_mainmenu.xml" 97 | run_script(uiengine, rootpanel, ffi.string(code), file, 8, 10, false, false) 98 | end 99 | local function get_child(childname) 100 | return get_root(uiengine, childname) or error("Couldn't get root panel..", 2) 101 | end 102 | local function change_visiblity(childptr, state) 103 | local panelptr = ffi.cast("void***", childptr) 104 | if is_valid_panel_ptr(uiengine, childptr) then 105 | return set_visible(panelptr, state) 106 | else 107 | error("Invalid panel..", 2) 108 | end 109 | end 110 | local function get_child_name(childptr) 111 | local panelptr = ffi.cast("void***", childptr) 112 | if is_valid_panel_ptr(uiengine, childptr) then 113 | return ffi.string(get_panel_id(panelptr)) 114 | else 115 | error("Invalid panel..", 2) 116 | end 117 | end 118 | return { 119 | eval = eval, 120 | get_child = get_child, 121 | get_child_name = get_child_name, 122 | set_visible = change_visiblity 123 | } 124 | -------------------------------------------------------------------------------- /panorama/fortnite_emotes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aviarita/lua-scripts/2f084ffab6ffbf1abca0c0e6cefdc7c79acb7714/panorama/fortnite_emotes.zip -------------------------------------------------------------------------------- /panorama/invite_friendcode.lua: -------------------------------------------------------------------------------- 1 | local js = require("access_panorama") 2 | client.set_event_callback("console_input", function(cmd) 3 | if cmd:sub(1, 6) == "invite" then 4 | -- "invite " is 7 chars long 5 | if cmd:len() > 7 then 6 | local xuid = cmd:sub(8, -1) 7 | js.eval([[ 8 | var xuid = FriendsListAPI.GetXuidFromFriendCode("]]..xuid..[["); 9 | var name = FriendsListAPI.GetFriendName(xuid); 10 | if (LobbyAPI.IsSessionActive() == false) { 11 | LobbyAPI.CreateSession(); 12 | } 13 | FriendsListAPI.ActionInviteFriend(xuid, ''); 14 | $.Msg(`Invited \"${name}\" to the lobby..`); 15 | ]]) 16 | else 17 | client.color_log(163, 163, 163, "invite - invites the given friendcode to the lobby, creates a lobby if none existed") 18 | end 19 | return true 20 | end 21 | end) 22 | -------------------------------------------------------------------------------- /panorama/lobby_chat.lua: -------------------------------------------------------------------------------- 1 | local js = require("access_panorama") 2 | js.eval([[ 3 | var PartyChat = $('#MainMenu').FindChildInLayoutFile('PartyChat'); 4 | var elChatContainer = PartyChat.FindChildInLayoutFile('ChatContainer'); 5 | var elChatInput = PartyChat.FindChildInLayoutFile('ChatInput'); 6 | 7 | function call_x_times(times, callback) { 8 | for (var i = 1; i <= times; i++){ 9 | callback(); 10 | } 11 | } 12 | ]]) 13 | 14 | ui.new_button("lua", "a", "Clear lobby chat", function() 15 | js.eval([[ 16 | if (FriendsListAPI.IsLocalPlayerPlayingMatch()) { 17 | elChatInput.text = "-﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽ ﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽ ﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽ ﷽﷽ ﷽﷽﷽ ﷽-﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽ ﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽ ﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽ ﷽﷽ ﷽﷽﷽ ﷽-﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽ ﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽ ﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽ ﷽﷽ ﷽﷽﷽ ﷽" 18 | } 19 | else { 20 | elChatInput.text = ("     ").repeat(200); 21 | } 22 | call_x_times(50, () => { 23 | PartyChat.SubmitChatText(); 24 | }); 25 | elChatInput.text = "" 26 | PartyChat.ScrollToBottom(); 27 | ]]) 28 | end) 29 | 30 | -- chat 31 | local chat_looped = nil 32 | local chat_looped_delay = nil 33 | local chat_times = nil 34 | 35 | local chattext = nil 36 | 37 | local function send_message() 38 | js.eval([[ 39 | elChatInput.text = "]]..ui.get(chattext).. [[" 40 | call_x_times(]]..ui.get(chat_times).. [[, ()=>{ 41 | PartyChat.SubmitChatText(); 42 | }); 43 | elChatInput.text = "" 44 | PartyChat.ScrollToBottom(); 45 | ]]) 46 | if ui.get(chat_looped) == false then return end 47 | client.delay_call(ui.get(chat_looped_delay) / 1000, send_message) 48 | end 49 | 50 | chat_looped = ui.new_checkbox("lua", "a", "Looped") 51 | chat_looped_delay = ui.new_slider("lua", "a", "\n", 1, 1000, 100, true, "ms") 52 | ui.new_button("lua", "a", "Send chat message", function() 53 | send_message() 54 | end) 55 | chattext = ui.new_textbox("lua", "a", "chat message") 56 | chat_times = ui.new_slider("lua", "a", "\n", 1, 250, 1) 57 | --- 58 | 59 | -- color 60 | local color_looped = nil 61 | local color_looped_delay = nil 62 | local color_times = nil 63 | 64 | local function change_color() 65 | js.eval([[ 66 | call_x_times(]]..ui.get(color_times).. [[, ()=>{ 67 | LobbyAPI.ChangeTeammateColor(); 68 | }); 69 | ]]) 70 | if ui.get(color_looped) == false then return end 71 | client.delay_call(ui.get(color_looped_delay) / 1000, change_color) 72 | end 73 | 74 | color_looped = ui.new_checkbox("lua", "a", "Looped") 75 | color_looped_delay = ui.new_slider("lua", "a", "\n", 1, 1000, 100, true, "ms") 76 | ui.new_button("lua", "a", "Change color", function() 77 | change_color() 78 | end) 79 | color_times = ui.new_slider("lua", "a", "\n", 1, 250, 1) 80 | --- 81 | -------------------------------------------------------------------------------- /panorama/mass_invite.lua: -------------------------------------------------------------------------------- 1 | local js = require("access_panorama") 2 | 3 | js.eval([[ 4 | let collectedSteamIDS = []; 5 | collectedSteamIDS.push("123"); 6 | ]]) 7 | 8 | local refresh = false 9 | local function refresh_nearbies() 10 | client.delay_call(5, refresh_nearbies) 11 | if not refresh then 12 | return 13 | end 14 | js.eval([[ 15 | PartyBrowserAPI.Refresh(); 16 | var lobbies = PartyBrowserAPI.GetResultsCount(); 17 | for (var lobbyid = 0; lobbyid < lobbies; lobbyid++) { 18 | var xuid = PartyBrowserAPI.GetXuidByIndex(lobbyid); 19 | if (!collectedSteamIDS.includes(xuid)) { 20 | if (collectedSteamIDS.includes('123')) { 21 | collectedSteamIDS.splice(collectedSteamIDS.indexOf('123'), 1); 22 | } 23 | collectedSteamIDS.push(xuid); 24 | $.Msg(`Adding ${xuid} to the collection..`); 25 | } 26 | } 27 | $.Msg(`Mass invite collection: ${collectedSteamIDS.length}`); 28 | ]]) 29 | end 30 | refresh_nearbies() 31 | local auto_refresh_nearbies = ui.new_checkbox("lua", "a", "Auto refresh nearbies") 32 | ui.set_callback(auto_refresh_nearbies, function(self) 33 | refresh = ui.get(self) 34 | end) 35 | ui.new_button("lua", "a", "Refresh nearbies", function() 36 | js.eval([[ 37 | PartyBrowserAPI.Refresh(); 38 | var lobbies = PartyBrowserAPI.GetResultsCount(); 39 | for (var lobbyid = 0; lobbyid < lobbies; lobbyid++) { 40 | var xuid = PartyBrowserAPI.GetXuidByIndex(lobbyid); 41 | if (!collectedSteamIDS.includes(xuid)) { 42 | if (collectedSteamIDS.includes('123')) { 43 | collectedSteamIDS.splice(collectedSteamIDS.indexOf('123'), 1); 44 | } 45 | collectedSteamIDS.push(xuid); 46 | $.Msg(`Adding ${xuid} to the collection..`); 47 | } 48 | } 49 | $.Msg(`Mass invite collection: ${collectedSteamIDS.length}`); 50 | ]]) 51 | end) 52 | ui.new_button("lua", "a", "Mass invite nearbies", function() 53 | js.eval([[ 54 | collectedSteamIDS.forEach(xuid => { 55 | FriendsListAPI.ActionInviteFriend(xuid, ""); 56 | }); 57 | ]]) 58 | end) 59 | ui.new_button("lua", "a", "Print invite collection", function() 60 | js.eval([[ 61 | $.Msg(collectedSteamIDS); 62 | ]]) 63 | end) 64 | ui.new_button("lua", "a", "Invite all friends", function() 65 | js.eval([[ 66 | var friends = FriendsListAPI.GetCount(); 67 | for (var id = 0; id < friends; id++) { 68 | var xuid = FriendsListAPI.GetXuidByIndex(id); 69 | FriendsListAPI.ActionInviteFriend(xuid, ""); 70 | } 71 | ]]) 72 | end) 73 | -------------------------------------------------------------------------------- /panorama/remove_main_menu_model.lua: -------------------------------------------------------------------------------- 1 | local js = require("access_panorama") 2 | local show = ui.new_checkbox("Misc", "Settings", "Show main menu model") 3 | ui.set_callback(show, function(self) 4 | local state = ui.get(self) 5 | js.eval([[ 6 | var model = $.GetContextPanel().GetChild(0).FindChildInLayoutFile( 'JsMainmenu_Vanity' ); 7 | model.visible = ]].. tostring(state) .. [[; 8 | ]]) 9 | end) 10 | -------------------------------------------------------------------------------- /panorama/unlock_loadout.lua: -------------------------------------------------------------------------------- 1 | local js = require("access_panorama") 2 | js.eval([[ 3 | LoadoutAPI.IsLoadoutAllowed = function() { 4 | return true; 5 | } 6 | ]]) 7 | -------------------------------------------------------------------------------- /prevent_rage_settings/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/CmS65S7.png) 2 | -------------------------------------------------------------------------------- /prevent_rage_settings/prevent_loading_rage_settings.lua: -------------------------------------------------------------------------------- 1 | local SetUi = ui.set 2 | local GetUi = ui.get 3 | local aimbot = ui.reference("RAGE", "Aimbot", "Enabled") 4 | local spread = ui.reference("RAGE", "Other", "Remove spread") 5 | local recoil = ui.reference("RAGE", "Other", "Remove recoil") 6 | local antiaim = ui.reference("AA", "Anti-Aimbot angles", "Enabled") 7 | local anti_ut = ui.reference("MISC", "Settings", "Anti-untrusted") 8 | 9 | local checkbox = ui.new_checkbox("MISC", "Settings", "Prevent loading rage settings") 10 | 11 | local GetAll = entity.get_all 12 | local GetProp = entity.get_prop 13 | client.set_event_callback("run_command", function() 14 | local CCSGameRulesProxy = GetAll("CCSGameRulesProxy")[1] 15 | local m_bIsValveDS = GetProp(CCSGameRulesProxy, "m_bIsValveDS") 16 | if m_bIsValveDS == 1 and ui.get(checkbox) == true then 17 | SetUi(aimbot, false) 18 | SetUi(spread, false) 19 | SetUi(recoil, false) 20 | SetUi(antiaim, false) 21 | SetUi(anti_ut, true) 22 | end 23 | end) 24 | -------------------------------------------------------------------------------- /ragdoll_launcher/ragdoll launcher.lua: -------------------------------------------------------------------------------- 1 | local get, set_prop, get_prop, cb, slider, get_all, add_event, get_lp, is_alive = ui.get, entity.set_prop, entity.get_prop, ui.new_checkbox, ui.new_slider, entity.get_all, client.set_event_callback, entity.get_local_player, entity.is_alive 2 | local m_enable = cb("misc", "miscellaneous", "Ragdoll launcher") 3 | local m_mult = slider("misc", "miscellaneous", "\n ragdoll_launcher_multiplier", 0, 250, 0) 4 | local function launch_ragdoll(ragdoll) 5 | local mult = get(m_mult) 6 | local force_x, force_y, force_z = get_prop(ragdoll, "m_vecForce") 7 | local ragdollvelocity_x, ragdollvelocity_y, ragdollvelocity_z = get_prop(ragdoll, "m_vecRagdollVelocity") 8 | set_prop(ragdoll, "m_vecForce", force_x * mult, force_y * mult, force_z * mult) 9 | set_prop(ragdoll, "m_vecRagdollVelocity", ragdollvelocity_x * mult, ragdollvelocity_y * mult, ragdollvelocity_z * mult) 10 | end 11 | add_event("net_update_end", function() 12 | if get(m_enable) == false then return end 13 | local me = get_lp() 14 | if me == nil or me == 0 then return end 15 | if not is_alive(me) then return end 16 | local ragdolls = get_all("CCSRagdoll") 17 | for i=1, #ragdolls do 18 | local ragdoll = ragdolls[i] 19 | if ragdoll == nil then return end 20 | launch_ragdoll(ragdoll) 21 | end 22 | end) 23 | -------------------------------------------------------------------------------- /randomize_aa/README.md: -------------------------------------------------------------------------------- 1 | ![screen](https://i.imgur.com/UF9eZOq.png) 2 | -------------------------------------------------------------------------------- /randomize_aa/randomize_aa_on_hit_fire.lua: -------------------------------------------------------------------------------- 1 | local GetUi = ui.get 2 | local SetUi = ui.set 3 | local SetVisible = ui.set_visible 4 | local uidToEntIndex = client.userid_to_entindex 5 | local LocalPlayer = entity.get_local_player 6 | 7 | local when_to_randomize = ui.new_multiselect("AA", "Other", "When to randomize", "On fire", "On hit") 8 | 9 | local randomize_on_fire = ui.new_multiselect("AA", "Other", "Randomize on fire", "Pitch", "Yaw", "Yaw jitter", "Yaw while running", "Fake yaw", "Freestanding real yaw offset", "Freestanding fake yaw offset") 10 | local randomize_on_hit = ui.new_multiselect("AA", "Other", "Randomize on hit", "Pitch", "Yaw", "Yaw jitter", "Yaw while running", "Fake yaw", "Freestanding real yaw offset", "Freestanding fake yaw offset") 11 | 12 | 13 | local pitch_ref = ui.reference("AA", "Anti-aimbot angles", "Pitch") 14 | local yaw_ref = ui.reference("AA", "Anti-aimbot angles", "Yaw") 15 | local yaw_jitter_ref = ui.reference("AA", "Anti-aimbot angles", "Yaw jitter") 16 | local yaw_while_running_ref = ui.reference("AA", "Anti-aimbot angles", "Yaw while running") 17 | local fake_yaw_ref = ui.reference("AA", "Anti-aimbot angles", "Fake yaw") 18 | 19 | local freestand_real_ref = ui.reference("AA", "Anti-aimbot angles", "Freestanding real yaw offset") 20 | local freestand_fake_ref = ui.reference("AA", "Anti-aimbot angles", "Freestanding fake yaw offset") 21 | 22 | local pitch = { 23 | "Default", 24 | "Up", 25 | "Down", 26 | "Minimal" 27 | } 28 | 29 | local yaw = { 30 | "180", 31 | "Jitter", 32 | "Spin", 33 | "Sideways", 34 | "Static", 35 | "180 Z", 36 | "Crosshair" 37 | } 38 | 39 | local yaw_jitter = { 40 | "Off", 41 | "Offset", 42 | "Center", 43 | "Random" 44 | } 45 | 46 | local yaw_running = { 47 | "180", 48 | "Jitter", 49 | "Spin", 50 | "Sideways", 51 | "Local view", 52 | "Static", 53 | "Opposite" 54 | } 55 | 56 | local fake_yaw = { 57 | "Default", 58 | "180", 59 | "Jitter", 60 | "Spin", 61 | "Sideways", 62 | "Random", 63 | "Local view", 64 | "Static", 65 | "Opposite", 66 | } 67 | 68 | local function contains(table, val) 69 | for i=1,#table do 70 | if table[i] == val then 71 | return true 72 | end 73 | end 74 | return false 75 | end 76 | 77 | 78 | local function randomize_aa(menu_item) 79 | 80 | local random_pitch = pitch[client.random_int(1,4)] 81 | local random_yaw = yaw[client.random_int(1,7)] 82 | local random_yaw_jitter = yaw_jitter[client.random_int(1,4)] 83 | local random_yaw_while_running = yaw_running[client.random_int(1,7)] 84 | local random_fake_yaw = fake_yaw[client.random_int(1,8)] 85 | local random_freestand_real = client.random_int(-90,90) 86 | local random_freestand_fake = client.random_int(-90,90) 87 | 88 | local selected_item = GetUi(menu_item) 89 | 90 | for i=1, #selected_item do 91 | if selected_item[i] == "Pitch" then 92 | SetUi(pitch_ref, random_pitch) 93 | 94 | elseif selected_item[i] == "Yaw" then 95 | SetUi(yaw_ref, random_yaw) 96 | 97 | elseif selected_item[i] == "Yaw jitter" then 98 | SetUi(yaw_jitter_ref, random_yaw_jitter) 99 | 100 | elseif selected_item[i] == "Yaw while running" then 101 | SetUi(yaw_while_running_ref, random_yaw_while_running) 102 | 103 | elseif selected_item[i] == "Fake yaw" then 104 | SetUi(fake_yaw_ref, random_fake_yaw) 105 | 106 | elseif selected_item[i] == "Freestanding real yaw offset" then 107 | SetUi(freestand_real_ref, random_freestand_real) 108 | 109 | elseif selected_item[i] == "Freestanding fake yaw offset" then 110 | SetUi(freestand_fake_ref, random_freestand_fake) 111 | end 112 | end 113 | end 114 | 115 | 116 | local function on_player_hurt(event) 117 | 118 | local userID = event.userid 119 | local userEntIndex = uidToEntIndex(userID) 120 | 121 | if userEntIndex == LocalPlayer() then 122 | local randomize_mode = GetUi(when_to_randomize) 123 | 124 | for i=1, #randomize_mode do 125 | if randomize_mode[i] == "On hit" then 126 | randomize_aa(randomize_on_hit) 127 | end 128 | end 129 | end 130 | end 131 | 132 | 133 | local function on_aim_fire(event) 134 | 135 | local randomize_mode = GetUi(when_to_randomize) 136 | 137 | for i=1, #randomize_mode do 138 | if randomize_mode[i] == "On fire" then 139 | randomize_aa(randomize_on_fire) 140 | end 141 | end 142 | end 143 | 144 | local function on_paint(ctx) 145 | local value = GetUi(when_to_randomize) 146 | SetVisible(randomize_on_fire, contains(value, "On fire")) 147 | SetVisible(randomize_on_hit, contains(value, "On hit")) 148 | end 149 | 150 | client.set_event_callback("player_hurt", on_player_hurt) 151 | client.set_event_callback("aim_fire", on_aim_fire) 152 | client.set_event_callback("paint", on_paint) 153 | -------------------------------------------------------------------------------- /rankreveal/rankreveal.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | ffi.cdef[[ 3 | typedef void(__thiscall* dispatch_user_message_t)(void*, int, int, int, void*); // 38 4 | typedef bool(__thiscall* is_ingame_t)(void*); // 26 5 | ]] 6 | local baseclient = ffi.cast(ffi.typeof("void***"), client.create_interface("client_panorama.dll", "VClient018")) 7 | local engineclient = ffi.cast(ffi.typeof("void***"), client.create_interface("engine.dll", "VEngineClient014")) 8 | local dispatch_user_messasge = ffi.cast("dispatch_user_message_t", baseclient[0][38]) 9 | local is_ingame = ffi.cast("is_ingame_t", engineclient[0][26]) 10 | 11 | client.set_event_callback("paint", function(ctx) 12 | if is_ingame(engineclient) and client.key_state(0x09) then 13 | dispatch_user_messasge(baseclient, 0x32, 0, 0, nil) 14 | end 15 | end) 16 | -------------------------------------------------------------------------------- /replace_materials/README.md: -------------------------------------------------------------------------------- 1 | ## Steps to add your own materials 2 | 1. Download them from [here](https://gamebanana.com/skins/games/4660) and extract it. 3 | 2. Open the lua file 4 | 3. Find the tables **weapon_materials** and add your shit to it 5 | 4. Unload and then load the lua, DO NOT RELOAD IT OTHERWISE YOU WILL CRASH 6 | 7 | A few examples: 8 | ```lua 9 | local weapon_models = { 10 | [1] = "models/weapons/v_models/gold_pist_deagle/pist_deagle", -- weapon_deagle 11 | [7] = "models/weapons/v_models/dragonlore_rif_ak47/ak47", -- weapon_ak47 12 | [9] = "models/weapons/v_models/snip_awp_trace/awp", -- weapon_awp 13 | } 14 | ``` 15 | -------------------------------------------------------------------------------- /replace_materials/replace_materials.lua: -------------------------------------------------------------------------------- 1 | local weapon_materials = { 2 | -- [Weapon index] = path to material 3 | [1] = " ", -- DesertEagle 4 | [2] = " ", -- Elites 5 | [3] = " ", -- FiveSeven 6 | [4] = " ", -- Glock18 7 | [7] = " ", -- AK47 8 | [8] = " ", -- Aug 9 | [9] = " ", -- AWP 10 | [10] = " ", -- Famas 11 | [11] = " ", -- G3SG1 12 | [13] = " ", -- GalilAR 13 | [14] = " ", -- M249 14 | [16] = " ", -- M4A1 15 | [17] = " ", -- MAC10 16 | [19] = " ", -- P90 17 | [23] = " ", -- MP5SD 18 | [24] = " ", -- UMP45 19 | [25] = " ", -- xm1014 20 | [26] = " ", -- Bizon 21 | [27] = " ", -- Mag7 22 | [28] = " ", -- Negev 23 | [29] = " ", -- Sawedoff 24 | [30] = " ", -- Tec9 25 | [31] = " ", -- Taser 26 | [61] = " ", -- USP_SILENCER 27 | [33] = " ", -- MP7 28 | [34] = " ", -- MP9 29 | [35] = " ", -- Nova 30 | [36] = " ", -- P250 31 | [37] = " ", -- Shield 32 | [38] = " ", -- SCAR20 33 | [39] = " ", -- SG556 34 | [40] = " ", -- SSG08 35 | [41] = " ", -- Knife 36 | [42] = " ", -- Knife 37 | [43] = " ", -- FLASHBANG 38 | [44] = " ", -- HE_Grenade 39 | [45] = " ", -- Smoke_Grenade 40 | [46] = " ", -- MOLOTOV 41 | [47] = " ", -- DECOY 42 | [48] = " ", -- IncGrenade 43 | [49] = " ", -- C4 44 | [57] = " ", -- Healthshot 45 | [59] = " ", -- Knife_T 46 | [60] = " ", -- M4_SILENCER 47 | [61] = " ", -- USP_SILENCER 48 | [63] = " ", -- CZ75 49 | [64] = " ", -- REVOLVER 50 | [68] = " ", -- TAGrenade 51 | [70] = " ", -- BreachCharge 52 | [72] = " ", -- Tablet 53 | [74] = " ", -- Knife 54 | [75] = " ", -- Axe 55 | [76] = " ", -- Hammer 56 | [78] = " ", -- Spanner 57 | [80] = " ", -- Knife_Ghost 58 | [81] = " ", -- FIREBOMB 59 | [82] = " ", -- Diversion 60 | [83] = " ", -- frag_Grenade 61 | [84] = " ", -- Snowball 62 | [85] = " ", -- BUMPMINE 63 | [500] = " ", -- KnifeBayonet 64 | [503] = " ", -- KnifeCSS 65 | [505] = " ", -- KnifeFlip 66 | [506] = " ", -- KnifeGut 67 | [507] = " ", -- KnifeKaram 68 | [508] = " ", -- KnifeM9 69 | [509] = " ", -- KnifeTactical 70 | [512] = " ", -- knife_falchion_advanced 71 | [514] = " ", -- knife_survival_bowie 72 | [515] = " ", -- Knife_Butterfly 73 | [516] = " ", -- knife_push 74 | [519] = " ", -- knife_ursus 75 | [520] = " ", -- knife_gypsy_jackknife 76 | [522] = " ", -- knife_stiletto 77 | [521] = " ", -- knife_outdoor 78 | [507] = " ", -- KnifeKaram 79 | [525] = " ", -- knife_skeleton 80 | [518] = " ", -- knife_canis 81 | [517] = " ", -- knife_cord 82 | [523] = " ", -- knife_widowmaker 83 | } 84 | 85 | local weapon_mats = {} 86 | for k,v in pairs(weapon_materials) do 87 | table.insert(weapon_mats, k) 88 | end 89 | 90 | local replace_weapon_mats = ui.new_checkbox("lua", "a", "Replace weapon materials") 91 | 92 | local function replace_material(ent, material) 93 | if material:len() > 5 and ent ~= nil then 94 | local mats = materialsystem.get_model_materials(ent) 95 | local new_mat = materialsystem.find_material(material, true) or error("invalid material provided") 96 | new_mat:alpha_modulate(255) 97 | for i=1, #mats do 98 | local mat = mats[i] 99 | local name = mat:get_name() 100 | if name:find("weapons/v_models") and not name:find("bare_") then 101 | materialsystem.override_material(mat, new_mat) 102 | end 103 | end 104 | end 105 | end 106 | 107 | client.set_event_callback("net_update_start", function() 108 | if ui.get(replace_weapon_mats) then 109 | 110 | local me = entity.get_local_player() 111 | if me == nil then return end 112 | 113 | if not entity.is_alive(me) then return end 114 | 115 | local m_hViewModel = entity.get_prop(me, "m_hViewModel[0]") 116 | if m_hViewModel == nil then return end 117 | 118 | local m_hWeapon = entity.get_prop(m_hViewModel, "m_hWeapon") 119 | if m_hWeapon == nil then return end 120 | 121 | if entity.get_prop(m_hWeapon, "m_iItemDefinitionIndex") == nil then return end 122 | local wpn_idx = bit.band(entity.get_prop(m_hWeapon, "m_iItemDefinitionIndex"), 0xFFFF) 123 | if wpn_idx == nil then return end 124 | 125 | if weapon_materials[wpn_idx] ~= nil then 126 | replace_material(m_hViewModel, weapon_materials[wpn_idx]) 127 | end 128 | end 129 | end) 130 | -------------------------------------------------------------------------------- /semi_rage_fix/README.md: -------------------------------------------------------------------------------- 1 | ## Instructions 2 | 3 | 1. Copy the file content 4 | 2. Save it to a file called aaaaaaaaaaaa.lua 5 | 3. Load aaaaaaaaaaaa.lua 6 | 4. Make sure that your semi rage lua/ljbc doesnt start with a number or the letter 'A' 7 | 5. Load your semi rage lua/ljbc 8 | 9 | ## Informations 10 | 11 | Its really important that this lua is named aaaaaaaaaaaa.lua and is loaded before your semi rage lua/ljbc, otherwise it wont work 12 | -------------------------------------------------------------------------------- /semi_rage_fix/aaaaaaaaaa.lua: -------------------------------------------------------------------------------- 1 | local ui_reference = ui.reference 2 | local twist = ui.new_checkbox("AA", "Anti-aimbot angles", "Twist(Useless)") 3 | local shs = ui.new_checkbox("RAGE", "Aimbot", "Stomach hitbox scale(Useless)") 4 | local psp = ui_reference("RAGE", "Aimbot", "Prefer safe point") 5 | local fsp = ui_reference("RAGE", "Aimbot", "Force safe point") 6 | function ui.reference(tab, container, name) 7 | if name == "Infinite duck" then 8 | return ui_reference("misc", "movement", "Infinite duck") 9 | elseif name == "Twist" then 10 | return twist 11 | elseif name == "Stomach hitbox scale" then 12 | return shs 13 | elseif name == "Safe point" then 14 | return psp, fsp 15 | end 16 | return ui_reference(tab, container, name) 17 | end 18 | -------------------------------------------------------------------------------- /silent_backtrack/silent_backtrack.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | ffi.cdef [[ 3 | struct vec3_t_ahubsdfgguhinadfiuhnuiadnfhhhnhahuhfdn { 4 | float x; float y; float z; 5 | }; 6 | ]] 7 | 8 | local rawientitylist = client.create_interface("client_panorama.dll", "VClientEntityList003") or error("VClientEntityList003 wasnt found", 2) 9 | local ientitylist = ffi.cast(ffi.typeof("void***"), rawientitylist) or error("rawientitylist is nil", 2) 10 | local get_client_entity = ffi.cast(ffi.typeof("void*(__thiscall*)(void*, int)"), ientitylist[0][3]) or error("get_client_entity is nil", 2) 11 | 12 | local f = ffi.typeof("void( __thiscall*)(void*, const struct vec3_t_ahubsdfgguhinadfiuhnuiadnfhhhnhahuhfdn&)") 13 | local match = client.find_signature("client_panorama.dll", "\x55\x8B\xEC\x83\xE4\xF8\x51\x53\x56\x57\x8B\xF1\xE8") or error("invalid signature") 14 | local fn = ffi.cast(f, match) 15 | local function set_abs_origin(entity, x, y, z) 16 | local pos = ffi.new("struct vec3_t_ahubsdfgguhinadfiuhnuiadnfhhhnhahuhfdn") 17 | pos.x = x pos.y = y pos.z = z 18 | fn(entity, pos) 19 | end 20 | 21 | local silent_backtrack = ui.new_checkbox("visuals", "effects", "Silent backtrack") 22 | 23 | local _set, _unset = client.set_event_callback, client.unset_event_callback 24 | 25 | local positions = {} 26 | local function net_update_start() 27 | for _, entidx in pairs(entity.get_players(true)) do 28 | positions[entidx] = {entity.get_prop(entidx, "m_vecOrigin")} 29 | end 30 | end 31 | 32 | local function player_death(event) 33 | local opfer = client.userid_to_entindex(event.userid) 34 | local x2, y2, z2 = unpack(positions[opfer]) 35 | client.delay_call(0.0000000000001, function() 36 | local ragdolls = entity.get_all("CCSRagdoll") 37 | for i = 1, #ragdolls do 38 | local ragdoll = ragdolls[i] 39 | local m_hPlayer = entity.get_prop(ragdoll, "m_hPlayer") 40 | if m_hPlayer == opfer then 41 | local ragdoll_entity = get_client_entity(ientitylist, ragdoll) 42 | if ragdoll_entity ~= nil then 43 | local x, y, z = entity.get_prop(ragdoll, "m_vecOrigin") 44 | set_abs_origin(ragdoll_entity, x2, y2, z2) 45 | end 46 | end 47 | end 48 | end) 49 | end 50 | 51 | ui.set_callback(silent_backtrack, function(self) 52 | local fn = ui.get(self) and _set or _unset 53 | fn("net_update_start", net_update_start) 54 | fn("player_death", player_death) 55 | end) 56 | -------------------------------------------------------------------------------- /slidewalk/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/DT6B4r2.png) 2 | -------------------------------------------------------------------------------- /slidewalk/slidewalk.lua: -------------------------------------------------------------------------------- 1 | local slidewalk = ui.new_checkbox("misc", "miscellaneous", "Slidewalk") 2 | client.set_event_callback('setup_command', function(cmd) 3 | 4 | local move_type = entity.get_prop(entity.get_local_player(), "m_MoveType") 5 | 6 | if move_type == 9 then return end -- disable when on a ladder 7 | if cmd.in_use == 1 then return end -- disable when holding e 8 | 9 | if ui.get(slidewalk) then 10 | if (cmd.forwardmove > 0) then 11 | cmd.in_back = 1 12 | cmd.in_forward = 0 13 | end 14 | 15 | if (cmd.forwardmove < 0) then 16 | cmd.in_forward = 1 17 | cmd.in_back = 0 18 | end 19 | 20 | if (cmd.sidemove < 0) then 21 | cmd.in_moveright = 1 22 | cmd.in_moveleft = 0 23 | end 24 | 25 | if (cmd.sidemove > 0) then 26 | cmd.in_moveleft = 1 27 | cmd.in_moveright = 0 28 | end 29 | end 30 | end) 31 | -------------------------------------------------------------------------------- /sound_esp/README.md: -------------------------------------------------------------------------------- 1 | ![menu](https://i.imgur.com/31PY33W.png) 2 | -------------------------------------------------------------------------------- /sound_esp/sound_esp.lua: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------- 2 | local sound = "ui/beepclear" -- Thats the sound you will hear -- 3 | ----------------------------------------------------------------- 4 | 5 | local checkbox = ui.new_checkbox("visuals", "player esp", "Sound esp") 6 | local min_distance = ui.new_slider("visuals", "player esp", "Min distance", 0, 500, 100, true, "ft") 7 | local volume = ui.new_slider("visuals", "player esp", "Volume", 0, 100, 50, true, "%") 8 | 9 | local GetUi = ui.get 10 | local SetUi = ui.set 11 | local GetLocalPlayer = entity.get_local_player 12 | local GetProp = entity.get_prop 13 | local AddEvent = client.set_event_callback 14 | local MaxPlayers = globals.maxplayers 15 | 16 | local function distance3d(a, b) 17 | return math.ceil(math.sqrt(math.pow(a.x - b.x, 2) + math.pow(a.y - b.y, 2) + math.pow(a.z - b.z, 2)) * 0.0254 / 0.3048) 18 | end 19 | 20 | local last_tickcount = 0 21 | 22 | -- credits to sapphyrus -- 23 | local function play_sound(filename, volume) 24 | local amount = math.floor(volume) 25 | local more = volume % amount == 0 and 0 or 1 26 | for i = 1, amount+more do 27 | local volume_temp = 1 28 | if i == amount+more then 29 | volume_temp = volume+1-i 30 | end 31 | client.exec("playvol ", filename, " ", volume_temp) 32 | end 33 | end 34 | 35 | AddEvent("run_command", function() 36 | if GetUi(checkbox) then 37 | 38 | local lp_position = {x, y, z} 39 | lp_position.x, lp_position.y, lp_position.z = GetProp(GetLocalPlayer(), "m_vecOrigin") 40 | 41 | local players = entity.get_players(true) 42 | 43 | for i = 1, #players do 44 | local player = players[i] 45 | 46 | local enemy_position = {x, y, z} 47 | 48 | enemy_position.x, enemy_position.y, enemy_position.z = GetProp(player, "m_vecOrigin") 49 | local distance = distance3d(lp_position, enemy_position) 50 | 51 | local spam_delay_value = distance / 35 52 | local current_tickcount = globals.tickcount() 53 | if current_tickcount - last_tickcount < spam_delay_value then 54 | return 55 | elseif current_tickcount - last_tickcount > spam_delay_value then 56 | last_tickcount = current_tickcount 57 | end 58 | 59 | if distance < GetUi(min_distance) then 60 | play_sound(sound, GetUi(volume) / 100) 61 | end 62 | end 63 | end 64 | end) 65 | -------------------------------------------------------------------------------- /steam_api/README.md: -------------------------------------------------------------------------------- 1 | # SteamAPI 2 | 3 | ### Classes: 4 | * [ISteamClient](https://partner.steamgames.com/doc/api/ISteamClient) 5 | * [ISteamAppList](https://github.com/Aviarita/steam_sdk/blob/master/isteamapplist.h#L22) 6 | * [ISteamApps](https://partner.steamgames.com/doc/api/ISteamApps) 7 | * [ISteamController](https://partner.steamgames.com/doc/api/ISteamController) 8 | * [ISteamFriends](https://partner.steamgames.com/doc/api/ISteamFriends) 9 | * [ISteamHTMLSurface](https://partner.steamgames.com/doc/api/ISteamHTMLSurface) 10 | * [ISteamHTTP](https://partner.steamgames.com/doc/api/ISteamHTTP) 11 | * [ISteamInventory](https://partner.steamgames.com/doc/api/ISteamInventory) 12 | * [ISteamMatchmakingServers](https://partner.steamgames.com/doc/api/ISteamMatchmakingServers) 13 | * [ISteamMatchmaking](https://partner.steamgames.com/doc/api/ISteamMatchmaking) 14 | * [ISteamMusicRemote](https://partner.steamgames.com/doc/api/ISteamMusicRemote) 15 | * [ISteamMusic](https://partner.steamgames.com/doc/api/ISteamMusic) 16 | * [ISteamNetworking](https://partner.steamgames.com/doc/api/ISteamNetworking) 17 | * [ISteamRemoteStorage](https://partner.steamgames.com/doc/api/ISteamRemoteStorage) 18 | * [ISteamScreenshots](https://partner.steamgames.com/doc/api/ISteamScreenshots) 19 | * [ISteamUGC](https://partner.steamgames.com/doc/api/ISteamUGC) 20 | * [ISteamUserStats](https://partner.steamgames.com/doc/api/ISteamUserStats) 21 | * [ISteamUser](https://partner.steamgames.com/doc/api/ISteamUser) 22 | * [ISteamUtils](https://partner.steamgames.com/doc/api/ISteamUtils) 23 | * [ISteamVideo](https://partner.steamgames.com/doc/api/ISteamVideo) 24 | -------------------------------------------------------------------------------- /third_person_dead_key/third_person_dead_key.lua: -------------------------------------------------------------------------------- 1 | local cb_ref = ui.reference("visuals", "effects", "Force third person (dead)") 2 | local _, key_ref = ui.reference("visuals", "effects", "Force third person (alive)") 3 | client.set_event_callback("paint", function(ctx) ui.set(cb_ref, ui.get(key_ref)) end) 4 | -------------------------------------------------------------------------------- /translator/README.md: -------------------------------------------------------------------------------- 1 | ## Steps 2 | 3 | 1. Visit https://passport.yandex.com/registration?origin=translate and make an account 4 | 2. Visit https://translate.yandex.com/developers/keys 5 | 3. Click "Create a new key" https://i.imgur.com/BYk5m9z.png 6 | 4. Enter some random bullshit as the description and click "Create" https://i.imgur.com/vmuoGNp.png 7 | 5. Hover over the code field and press "Copy" https://i.imgur.com/cBoxlYf.png 8 | 6. Load the lua and type "set_api_key \" in the console and press enter 9 | 10 | If everything went well you should be able to use the translation now, if the lua says some bullshit like "invalid api key", just redo the steps. 11 | 12 | ![menu](https://i.imgur.com/xUZSjhq.png) 13 | ![console1](https://i.imgur.com/vZXLxLP.png) 14 | ![console2](https://i.imgur.com/zZiIHwu.png) 15 | -------------------------------------------------------------------------------- /translator/translator.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aviarita/lua-scripts/2f084ffab6ffbf1abca0c0e6cefdc7c79acb7714/translator/translator.lua -------------------------------------------------------------------------------- /x88/README.md: -------------------------------------------------------------------------------- 1 | This script requires you to download [my surface library.](https://github.com/Aviarita/surface) 2 | 3 | ![Preview](https://i.imgur.com/UivTw0x.png) 4 | --------------------------------------------------------------------------------