0% found this document useful (0 votes)
74 views2 pages

Lua Modifi

This document defines a speed hack for a game that increases the game speed to 1 when the Q key is pressed and resets it to the normal speed of 0.949 when the Q key is released. It creates a timer that calls the checkKeys function every 150 milliseconds to monitor key presses and adjust the game speed accordingly.

Uploaded by

LZGAMERHQ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views2 pages

Lua Modifi

This document defines a speed hack for a game that increases the game speed to 1 when the Q key is pressed and resets it to the normal speed of 0.949 when the Q key is released. It creates a timer that calls the checkKeys function every 150 milliseconds to monitor key presses and adjust the game speed accordingly.

Uploaded by

LZGAMERHQ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

SpeedHackAmount=1;

KeyForSpeedhack = VK_Q;
lastSpeed=0;

function checkKeys(timer)
if (isKeyPressed(KeyForSpeedhack)) then
if lastspeed ~= 0 then
speedhack_setSpeed(SpeedHackAmount)
lastSpeed=0
end
else
if lastspeed ~= 0 then
speedhack_setSpeed(0.949)
lastSpeed=0
end
end
end

t=createTimer(nil)
timer_setInterval(t, 110)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true)

SpeedHackAmount=1;
KeyForSpeedhack = VK_Q;
lastSpeed=0;

function checkKeys(timer)
if (isKeyPressed(KeyForSpeedhack)) then
if lastspeed ~= 0 then
speedhack_setSpeed(SpeedHackAmount)
lastSpeed=0
end
else
if lastspeed ~= 0 then
speedhack_setSpeed(0.949)
lastSpeed=0
end
end
end

function checkKeys(timer)
if (isKeyPressed(KeyForSpeedhack)) then
if lastspeed ~= 0 then
speedhack_setSpeed(SpeedHackAmount)
lastSpeed=0
end
else
if lastspeed ~= 0 then
speedhack_setSpeed(0.949)
lastSpeed=0
end
end
end

function checkKeys(timer)
if (isKeyPressed(KeyForSpeedhack)) then
if lastspeed ~= 0 then
speedhack_setSpeed(SpeedHackAmount)
lastSpeed=0
end
else
if lastspeed ~= 0 then
speedhack_setSpeed(0.949)
lastSpeed=0
end
end
end

function checkKeys(timer)
if (isKeyPressed(KeyForSpeedhack)) then
if lastspeed ~= 0 then
speedhack_setSpeed(SpeedHackAmount)
lastSpeed=0
end
else
if lastspeed ~= 0 then
speedhack_setSpeed(0.949)
lastSpeed=0
end
end
end

t=createTimer(nil)
timer_setInterval(t, 150)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true)

You might also like