Page 1 of 1

Need some help (speedhack lua)

Posted: Fri Sep 27, 2019 3:38 pm
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

Re: Need some help (speedhack lua)

Posted: Sun Sep 29, 2019 12:31 pm
by JohnFK
The script needs to be running in a timer otherwise it's getting executed only once you activate the script.

[Link]