Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. local entity
  2. local Standing = ""
  3. local Moving = ""
  4. local InAir = ""
  5. local SlowWalk = ""
  6. local time = 0
  7. local time1 = 0
  8.  
  9. local box = gui.Groupbox(gui.Reference('VISUALS', "ENEMIES", "Options"), "Random speed shit", 0, 1050, 213, 250)
  10. local speed_bar = gui.Combobox(box, "speed_bar", "Show Speed", "Off", "Bar", "Number","Both")
  11. local Moving_box = gui.Combobox(box, "Moving_box", "Velocity Flag", "Off", "Show SlowWalk", "Show all modes")
  12. local slider_r = gui.Slider(box, "slider_r", "Red", 255, 0, 255);
  13. local slider_g = gui.Slider(box, "slider_g", "Green", 255, 0, 255)
  14. local slider_b = gui.Slider(box, "slider_b", "Blue", 255, 0, 255);
  15. local slider_a = gui.Slider(box, "slider_a", "Alpha", 255, 0, 255);
  16.  
  17. function speed_stuff()
  18.  
  19.  
  20.  
  21. if entity ~= nil then
  22.  
  23. if entity:IsAlive() and entity:IsPlayer() then
  24.  
  25. local fFlags = entity:GetProp("m_fFlags");
  26.  
  27. local VelocityX = entity:GetPropFloat("localdata", "m_vecVelocity[0]");
  28. local VelocityY = entity:GetPropFloat("localdata", "m_vecVelocity[1]");
  29.  
  30. local Velocity = math.sqrt(VelocityX ^ 2 + VelocityY ^ 2);
  31.  
  32. if Velocity == 0 and (fFlags == 257 or fFlags == 263 or fFlags == 261 or fFlags == 259) then
  33. Standing = "Standing";
  34. time = globals.CurTime()
  35.  
  36. else
  37. Standing = "";
  38. end
  39.  
  40. if Velocity >= 95 and (fFlags == 257 or fFlags == 263 or fFlags == 261 or fFlags == 259) and time1 +0.5 < globals.CurTime() then
  41. time = globals.CurTime()
  42. Moving = "Moving";
  43. SlowWalk = ""
  44. elseif (Velocity <= 95 and math.floor(Velocity + 0.5) ~= 0 )and (fFlags == 257 or fFlags == 263 or fFlags == 261 or fFlags == 259) and time +0.25 > globals.CurTime() then
  45. Moving = "Moving";
  46. SlowWalk = ""
  47. elseif (math.floor(Velocity + 0.5) <= 95 and math.floor(Velocity + 0.5) ~= 0 ) and (fFlags == 257 or fFlags ==259) and time+0.25 < globals.CurTime() then
  48. SlowWalk = "Slow Walking"
  49. Moving = "";
  50. elseif (math.floor(Velocity + 0.5) <= 32 and math.floor(Velocity + 0.5) ~= 0 )and (fFlags == 263 or fFlags == 261) and time+0.25< globals.CurTime() then
  51.  
  52. SlowWalk = "Slow Walking"
  53. Moving = "";
  54. else
  55. Moving = "";
  56. SlowWalk = ""
  57. end
  58. if fFlags == 256 or fFlags == 262 or fFlags == 260 then
  59. InAir = "In Air"
  60. time1 = globals.CurTime()
  61. else
  62. InAir = ""
  63. end
  64. return math.floor(Velocity + 0.5);
  65. end
  66. end
  67. end
  68.  
  69.  
  70. local function debug_builder(Builder)
  71.  
  72.  
  73. maxspeed = tonumber(client.GetConVar("sv_maxspeed"))
  74. entity = Builder:GetEntity()
  75. local speed = speed_bar:GetValue()
  76. local mode = Moving_box:GetValue()
  77.  
  78. if entities.GetLocalPlayer():GetTeamNumber() ~= entity:GetTeamNumber() then
  79.  
  80. Builder:Color(slider_r:GetValue(), slider_g:GetValue(), slider_b:GetValue(), slider_a:GetValue())
  81. if speed_stuff() ~= nil and entity:IsPlayer() then
  82. if speed == 1 then
  83. Builder:AddBarLeft((speed_stuff() / maxspeed))
  84. elseif speed == 2 then
  85. Builder:AddTextBottom(speed_stuff())
  86. elseif speed == 3 then
  87. Builder:AddTextBottom(speed_stuff())
  88. Builder:AddBarLeft((speed_stuff() / maxspeed))
  89. end
  90. if mode == 1 then
  91. Builder:AddTextTop(SlowWalk)
  92. elseif mode == 2 then
  93. Builder:AddTextTop(Moving .. Standing .. InAir .. SlowWalk)
  94. end
  95. end
  96. end
  97. end
  98.  
  99. callbacks.Register("DrawESP", "debug_builder", debug_builder)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement