Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- James's Save Tools On Respawn
- After executing the script, please wait until you are able to move your character again.
- this is so simple but some people wanted it
- ]]
- -- Don't edit script unless you know what you're doing. If you wanna add this into a script, please give credits and message me on discord that you added it in a script at James H.#0953
- local LocalPlayer = game:GetService("Players").LocalPlayer
- local function saveTools()
- LocalPlayer.Character:WaitForChild("Humanoid").Died:Connect(function()
- LocalPlayer.Character:FindFirstChild("Humanoid"):UnequipTools()
- for _, tool in pairs(LocalPlayer.Backpack:GetChildren()) do
- if tool:IsA("Tool") then
- tool.Parent = LocalPlayer
- end
- end
- end)
- end
- LocalPlayer.CharacterAdded:Connect(function(char)
- for _, tool in pairs(LocalPlayer:GetChildren()) do
- if tool:IsA("Tool") then
- tool.Parent = LocalPlayer.Backpack
- end
- end
- saveTools()
- end)
- saveTools()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement