|
| 19 Jul 2014 03:51 AM |
local Settings = { Stat = "KOs" ,PP = 50 ,Needed = 1 ,PPService = game:GetService("PointsService")}
game.Players.PlayerAdded:connect(function(player) local leaderstat = player:findFirstChild('leaderstats') local playerstat = leaderstats:findFirstChild(Settings.Stat) if leaderstats ~= nil and playerstat ~= nil then playerstat.Changed:connect(function() if playerstat.Value >= Settings.Needed then if PPService:GetAwardablePoints() ~= 0 and PPService:GetAwardablePoints() >= Settings.PP then PPService:AwardPoints(player.userId, Settings.PP) end end end) end end) |
|
|
| Report Abuse |
|
|
| 19 Jul 2014 05:33 AM |
| That should work correctly, I see no bugs. |
|
|
| Report Abuse |
|