Been trying to put together a piece of code to do this as it sounds simple but I cant wrap my head around it.. any help?
local Humanoid = script.Parent.Humanoid
function PwntX_X()
local tag = Humanoid:findFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Leaderstats = tag.Value:findFirstChild("leaderstats")
if Leaderstats ~= nil then
Leaderstats.Currency.Value = Leaderstats.Currency.Value + 0 --Change Currency to Your Money
wait(0.1)
script:remove()
end
end
end
end
Humanoid.Died:connect(PwntX_X)
local Humanoid = script.Parent.Humanoid
function PwntX_X()
local tag = Humanoid:findFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Leaderstats = tag.Value:findFirstChild("leaderstats")
if Leaderstats ~= nil then
Leaderstats.XP.Value = Leaderstats.XP.Value + 0 --Change XP To your Experience Name
wait(0.1)
script:remove()
end
end
end
end
Humanoid.Died:connect(PwntX_X)

3 comments
ahhh, so many deprecated stuff and lack of indents.......
Doing 400 = 400 + 0............ So efficient...
^Do not bash on this persons question and or code. He is obviously a beginner, yes, but that does not mean you have to correct him in the tone in which you are using.