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)
Speed hack Script in Lua
-
- Expert Cheater
- Posts: 66
- Joined: Sat Sep 21, 2019 4:21 pm
- Reputation: 45
Re: Speed hack Script in Lua
You mean something like this?
Code: Select all
{$lua}
[ENABLE]
p_cheats = createTimer()
p_cheats.setInterval(1)
p_cheats.onTimer = function()
if isKeyPressed(VK_V) then
speedhack_setSpeed(25)
end
if isKeyPressed(VK_B) then
speedhack_setSpeed(1)
end
end
[DISABLE]
p_cheats.destroy()
Who is online
Users browsing this forum: No registered users