Kill aura (for bots)

public
vxpreen Aug 11, 2024 Never 23
Clone
Lua paste1.lua 161 lines (139 loc) | 5.15 KB
1
-- loadstring(game:HttpGet("https://pastecode.dev/raw/ynaczu6k/paste1.lua"))()
2
3
local Players = game:GetService("Players")
4
local LocalPlayer = Players.LocalPlayer
5
local RunService = game:GetService("RunService")
6
local UserInputService = game:GetService("UserInputService")
7
8
local Killaura = {Enabled = true}
9
local KillauraRange = 6
10
local KillauraAngle = 360
11
local KillauraTarget = {Enabled = false}
12
local KillauraRangeCirclePart
13
local dmgEnabled = true
14
15
_G.HoleOff = false
16
17
game.StarterGui:SetCore("SendNotification", {
18
Title = "Loaded!";
19
Text = "Killaura/reach";
20
})
21
22
game.StarterGui:SetCore("SendNotification", {
23
Title = "Hits En Hole";
24
Text = _G.HoleOff and "Off" or "On";
25
})
26
27
local function createRangeVisualizer()
28
local part = Instance.new("Part")
29
part.Shape = Enum.PartType.Ball
30
part.Size = Vector3.new(KillauraRange * 2, KillauraRange * 2, KillauraRange * 2)
31
part.Anchored = true
32
part.CanCollide = false
33
part.Transparency = 0.7
34
part.Material = Enum.Material.Neon
35
part.Color = Color3.fromRGB(138, 33, 32)
36
return part
37
end
38
39
local function onHit(hit, handle)
40
local victim = hit.Parent:FindFirstChildOfClass("Humanoid")
41
if victim and victim.Parent.Name ~= LocalPlayer.Name then
42
if dmgEnabled then
43
for _, v in pairs(hit.Parent:GetChildren()) do
44
if v:IsA("BasePart") then
45
firetouchinterest(handle, v, 0)
46
firetouchinterest(handle, v, 1)
47
end
48
end
49
else
50
firetouchinterest(handle, hit, 0)
51
firetouchinterest(handle, hit, 1)
52
end
53
end
54
end
55
56
local function getToolHandle()
57
local character = LocalPlayer.Character
58
if character then
59
local tool = character:FindFirstChildWhichIsA("Tool")
60
if tool then
61
return tool:FindFirstChildWhichIsA("BasePart")
62
end
63
end
64
return nil
65
end
66
67
local function attackNearbyPlayers()
68
if not Killaura.Enabled then return end
69
70
local character = LocalPlayer.Character
71
if not character then return end
72
73
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
74
if not humanoidRootPart then return end
75
76
local handle = getToolHandle()
77
if not handle then return end
78
79
-- Iterate through all models in the workspace
80
for _, model in pairs(workspace:GetDescendants()) do
81
if model:IsA("Model") and model:FindFirstChild("HumanoidRootPart") and model:FindFirstChildOfClass("Humanoid") then
82
if model ~= character then
83
local targetRootPart = model.HumanoidRootPart
84
local distance = (humanoidRootPart.Position - targetRootPart.Position).Magnitude
85
86
local isWithinReach = distance <= KillauraRange
87
local isNotUnderCharacter = targetRootPart.Position.Y >= humanoidRootPart.Position.Y - 0.1
88
89
if _G.HoleOff then
90
if isWithinReach and isNotUnderCharacter then
91
onHit(targetRootPart, handle)
92
end
93
else
94
if isWithinReach then
95
onHit(targetRootPart, handle)
96
end
97
end
98
end
99
end
100
end
101
end
102
103
local function toggleKillaura()
104
Killaura.Enabled = not Killaura.Enabled
105
end
106
107
local function toggleVisualizer()
108
if KillauraRangeCirclePart then
109
KillauraRangeCirclePart:Destroy()
110
KillauraRangeCirclePart = nil
111
else
112
KillauraRangeCirclePart = createRangeVisualizer()
113
KillauraRangeCirclePart.Parent = workspace
114
end
115
end
116
117
local function toggleHole()
118
_G.HoleOff = not _G.HoleOff
119
game.StarterGui:SetCore("SendNotification", {
120
Title = "Hits En Hole";
121
Text = _G.HoleOff and "Off" or "On";
122
})
123
end
124
125
UserInputService.InputBegan:Connect(function(input, gameProcessed)
126
if gameProcessed then return end
127
128
if input.KeyCode == Enum.KeyCode.J then
129
toggleKillaura()
130
elseif input.KeyCode == Enum.KeyCode.U then
131
toggleVisualizer()
132
elseif input.KeyCode == Enum.KeyCode.H then
133
toggleHole()
134
elseif input.KeyCode == Enum.KeyCode.R then
135
KillauraRange = KillauraRange + 0.5
136
game.StarterGui:SetCore("SendNotification", {
137
Title = "Reach";
138
Text = "" .. KillauraRange;
139
})
140
elseif input.KeyCode == Enum.KeyCode.E then
141
KillauraRange = KillauraRange - 0.5
142
game.StarterGui:SetCore("SendNotification", {
143
Title = "Reach";
144
Text = "" .. KillauraRange;
145
})
146
end
147
end)
148
149
RunService.Heartbeat:Connect(function()
150
if Killaura.Enabled then
151
attackNearbyPlayers()
152
153
if KillauraRangeCirclePart then
154
local character = LocalPlayer.Character
155
if character and character:FindFirstChild("HumanoidRootPart") then
156
KillauraRangeCirclePart.Position = character.HumanoidRootPart.Position
157
KillauraRangeCirclePart.Size = Vector3.new(KillauraRange * 2, KillauraRange * 2, KillauraRange * 2)
158
end
159
end
160
end
161
end)