Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

_G.

AutoFarm = true

local Environment = game:GetService("Workspace").Environment


local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local Locations = Environment.Locations


local HairAssets = ReplicatedStorage.GameObjects.HairAssets
local Styles, Colors = HairAssets.Styles, HairAssets.Colors
local LocalPlayer = Players.LocalPlayer

local function GetTStyles()


local Total = {}
for _, Hair in next, Styles:GetChildren() do
local Mesh = Hair:FindFirstChild("Mesh", true)
if Mesh then
Total[Hair.name] = Mesh.MeshId
end
end
return Total
end

local function GetTColors()


local Total = {}
for _, Color in next, Colors:GetChildren() do
Total[Color.Name] = Color.Value
end
return Total
end

local function GetWorkstation()


local HairDresser = Locations:FindFirstChild("StylezHairStudio")
if HairDresser then
local Workstations = HairDresser.HairdresserWorkstations
for _, Workstation in next, Workstations:GetChildren() do
if Workstation.InUse.Value == LocalPlayer then
return Workstation
end
end
end
end

repeat
wait(2.5)
warn("Awaiting Workstation [ Finish 1 job at Hairdresser ]")
until GetWorkstation()

local HairList, ColorList = GetTStyles(), GetTColors();


local Workstation = GetWorkstation()

local function FireNext(Type)


if Type == "Finish" then
return firesignal(Workstation.Mirror.HairdresserGUI.Frame.Done.Activated)
end
return
firesignal(Workstation.Mirror.HairdresserGUI.Frame:FindFirstChild(Type).Next.Activa
ted)
end

local function DoesHairMatch(HairName)


local Current = Workstation.Occupied.Value.PrimaryHat
return Current.Handle.Mesh.MeshId == HairList[HairName]
end

local function DoesColorMatch(ColorName)


local Current = Workstation.Occupied.Value.PrimaryHat
return Current.Handle.BrickColor == ColorList[ColorName]
end

while _G.AutoFarm do
pcall(function()
if _G.AutoFarm then
for i = 1, 15 do
if not DoesColorMatch(Workstation.Occupied.Value.Order.Color.Value) then
FireNext("Color")
end
if not DoesHairMatch(Workstation.Occupied.Value.Order.Style.Value) then
FireNext("Style")
end
end
FireNext("Finish")
end
end)
wait()
end

You might also like