uoryetwq

죽은자리 부활 스크립트

Feb 23rd, 2025
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local deathPosition = nil
  3.  
  4. local function onCharacterAdded(character)
  5. local rootPart = character:WaitForChild("HumanoidRootPart", 10)
  6. local humanoid = character:WaitForChild("Humanoid", 10)
  7.  
  8. if humanoid and rootPart then
  9. humanoid.Died:Connect(function()
  10. deathPosition = rootPart.Position
  11. player.CharacterAdded:Wait()
  12. local newCharacter = player.Character or player.CharacterAdded:Wait()
  13. local newRootPart = newCharacter:WaitForChild("HumanoidRootPart", 10)
  14.  
  15. if newRootPart and deathPosition then
  16. newRootPart.CFrame = CFrame.new(deathPosition)
  17. end
  18. end)
  19. end
  20. end
  21.  
  22. if player.Character then
  23. onCharacterAdded(player.Character)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment