Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Kill aura made by MawinCK
- local player = game:GetService("Players")
- local localplayer = player.LocalPlayer
- local character = localplayer.Character or player.CharacterAdded:Wait()
- local localroot = character:WaitForChild("HumanoidRootPart")
- local Tool = character:FindFirstChildOfClass("Tool")
- local remote = Tool:FindFirstChild("DamageRemote")
- local function closest()
- local target = nil
- local range = 30
- for i, v in pairs(game.Players:GetPlayers()) do
- if v ~= localplayer and v.Character and not v.Character:FindFirstChildWhichIsA("ForceField") then
- local JN = v.Character:FindFirstChild("HumanoidRootPart")
- local dist = (localroot.Position - JN.Position).magnitude
- if dist < range then
- range = dist
- target = v
- end
- end
- end
- return target
- end
- local t = closest()
- local function gethum()
- local global = nil
- t = closest()
- if t and t.Character then
- local h = t.Character:FindFirstChildOfClass("Humanoid")
- if h and h.Health > 0 then
- global = h
- end
- end
- return global
- end
- local hum = gethum()
- game:GetService("RunService").RenderStepped:Connect(function()
- hum = gethum()
- end)
- while wait(0.1) do
- if hum then
- local args = {
- [1] = hum
- }
- remote:FireServer(unpack(args))
- else
- warn("No Global")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement