Advertisement
Helgodxdd

AutoThrowTesting

Nov 30th, 2021
41
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Player = game:GetService("Players").LocalPlayer
  2. local Mouse = Player:GetMouse()
  3.  
  4. local CheckKnife = function()
  5. for i,v in pairs(Player.Backpack:GetChildren()) do
  6. if v:IsA("Tool") and v.Name == "Knife" then
  7. return true
  8. else
  9. return false
  10. end
  11. end
  12. end
  13.  
  14. local ThrowKnifeg = function()
  15. if _G.EstoyTirando == true then
  16. for i,v in pairs(Player.Backpack:GetChildren()) do
  17. if v:IsA("Tool") and v.Name == "Knife" then
  18. _G.EstoyTirando = false
  19. end
  20. end
  21. else
  22. if CheckKnife() == true then
  23. _G.EstoyTirando = true
  24. for i= 1,1 do
  25. for i,v in pairs(Player.Backpack:GetChildren()) do
  26. if v:IsA("Tool") and v.Name == "Knife" then
  27. Player.Character.Humanoid:EquipTool(v)
  28. end
  29. end
  30. if game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife then
  31. local ElValorDelRotador = game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.RotateValue.Value;
  32. if game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife:FindFirstChild("throwOrientation") then
  33. ElValorDelRotador = game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife:FindFirstChild("throwOrientation").Value;
  34. end
  35. wait()
  36. local Anim = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.ThrowCharge)
  37. local nim = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.Throw)
  38. Anim:Play(0.1, 1, 2)
  39. wait(0.25)
  40. Anim:Stop()
  41. local l__LocalPlayer__3 = game.Players.LocalPlayer;
  42. local l__mouse__6 = l__LocalPlayer__3:GetMouse();
  43. local v24, v25 = game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(l__mouse__6.UnitRay.Origin, l__mouse__6.UnitRay.Direction * 1000), { l__LocalPlayer__3.Character, workspace.Pets, workspace.KnifeHost });
  44. game.ReplicatedStorage.Remotes.ThrowKnife:FireServer(v25,0.4,ElValorDelRotador)
  45. nim:Play(0.1, 1, 3)
  46. game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.Handle.Swoosh.Pitch = math.random(1100, 1300) / 1000
  47. game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.Handle.Swoosh:Play()
  48. wait(.15)
  49. wait(.15)
  50. Player.Character.Humanoid:UnequipTools()
  51. wait(.30)
  52. end
  53. end
  54. _G.EstoyTirando = false
  55. else
  56. if game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife then
  57. if _G.EstoyTirando == true then
  58. return
  59. else
  60. _G.EstoyTirando = true
  61. for i= 1,1 do
  62. if game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife then
  63. local ElValorDelRotador = game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.RotateValue.Value;
  64. if game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife:FindFirstChild("throwOrientation") then
  65. ElValorDelRotador = game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife:FindFirstChild("throwOrientation").Value;
  66. end
  67. wait()
  68. local Anim = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.ThrowCharge)
  69. local nim = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.Throw)
  70. Anim:Play(0.1, 1, 2)
  71. wait(0.25)
  72. Anim:Stop()
  73. local l__LocalPlayer__3 = game.Players.LocalPlayer;
  74. local l__mouse__6 = l__LocalPlayer__3:GetMouse();
  75. local v24, v25 = game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(l__mouse__6.UnitRay.Origin, l__mouse__6.UnitRay.Direction * 1000), { l__LocalPlayer__3.Character, workspace.Pets, workspace.KnifeHost });
  76. game.ReplicatedStorage.Remotes.ThrowKnife:FireServer(v25,0.4,ElValorDelRotador)
  77. nim:Play(0.1, 1, 3)
  78. game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.Handle.Swoosh.Pitch = math.random(1100, 1300) / 1000
  79. game:GetService("Workspace")[game:GetService("Players").LocalPlayer.Name].Knife.Handle.Swoosh:Play()
  80. wait(.15)
  81. wait(.15)
  82. Player.Character.Humanoid:UnequipTools()
  83. wait(.30)
  84. end
  85. end
  86. _G.EstoyTirando = false
  87. end
  88. end
  89. end
  90. end
  91. end
  92.  
  93. Mouse.KeyUp:Connect(function(Key)
  94. if Key == (string.lower(_G.Key1) or string.upper(_G.Key1)) then
  95. ThrowKnifeg()
  96. end
  97. end)
Advertisement
RAW Paste Data Copied
Advertisement