local ffi = ffi ffi.cdef[[ int VirtualProtect(void* lpAddress, unsigned long long dwSize, unsigned long flNewProtect, unsigned long* lpflOldProtect); ]] local kernel32 = ffi.load("kernel32") local old_protect_buf = ffi.new("unsigned long[1]") local PAGE_EXECUTE_READWRITE = 0x40 -- Ayarlar ve Veri Yapıları local registry = {} local function make_var(name, val) local obj = { name = name, v = val, get = function(s) return s.v end, set = function(s,v) s.v = v end } registry[name] = obj return obj end local current_tab = 0 -- Kontroller & Değişken Tanımları local cb_scope_rem = make_var("cb_scope_rem", true) local cb_scope_enable = make_var("cb_scope_enable", true) local cb_always_cross = make_var("cb_always_cross", false) local sl_scope_len = make_var("sl_scope_len", 100.0) local sl_scope_gap = make_var("sl_scope_gap", 10.0) local sl_scope_thick = make_var("sl_scope_thick", 2.5) -- Şeffaflık değişkeni local sl_menu_alpha = make_var("sl_menu_alpha", 220.0) local sl_inner_r = make_var("sl_inner_r", 122.0) local sl_inner_g = make_var("sl_inner_g", 0.0) local sl_inner_b = make_var("sl_inner_b", 233.0) local sl_inner_a = make_var("sl_inner_a", 255.0) local sl_outer_r = make_var("sl_outer_r", 149.0) local sl_outer_g = make_var("sl_outer_g", 255.0) local sl_outer_b = make_var("sl_outer_b", 241.0) local sl_outer_a = make_var("sl_outer_a", 0.0) local cb_fov_enable = make_var("cb_fov_enable", true) local sl_fov_base = make_var("sl_fov_base", 100.0) local cb_fov_scope = make_var("cb_fov_scope", true) local sl_fov_zoom1 = make_var("sl_fov_zoom1", 100.0) local sl_fov_zoom2 = make_var("sl_fov_zoom2", 30.0) local cb_bhop_enable = make_var("cb_bhop_enable", true) local cb_autostrafe = make_var("cb_autostrafe", true) local strafe_toggle = false local cb_tt_enable = make_var("cb_tt_enable", false) local t_hs_only = make_var("t_hs_only", false) local t_hs_on = make_var("t_hs_on", false) local t_death_on = make_var("t_death_on", false) local t_kill_text = make_var("t_kill_text", " you're trash| sit down| 0 skill| uninstall the game|doggy") local t_hs_text = make_var("t_hs_text", " one tapped| heads up|1|bot_kick") local t_death_text = make_var("t_death_text", " lucky| nice cheat| DOG") local cb_auto_accept = make_var("cb_auto_accept", true) -- Bellek İşlemleri local scope_fn, scope_orig, scope_patched = nil, nil, false local fov_fn, fov_orig, fov_patched = nil, ffi.new("uint8_t[10]"), false local fov_orig_prot = 0 local off_scope = schema.get_offset("C_CSPlayerPawn", "m_bIsScoped") local off_zoom = schema.get_offset("C_CSWeaponBaseGun", "m_zoomLevel") or schema.get_offset("CWeaponCSBase", "m_zoomLevel") or schema.get_offset("CCSWeaponBase", "m_zoomLevel") or schema.get_offset("C_CSWeaponBase", "m_zoomLevel") or schema.get_offset("C_WeaponCSBase", "m_zoomLevel") or schema.get_offset("CBasePlayerWeapon", "m_zoomLevel") local function safe_write_byte(addr, byte) local ptr = ffi.cast("void*", addr) local ok = kernel32.VirtualProtect(ptr, 1, PAGE_EXECUTE_READWRITE, old_protect_buf) if ok == 0 then return false end ffi.cast("unsigned char*", ptr)[0] = byte kernel32.VirtualProtect(ptr, 1, old_protect_buf[0], old_protect_buf) return true end local function init_memory_hacks() local client_dll = memory.get_module("client.dll") if not client_dll then return end scope_fn = memory.find_pattern("client.dll", "48 8B C4 53 57 48 83 EC ? 48 8B FA") if scope_fn then scope_orig = memory.read_u8(scope_fn) end local fov_call = memory.find_pattern("client.dll", "E8 ? ? ? ? F3 0F 11 06 48 8B 5C 24 58") if fov_call then local rel = ffi.cast("int32_t*", fov_call + 1)[0] fov_fn = fov_call + 5 + rel kernel32.VirtualProtect(ffi.cast("void*", fov_fn), 10, PAGE_EXECUTE_READWRITE, old_protect_buf) fov_orig_prot = old_protect_buf[0] ffi.copy(fov_orig, ffi.cast("void*", fov_fn), 10) end end local function is_scoped() if not engine.is_in_game() then return false end local lp = entitylist.get_local_player() if not lp or not lp:is_alive() then return false end local addr = lp:get_address() if not addr or addr == 0 or not off_scope then return false end return memory.read_u8(addr + off_scope) ~= 0 end local function get_zoom_level() if not engine.is_in_game() then return 0 end local lp = entitylist.get_local_player() if not lp or not lp:is_alive() then return 0 end if not is_scoped() then return 0 end if off_zoom then local wep = lp:get_active_weapon() if not wep then return 1 end local addr = wep:get_address() if not addr or addr == 0 then return 1 end return memory.read_u32(addr + off_zoom) end return 1 end local function set_fov_patch(f) if not fov_fn then return end local buf = ffi.new("float[1]", f) local u32 = ffi.cast("uint32_t*", buf)[0] local patch = {0xB8, bit.band(u32, 0xFF), bit.band(bit.rshift(u32, 8), 0xFF), bit.band(bit.rshift(u32, 16), 0xFF), bit.band(bit.rshift(u32, 24), 0xFF), 0x66, 0x0F, 0x6E, 0xC0, 0xC3} ffi.copy(ffi.cast("void*", fov_fn), ffi.new("uint8_t[10]", patch), 10) fov_patched = true end local function restore_fov() if not fov_fn or not fov_patched then return end ffi.copy(ffi.cast("void*", fov_fn), fov_orig, 10) fov_patched = false end local _scope_line_anim = 0.0 local function draw_custom_scope() if not engine.is_in_game() then return end if not cb_always_cross:get() and not is_scoped() then _scope_line_anim = _scope_line_anim + (0.0 - _scope_line_anim) * 0.25 if _scope_line_anim < 0.01 then return end else _scope_line_anim = _scope_line_anim + (1.0 - _scope_line_anim) * 0.18 end local sw, sh = render.get_screen_size() local cx, cy = sw * 0.5, sh * 0.5 local la = cb_always_cross:get() and 1.0 or _scope_line_anim local length = sl_scope_len:get() * la local gap = sl_scope_gap:get() local thick = sl_scope_thick:get() local ir, ig, ib = sl_inner_r:get(), sl_inner_g:get(), sl_inner_b:get() local ia = math.floor(la * sl_inner_a:get()) local or2, og, ob = sl_outer_r:get(), sl_outer_g:get(), sl_outer_b:get() local oa = math.floor(la * sl_outer_a:get()) local fade_out_gap = gap / 2.0 render.gradient_rect(cx - thick*0.5, cy - gap - length, thick, length, or2,og,ob,oa, ir,ig,ib,ia, false) render.gradient_rect(cx - thick*0.5, cy - gap, thick, fade_out_gap, ir,ig,ib,ia, or2,og,ob,oa, false) render.gradient_rect(cx - thick*0.5, cy + gap, thick, length, ir,ig,ib,ia, or2,og,ob,oa, false) render.gradient_rect(cx - thick*0.5, cy + gap - fade_out_gap, thick, fade_out_gap, or2,og,ob,oa, ir,ig,ib,ia, false) render.gradient_rect(cx - gap - length, cy - thick*0.5, length, thick, or2,og,ob,oa, ir,ig,ib,ia, true) render.gradient_rect(cx - gap, cy - thick*0.5, fade_out_gap, thick, ir,ig,ib,ia, or2,og,ob,oa, true) render.gradient_rect(cx + gap, cy - thick*0.5, length, thick, ir,ig,ib,ia, or2,og,ob,oa, true) render.gradient_rect(cx + gap - fade_out_gap, cy - thick*0.5, fade_out_gap, or2,og,ob,oa, ir,ig,ib,ia, true) end local function tt_split(s) local out = {} if not s then return out end for piece in (s .. "|"):gmatch("([^|]*)|") do piece = piece:gsub("^%s+", ""):gsub("%s+$", "") if piece ~= "" then out[#out + 1] = piece end end return out end local tt_rot = 0 local function tt_pick_index(list) local n = #list if n == 0 then return nil end tt_rot = tt_rot + 1 return (tt_rot % n) + 1 end local function tt_fill(tmpl, name, weapon) return tmpl:gsub("{name}", name or ""):gsub("{weapon}", weapon or "") end local tt_queue = {} local function tt_enqueue_at(at, line, team) if not line or line == "" then return end tt_queue[#tt_queue + 1] = { at = at, line = line, team = team } end local function tt_spam(list, name, weapon, team) local n = #list if n == 0 then return end local base = globals.curtime() + 0.15 local idx = tt_pick_index(list) tt_enqueue_at(base, tt_fill(list[idx], name, weapon), team) end local sidebar_width = 45 local target_sidebar_width = 45 local cur_fov = 90.0 client.set_callback("on_paint", function() if menu.is_open(1) then imgui.set_next_window_bg_alpha(sl_menu_alpha:get() / 255.0) imgui.set_next_window_size(780, 500) if imgui.begin("##main2", nil, 2 + 4 + 8) then local mx, my = imgui.get_mouse_pos() local wx, wy = imgui.get_window_pos() local local_mx = mx - wx local local_my = my - wy if local_mx >= 8 and local_mx <= 160 and local_my >= 0 and local_my <= 480 then target_sidebar_width = 150 else target_sidebar_width = 35 end sidebar_width = sidebar_width + (target_sidebar_width - sidebar_width) * 0.06 -- Sol Taraf: Sekmeler if imgui.begin_child("##sidebar2", math.floor(sidebar_width), 450, false) then if sidebar_width > 90 then imgui.text("") imgui.text("Scolity.Lua") else imgui.text("") imgui.text(" Sclty") end imgui.separator() imgui.spacing() local btn_w = sidebar_width > 90 and 135 or 32 if imgui.button("Visuals", btn_w, 50) then current_tab = 0 end if imgui.button("Movement", btn_w, 50) then current_tab = 1 end if imgui.button("TrashTalk", btn_w, 50) then current_tab = 2 end if imgui.button("Misc", btn_w, 50) then current_tab = 3 end imgui.end_child() end imgui.same_line() -- Sağ Taraf: İçerik Alanı local content_w = 750 - math.floor(sidebar_width) if imgui.begin_child("##content2", content_w, 450, true) then if current_tab == 0 then imgui.text("") imgui.text_colored(220, 120, 255, 255, "VISUALS & SCOPE SETTINGS") imgui.separator() cb_fov_enable:set(imgui.checkbox("Enable FOV", cb_fov_enable:get())) if cb_fov_enable:get() then sl_fov_base:set(imgui.slider_float("Base FOV", sl_fov_base:get(), 30.0, 150.0)) cb_fov_scope:set(imgui.checkbox("Scoped override", cb_fov_scope:get())) if cb_fov_scope:get() then sl_fov_zoom1:set(imgui.slider_float("Zoom 1", sl_fov_zoom1:get(), 10.0, 150.0)) sl_fov_zoom2:set(imgui.slider_float("Zoom 2", sl_fov_zoom2:get(), 5.0, 150.0)) end end imgui.spacing() imgui.separator() cb_scope_enable:set(imgui.checkbox("Enable Custom Scope", cb_scope_enable:get())) cb_scope_rem:set(imgui.checkbox("Remove Overlay", cb_scope_rem:get())) cb_always_cross:set(imgui.checkbox("Always Show Crosshair", cb_always_cross:get())) if cb_scope_enable:get() then imgui.spacing() sl_scope_len:set(imgui.slider_float("Length", sl_scope_len:get(), 10.0, 200.0)) sl_scope_gap:set(imgui.slider_float("Gap", sl_scope_gap:get(), 0.0, 50.0)) sl_scope_thick:set(imgui.slider_float("Thickness", sl_scope_thick:get(), 0.5, 5.0)) imgui.spacing() imgui.separator() imgui.text_colored(255, 150, 200, 255, "Inner Color:") imgui.text_colored(255, 55, 0, 255, "Inner Red") sl_inner_r:set(imgui.slider_float("Inner Red", sl_inner_r:get(), 0.0, 255.0)) imgui.text_colored(25, 150, 20, 255, "Inner Green") sl_inner_g:set(imgui.slider_float("Inner Green", sl_inner_g:get(), 0.0, 255.0)) imgui.text_colored(25, 10, 200, 255, "Inner Blue") sl_inner_b:set(imgui.slider_float("Inner Blue", sl_inner_b:get(), 0.0, 255.0)) imgui.text_colored(25, 55, 200, 95, "Inner Alpha") sl_inner_a:set(imgui.slider_float("Inner Alpha", sl_inner_a:get(), 0.0, 255.0)) imgui.spacing() imgui.text_colored(255, 150, 200, 255, "Outer Color:") imgui.text_colored(255, 55, 0, 255, "Outer Red") sl_outer_r:set(imgui.slider_float("Outer Red", sl_outer_r:get(), 0.0, 255.0)) imgui.text_colored(25, 150, 20, 255, "Outer Green") sl_outer_g:set(imgui.slider_float("Outer Green", sl_outer_g:get(), 0.0, 255.0)) imgui.text_colored(25, 10, 200, 255, "Outer Blue") sl_outer_b:set(imgui.slider_float("Outer Blue", sl_outer_b:get(), 0.0, 255.0)) imgui.text_colored(25, 55, 200, 95, "Outer Alpha") sl_outer_a:set(imgui.slider_float("Outer Alpha", sl_outer_a:get(), 0.0, 255.0)) end elseif current_tab == 1 then imgui.text("") imgui.text_colored(220, 120, 255, 255, "MOVEMENT SETTINGS") imgui.separator() cb_bhop_enable:set(imgui.checkbox("Enable Bunny Hop", cb_bhop_enable:get())) cb_autostrafe.v = imgui.checkbox("Enable AutoStrafe", cb_autostrafe.v) elseif current_tab == 2 then imgui.text("") imgui.text_colored(220, 120, 255, 255, "TRASHTALK SETTINGS") imgui.separator() cb_tt_enable:set(imgui.checkbox("Enable TrashTalk", cb_tt_enable:get())) t_hs_only:set(imgui.checkbox("Headshots only", t_hs_only:get())) t_hs_on:set(imgui.checkbox("Enable Headshot phrases", t_hs_on:get())) t_death_on:set(imgui.checkbox("Enable death phrases", t_death_on:get())) imgui.spacing() imgui.separator() imgui.text_colored(255, 150, 200, 255, "Kill Phrases (use | to separate):") t_kill_text:set(imgui.input_text("##killtext", t_kill_text:get(), 256)) imgui.text_colored(255, 150, 200, 255, "Headshot Phrases (use | to separate):") t_hs_text:set(imgui.input_text("##hstext", t_hs_text:get(), 256)) imgui.text_colored(255, 150, 200, 255, "Death Phrases (use | to separate):") t_death_text:set(imgui.input_text("##deathtext", t_death_text:get(), 256)) elseif current_tab == 3 then imgui.text("") imgui.text_colored(220, 120, 255, 255, "MISCELLANEOUS") imgui.separator() cb_auto_accept:set(imgui.checkbox("Auto Accept Match", cb_auto_accept:get())) imgui.spacing() imgui.separator() imgui.text_colored(255, 150, 200, 255, "UI TRANSPARENCY") sl_menu_alpha:set(imgui.slider_float("Menu Alpha", sl_menu_alpha:get(), 50.0, 255.0)) end imgui.end_child() end end imgui.end_window() end if cb_scope_enable:get() then draw_custom_scope() end if cb_auto_accept:get() then local match_state = matchmaking and matchmaking.get_state() or nil if match_state == 2 or match_state == "match_found" then engine.exec("cooldown_accept; +accept") end end if engine.is_in_game() and cb_fov_enable:get() and fov_fn then local zl = get_zoom_level() local target = sl_fov_base:get() if zl > 0 and cb_fov_scope:get() then target = (zl >= 2) and sl_fov_zoom2:get() or sl_fov_zoom1:get() end cur_fov = cur_fov + (target - cur_fov) * 0.15 set_fov_patch(cur_fov) else restore_fov() end if engine.is_in_game() and #tt_queue > 0 then local now = globals.curtime() for i = #tt_queue, 1, -1 do local q = tt_queue[i] if now >= q.at then local say = "say " local safe = q.line:gsub('"', ""):gsub("[\r\n;]", " ") engine.exec(say .. safe) table.remove(tt_queue, i) end end end end) client.set_callback("on_createmove_start", function() pcall(function() if not engine.is_in_game() then return end if not cmd.is_valid() then return end if not cmd.is_real_tick() then return end local lp = entitylist.get_local_player() if cb_bhop_enable:get() and lp and lp:is_alive() then if cmd.is_button_down(buttons.jump) then local flags = lp:field("m_fFlags") or 0 if bit.band(flags, 1) == 0 then cmd.remove_button(buttons.jump) end end end if cb_autostrafe.v and lp and lp:is_alive() then local viewangles = cmd.get_viewangles() if viewangles then strafe_toggle = not strafe_toggle if strafe_toggle then viewangles.y = viewangles.y + 1.5 else viewangles.y = viewangles.y - 1.5 end cmd.set_viewangles(viewangles) end end end) end) client.add_event_callback("player_death", function(e) if not cb_tt_enable:get() then return end local lp = entitylist.get_local_player() if not lp then return end local attacker = e:get_player("attacker") local victim_a = e:get_player("userid") local me = lp:get_address() if attacker == me and victim_a ~= me then local hs = e:get_bool("headshot") if t_hs_only:get() and not hs then return end local victim = victim_a ~= 0 and entitylist.player_from_address(victim_a) or nil local name = victim and victim:get_name() or "enemy" local weapon = e:get_string("weapon") or "" local list = (hs and t_hs_on:get()) and tt_split(t_hs_text:get()) or tt_split(t_kill_text:get()) tt_spam(list, name, weapon, false) end if victim_a == me and t_death_on:get() then local name = "me" local weapon = e:get_string("username") or "" local list = tt_split(t_death_text:get()) tt_spam(list, name, weapon, false) end end) client.set_callback("on_frame_stage", function(stage) if stage == frame_stage.RENDER_START and scope_fn then local want = cb_scope_rem:get() if want and not scope_patched then if safe_write_byte(scope_fn, 0xC3) then scope_patched = true end elseif not want and scope_patched then if safe_write_byte(scope_fn, scope_orig) then scope_patched = false end end end end) client.set_callback("on_unload", function() if scope_fn and scope_orig and scope_patched then safe_write_byte(scope_fn, scope_orig) end restore_fov() if fov_fn and fov_orig_prot ~= 0 then kernel32.VirtualProtect(ffi.cast("void*", fov_fn), 10, fov_orig_prot, old_protect_buf) end tt_queue = {} print("[Scolity.lua] Unloaded successfully. Goodbye!") end) init_memory_hacks() print("[Scolity.lua] Initialized successfully! Welcome back.")