idk some sword bot

public
vxpreen Aug 11, 2024 Never 37
Clone
Lua paste1.lua 123 lines (105 loc) | 4.78 KB
1
-- loadstring(game:HttpGet("https://pastecode.dev/raw/1csf723l/paste1.lua"))()
2
3
getgenv().HowFastDanSchneiderCatchesYou = 1
4
getgenv().HowMuchDanSchneiderTouchesYou = 15
5
getgenv().HowMuchDanSchneiderTouchedYou = 25
6
local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/bloodball/-back-ups-for-libs/main/wall%20v3')))()
7
8
local w = library:CreateWindow("Sword Fight") -- Creates the window
9
local b = w:CreateFolder("Bot") -- Creates the folder(U will put here your buttons,etc)
10
11
b:Slider("Roto Speed", {
12
min = 0;
13
max = 1;
14
precise = true;
15
}, function(value)
16
getgenv().HowFastDanSchneiderCatchesYou = value
17
end)
18
19
b:Slider("Sword Ranga", {
20
min = 0;
21
max = 15;
22
precise = false;
23
}, function(value)
24
getgenv().HowMuchDanSchneiderTouchesYou = value
25
end)
26
27
b:Slider("Attak Ranga", {
28
min = 0;
29
max = 10000;
30
precise = false;
31
}, function(value)
32
getgenv().HowMuchDanSchneiderTouchedYou = value
33
end)
34
35
getgenv().Daddy_Catches_You = false
36
37
game:GetService("RunService").RenderStepped:Connect(function()
38
if getgenv().Daddy_Catches_You == true then
39
spawn(function()
40
local tool = game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
41
if tool and tool:FindFirstChild("Handle") then
42
tool:Activate()
43
44
local players = game.Players:GetPlayers()
45
for i = 2, #players do
46
local char = players[i].Character
47
if char and char:FindFirstChild("Humanoid") and char.Humanoid.Health > 0 and char:FindFirstChild("HumanoidRootPart") then
48
if game.Players.LocalPlayer:DistanceFromCharacter(char.HumanoidRootPart.Position) <= getgenv().HowMuchDanSchneiderTouchesYou then
49
for _, part in next, char:GetChildren() do
50
if part:IsA("BasePart") then
51
firetouchinterest(tool.Handle, part, 0)
52
firetouchinterest(tool.Handle, part, 1)
53
end
54
end
55
end
56
end
57
end
58
end
59
end)
60
end
61
end)
62
63
local localPlayer = game:GetService("Players").LocalPlayer
64
local mouse = localPlayer:GetMouse()
65
66
local function getClosestPlayer()
67
local closestPlayer = nil
68
local shortestDistance = getgenv().HowMuchDanSchneiderTouchedYou
69
70
for _, player in pairs(game:GetService("Players"):GetPlayers()) do
71
if player.Name ~= localPlayer.Name then
72
local char = player.Character
73
if char and char:FindFirstChild("Humanoid") and char.Humanoid.Health ~= 0 and char:FindFirstChild("HumanoidRootPart") then
74
local magnitude = (char.HumanoidRootPart.Position - localPlayer.Character.HumanoidRootPart.Position).magnitude
75
if magnitude < shortestDistance then
76
closestPlayer = player
77
shortestDistance = magnitude
78
end
79
end
80
end
81
end
82
return closestPlayer
83
end
84
85
local stateType = Enum.HumanoidStateType
86
local character = localPlayer.Character
87
local humanoid = character:WaitForChild("Humanoid")
88
89
humanoid:SetStateEnabled(stateType.FallingDown, false)
90
humanoid:SetStateEnabled(stateType.Ragdoll, false)
91
92
while true do
93
wait()
94
if not getgenv().executed then
95
getgenv().executed = true
96
mouse.KeyDown:connect(function(key)
97
if key == "x" then
98
getgenv().Daddy_Catches_You = not getgenv().Daddy_Catches_You
99
end
100
end)
101
end
102
103
local closestPlayer = getClosestPlayer()
104
if closestPlayer and getgenv().Daddy_Catches_You then
105
local targetPart = closestPlayer.Character.HumanoidRootPart
106
local playerPart = localPlayer.Character.HumanoidRootPart
107
108
-- Smoothly turn to face the target with a horizontal rotation of 25 degrees
109
local lookAt = CFrame.new(playerPart.Position, targetPart.Position)
110
playerPart.CFrame = playerPart.CFrame:Lerp(CFrame.new(playerPart.Position, targetPart.Position) * CFrame.Angles(0, math.rad(25), 0), getgenv().HowFastDanSchneiderCatchesYou)
111
112
-- Move towards the target
113
local moveToPosition = targetPart.CFrame * CFrame.new(-3, 0, 0).p
114
localPlayer.Character:FindFirstChildOfClass('Humanoid'):MoveTo(moveToPosition)
115
116
-- Handle jumping if in freefall
117
if localPlayer.Character.Humanoid:GetState() == Enum.HumanoidStateType.Freefall then
118
localPlayer.Character.Humanoid.Jump = true
119
end
120
else
121
localPlayer.Character:FindFirstChildOfClass('Humanoid').AutoRotate = true
122
end
123
end