<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="52">
  <Files>
    <File Name="File Path.txt" Encoding="Ascii85">)[;(?aJGsGD9TSSO3YPo%gjkFj(aUNO*ODx%{dYBOGV-6rB/W?00</File>
  </Files>
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"Launch Game"</Description>
      <Color>800080</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{$LUA}
-- Launch Game Script --
if syntaxcheck then return end

[ENABLE]
local storedData = findTableFile("File Path.txt")
local filePath = nil

if storedData then
 local stream = createStringStream()

 stream.Position = 0
 stream.copyFrom(storedData.Stream, storedData.Stream.Size)
 filePath = stream.DataString
 stream.destroy()
else
 storedData = createTableFile("File Path.txt")
end

local function launchGame(filePath)
  local success, err = pcall(function()
      createProcess(filePath)
  end)

  if success then
    local stream = createStringStream(filePath)
    storedData.Stream.Position = 0
    storedData.Stream.copyFrom(stream, stream.Size)
    stream.destroy()
  else
    error(err, 0)
  end
end

local function launchOpenFileDialog(filePath)
 local dialog = createOpenDialog(nil)

 dialog.Title = "Select Game File"
 dialog.InitialDir = filePath
 dialog.Filter = "Executables (*.exe)|*.exe|All files"
 dialog.DefaultExt = "exe"

 if dialog.execute() then
  filePath = dialog.FileName
  launchGame(filePath)
 else
  error("No file selected", 0)
 end

 dialog.destroy()
end

if filePath and filePath ~= "" then
  local message = string.format("Do you want to Launch\n&lt;%s&gt; ?", filePath)
  local result = messageDialog(message, mtConfirmation, mbYes, mbNo)

  if result == mrYes then
    launchGame(filePath)
  else
    launchOpenFileDialog(filePath)
  end
else
 launchOpenFileDialog(filePath)
end

sleep(1000)
getMainForm().Menu.Items[0][2].doClick()

createThread(function()
  while readInteger(process) ~= nil do
    sleep(1000)
  end
  memrec.Active = false
end)
[DISABLE]

</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
