Advertisement
Guest User

fakewalk

a guest
Apr 19th, 2019
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1. autostop_keys = {
  2.     "rbot_autosniper_autostop",
  3.     "rbot_sniper_autostop",
  4.     "rbot_scout_autostop",
  5.     "rbot_revolver_autostop",
  6.     "rbot_pistol_autostop",
  7.     "rbot_smg_autostop",
  8.     "rbot_rifle_autostop",
  9.     "rbot_shotgun_autostop",
  10.     "rbot_lmg_autostop",
  11.     "rbot_shared_autostop"
  12. }
  13.  
  14. autostop_user_saved_values = {}
  15. for i = 1, #autostop_keys do
  16.     autostop_user_saved_values[i] = gui.GetValue(autostop_keys[i]);
  17. end
  18.  
  19. callbacks.Register("Draw", function()
  20.     local slowWalkBind = gui.GetValue("msc_slowwalk");
  21.     if (slowWalkBind == nil or slowWalkBind == 0) then return end
  22.     local lPlayer = entities.GetLocalPlayer();
  23.     if (lPlayer == nil) then return end
  24.     local slowWalkEnabled = input.IsButtonDown(slowWalkBind);
  25.     for i = 1, #autostop_keys do
  26.         if slowWalkEnabled and lPlayer:IsAlive() then
  27.             local text = "SlowWalk Fix Enabled"
  28.             local textWidth, textHeight = draw.GetTextSize(text);
  29.             local top = 590
  30.             draw.Color(150, 185, 1, 255);
  31.             draw.FilledRect(0, top, textWidth + 30, top + textHeight + 20);
  32.             draw.Color(16, 0, 0, 255);
  33.             draw.FilledRect(0, top, textWidth + 20, top + textHeight + 20);
  34.             draw.Color(255, 255, 255, 255);
  35.             draw.Text(10, top + 10, text);
  36.             gui.SetValue(autostop_keys[i], 0);
  37.         else
  38.             gui.SetValue(autostop_keys[i], autostop_user_saved_values[i])
  39.         end
  40.     end
  41. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement