Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cosmetic Rain Matrix Text Reveal For Game Hack Trainer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1669

PostPosted: Mon Jun 29, 2026 4:49 am    Post subject: Cosmetic Rain Matrix Text Reveal For Game Hack Trainer Reply with quote

Hello friends,After a long time of just lurking and observing every post in this forum, I now want to make a small contribution to those who still enjoy creating game hack trainers.I call this a "cosmetic" for your game hack trainer. It serves as a polish to make your trainer look more appealing, or for any other purposes you might need. More importantly, it demonstrates the logic behind the code script below, specifically using Cheat Engine (CE) Lua. CE Lua isn't originally designed for building full applications and comes with various feature limitations.I call the following code script "Rain Matrix Text Reveal." You can use it as a cinematic intro for your game hack trainer. Once the animation ends, you can use the final frame as a panel to display all of your trainer's menu options.Of course, the animation quality won't be as smooth as what you would get using programming languages like VB, Python, or others.

Code:

getLuaEngine().cbShowOnPrint.Checked = true

MainForm = createForm(nil)
MainForm.Caption = 'Matrix Opening'
MainForm.Width = 900
MainForm.Height = 500
MainForm.Position = 'poScreenCenter'
MainForm.Color = 0x000000
MainForm.AlphaBlend = true
MainForm.AlphaBlendValue = 255

tReveal = createTimer(MainForm);
tReveal.Interval = 100;
tReveal.Enabled = false

rainTimer = createTimer(MainForm);
rainTimer.Interval = 100;
rainTimer.Enabled = false

transitionTimer = createTimer(MainForm);
transitionTimer.Interval = 3000;
transitionTimer.Enabled = false

---------------------------------------------------
-- Variabel target text
---------------------------------------------------
local tcr = "entarō-san no kyarakutā ohirome"
local revealed = {}
local scroll_counts = {}
for i=1,#tcr do
  revealed[i] = "0"
  scroll_counts[i] = 0
end

---------------------------------------------------
-- Label reveal
---------------------------------------------------
lblReveal = createLabel(MainForm)
lblReveal.Caption = ""
lblReveal.Font.Size = 40
lblReveal.Font.Color = 0x00FF00
lblReveal.Transparent = true

---------------------------------------------------
-- Label final (hide first)
---------------------------------------------------
lblFinal = createLabel(MainForm)
lblFinal.Caption = "Ganbatte kudasai ..!!"
lblFinal.Font.Size = 40
lblFinal.Font.Color = 0x00FF00
lblFinal.Transparent = true
lblFinal.Visible = false

---------------------------------------------------
-- Rain Matrix Function
---------------------------------------------------
function doRain()
local lbl = createLabel(MainForm)
  lbl.Caption = tostring(math.random(0,9))
  lbl.Font.Size = 10
  lbl.Font.Color = 0x00FF00
  lbl.Left = math.random(0, MainForm.Width)
  lbl.Top = 0
  lbl.Transparent = false
  lbl.Color = 0x000000

  local fallTimer = createTimer(MainForm)
  fallTimer.Interval = 50
  fallTimer.OnTimer = function(ft)
    if lbl == nil or MainForm == nil then
      ft.Enabled = false
      return
    end
    lbl.Top = lbl.Top + 10
    if lbl.Top > MainForm.Height then
      lbl.destroy()
      ft.Enabled = false
    end
  end
end

---------------------------------------------------
-- Reveal Function
---------------------------------------------------
function doReveal()
  local done = true
  for i=1,#tcr do
    if scroll_counts[i] < 20 then
      revealed[i] = tostring(math.random(0,9))
      scroll_counts[i] = scroll_counts[i] + 1
      done = false
    else
      revealed[i] = string.sub(tcr,i,i)
    end
  end
  lblReveal.Caption = table.concat(revealed)
  lblReveal.Left = (MainForm.Width - lblReveal.Width)//2
  lblReveal.Top  = (MainForm.Height - lblReveal.Height)//2

  if table.concat(revealed) == tcr then
    tReveal.Enabled = false
    transitionTimer.Enabled = true
  end
end

---------------------------------------------------
-- Transition
---------------------------------------------------
function doTransition()
  transitionTimer.Enabled = false
  rainTimer.Enabled = false
  lblReveal.destroy()
  lblFinal.Visible = true

  lblFinal.Left = (MainForm.Width - lblFinal.Width)//2
  lblFinal.Top  = (MainForm.Height - lblFinal.Height)//2
end

---------------------------------------------------
-- Assign handler to timer
---------------------------------------------------
tReveal.OnTimer = doReveal
rainTimer.OnTimer = doRain
transitionTimer.OnTimer = doTransition

---------------------------------------------------
-- Animation start
---------------------------------------------------
tReveal.Enabled = true
rainTimer.Enabled = true
MainForm.show()

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites