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: 123
Joined: Thu Aug 29, 2019 2:38 pm
Reputation: 167

Need some help (speedhack lua)

Post by TheInsaneHacker »

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: 55
Joined: Tue Aug 29, 2017 10:50 am
Reputation: 24

Re: Need some help (speedhack lua)

Post by JohnFK »

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

[Link]

Post Reply

Who is online

Users browsing this forum: ireallymeanit