5rfpbtfsc

cheat engine title randomizer lua script

Jun 20th, 2026 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.58 KB | Source Code | 0 0
  1. local replacements = {
  2.     ["a"] = "4", ["A"] = "4",
  3.     ["e"] = "3", ["E"] = "3",
  4.     ["i"] = "1", ["I"] = "1",
  5.     ["o"] = "0", ["O"] = "0",
  6.     ["s"] = "$", ["S"] = "$",
  7.     ["t"] = "7", ["T"] = "7"
  8. }
  9. local function convertToLeet(str)
  10.     local result = ""
  11.     for i = 1, #str do
  12.         local char = str:sub(i, i)
  13.         result = result .. (replacements[char] or char)
  14.     end
  15.     return result
  16. end
  17. local function processControls(comp)
  18.     if not comp then return end
  19.     local success, count = pcall(function() return comp.ComponentCount end)
  20.     if not success then return end
  21.     for i = 0, count - 1 do
  22.         local child = comp.Component
  23.         if child then
  24.             local cls = child.ClassName
  25.             if cls ~= "TEdit" and cls ~= "TMemo" and cls ~= "TRichEdit" then
  26.                 pcall(function()
  27.                     if child.Caption and child.Caption ~= "" then
  28.                         child.Caption = convertToLeet(child.Caption)
  29.                     end
  30.                     if cls == "TComboBox" or cls == "TListBox" then
  31.                         for j = 0, child.Items.Count - 1 do
  32.                             child.Items[j] = convertToLeet(child.Items[j])
  33.                         end
  34.                     end
  35.                 end)
  36.             end
  37.             processControls(child)
  38.         end
  39.     end
  40. end
  41. local fCount = getFormCount()
  42. for i = 0, fCount - 1 do
  43.     local form = getForm(i)
  44.     if form then
  45.         pcall(function() form.Caption = convertToLeet(form.Caption) end)
  46.         processControls(form)
  47.     end
  48. end
  49. collectgarbage("collect")
Advertisement
Add Comment
Please, Sign In to add comment