Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.91 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, 320)
  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. local FL_DUCKING = (1 << 1)
  32. local FL_STADNING = (1<<0)
  33.  
  34. if Velocity == 0 and ((fFlags & FL_DUCKING) == FL_DUCKING or (fFlags & FL_STADNING) == FL_STADNING) then
  35. Standing = "Standing";
  36. time = globals.CurTime()
  37. else
  38. Standing = "";
  39. end
  40.  
  41. if Velocity >= 95 and ((fFlags & FL_DUCKING) ~= FL_DUCKING and (fFlags & FL_STADNING) == FL_STADNING) and time1 +0.5 < globals.CurTime() then
  42. time = globals.CurTime()
  43. Moving = "Moving";
  44. SlowWalk = ""
  45. elseif (math.floor(Velocity + 0.5) <= 95 and math.floor(Velocity + 0.5) >= 36 ) and ((fFlags & FL_DUCKING) == FL_DUCKING and (fFlags & FL_STADNING) == FL_STADNING) and time1 +0.5 < globals.CurTime() then
  46. Moving = "Moving";
  47. SlowWalk = ""
  48. elseif (math.floor(Velocity + 0.5) <= 95 and math.floor(Velocity + 0.5) ~= 0 ) and ((fFlags & FL_DUCKING) ~= FL_DUCKING and (fFlags & FL_STADNING) == FL_STADNING )and time+0.25 < globals.CurTime() then
  49. SlowWalk = "Slow Walking"
  50. Moving = "";
  51.  
  52. elseif (math.floor(Velocity + 0.5) <= 36 and math.floor(Velocity + 0.5) ~= 0 )and ((fFlags & FL_DUCKING) == FL_DUCKING and (fFlags & FL_STADNING) == FL_STADNING ) and time+0.7< globals.CurTime() then
  53. SlowWalk = "Slow Walking"
  54. Moving = "";
  55. else
  56. Moving = "";
  57. SlowWalk = ""
  58. end
  59. if (fFlags & FL_STADNING) ~= FL_STADNING then
  60. InAir = "In Air"
  61. time1 = globals.CurTime()
  62. else
  63. InAir = ""
  64. end
  65. return math.floor(Velocity + 0.5);
  66. end
  67. end
  68. end
  69.  
  70.  
  71. local function debug_builder(Builder)
  72.  
  73.  
  74. maxspeed = tonumber(client.GetConVar("sv_maxspeed"))
  75. entity = Builder:GetEntity()
  76. local speed = speed_bar:GetValue()
  77. local mode = Moving_box:GetValue()
  78.  
  79. if entities.GetLocalPlayer():GetTeamNumber() ~= entity:GetTeamNumber() then
  80.  
  81. Builder:Color(slider_r:GetValue(), slider_g:GetValue(), slider_b:GetValue(), slider_a:GetValue())
  82. if speed_stuff() ~= nil and entity:IsPlayer() then
  83. if speed == 1 then
  84. Builder:AddBarLeft((speed_stuff() / maxspeed))
  85. elseif speed == 2 then
  86. Builder:AddTextBottom(speed_stuff())
  87. elseif speed == 3 then
  88. Builder:AddTextBottom(speed_stuff())
  89. Builder:AddBarLeft((speed_stuff() / maxspeed))
  90. end
  91. if mode == 1 then
  92. Builder:AddTextTop(SlowWalk)
  93. elseif mode == 2 then
  94. Builder:AddTextTop(Moving .. Standing .. InAir .. SlowWalk)
  95. end
  96. end
  97. end
  98. end
  99.  
  100. callbacks.Register("DrawESP", "debug_builder", debug_builder)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement