Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if KillAll then KillAll() end
- local Run = true
- local KillAll = setmetatable(configs or {
- whitelist = {},
- AutoToxic = true,
- ResponseList = {"<user> is such a noob","Imagine dying <user>","lol <user> just died","Alt F4 already <user>"}
- },{__call = function()
- Run = false
- end})
- getgenv().KillAll = KillAll
- local cloneref = cloneref or function(obj) return obj end
- local Players = cloneref(game:GetService("Players"))
- local lp = cloneref(Players.LocalPlayer)
- local function getchar(plr)
- return (plr or lp).Character
- end
- local function gettool(plr)
- local char = plr and plr:IsA("Model") and plr or getchar(plr)
- return (char and char:FindFirstChildWhichIsA("Tool")),char
- end
- local function GetDamageRemoteFromTool(Tool)
- return Tool and Tool:FindFirstChildWhichIsA("RemoteEvent",true)
- end
- local function IsValidMember(obj,target)
- return obj:IsDescendantOf(target or game)
- end
- local function GetPlayersToKill()
- local PlayersToKill = {}
- for i,v in Players:GetPlayers() do
- if not table.find(KillAll.whitelist,v.Name) then
- table.insert(PlayersToKill, v)
- end
- end
- return PlayersToKill
- end
- table.insert(KillAll.whitelist,lp.Name)
- while Run do
- for _,player in pairs(GetPlayersToKill()) do
- local char = getchar(player)
- local tool, char = gettool()
- if tool then
- local DamageRemote = GetDamageRemoteFromTool(tool)
- if DamageRemote then
- if IsValidMember(char) and not char:FindFirstChildWhichIsA("ForceField") then
- local lpchar = getchar()
- local InvalidMember = false
- repeat
- if Run and IsValidMember(lpchar) and IsValidMember(DamageRemote,lpchar) then
- local args = {
- [1] = false
- }
- game:GetService("ReplicatedStorage").Events.Spin:InvokeServer(unpack(args))
- task.wait()
- else
- InvalidMember = true
- break
- end
- until not IsValidMember(char) or not IsValidMember(player)
- if not InvalidMember then
- local Player = char.Name
- warn("Successfully killed:",Player)
- else
- warn("DamageRemote is no longer a valid member of LocalPlayer's Character")
- end
- end
- end
- else
- break
- end
- end
- task.wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement