Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I need a script that gives player points every 5 kills?

-- Its for my group and i do have player points available to give away

2 answers

Scripting Helpers is NOT a request site. Please take the time to read the blog post made as a guide for you to know how to post questions properly as this question is not constructive.

Well, I have one:

PointsService = game:GetService("PointsService")
Stat = "KOs" 
Needed = 1 --This is how much KOs is needed
game.Players.PlayerAdded:connect(function(p)
        repeat wait() until p:FindFirstChild("leaderstats") ~= nil
        print("Found \"leaderstats\" object!")
        repeat wait() until p.leaderstats:findFirstChild(Stat) ~= nil
        print("Found "..Stat.." object!")
        p.leaderstats[Stat].Changed:connect(function(prop)
                print("Value changed!")
                if prop >= Needed then
                        game:GetService("PointsService"):AwardPoints(p.userId,1) -- 1 can be changed to whatever amount of PPs
                end
        end)
end)

But you would need a linked leaderboard too

This discussion is preserved as it was. New answers, comments, and votes are closed.