A_GUES

Sword bot by GPT-4

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