kamokumo

Untitled boxing game auto dodge script

Jul 27th, 2023 (edited)
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. warn("!Started!")
  2.  
  3. local Enabled = true
  4.  
  5. local set_thread_identity = (setthreadcontext or set_thread_identity or function()
  6. return print("Your exploit doesnt support this function")
  7. end)
  8.  
  9. local Client = game.Players.LocalPlayer
  10. local States = workspace:WaitForChild("States")
  11. local Effect = require(game:GetService("ReplicatedStorage").Modules.EffectHelper)
  12.  
  13. local VIM = game:service("VirtualInputManager")
  14.  
  15. local function hold(keyCode, time)
  16. set_thread_identity(7)
  17. VIM:SendKeyEvent(true, keyCode, false, game)
  18. task.wait(time)
  19. VIM:SendKeyEvent(false, keyCode, false, game)
  20. set_thread_identity(2)
  21. end
  22.  
  23. function get(n, s)
  24. return States[n.Name]:FindFirstChild(s, true).Value
  25. end
  26. function get_root(chr)
  27. return chr.HumanoidRootPart
  28. end
  29.  
  30. function notif(str, str2)
  31. game:GetService("StarterGui"):SetCore("SendNotification", {
  32. Title = str,
  33. Text = str2,
  34. })
  35. end
  36.  
  37. function dash()
  38. hold(0x20, 0.1)
  39. end
  40. function random()
  41. return math.random(1, 100) / 100
  42. end
  43. local waiting = {}
  44. function waitValid(name, func)
  45. if not waiting[name] then
  46. waiting[name] = {}
  47. end
  48. table.insert(waiting[name], func)
  49. warn("Added Queue :", name)
  50. end
  51. function valid(name, ...)
  52. for i = 1, #waiting[name] do
  53. task.spawn(waiting[name][i], ...)
  54. end
  55. waiting[name] = nil
  56. warn("Cleared Queue :", name)
  57. end
  58.  
  59. shared.BaseEffectFunction = shared.BaseEffectFunction or {}
  60. for i, v in pairs(Effect) do
  61. shared.BaseEffectFunction[i] = shared.BaseEffectFunction[i] or v
  62. Effect[i] = function(d, ...)
  63. task.spawn(function()
  64. if not Enabled then
  65. return
  66. end
  67. if type(d) == "table" and typeof(d[2]) == "Instance" then
  68. local Target = get(Client, "LockedOn")
  69. local Distance = Client:DistanceFromCharacter(get_root(d[2]).Position)
  70.  
  71. if States[Client.Name]:FindFirstChild("Blocking", true).Value or
  72. not States[Client.Name]:FindFirstChild("Equipped", true).Value or
  73. States[Client.Name]:FindFirstChild("Punching", true).Value then
  74. return
  75. end
  76.  
  77. if Distance > 10.8 then
  78. return
  79. end
  80. if (d[1] == "AttackTrail" or d[1] == "StartupHighlight" or d[1] == "UltimateHighlight") and d[2] ~= Client.Character and type(d[5]) == 'number' then
  81. waitValid(d[2].Name , function(LightAttack)
  82. local delay = d[5] * Random.new():NextNumber(0.4, 0.6)
  83. local formattedResult = string.format("%.2f", delay)
  84. task.wait(tonumber(formattedResult))
  85. coroutine.wrap(dash)()
  86. notif("dodged!", "truly master at work")
  87. end)
  88. end
  89. if d[1] == "StartupHighlight" then
  90. valid(d[2].Name, not (d[3] or d[4] or d[5]))
  91. end
  92. end
  93. end)
  94. return shared.BaseEffectFunction[i](d, ...)
  95. end
  96. end
Add Comment
Please, Sign In to add comment