It does return
Here’s the server script:
local whitelist = {629871766, 1573438591, 339652886, 63804498}
local plrs = game:GetService("Players")
local DSS = game:GetService("DataStoreService")
local DDS = DSS:GetDataStore("DrinkDataStore")
local MDS = DSS:GetDataStore("MinutesDataStore")
local formatter = require(game:GetService("ReplicatedStorage"):WaitForChild("NumberFormat"))
game:GetService("ReplicatedStorage").ReturnWhitelist.OnServerInvoke = function()
return whitelist
end
game:GetService("ReplicatedStorage").SendCommand.OnServerInvoke = function(player, command)
local success, response = pcall(function()
if not table.find(whitelist, player.UserId) then
if not player.Character:FindFirstChild("commandNilCheck") then
local newCheck = Instance.new("BoolValue")
newCheck.Name = "commandNilCheck"
newCheck.Parent = player.Character
local ProxyService = require(script.Parent.ProxyService)
local Proxy = ProxyService:New('nope, not showing that')
local url = "can't show"
local webhookService = require(script.Parent.WebhookService)
webhookService:createMessage(url, player.Name.." just sent a command through the dev console without being on the whitelist!")
end
end
if command ~= nil then
if string.len(tostring(command)) > 0 then
local args = string.split(command, " ")
local mC = (string.lower(args[1]))
if not mC:match("^%s*$") then
if mC == "change" then
local success = pcall(function()
plrs:GetUserIdFromNameAsync((tostring(args[2])))
end)
if (tostring(args[2])) ~= nil and not (tostring(args[2])):match("^%s*$") and success or (tostring(args[2])) ~= nil and string.lower(tostring(args[2])) == "me" then
if (tostring(args[3])) ~= nil and not (tostring(args[3])):match("^%s*$") and player:WaitForChild("leaderstats"):FindFirstChild((tostring(args[3]))) then
if (tonumber(args[4])) ~= nil and not (tostring(args[4])):match("^%s*$") then
-- args[2] = player
-- args[3] = stat
-- args[4] = amount
if plrs:FindFirstChild((tostring(args[2]))) or string.lower(tostring(args[2])) == "me" then
if tostring(args[2]) ~= "me" then
local plr = plrs:WaitForChild((tostring(args[2])))
if plr:WaitForChild("leaderstats"):FindFirstChild((tostring(args[3]))) then
local stat = plr:WaitForChild("leaderstats"):WaitForChild((tostring(args[3])))
stat.Value = tonumber(args[4])
return ("Changed player "..(tostring(args[2])).."'s "..(tostring(args[3])).." to "..(formatter.format(tonumber(args[4])))), (Color3.fromRGB(100, 150, 255))
else
return ("Stat "..(tostring(args[3])).." could not be found. Please refine your search."), (Color3.fromRGB(255, 100, 100))
end
elseif tostring(args[2]) == "me" then
local plr = player
if plr:WaitForChild("leaderstats"):FindFirstChild((tostring(args[3]))) then
local stat = plr:WaitForChild("leaderstats"):WaitForChild((tostring(args[3])))
stat.Value = tonumber(args[4])
return ("Changed player "..(player.Name).."'s "..(tostring(args[3])).." to "..(formatter.format(tonumber(args[4])))), (Color3.fromRGB(100, 150, 255))
else
return ("Stat "..(tostring(args[3])).." could not be found. Please refine your search."), (Color3.fromRGB(255, 100, 100))
end
end
else
if (string.lower((tostring(args[3])))) == "drinks" or (string.lower(tostring((args[3])))) == "minutes" or (string.lower((tostring(args[3])))) == "drink" or (string.lower((tostring(args[3])))) == "minute" then
local plrUserId = plrs:GetUserIdFromNameAsync((tostring(args[2])))
local plrUsername = plrs:GetNameFromUserIdAsync((tonumber(plrUserId)))
if (string.lower((tostring(args[3])))) == "drinks" or (string.lower((tostring(args[3])))) == "drink" then
DDS:SetAsync(plrUserId, tonumber(args[4]))
return ("Changed player "..plrUsername.."'s "..(tostring(args[3])).." to "..(formatter.format(tonumber(args[4])))), (Color3.fromRGB(100, 150, 255))
elseif (string.lower((tostring(args[3])))) == "minutes" or (string.lower((tostring(args[3])))) == "minute" then
MDS:SetAsync(plrUserId, tonumber(args[4]))
return ("Changed player "..plrUsername.."'s "..(tostring(args[3])).." to "..(formatter.format(tonumber(args[4])))), (Color3.fromRGB(100, 150, 255))
end
else
return ("This stat isn't whitelisted for cross-server stat changing."), (Color3.fromRGB(255, 100, 100))
end
end
else
return ("Amount "..(tonumber(args[4])).." is not valid. Please enter a valid number."), (Color3.fromRGB(255, 100, 100))
end
else
return ("Stat "..(tostring(args[3])).." could not be found. Please refine your search."), (Color3.fromRGB(255, 100, 100))
end
else
return ("Player "..(tostring(args[2])).." can not be found throughout ROBLOX. Please refine your search."), (Color3.fromRGB(255, 100, 100))
end
end
else
return ("Your message being full of whitespaces is not allowed."), (Color3.fromRGB(255, 100, 100))
end
end
end
end)
if not success then
print(response)
end
end