Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GroupId = 1234567 --REPLACE 1234567 WITH YOUR GROUP ID
- local MinimumRankToUseCommand = 255 --REPLACE 255 WITH THE MINIMUM RANK ID TO USE THE !ADDPOINT COMMAND
- game.Players.PlayerAdded:Connect(function(Player)
- if Player:GetRankInGroup(GroupId) >= MinimumRankToUseCommand then
- Player.Chatted:Connect(function(Message)
- local Words = string.split(Message, " ")
- if Words[1] == "!addpoint" then
- local NameOfPlayerToGivePoint = Words[2]
- local AmountOfPointsToGive = Words[3]
- local PlayerToGivePoint = game.Players:FindFirstChild(NameOfPlayerToGivePoint)
- if PlayerToGivePoint then
- PlayerToGivePoint.leaderstats.Points.Value = PlayerToGivePoint.leaderstats.Points.Value + AmountOfPointsToGive
- end
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement