As you can see from the title above.
local Players = game:GetService("Players")
local GroupId = 8402934
local MinimumRankToUseCommand = 100
Players.PlayerAdded:Connect(function(Player)
if Player:GetRankInGroup(GroupId) >= MinimumRankToUseCommand then
Player.Chatted:Connect(function(Message)
local Words = string.split(Message, " ")
local Command = Words[1]:lower()
if Command == "!addpoint" then
local NameOfPlayerToGivePoint = Words[2]
local AmountOfPointsToGive = Words[3]
local PlayerToGivePoint = Players:FindFirstChild(NameOfPlayerToGivePoint)
if PlayerToGivePoint then
PlayerToGivePoint.leaderstats.Points.Value += AmountOfPointsToGive
end
elseif Command == "!removepoint" then
local NameOfPlayerToGivePoint = Words[2]
local AmountOfPointsToGive = Words[3]
local PlayerToGivePoint = Players:FindFirstChild(NameOfPlayerToGivePoint)
if PlayerToGivePoint then
PlayerToGivePoint.leaderstats.Points.Value -= AmountOfPointsToGive
end
end
end)
end
end)
Rather than I do the players full username. Is it possible to script this