The idea of this script is to give me currency and experience points when I kill another player. However it isn't working.
local cv = c.Humanoid:findFirstChild("creator")
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c.Humanoid.Died:connect (function()
if cv then local k = cv.Value if k and k ~= p then
k.leaderstats.Experience.Value = k.leaderstats.Experience.Value + 100
k.leaderstats.Currency.Value = k.leaderstats.Currency.Value + 50
end)
end)
end)

2 comments
This script is really messed up.
Agreed, try organizing your script - don't use functions in functions.