i am trying to make a script to give you free KOs, but cant get the script to save to the profile stats. can someone give me a script that will save it to the stats please?
this is what i have so far:
function handleKillCount(humanoid, player)
local killer = getKillerOfHumanoidIfStillInGame(humanoid)
if killer ~= nil then
local stats = killer:findFirstChild("leaderstats")
if stats ~= nil then
local kills = stats:findFirstChild("KO's")
local earn = stats:findFirstChild("Points")
if killer ~= player then
kills.Value = kills.Value + 99
earn.Value = earn.Value + 100
else
kills.Value = kills.Value - 99
earn.Value = earn.Value - 99
end
end
end
end
|