0% found this document useful (1 vote)
169 views2 pages

Speed Hack Script for Key Press Control

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 (1 vote)
169 views2 pages

Speed Hack Script for Key Press Control

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

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