Professional Documents
Culture Documents
Work at A Pizza Place FIXED SIREL KILLERS AUTO FARM
Work at A Pizza Place FIXED SIREL KILLERS AUTO FARM
Work at A Pizza Place FIXED SIREL KILLERS AUTO FARM
-- working as of 18/01/2023
getupvalues = getupvalues or debug.getupvalues
setupvalue = setupvalue or debug.setupvalue
if not (getrawmetatable and getupvalues and setupvalue and (getreg or
debug.getregistry)) then
local h = Instance.new("Hint",workspace)
h.Text = "Incompatible exploit."
wait(3)
h:Destroy()
return
end
local settings = {refill_at=0, refill_end=60, deliver_at=24, stay_in_kitchen=true}
local doCashier,doBoxer,doCook,doSupplier,doDelivery = true,true,true,false,true
if readfile then
pcall(function()
local new =
game:GetService("HttpService"):JSONDecode(readfile("PizzaFarm.txt"))
--corruption?
local doOverwrite=false
for k,v in pairs(new) do
if settings[k]==nil then
doOverwrite=true
new[k]=nil
end
end
for k,v in pairs(settings) do
if new[k]==nil then
doOverwrite=true
new[k]=v
end
end
--use input
if doOverwrite then
warn("Settings overwritten")
writefile("PizzaFarm.txt",game:GetService("HttpService"):JSONEncode(new))
end
settings = new
end)
end
if getconnections then
for _,c in next,getconnections(game:GetService("ScriptContext").Error) do
c:Disable()
end
end
writefile("PizzaFarm.txt",game:GetService("HttpService"):JSONEncode(settings))
messageLbl.Visible=true
wait(2)
messageLbl.Visible=false
end
end)
local cameraArray = {CFrame.new(23,14,65,0.629,0.386,-0.674,-0,0.867,0.497,0.777,-
0.313,0.545),CFrame.new(39,15,83,-0.571,0.392,-0.720,-0,0.878,0.478,0.820,0.273,-
0.502),CFrame.new(40,20,-38,-0.801,-0.229,0.552,-0,0.923,0.384,-0.598,0.307,-
0.739),CFrame.new(51,15,-25,-0.707,0.338,-0.620,0,0.878,0.478,0.707,0.338,-
0.620),CFrame.new(47,12,21,0.026,0.323,-0.945,-0,0.946,0.323,0.999,-0.008,0.024)}
local cameraIndex = 0
centerCamBtn.MouseButton1Click:Connect(function()
cameraIndex = 0
workspace.CurrentCamera.CameraType = "Custom"
end)
leftCamBtn.MouseButton1Click:Connect(function()
cameraIndex = cameraIndex - 1
if cameraIndex < 0 then
cameraIndex = #cameraArray
end
if cameraIndex == 0 then
workspace.CurrentCamera.CameraType="Custom"
else
local cf = cameraArray[cameraIndex]
workspace.CurrentCamera.CameraType="Scriptable"
workspace.CurrentCamera:Interpolate(cf,cf+cf.lookVector*10,0.5)
end
end)
rightCamBtn.MouseButton1Click:Connect(function()
cameraIndex = cameraIndex + 1
if cameraIndex > #cameraArray then
cameraIndex = 0
workspace.CurrentCamera.CameraType="Custom"
else
local cf = cameraArray[cameraIndex]
workspace.CurrentCamera.CameraType="Scriptable"
workspace.CurrentCamera:Interpolate(cf,cf+cf.lookVector*10,0.5)
end
end)
--//subroutines
--local supplyCounts =
{TomatoSauce=99,Cheese=99,Sausage=99,Pepperoni=99,Dough=99,Box=99,Dew=99}
--for name in pairs(supplyCounts) do
--local lbl = workspace.SupplyCounters[name=="Dew" and "CounterMountainDew"
or "Counter"..name].a.SG.Counter
--supplyCounts[name]=tonumber(lbl.Text)
--lbl.Changed:Connect(function()
--supplyCounts[name]=tonumber(lbl.Text)
--end)
--end
local boxPtick=0
local boxDtick=0
local function FindBoxes()
local c,o,f
local children = workspace.AllBox:GetChildren()
for i=1,#children do
local b = children[i]
if ffc(b,"HasPizzaInside") or ffc(b,"Pizza") then
if c==nil and b.Name=="BoxClosed" and b.Anchored==false and not
b.HasPizzaInside.Value then
c=b
elseif o==nil and b.Name=="BoxOpen" and b.Anchored==false and not
b.Pizza.Value then
o=b
elseif f==nil and (b.Name=="BoxOpen" and b.Pizza.Value) or
(b.Name=="BoxClosed" and b.HasPizzaInside.Value) then
f=b
end
if c and o and f then
return c,o,f
end
end
end
return c,o,f
end
local function FindBoxingFoods()
local p,d
local children = workspace.BoxingRoom:GetChildren()
for i=1,#children do
local f = children[i]
if not f.Anchored then
if p==nil and f.Name=="Pizza" then
p=f
elseif d==nil and f.Name=="Dew" then
d=f
end
if p and d then
return p,d
end
end
end
return p,d
end
local orderDict={["3540529228"]="Cheese",["3540530535"]="Sausage",
["3540529917"]="Pepperoni",["2512571151"]="Dew",["2512441325"]="Dew"}
local cookingDict = {Cheese=0,Sausage=0,Pepperoni=0,Dew=0}
local cookPtick=0
local cookDtick=0
local cookWarned=false
local boxerWarned=false
local function getOrders()
local orders={}
local tempCookingDict = {}
for i,v in pairs(cookingDict) do tempCookingDict[i]=v end
local children = workspace.Orders:GetChildren()
for i=1,#children do
local o = orderDict[children[i].SG.ImageLabel.Image:match("%d+$")]
if o then
if tempCookingDict[o]>0 then
--ignores oven pizzas, so new orders are priority
tempCookingDict[o]=tempCookingDict[o]-1
--elseif (o=="Dew" and #workspace.AllMountainDew:GetChildren()>0)
or (supplyCounts[o]>0 and supplyCounts.TomatoSauce>0 and supplyCounts.Cheese>0)
then
--need supplies
orders[#orders+1]=o
end
end
end
return orders
end
local function FindFirstDew()
local children = workspace.AllMountainDew:GetChildren()
for i=1,#children do
local d = children[i]
if (ffc(d,"IsBurned")==nil or d.IsBurned.Value==false) and not
d.Anchored then
return d
end
end
end
local function FindBadDew()
local children = workspace.AllMountainDew:GetChildren()
for i=1,#children do
local d = children[i]
if (ffc(d,"IsBurned")==nil or d.IsBurned.Value==false) and d.Position.X
> 53 and d.Position.Z > 50 and not d.Anchored then
return d
end
end
end
local function FindDoughAndWithout(str)
local goodraw,p,raw,trash
local children = workspace.AllDough:GetChildren()
for i = #children, 2, -1 do --shuffle
local j = RNG:NextInteger(1, i)
children[j], children[i] = children[i], children[j]
end
for i=1,#children do
local d = children[i]
if d.Anchored==false and #d:GetChildren()>9 then
if d.IsBurned.Value or d.HasBugs.Value or d.Cold.Value or
(d.BrickColor.Name=="Bright orange" and ffc(d,"XBillboard")) then
if trash==nil and d.Position.Y > 0 and
((d.Position*Vector3.new(1,0,1))-Vector3.new(47.90, 0, 72.49)).Magnitude > 1 then
trash=d
end
elseif p==nil and d.BrickColor.Name=="Bright orange" then
p=d
elseif goodraw==nil and d.Position.X<55 and
d.BrickColor.Name=="Brick yellow" and ((str and not ffc(d.SG.Frame,str)) or
(str==nil and ffc(d.SG.Frame,"Sausage")==nil and ffc(d.SG.Frame,"Pepperoni")==nil))
then
--prefers flat
if d.Mesh.Scale.Y<1.1 then
goodraw=d
else
raw=d
end
end
if goodraw and p and trash then
return goodraw,p,trash
end
end
end
return goodraw or raw,p,trash
end
local function getOvenNear(pos)
local children = workspace.Ovens:GetChildren()
for i=1,#children do
if ffc(children[i],"Bottom") and (children[i].Bottom.Position-
pos).magnitude < 1.5 then
return children[i]
end
end
end
local function getDoughNear(pos)
local children = workspace.AllDough:GetChildren()
for i=1,#children do
if (children[i].Position-pos).magnitude < 1.5 then
return children[i]
end
end
end
local function isFullyOpen(oven)
return oven.IsOpen.Value==true and (oven.Door.Meter.RotVelocity.Z^2)^.5<.0001
end
network:FireServer("AddIngredientToPizza", raw,"TomatoSauce")
network:FireServer("AddIngredientToPizza", raw,"Cheese")
network:FireServer("AddIngredientToPizza", raw,topping)
network:FireServer("UpdateProperty", raw,
"CFrame", oven.Bottom.CFrame+Vector3.new(0,0.7,0))
oven.Door.ClickDetector.Detector:FireServer()
--mark as cooking
cookingDict[order]=cookingDict[order]+1
local revoked=false
spawn(function()
raw.AncestryChanged:Wait()
if not revoked then
cookingDict[order]=cookingDict[order]-1
revoked=true
end
end)
delay(40, function()
if not revoked then
cookingDict[order]=cookingDict[order]-1
revoked=true
end
end)
end
end
end
end
--open unnecessarily closed ovens
for _,o in ipairs(ovens) do
local bar = o.Door.Meter.SurfaceGui.ProgressBar.Bar
if o.IsOpen.Value==false and (o.IsCooking.Value==false or
(Vector3.new(bar.ImageColor3.r,bar.ImageColor3.g,bar.ImageColor3.b)-
Vector3.new(.871,.518,.224)).magnitude>.1) then
didsomething=true
if (root.Position-Vector3.new(36.64, 3.80,
54.11)).magnitude>9 then smoothTP(CFrame.new(36.64, 3.80, 54.11)) wait(.1) end
o.Door.ClickDetector.Detector:FireServer()
break
end
end
--trash
if badD then
didsomething=true
if (root.Position-Vector3.new(36.64, 3.80,
54.11)).magnitude>9 then smoothTP(CFrame.new(36.64, 3.80, 54.11)) wait(.1) end
network:FireServer("UpdateProperty", badD, "CFrame",
CFrame.new(RNG:NextNumber(28,30), 1.7, RNG:NextNumber(55,57)))
end
if trash and (trash.IsBurned.Value==false or
getOvenNear(trash.Position)==nil or getOvenNear(trash.Position).IsOpen.Value) then
--closed oven breaks if you take burnt out of it
didsomething=true
if (root.Position-Vector3.new(36.64, 3.80,
54.11)).magnitude>9 then smoothTP(CFrame.new(36.64, 3.80, 54.11)) wait(.1) end
network:FireServer("UpdateProperty", trash, "CFrame",
CFrame.new(47.90, 7.00, 72.49, 1, 0, -0, 0, 0, 1, 0, -1, 0))
end
if didsomething then wait(0.5) else break end
else
break
end
end
end
wait(1)
--//main loop
while gui.Parent do
wait(0.9)
humanoid.Sit=false
if RNG:NextInteger(1,20)==1 then
game:GetService("VirtualInputManager"):SendKeyEvent(true,"Z",false,game)
wait()
game:GetService("VirtualInputManager"):SendKeyEvent(false,"Z",false,game)
end
for zz=1,3 do
local c,order = FindFirstCustomer()
if doCashier and c and order then
local reg = 3
if c.Head.Position.X < 50 then
reg = 2
elseif c.Head.Position.X < 70 then
reg = 1
end
if (root.Position-Vector3.new(50.30, 3.80, 83.24)).magnitude>9
then smoothTP(CFrame.new(50.30, 3.80, 83.24)) wait(.1) end
network:FireServer("OrderComplete", c, order,
workspace["Register"..reg])
wait(0.3)
else
break
end
end
tryCook()
for zz=1,7 do
if doBoxer then
local didsomething = false
local boxP,boxD = FindBoxingFoods()
local closedBox,openBox,fullBox = FindBoxes()
if boxD and tick()-boxDtick>0.8 then
boxDtick=tick()
didsomething=true
if (root.Position-Vector3.new(58.74, 3.80,
12.400)).magnitude>9 then smoothTP(CFrame.new(58.74, 3.80, 12.40))wait(.1)
continue end
network:FireServer("UpdateProperty", boxD, "CFrame",
CFrame.new(63,4.9,-1,-1,0,0,0,1,0,0,0,-1))
end
if fullBox then
if fullBox.Name=="BoxOpen" then
didsomething=true
if (root.Position-Vector3.new(58.74, 3.80,
12.400)).magnitude>9 then smoothTP(CFrame.new(58.74, 3.80, 12.40))wait(.1)
continue end
network:FireServer("CloseBox", fullBox)
--will be moved next loop
elseif tick()-boxPtick>0.8 then
didsomething=true
if (root.Position-Vector3.new(58.74, 3.80,
12.400)).magnitude>9 then smoothTP(CFrame.new(58.74, 3.80, 12.40))wait(.1)
continue end
network:FireServer("UpdateProperty", fullBox,
"CFrame", CFrame.new(68.2,4.4,RNG:NextNumber(-3,-2),-1,0,0,0,1,0,0,0,-1))
boxPtick=tick()
end
end
if closedBox and not openBox then
didsomething=true
if (root.Position-Vector3.new(58.74, 3.80,
12.400)).magnitude>9 then smoothTP(CFrame.new(58.74, 3.80, 12.40))wait(.1)
continue end
network:FireServer("UpdateProperty", closedBox, "CFrame",
CFrame.new(RNG:NextNumber(62.5,70.5),3.5,RNG:NextNumber(11,25)))
wait()
network:FireServer("OpenBox", closedBox)
end
if openBox and boxP then
didsomething=true
if (root.Position-Vector3.new(58.74, 3.80,
12.400)).magnitude>9 then smoothTP(CFrame.new(58.74, 3.80, 12.40))wait(.1)
continue end
network:FireServer("UpdateProperty", boxP, "Anchored",
true)
network:FireServer("UpdateProperty", openBox, "Anchored",
true)
wait()
network:FireServer("UpdateProperty", boxP, "CFrame",
openBox.CFrame+Vector3.new(0,-2,0))
wait()
network:FireServer("AssignPizzaToBox", openBox, boxP)
end
if didsomething then wait(0.5) else break end
else
break
end
end
if doDelivery then
local wstools = FindAllDeliveryTools(workspace)
if #wstools > 1 or (wstools[1] and ffc(wstools[1].Handle,"X10")) then
--get tools
if (root.Position-Vector3.new(54.45, 4.02, -15)).magnitude>9 then
smoothTP(CFrame.new(54.45, 4.02, -15)) wait(.1) end
for i=1,#wstools do
if wstools[i].Parent == workspace then
humanoid:EquipTool(wstools[i])
wait()
end
end
wait(0.3)
local t = FindAllDeliveryTools(character)
for i=1,#t do
t[i].Parent = player.Backpack
end
wait(0.1)
if ffc(character,"RightHand") and ffc(character.RightHand,"RightGrip")
then
character.RightHand.RightGrip:Destroy()
end
end
local bptools = FindAllDeliveryTools(player.Backpack)
if #bptools >= settings.deliver_at and #bptools > 0 and tick()-delTick
> 30 then
--deliver to houses
table.sort(bptools,function(a,b)
a,b=tostring(a),tostring(b)
if (a:sub(1,1)=="B" and b:sub(1,1)=="B") then
return a < b
end
return a > b
end)
local fatass=false
for i=1,#bptools do
if not doDelivery then
break
end
humanoid.Sit=false
local tool = bptools[i]
local giver = getHousePart(tool.Name)
local ogp = giver.Position
if giver then
if (giver.Position-root.Position).Magnitude > 9 then
smoothTP(giver.CFrame+Vector3.new(0,7,0))
if giver.Parent==nil or (giver.Position-
ogp).Magnitude>1 then
giver = getHousePart(tool.Name) or giver
smoothTP(giver.CFrame+Vector3.new(0,7,0))
end
pcall(function() tool.Parent = character end)
wait(1.2)
local t = FindAllDeliveryTools(character)
for i=1,#t do
if t[i] ~= tool then
t[i].Parent = player.Backpack
end
end
wait(2)
fatass=false
else
if fatass then
wait(0.2)
else
wait(0.7)
end
pcall(function() tool.Parent = character end)
wait()
fatass=true
end
end
end
delTick = tick()
end
end
tryCook()
if doSupplier then
local refill=false
for s,c in pairs(supplyCounts) do
if c <= settings.refill_at then
refill=true
break
end
end
if refill then
local oldcf = root.CFrame
local waiting = false
local waitingTick = 0
local lastBox
while doSupplier do
--check if refill is done otherwise hit buttons
local fulfilled=true
local boxes = workspace.AllSupplyBoxes:GetChildren()
for yy=1,2 do
local needtp=true
local realc = 0
for _,btn in ipairs(supplyButtons) do
local s = bcolorToSupply[btn.BrickColor.Name]
if supplyCounts[s] < settings.refill_end then
local count = 0
if #boxes > 30 then
for i=1,#boxes do
local box = boxes[i]
if
bcolorToSupply[box.BrickColor.Name]==s and box.Anchored==false and box.Position.Z <
-940 then
count=count+1
end
end
end
if count < 2 then
if needtp then
needtp=false
smoothTP(btn.CFrame +
Vector3.new(0,3,2.5))
wait(0.1)
end
if not doSupplier then break end
root.CFrame = btn.CFrame +
Vector3.new(0,3,0)
wait(0.1)
realc=realc+1
end
fulfilled=false
end
end
wait(0.2)
if yy == 1 and realc < 3 then
wait(0.6)
end
end
if fulfilled or not (doSupplier) then
break
end
smoothTP(CFrame.new(8,12.4,-1020))
if not doSupplier then break end
--check if can finish waiting for boxes to move
if waiting and (lastBox.Position.X>42 or tick()-
waitingTick>6) then
waiting=false
if lastBox.Position.X<42 then
--clear boxes if stuck
smoothTP(CFrame.new(20.5,8,-35))
wait(0.1)
local boxes =
workspace.AllSupplyBoxes:GetChildren()
for i=1,#boxes do
local box = boxes[i]
if box.Anchored==false and
box.Position.Z>-55 then