Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ioc = true
- if game.Workspace:FindFirstChild(owner.Name) then
- game.workspace:FindFirstChild(owner.Name):FindFirstChild("Humanoid").Died:Connect(function()
- local Pos = owner.Character:WaitForChild('HumanoidRootPart').CFrame
- ioc = false
- owner:LoadCharacter()
- ioc = true
- owner.Character:WaitForChild('HumanoidRootPart').CFrame = Pos
- end)
- end
- owner.CharacterRemoving:Connect(function()
- wait(0.1)
- if ioc == true then
- ioc = false
- local Pos = owner.Character:WaitForChild('HumanoidRootPart').CFrame
- owner:LoadCharacter()
- owner.Character:WaitForChild('HumanoidRootPart').CFrame = Pos
- wait(0.1)
- ioc = true
- end
- end)
- owner.CharacterAdded:connect(function(char)
- wait(0.1)
- game.workspace:FindFirstChild(owner.Name):FindFirstChild("Humanoid").Died:Connect(function()
- local Pos = owner.Character:WaitForChild('HumanoidRootPart').CFrame
- owner:LoadCharacter()
- owner.Character:WaitForChild('HumanoidRootPart').CFrame = Pos
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment