Guest User

global death script

a guest
Sep 7th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. game:GetService('Players').PlayerAdded:connect(function(player)
  2.     player.CharacterAdded:Connect(function(character)
  3.         character:WaitForChild('Humanoid').Died:connect(function()
  4.             local Update = {}
  5.             if _G.gameplayers == nil then
  6.                 _G.gameplayers = {}
  7.             end
  8.             for i,v in pairs(_G.gameplayers) do
  9.                 if v ~= player.Name then
  10.                     table.insert(Update, 1,v)
  11.                 end
  12.             end
  13.             _G.gameplayers = Update
  14.         end)
  15.     end)
  16. end)
Advertisement
Add Comment
Please, Sign In to add comment