Advertisement
Cizzy

Untitled

May 16th, 2021
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. local cons = {
  2. [10] = 0,
  3. [30] = 0.01
  4. }
  5.  
  6. local KnifeClient = game.Players.LocalPlayer.Character:FindFirstChild('KnifeClient', true)
  7.  
  8. if KnifeClient then
  9. local KnifeClientS = getsenv(KnifeClient)
  10.  
  11. table.foreach(cons, function(i,v)
  12. setconstant(KnifeClientS.inputReleased, i, v)
  13. end)
  14.  
  15. local old = KnifeClientS.PlayAnimation
  16.  
  17. KnifeClientS.PlayAnimation = newcclosure(function(...)
  18. local Args = {...}
  19.  
  20. if (Args[1] == 'Grab' or Args[1] == 'Charge' or string.find(Args[1], 'Slash')) then
  21. Args[2] = 0.05
  22. return old(unpack(Args))
  23. end
  24.  
  25. return old(...)
  26. end)
  27. end
  28.  
  29. game.Players.LocalPlayer.Character.ChildAdded:Connect(function(Child)
  30. if Child.Name == 'Knife' then
  31. local Element = getsenv(Child:FindFirstChild('KnifeClient', true))
  32.  
  33. table.foreach(cons, function(i,v)
  34. setconstant(Element.inputReleased, i, v)
  35. end)
  36.  
  37. local old = Element.PlayAnimation
  38.  
  39. Element.PlayAnimation = newcclosure(function(...)
  40. local Args = {...}
  41.  
  42. if (Args[1] == 'Grab' or Args[1] == 'Charge' or string.find(Args[1], 'Slash')) then
  43. Args[2] = 0.05
  44. return old(unpack(Args))
  45. end
  46.  
  47. return old(...)
  48. end)
  49. end
  50. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement