Advertisement
ExecutorForALLdomain

PRISON LIFE ROBLOX KILL SCRIPT

Oct 18th, 2024
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local char = plr.Character
  3. local root = char.HumanoidRootPart
  4. local Players = game:GetService'Players'
  5.  
  6. local STOP = false
  7.  
  8. local connection
  9.  
  10. local killplayerEvent = game:GetService'ReplicatedStorage':FindFirstChild'meleeEvent'
  11. local player = "d" -- player name not need to type full name
  12. GlobalPlayersTable = {}
  13.  
  14. for i,proplayer in pairs(Players:GetPlayers()) do
  15.     table.insert(GlobalPlayersTable, proplayer)
  16. end
  17.  
  18.  
  19.  
  20. local function Kill(FOUND)
  21.     for i,Table in ipairs(GlobalPlayersTable) do
  22.         if string.find(Table.Name, FOUND) then
  23.            
  24.             coroutine.wrap(function()
  25.                 while task.wait() do
  26.                     if STOP then
  27.                         break
  28.                     end
  29.                     local Humanoid = Table.Character.Humanoid
  30.  
  31.                     connection = Humanoid.Died:Connect(function()
  32.                         STOP = true
  33.                         connection = nil
  34.                     end)
  35.  
  36.                     root.CFrame = Table.Character.HumanoidRootPart.CFrame
  37.                     killplayerEvent:FireServer(Table)
  38.                 end
  39.             end)()
  40.         end
  41.     end
  42. end
  43. Kill(player)
  44.  
  45.  
  46.  
  47. --[[coroutine.wrap(function()
  48.         while task.wait() do
  49.             if STOP then
  50.                 break
  51.             end
  52.             local Humanoid = v.Character.Humanoid
  53.  
  54.             connection = Humanoid.Died:Connect(function()
  55.                 STOP = true
  56.                 connection = nil
  57.             end)
  58.  
  59.             root.CFrame = v.Character.HumanoidRootPart.CFrame
  60.             killplayerEvent:FireServer(v)
  61.         end
  62.     end)()
  63. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement