local mem = require "memory"
local sprint = true
require "lib.moonloader"
function main()
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("sprint", function()
sprint = not sprint
sampAddChatMessage(sprint and "ON" or "OFF", -1)
end)
while true do wait(0)
if sampIsLocalPlayerSpawned() then
if sprint and isCharOnFoot(playerPed) and not isCharInAnyCar(playerPed) and isKeyDown(16) and not sampIsChatInputActive() and not isSampfuncsConsoleActive() and not sampIsDialogActive() then
setGameKeyState(16, 256)
wait(10)
setGameKeyState(16, 0)
end
end
if isSampAvailable() then
mem.setint8(0xB7CEE4, 1)
end
end
end