Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local root = char.HumanoidRootPart
- local Players = game:GetService'Players'
- local STOP = false
- local connection
- local killplayerEvent = game:GetService'ReplicatedStorage':FindFirstChild'meleeEvent'
- local player = "d" -- player name not need to type full name
- GlobalPlayersTable = {}
- for i,proplayer in pairs(Players:GetPlayers()) do
- table.insert(GlobalPlayersTable, proplayer)
- end
- local function Kill(FOUND)
- for i,Table in ipairs(GlobalPlayersTable) do
- if string.find(Table.Name, FOUND) then
- coroutine.wrap(function()
- while task.wait() do
- if STOP then
- break
- end
- local Humanoid = Table.Character.Humanoid
- connection = Humanoid.Died:Connect(function()
- STOP = true
- connection = nil
- end)
- root.CFrame = Table.Character.HumanoidRootPart.CFrame
- killplayerEvent:FireServer(Table)
- end
- end)()
- end
- end
- end
- Kill(player)
- --[[coroutine.wrap(function()
- while task.wait() do
- if STOP then
- break
- end
- local Humanoid = v.Character.Humanoid
- connection = Humanoid.Died:Connect(function()
- STOP = true
- connection = nil
- end)
- root.CFrame = v.Character.HumanoidRootPart.CFrame
- killplayerEvent:FireServer(v)
- end
- end)()
- ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement