Created by Levi#7059
Features:
- FEED ALL EMPLOYEES
--local allEmployees = {}
local hiredEmployees = {}
local hiredEmployeesIDs = {}
local a = game.Players.LocalPlayer.PlayerGui.UIPlayer.UIEmploye.EmployeFrame.Job:getDescendants()
for i=1,#a do
if a[i].Name == "MingZi" and a[i].Parent.Name == "Icon" and a[i].Text ~= "" and a[i].Text ~= "HELLO KITTY" then
table.insert(hiredEmployees, a[i].Text)
end
end
local employeedata = require(game:GetService("ReplicatedStorage").GameCommon.Template.Employe)
local translate = require(game.ReplicatedFirst.LocalizationHandle)
local a = require(game:GetService("ReplicatedStorage").GameCommon.GameClient.ClientScene)
for i,v in pairs(employeedata) do
for x=1,#hiredEmployees do
if translate:GetText(v.name, v.id) == hiredEmployees[x] then
print(hiredEmployees[x] .. " is working for Player")
table.insert(hiredEmployeesIDs, v.id)
end
end
--print(translate:GetText(v.name, v.id))
--table.insert(allEmployees, translate:GetText(v.name, v.id))
end
local gc = require(game.ReplicatedStorage.GameCommon.GameClient);
local lcp = gc.node.localClientPlayer;
local ammountOfVanilla = lcp.playerItem:GetHavePartItemCount(200010100);
if ammountOfVanilla <= #hiredEmployeesIDs*25 then
local args = {
[1] = 1,
[2] = 200010100,
[3] = #hiredEmployeesIDs*25
}
game:GetService("ReplicatedStorage"):WaitForChild("GameCommon"):WaitForChild("Messages"):WaitForChild("BuyAndSellItem"):FireServer(unpack(args))
end
for i=1,#hiredEmployeesIDs do
for i=1,25 do
game:GetService("ReplicatedStorage").GameCommon.Messages.Employe.GiveItem:FireServer(hiredEmployeesIDs[i], 200010100)
end
end