Skip to content

Instantly share code, notes, and snippets.

@DrSpeedy
Last active July 30, 2022 13:16
Show Gist options
  • Save DrSpeedy/da86b23d097618b7f8974e739871d2e7 to your computer and use it in GitHub Desktop.
Save DrSpeedy/da86b23d097618b7f8974e739871d2e7 to your computer and use it in GitHub Desktop.
GTAV: Stand Menu Better Super Run
-- DrSpeedy#1852
require 'lib/natives-1627063482'
local srun_enabled = false
local keys = {}
keys['RB'] = 183
menu.toggle(menu.my_root(), 'Super Run', {'srun_enabled'}, '', function(toggle)
srun_enabled = toggle
local is_super_running = false
util.create_tick_handler(function()
if (srun_enabled) then
local player = PLAYER.PLAYER_PED_ID()
local velocity = ENTITY.GET_ENTITY_VELOCITY(player)
local direction = ENTITY.GET_ENTITY_FORWARD_VECTOR(player)
local sprinting = TASK.IS_PED_SPRINTING(player)
local ragdoll = PED.IS_PED_RAGDOLL(player)
local falling = PED.IS_PED_FALLING(player)
local parastate = PED.GET_PED_PARACHUTE_STATE(player)
local speed_mult = 50
if (PAD.IS_CONTROL_PRESSED(2, keys['RB']) and sprinting and not (parastate == 0)) then
if not (PED.IS_PED_IN_ANY_VEHICLE(player, true) or falling or ragdoll) then
is_super_running = true
ENTITY.SET_ENTITY_VELOCITY(player, (direction.x*speed_mult), (direction.y*speed_mult), velocity.z)
end
else
if (is_super_running and not (falling or ragdoll)) then
is_super_running = false
local brake_mult = 0.66
velocity = ENTITY.GET_ENTITY_VELOCITY(player)
ENTITY.SET_ENTITY_VELOCITY(player, (velocity.x*brake_mult), (velocity.y*brake_mult), velocity.z)
end
end
end
end)
end)
while true do
util.yield()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment