Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local clone = game.ReplicatedStorage:WaitForChild("Clone")
- local NPC = script.Parent
- local Humanoid = script.Parent.Humanoid
- function Dead()
- local tag = Humanoid:FindFirstChild("creator")
- if tag ~= nil then
- local leaderstats = tag.Value:FindFirstChild("leaderstats")
- if leaderstats ~= nil then
- leaderstats.Parent.Exp.Value = leaderstats.Parent.Exp.Value + 10
- leaderstats.Money.Value = leaderstats.Money.Value + 100
- leaderstats.KillStreak.Value = leaderstats.KillStreak.Value + 1
- wait (0.1)
- local position = NPC.HumanoidRootPart.Position
- NPC:Destroy()
- wait(5)
- -- create a clone of the npc
- clone:Clone().Parent = game.Workspace
- clone.HumanoidRootPart.Position = position
- script:Remove()
- end
- end
- end
- Humanoid.Died:Connect(Dead)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement