<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="18">
  <Forms>
    <UDF1 Class="TCEForm" Encoding="Ascii85">ZBflm!Y}{48=IxFm}isAgJ(F@j2=6h7DxyTHsPiz(}1%ng^{m-[$/DO59JFu*:h}aJ,%L=-@af#S(^/JwLswXT+{s!:dRnT3^l9Ht+rJDj$$r/C.^ClU)*3quXwCHT;uAeIHrl3w.K,?DB*#uO?w7^-H,+hkOVM(;p%vyl-pzv4:I?86fX#;N:C+V(=q9PL+I;*w-6#vN+y.x9rAS^/5T+Tp_;r_GH:a0%Q9S:?TL/)/_7Uad+lyZoxVNwdx0*Wlu!oLB@ly1s@zHy^:1q-Be,JYVKWSgIf9JQy%[W]U(cTWH#3.kGUbA5vV#Qk0_4Q,%V5a0agwno5dw]/D/Y=RkY(3$4r+Ee7h_=UEc+gU%XTn=3q-WyF1$BN=@n5ZPk5Iff34R8lyY.5)jDREeNEu!9/=+5ZGrl79]*f5bq,DdNn_#U:O3!^0^</UDF1>
  </Forms>
  <CheatEntries/>
  <UserdefinedSymbols/>
  <LuaScript>--- color var
red="0x000000FF"
black="0x00999999"

--- scan double value
function findDoubleValueAndReplace(findValue, replaceWith)
  memscan = createMemScan()
  foundlist = createFoundList(memscan)
  protectionflags = "-W*X-C"
  memscan.firstScan(soExactValue, vtDouble, rtTruncated, findValue, nil,
               "0","7fffffff",protectionflags,
               fsmAligned,"4",
               false, false, false, false)
  memscan.waitTillDone()
  foundlist.initialize()

  for i=0,foundlist.Count-1 do
   fullAccess(  getAddress(foundlist.Address[i])  , 8)
   writeDouble(  foundlist.Address[i], replaceWith)
  end

  sleep(50)
  foundlist.destroy()
  sleep(50)
  memscan.destroy()
end

---- Scan and replace double value
function doscndouble()
  findDoubleValueAndReplace("your_value", 2000)
end

---- Toggle Box Executing
function CEToggleBox1Change(sender)
if (checkbox_getState(UDF1.CEToggleBox1) == 1) then
doscndouble()
local font = getProperty(UDF1.CEToggleBox1, "Font")
setProperty(font, "Color", red)
control_setCaption(UDF1.CEToggleBox1, "2000")
--
local font = getProperty(UDF1.CELabel2, "Font")     ----- Addition to test
setProperty(font, "Color", red)
control_setCaption(UDF1.CELabel2, "2000")
else
local font = getProperty(UDF1.CEToggleBox1, "Font")
setProperty(font, "Color", black)
control_setCaption(UDF1.CEToggleBox1, "800")
--
local font = getProperty(UDF1.CELabel2, "Font")  ----- Addition to test
setProperty(font, "Color", black)
control_setCaption(UDF1.CELabel2, "800")
end
end
</LuaScript>
</CheatTable>
