Advertisement
A_GUES

Not bot sword.

Sep 2nd, 2023 (edited)
1,190
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.74 KB | None | 0 0
  1. getgenv().i_said_right_foot_creep = false
  2.  
  3. game:GetService("RunService").RenderStepped:Connect(function()
  4.     if i_said_right_foot_creep == true then
  5.         spawn(function()
  6.             local tool = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
  7.             if tool and tool:FindFirstChild("Handle") then
  8.                 tool:Activate()
  9.  
  10.                 local p = game.Players:GetPlayers()
  11.                 for i = 2, #p do
  12.                     local v = p<i>.Character
  13.                     if v and v:FindFirstChild("Humanoid") and v.Humanoid.Health > 0 and v:FindFirstChild("HumanoidRootPart") and game.Players.LocalPlayer:DistanceFromCharacter(v.HumanoidRootPart.Position) <= 15 then
  14.                         for i, v in next, v:GetChildren() do
  15.                             if v:IsA("BasePart") then
  16.                                 firetouchinterest(tool.Handle, v, 0)
  17.                                 firetouchinterest(tool.Handle, v, 1)
  18.                             end
  19.                         end
  20.                     end
  21.                 end
  22.             end
  23.         end)
  24.     end
  25. end)
  26.  
  27. local localPlayer = game:GetService("Players").LocalPlayer
  28. local currentCamera = game:GetService("Workspace").CurrentCamera
  29. local mouse = localPlayer:GetMouse()
  30.  
  31. local function getClosestPlayer()
  32.     local closestPlayer = nil
  33.     local shortestDistance = math.huge
  34.  
  35.     for i, v in pairs(game:GetService("Players"):GetPlayers()) do
  36.         if v.Name ~= localPlayer.Name then
  37.             if v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and v.Character:FindFirstChild("HumanoidRootPart") and v.Character:FindFirstChild("Head") then
  38.                 if not v.Character:FindFirstChildOfClass("ForceField") then
  39.                     local ray = Ray.new(v.Character:FindFirstChild("HumanoidRootPart").Position, Vector3.new(0, -100000, 0))
  40.                     local Hit = game:GetService("Workspace"):FindPartOnRay(ray, v.Character)
  41.  
  42.                     if Hit then
  43.                         local magnitude = (v.Character.HumanoidRootPart.Position - localPlayer.Character.HumanoidRootPart.Position).magnitude
  44.  
  45.                         if magnitude < shortestDistance then
  46.                             closestPlayer = v
  47.                             shortestDistance = magnitude
  48.                         end
  49.                     end        
  50.                 end
  51.             end
  52.         end
  53.     end
  54.  
  55.     return closestPlayer
  56. end
  57.  
  58. local stateType = Enum.HumanoidStateType
  59. local character = game.Players.LocalPlayer.Character
  60. local humanoid = character:WaitForChild("Humanoid")
  61.  
  62. humanoid:SetStateEnabled(stateType.FallingDown, false)
  63. humanoid:SetStateEnabled(stateType.Ragdoll, false)
  64.  
  65. while true do
  66.     wait()
  67.     spawn(function()
  68.         if executed then
  69.         else
  70.             getgenv().executed = true
  71.             spawn(function()
  72.                 getgenv().i_said_right_foot_creep = false
  73.                 getgenv().ssss = game.Players.LocalPlayer:GetMouse()
  74.  
  75.                 ssss.KeyDown:connect(function(key)
  76.                     if key == "x" then
  77.                         if i_said_right_foot_creep == false then
  78.                             getgenv().i_said_right_foot_creep = true
  79.                             game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass('Humanoid').AutoRotate = false
  80.                         else
  81.                             getgenv().i_said_right_foot_creep = false
  82.                             game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass('Humanoid').AutoRotate = true
  83.                         end
  84.                     end
  85.                 end)
  86.             end)
  87.         end
  88.     end)
  89.     local targetPlayer = getClosestPlayer()
  90.     if game:GetService("Players").LocalPlayer.Character.PrimaryPart and targetPlayer and i_said_right_foot_creep == true then
  91.         local TargetPart = targetPlayer.Character.HumanoidRootPart
  92.         local Part = game.Players.LocalPlayer.Character.HumanoidRootPart
  93.         local RotateX, RotateY, RotateZ = 0, 0, 0
  94.  
  95.         Part.CFrame = CFrame.new(Part.Position, TargetPart.Position) * CFrame.Angles(math.rad(0), math.rad(25), math.rad(0))
  96.  
  97.         game:GetService("Players").LocalPlayer.Character.Humanoid:MoveTo(targetPlayer.Character.HumanoidRootPart.CFrame * Vector3.new(-3, 0, 0))
  98.         if targetPlayer.Character.Humanoid:GetState() == Enum.HumanoidStateType.Freefall then
  99.             game.Players.LocalPlayer.Character.Humanoid.Jump = true
  100.         end
  101.     end
  102. end
  103.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement