Need some help (speedhack lua)

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
TheInsaneHacker
Table Makers
Table Makers
Posts: 75
Joined: Thu Aug 29, 2019 2:38 pm
Reputation: 84

Need some help (speedhack lua)

Post by TheInsaneHacker » Fri Sep 27, 2019 3:38 pm

Hi,

I've just made a speedhack script in lua, but it doesn't work for some reason.
When I execute it, there is no script error, but when I press on my "S" key the speed doesn't change.
I have also tried to change the 0x53 to VK_ESCAPE or something, but that didn't work either.
Maybe someone can help me out :).

This is my script in lua:

lastspeed = 1

if (isKeyPressed(0x53)) then
if lastspeed == 1 then
speedhack_setSpeed(0.5)
lastspeed = 0.5
end
else
if lastspeed == 0.5 then
speedhack_setSpeed(1)
lastspeed = 1
end
end

JohnFK
Expert Cheater
Expert Cheater
Posts: 50
Joined: Tue Aug 29, 2017 10:50 am
Reputation: 12

Re: Need some help (speedhack lua)

Post by JohnFK » Sun Sep 29, 2019 12:31 pm

The script needs to be running in a timer otherwise it's getting executed only once you activate the script.

https://wiki.cheatengine.org/index.php? ... lass:Timer

Post Reply

Who is online

Users browsing this forum: No registered users