View previous topic :: View next topic |
Author |
Message |
Lurusha How do I cheat? Reputation: 0
Joined: 17 Jun 2022 Posts: 2
|
Posted: Sat Jun 18, 2022 8:34 am Post subject: Speed hack Script In Lua |
|
|
Guys, I'm setting up a Script and I would like more than one key to be done, but with separate speeds, for example, when I press Space it triggers a speed, and when I set another key it changes to another speed, I need to put it in the trainer
lastSpeed=1;
function checkKeys(timer)
if (isKeyPressed(VK_SPACE)) then
if lastspeed ~= 2.0 then
speedhack_setSpeed(2.0)
lastSpeed=2.0
end
else
if lastspeed ~= 1 then
speedhack_setSpeed(1)
lastSpeed=1
end
end
end
t=createTimer(nil)
timer_setInterval(t, 100)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true)
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4299
|
Posted: Sat Jun 18, 2022 10:46 am Post subject: |
|
|
Search for "lua elseif"
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Sat Jun 18, 2022 8:51 pm Post subject: |
|
|
Something like this :
Code: | lastSpeed=1;
function checkKeys(timer)
if (isKeyPressed(VK_A)) then
if lastspeed ~= 10 then
print("speed 10") -- speedhack_setSpeed(10)
lastSpeed=10
end
elseif (isKeyPressed(VK_B)) then
print("speed 5") -- speedhack_setSpeed(5)
lastSpeed=5
elseif (isKeyPressed(VK_C)) then
print("speed 1") -- speedhack_setSpeed(1)
lastSpeed=1
end
end
t=createTimer(nil)
timer_setInterval(t, 100)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true) |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
Lurusha How do I cheat? Reputation: 0
Joined: 17 Jun 2022 Posts: 2
|
Posted: Sun Jun 19, 2022 1:16 pm Post subject: |
|
|
Corroder wrote: | Something like this :
Code: | lastSpeed=1;
function checkKeys(timer)
if (isKeyPressed(VK_A)) then
if lastspeed ~= 10 then
print("speed 10") -- speedhack_setSpeed(10)
lastSpeed=10
end
elseif (isKeyPressed(VK_B)) then
print("speed 5") -- speedhack_setSpeed(5)
lastSpeed=5
elseif (isKeyPressed(VK_C)) then
print("speed 1") -- speedhack_setSpeed(1)
lastSpeed=1
end
end
t=createTimer(nil)
timer_setInterval(t, 100)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true) |
|
It didn't work, when I press the button inside the game the speedhack doesn't work, it only opens a console with the values.
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Sun Jun 19, 2022 8:28 pm Post subject: |
|
|
Balano wrote: |
It didn't work, when I press the button inside the game the speedhack doesn't work, it only opens a console with the values. |
Code: | lastSpeed=1;
function checkKeys(timer)
if (isKeyPressed(VK_A)) then
if lastspeed ~= 10 then
speedhack_setSpeed(10)
print("speedhack set to 10")
lastSpeed=10
end
elseif (isKeyPressed(VK_B)) then
speedhack_setSpeed(5)
print("speedhack set to 5")
lastSpeed=5
elseif (isKeyPressed(VK_C)) then
speedhack_setSpeed(1)
print("speedhack set to 1")
lastSpeed=1
end
end
t=createTimer(nil)
timer_setInterval(t, 100)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true) |
Oh, really?. It works fine for me. I think you just copy paste the script not edit it according to your needs.
Description: |
|
Filesize: |
261.9 KB |
Viewed: |
3792 Time(s) |
|
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
|