local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")
local LocalPlayer = Players.LocalPlayer
_G.Config = {
Enabled = true,
Targets = {
Guardians = true,
Titans = true,
Players = true,
Dummies = true,
Ducks = true,
Chickens = true,
},
Weapons = {
"wood_scythe", "stone_scythe", "iron_scythe", "diamond_scythe", "mythic_scythe",
"wood_great_hammer", "stone_great_hammer", "iron_great_hammer", "diamond_great_hammer", "mythic_great_hammer",
"wood_dagger", "stone_dagger", "iron_dagger", "diamond_dagger", "mythic_dagger",
"wood_gauntlets", "stone_gauntlets", "iron_gauntlets", "diamond_gauntlets", "mythic_gauntlets",
"noctium_blade", "noctium_blade_2", "noctium_blade_3", "noctium_blade_4",
"wood_dao", "stone_dao", "iron_dao", "diamond_dao", "emerald_dao",
"wood_gun_blade", "stone_gun_blade", "iron_gun_blade", "diamond_gun_blade", "emerald_gun_blade",
"summoner_claw_1", "summoner_claw_2", "summoner_claw_3", "summoner_claw_4",
"wood_sword", "stone_sword", "iron_sword", "diamond_sword", "emerald_sword",
"laser_sword", "guards_spear", "mass_hammer", "baguette", "void_sword",
"tinkers_wrench", "rageblade", "ice_sword", "frosty_hammer", "wizard_stick", "light_sword",
}
}
local SUMMONER_CLAWS = {
summoner_claw_1 = true,
summoner_claw_2 = true,
summoner_claw_3 = true,
summoner_claw_4 = true,
}
local Guardians = {}
local Titans = {}
local Dummies = {}
local Ducks = {}
local Chickens = {}
local function classify(model)
if not model:IsA("Model") then return end
if model.Name == "Diamond Guardian" then
table.insert(Guardians, model)
elseif model.Name == "Titan" then
table.insert(Titans, model)
elseif model.Name:find("Dummy") then
table.insert(Dummies, model)
elseif model.Name == "Duck" then
table.insert(Ducks, model)
elseif model.Name == "Chicken" then
table.insert(Chickens, model)
end
end
local function removeFrom(tbl, model)
for i, v in ipairs(tbl) do
if v == model then table.remove(tbl, i) break end
end
end
for _, obj in ipairs(Workspace:GetChildren()) do classify(obj) end
Workspace.ChildAdded:Connect(classify)
Workspace.ChildRemoved:Connect(function(obj)
removeFrom(Guardians, obj) removeFrom(Titans, obj)
removeFrom(Dummies, obj) removeFrom(Ducks, obj)
removeFrom(Chickens, obj)
end)
local function getRoot(model)
return model:FindFirstChild("HumanoidRootPart") or model.PrimaryPart
end
local function getClosestTarget()
local myChar = LocalPlayer.Character
local myRoot = myChar and getRoot(myChar)
if not myRoot then return nil end
local myPos = myRoot.Position
local closest, shortest = nil, math.huge
local cfg = _G.Config.Targets
local function check(char)
local root = getRoot(char)
if root then
local dist = (root.Position - myPos).Magnitude
if dist < shortest then shortest = dist closest = char end
end
end
if cfg.Players then
for _, player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer and player.Character then check(player.Character) end
end
end
if cfg.Guardians then for _, g in ipairs(Guardians) do check(g) end end
if cfg.Titans then for _, t in ipairs(Titans) do check(t) end end
if cfg.Dummies then for _, d in ipairs(Dummies) do check(d) end end
if cfg.Ducks then for _, d in ipairs(Ducks) do check(d) end end
if cfg.Chickens then for _, c in ipairs(Chickens) do check(c) end end
return closest
end
local function getWeapon()
local myChar = LocalPlayer.Character
if not myChar then return nil end
local weaponsSet = {}
for _, name in ipairs(_G.Config.Weapons) do weaponsSet[name] = true end
local equippedAccessory = nil
for _, child in ipairs(myChar:GetChildren()) do
if child:IsA("Accessory") and weaponsSet[child.Name] then
equippedAccessory = child
break
end
end
if not equippedAccessory then return nil end
local weaponName = equippedAccessory.Name
local invFolder = ReplicatedStorage:FindFirstChild("Inventories")
if not invFolder then return nil end
local inv = invFolder:FindFirstChild(LocalPlayer.Name)
if not inv then return nil end
for _, item in ipairs(inv:GetChildren()) do
if item.Name == weaponName then return item end
end
return nil
end
local function getEquippedWeaponName()
local myChar = LocalPlayer.Character
if not myChar then return nil end
local weaponsSet = {}
for _, name in ipairs(_G.Config.Weapons) do weaponsSet[name] = true end
for _, child in ipairs(myChar:GetChildren()) do
if child:IsA("Accessory") and weaponsSet[child.Name] then
return child.Name
end
end
return nil
end
local function findRemote(name)
local netManaged = ReplicatedStorage
:FindFirstChild("rbxts_include")
and ReplicatedStorage.rbxts_include
:FindFirstChild("node_modules")
and ReplicatedStorage.rbxts_include.node_modules
:FindFirstChild("@rbxts")
and ReplicatedStorage.rbxts_include.node_modules["@rbxts"]
:FindFirstChild("net")
and ReplicatedStorage.rbxts_include.node_modules["@rbxts"].net
:FindFirstChild("out")
and ReplicatedStorage.rbxts_include.node_modules["@rbxts"].net.out
:FindFirstChild("_NetManaged")
if not netManaged then return nil end
return netManaged:FindFirstChild(name)
end
local SwordHit = findRemote("SwordHit")
local SummonerClawRemote = findRemote("SummonerClawAttackRequest")
local function attackSummonerClaw(myRoot, targetRoot)
if not SummonerClawRemote then return end
local direction = (targetRoot.Position - myRoot.Position).Unit
local args = {
{
clientTime = tick(),
direction = direction,
position = myRoot.Position,
}
}
pcall(function()
SummonerClawRemote:FireServer(unpack(args))
end)
end
local function attackSword(target, weapon, myRoot, targetRoot)
if not SwordHit then return end
local args = {
chargedAttack = { chargeRatio = 0 },
entityInstance = target,
validate = {
selfPosition = { value = myRoot.Position },
targetPosition = { value = targetRoot.Position },
},
weapon = weapon,
}
pcall(function()
SwordHit:FireServer(args)
end)
end
local function attack()
local myChar = LocalPlayer.Character
if not myChar then return end
local myRoot = getRoot(myChar)
if not myRoot then return end
local target = getClosestTarget()
if not target then return end
local targetRoot = getRoot(target)
if not targetRoot then return end
local weaponName = getEquippedWeaponName()
if not weaponName then return end
if SUMMONER_CLAWS[weaponName] then
attackSummonerClaw(myRoot, targetRoot)
else
local weapon = getWeapon()
if not weapon then return end
attackSword(target, weapon, myRoot, targetRoot)
end
end
task.spawn(function()
task.wait(2)
while true do
if _G.Config.Enabled then
pcall(attack)
end
task.wait(0.00001)
end
end)kill aura script for BedWars, open source and straight to the point
auto hits nearby players so u don’t have to spam click, just turn it on and it does the job
No comments yet. Be the first to comment!
1local Players = game:GetService("Players")
2local ReplicatedStorage = game:GetService("ReplicatedStorage")
3local Workspace = game:GetService("Workspace")
4local LocalPlayer = Players.LocalPlayer
5
6_G.Config = {
7 Enabled = true,
8 Targets = {
9 Guardians = true,
10 Titans = true,
11 Players = true,
12 Dummies = true,
13 Ducks = true,
14 Chickens = true,
15 },
16 Weapons = {
17 "wood_scythe", "stone_scythe", "iron_scythe", "diamond_scythe", "mythic_scythe",
18 "wood_great_hammer", "stone_great_hammer", "iron_great_hammer", "diamond_great_hammer", "mythic_great_hammer",
19 "wood_dagger", "stone_dagger", "iron_dagger", "diamond_dagger", "mythic_dagger",
20 "wood_gauntlets", "stone_gauntlets", "iron_gauntlets", "diamond_gauntlets", "mythic_gauntlets",
21 "noctium_blade", "noctium_blade_2", "noctium_blade_3", "noctium_blade_4",
22 "wood_dao", "stone_dao", "iron_dao", "diamond_dao", "emerald_dao",
23 "wood_gun_blade", "stone_gun_blade", "iron_gun_blade", "diamond_gun_blade", "emerald_gun_blade",
24 "summoner_claw_1", "summoner_claw_2", "summoner_claw_3", "summoner_claw_4",
25 "wood_sword", "stone_sword", "iron_sword", "diamond_sword", "emerald_sword",
26 "laser_sword", "guards_spear", "mass_hammer", "baguette", "void_sword",
27 "tinkers_wrench", "rageblade", "ice_sword", "frosty_hammer", "wizard_stick", "light_sword",
28 }
29}
30
31local SUMMONER_CLAWS = {
32 summoner_claw_1 = true,
33 summoner_claw_2 = true,
34 summoner_claw_3 = true,
35 summoner_claw_4 = true,
36}
37
38local Guardians = {}
39local Titans = {}
40local Dummies = {}
41local Ducks = {}
42local Chickens = {}
43
44local function classify(model)
45 if not model:IsA("Model") then return end
46 if model.Name == "Diamond Guardian" then
47 table.insert(Guardians, model)
48 elseif model.Name == "Titan" then
49 table.insert(Titans, model)
50 elseif model.Name:find("Dummy") then
51 table.insert(Dummies, model)
52 elseif model.Name == "Duck" then
53 table.insert(Ducks, model)
54 elseif model.Name == "Chicken" then
55 table.insert(Chickens, model)
56 end
57end
58
59local function removeFrom(tbl, model)
60 for i, v in ipairs(tbl) do
61 if v == model then table.remove(tbl, i) break end
62 end
63end
64
65for _, obj in ipairs(Workspace:GetChildren()) do classify(obj) end
66Workspace.ChildAdded:Connect(classify)
67Workspace.ChildRemoved:Connect(function(obj)
68 removeFrom(Guardians, obj) removeFrom(Titans, obj)
69 removeFrom(Dummies, obj) removeFrom(Ducks, obj)
70 removeFrom(Chickens, obj)
71end)
72
73local function getRoot(model)
74 return model:FindFirstChild("HumanoidRootPart") or model.PrimaryPart
75end
76
77local function getClosestTarget()
78 local myChar = LocalPlayer.Character
79 local myRoot = myChar and getRoot(myChar)
80 if not myRoot then return nil end
81
82 local myPos = myRoot.Position
83 local closest, shortest = nil, math.huge
84 local cfg = _G.Config.Targets
85
86 local function check(char)
87 local root = getRoot(char)
88 if root then
89 local dist = (root.Position - myPos).Magnitude
90 if dist < shortest then shortest = dist closest = char end
91 end
92 end
93
94 if cfg.Players then
95 for _, player in ipairs(Players:GetPlayers()) do
96 if player ~= LocalPlayer and player.Character then check(player.Character) end
97 end
98 end
99 if cfg.Guardians then for _, g in ipairs(Guardians) do check(g) end end
100 if cfg.Titans then for _, t in ipairs(Titans) do check(t) end end
101 if cfg.Dummies then for _, d in ipairs(Dummies) do check(d) end end
102 if cfg.Ducks then for _, d in ipairs(Ducks) do check(d) end end
103 if cfg.Chickens then for _, c in ipairs(Chickens) do check(c) end end
104
105 return closest
106end
107
108local function getWeapon()
109 local myChar = LocalPlayer.Character
110 if not myChar then return nil end
111
112 local weaponsSet = {}
113 for _, name in ipairs(_G.Config.Weapons) do weaponsSet[name] = true end
114
115 local equippedAccessory = nil
116 for _, child in ipairs(myChar:GetChildren()) do
117 if child:IsA("Accessory") and weaponsSet[child.Name] then
118 equippedAccessory = child
119 break
120 end
121 end
122 if not equippedAccessory then return nil end
123
124 local weaponName = equippedAccessory.Name
125 local invFolder = ReplicatedStorage:FindFirstChild("Inventories")
126 if not invFolder then return nil end
127
128 local inv = invFolder:FindFirstChild(LocalPlayer.Name)
129 if not inv then return nil end
130
131 for _, item in ipairs(inv:GetChildren()) do
132 if item.Name == weaponName then return item end
133 end
134 return nil
135end
136
137local function getEquippedWeaponName()
138 local myChar = LocalPlayer.Character
139 if not myChar then return nil end
140 local weaponsSet = {}
141 for _, name in ipairs(_G.Config.Weapons) do weaponsSet[name] = true end
142 for _, child in ipairs(myChar:GetChildren()) do
143 if child:IsA("Accessory") and weaponsSet[child.Name] then
144 return child.Name
145 end
146 end
147 return nil
148end
149
150local function findRemote(name)
151 local netManaged = ReplicatedStorage
152 :FindFirstChild("rbxts_include")
153 and ReplicatedStorage.rbxts_include
154 :FindFirstChild("node_modules")
155 and ReplicatedStorage.rbxts_include.node_modules
156 :FindFirstChild("@rbxts")
157 and ReplicatedStorage.rbxts_include.node_modules["@rbxts"]
158 :FindFirstChild("net")
159 and ReplicatedStorage.rbxts_include.node_modules["@rbxts"].net
160 :FindFirstChild("out")
161 and ReplicatedStorage.rbxts_include.node_modules["@rbxts"].net.out
162 :FindFirstChild("_NetManaged")
163 if not netManaged then return nil end
164 return netManaged:FindFirstChild(name)
165end
166
167local SwordHit = findRemote("SwordHit")
168local SummonerClawRemote = findRemote("SummonerClawAttackRequest")
169
170local function attackSummonerClaw(myRoot, targetRoot)
171 if not SummonerClawRemote then return end
172
173 local direction = (targetRoot.Position - myRoot.Position).Unit
174
175 local args = {
176 {
177 clientTime = tick(),
178 direction = direction,
179 position = myRoot.Position,
180 }
181 }
182
183 pcall(function()
184 SummonerClawRemote:FireServer(unpack(args))
185 end)
186end
187
188local function attackSword(target, weapon, myRoot, targetRoot)
189 if not SwordHit then return end
190
191 local args = {
192 chargedAttack = { chargeRatio = 0 },
193 entityInstance = target,
194 validate = {
195 selfPosition = { value = myRoot.Position },
196 targetPosition = { value = targetRoot.Position },
197 },
198 weapon = weapon,
199 }
200
201 pcall(function()
202 SwordHit:FireServer(args)
203 end)
204end
205
206local function attack()
207 local myChar = LocalPlayer.Character
208 if not myChar then return end
209
210 local myRoot = getRoot(myChar)
211 if not myRoot then return end
212
213 local target = getClosestTarget()
214 if not target then return end
215
216 local targetRoot = getRoot(target)
217 if not targetRoot then return end
218
219 local weaponName = getEquippedWeaponName()
220 if not weaponName then return end
221
222 if SUMMONER_CLAWS[weaponName] then
223 attackSummonerClaw(myRoot, targetRoot)
224 else
225 local weapon = getWeapon()
226 if not weapon then return end
227 attackSword(target, weapon, myRoot, targetRoot)
228 end
229end
230
231task.spawn(function()
232 task.wait(2)
233 while true do
234 if _G.Config.Enabled then
235 pcall(attack)
236 end
237 task.wait(0.00001)
238 end
239end)