Advertisement
Alex7077

Fgcfgccfg

Dec 17th, 2024
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.91 KB | None | 0 0
  1. --[[
  2. WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
  3. ]]
  4. getupvalues = getupvalues or debug.getupvalues
  5. setupvalue = setupvalue or debug.setupvalue
  6. if not (getrawmetatable and getupvalues and setupvalue and (getreg or debug.getregistry)) then
  7. local h = Instance.new("Hint",workspace)
  8. h.Text = "Incompatible exploit."
  9. wait(3)
  10. h:Destroy()
  11. return
  12. end
  13. local settings = {refill_at=50, refill_end=97, stay_in_kitchen=true}
  14. local doCashier,doBoxer,doCook,doSupplier,doDelivery = true,true,true,true,true
  15. if readfile then
  16. pcall(function()
  17. local new = game:GetService("HttpService"):JSONDecode(readfile("PizzaFarm.txt"))
  18. --corruption?
  19. local doOverwrite=false
  20. for k,v in pairs(new) do
  21. if settings[k]==nil then
  22. doOverwrite=true
  23. new[k]=nil
  24. end
  25. end
  26. for k,v in pairs(settings) do
  27. if new[k]==nil then
  28. doOverwrite=true
  29. new[k]=v
  30. end
  31. end
  32. --use input
  33. if doOverwrite then
  34. warn("Settings overwritten")
  35. writefile("PizzaFarm.txt",game:GetService("HttpService"):JSONEncode(new))
  36. end
  37. settings = new
  38. end)
  39. end
  40.  
  41. if getconnections then
  42. for _,c in next,getconnections(game:GetService("ScriptContext").Error) do
  43. c:Disable()
  44. end
  45. end
  46.  
  47. local player = game:GetService("Players").LocalPlayer
  48. local ffc = game.FindFirstChild
  49. local RNG = Random.new()
  50. local network
  51. local character,root
  52. do
  53. local reg = (getreg or debug.getregistry)()
  54. for i=1,#reg do
  55. local f = reg[i]
  56. if type(f)=="function" and tostring(getfenv(f).script)=="Paycheck" then
  57. for k,v in next,getupvalues(f) do
  58. if tostring(v) == "CashOut" then
  59. setupvalue(f,k,{MouseButton1Click={wait=function()end,Wait=function()end}})
  60. break
  61. end
  62. end
  63. elseif type(f)=="table" and rawget(f,"FireServer") and rawget(f,"BindEvents") then
  64. network = f
  65. end
  66. end
  67. local mt=getrawmetatable(game)
  68. if setreadonly then
  69. setreadonly(mt,false)
  70. elseif make_writeable then
  71. make_writeable(mt)
  72. end
  73. local old__newindex=mt.__newindex
  74. if newcclosure then
  75. mt.__newindex=newcclosure(function(t,k,v)
  76. if t~=workspace.CurrentCamera or tostring(getfenv(2).script)~="LocalMain" then
  77. return old__newindex(t,k,v)
  78. end
  79. end)
  80. else
  81. mt.__newindex=function(t,k,v)
  82. if t~=workspace.CurrentCamera or tostring(getfenv(2).script)~="LocalMain" then
  83. return old__newindex(t,k,v)
  84. end
  85. end
  86. end
  87. workspace.Main.RealignCamera.RealignCamera:Destroy()
  88. Instance.new("BindableEvent",workspace.Main.RealignCamera).Name="RealignCamera"
  89. end
  90. assert(network,"failed to find network")
  91. --//gui
  92. Create = function(class,parent,props)
  93. local new = Instance.new(class)
  94. for k,v in next,props do
  95. new[k]=v
  96. end
  97. new.Parent = parent
  98. return new
  99. end
  100. gui=Create("ScreenGui",game.CoreGui,{Name="Farm", ZIndexBehavior="Sibling"})
  101. main=Create("Frame",gui,{Name="main", Draggable=true, Active=true, Size=UDim2.new(0,350,0,100), Position=UDim2.new(.335,0,0.02,0), BackgroundColor3=Color3.new(0.098,0.098,0.098)})
  102. topbar=Create("Frame",main,{Name="topbar", Size=UDim2.new(1,0,0.15,0), BackgroundColor3=Color3.new(0.255,0.255,0.255)})
  103. closeBtn=Create("TextButton",topbar,{Name="closeBtn", TextWrapped=true, Size=UDim2.new(0.03,0,1,0), TextColor3=Color3.new(1,1,1), Text="X", BackgroundTransparency=1,
  104. Font="GothamSemibold", Position=UDim2.new(0.96,0,0,0), TextSize=14, TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  105. titleLbl=Create("TextLabel",topbar,{Name="titleLbl", TextWrapped=true, Size=UDim2.new(0.5,0,1,0), Text="Pizza Factory", TextSize=14, Font="GothamSemibold",
  106. BackgroundTransparency=1, Position=UDim2.new(0.25,0,0,0), TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
  107. saveBtn=Create("ImageButton",topbar,{Name="saveBtn", Image="rbxassetid://55687833", Size=UDim2.new(0.05,0,1,0), Position=UDim2.new(0.01,0,0,0), BackgroundTransparency=1, BackgroundColor3=Color3.new(), Visible=writefile~=nil})
  108. settings_1=Create("Frame",main,{Name="settings", BackgroundTransparency=1, Size=UDim2.new(0.97,0,0.75,0), Position=UDim2.new(0.025,0,0.2,0), BackgroundColor3=Color3.new(1,1,1)})
  109. Layout=Create("UIGridLayout",settings_1,{VerticalAlignment="Center", SortOrder="LayoutOrder", HorizontalAlignment="Center", CellPadding=UDim2.new(0.01,0,0.1,0), CellSize=UDim2.new(0.325,0,0.26,0)})
  110. cashier=Create("Frame",settings_1,{Name="cashier", LayoutOrder=4, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  111. Label=Create("TextLabel",cashier,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Cashier", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  112. BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  113. cashierBtn=Create("ImageButton",cashier,{Name="cashierBtn", ImageTransparency=1, BorderSizePixel=0, Size=UDim2.new(0.38,0,1,0), BackgroundColor3=Color3.new(0.392,0.392,0.392)})
  114. cashierSlider=Create("Frame",cashierBtn,{Name="slider", Size=UDim2.new(0.5,-4,1,-4), Position=UDim2.new(doCashier and 0.5 or 0,2,0,2), BorderSizePixel=0, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  115. kitchen=Create("Frame",settings_1,{Name="kitchen", LayoutOrder=9, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  116. Label_2=Create("TextLabel",kitchen,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="[redacted]:", TextSize=14, TextXAlignment="Right", Font="SourceSans",
  117. BackgroundTransparency=1, TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  118. kitchenBtn=Create("TextButton",kitchen,{Name="kitchenBtn", TextWrapped=true, Size=UDim2.new(0.25,0,1,0), TextColor3=Color3.new(), Text=settings.stay_in_kitchen and "X" or "", Font="GothamBold",
  119. Position=UDim2.new(0.62,0,0,0), TextSize=35, TextScaled=true, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  120. refillEnd=Create("Frame",settings_1,{Name="refillEnd", LayoutOrder=8, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  121. refillEndBox=Create("TextBox",refillEnd,{Name="refillEndBox", TextWrapped=true, Size=UDim2.new(0.25,0,1,0), Text=tostring(settings.refill_end), TextSize=50, TextColor3=Color3.new(),
  122. Font="Code", Position=UDim2.new(0.62,0,0,0), TextScaled=true, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  123. Label_3=Create("TextLabel",refillEnd,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Refill End:", TextSize=14, TextXAlignment="Right", Font="SourceSans",
  124. BackgroundTransparency=1, TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  125. refillAt=Create("Frame",settings_1,{Name="refillAt", LayoutOrder=7, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  126. Label_4=Create("TextLabel",refillAt,{TextWrapped=true, Size=UDim2.new(0.5,0,1,0), Text="Refill At:", TextSize=14, TextXAlignment="Right", Font="SourceSans",
  127. BackgroundTransparency=1, TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  128. refillAtBox=Create("TextBox",refillAt,{Name="refillAtBox", TextWrapped=true, Size=UDim2.new(0.25,0,1,0), Text=tostring(settings.refill_at), TextSize=50, TextColor3=Color3.new(),
  129. Font="Code", Position=UDim2.new(0.52,0,0,0), TextScaled=true, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  130. supplier=Create("Frame",settings_1,{Name="supplier", LayoutOrder=6, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  131. Label_5=Create("TextLabel",supplier,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Supplier", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  132. BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  133. supplierBtn=Create("ImageButton",supplier,{Name="supplierBtn", ImageTransparency=1, BorderSizePixel=0, Size=UDim2.new(0.38,0,1,0), BackgroundColor3=Color3.new(0.392,0.392,0.392)})
  134. supplierSlider=Create("Frame",supplierBtn,{Name="slider", Size=UDim2.new(0.5,-4,1,-4), Position=UDim2.new(doSupplier and 0.5 or 0,2,0,2), BorderSizePixel=0, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  135. delivery=Create("Frame",settings_1,{Name="delivery", LayoutOrder=5, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  136. Label_6=Create("TextLabel",delivery,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Delivery", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  137. BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  138. deliveryBtn=Create("ImageButton",delivery,{Name="deliveryBtn", ImageTransparency=1, BorderSizePixel=0, Size=UDim2.new(0.38,0,1,0), BackgroundColor3=Color3.new(0.392,0.392,0.392)})
  139. deliverySlider=Create("Frame",deliveryBtn,{Name="slider", Size=UDim2.new(0.5,-4,1,-4), Position=UDim2.new(doDelivery and 0.5 or 0,2,0,2), BorderSizePixel=0, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  140. boxer=Create("Frame",settings_1,{Name="boxer", LayoutOrder=2, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  141. boxerLbl=Create("TextLabel",boxer,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Boxer", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  142. BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  143. boxerBtn=Create("ImageButton",boxer,{Name="boxerBtn", ImageTransparency=1, BorderSizePixel=0, Size=UDim2.new(0.38,0,1,0), BackgroundColor3=Color3.new(0.392,0.392,0.392)})
  144. boxerSlider=Create("Frame",boxerBtn,{Name="slider", Size=UDim2.new(0.5,-4,1,-4), Position=UDim2.new(doBoxer and 0.5 or 0,2,0,2), BorderSizePixel=0, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  145. cook=Create("Frame",settings_1,{Name="cook", LayoutOrder=3, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  146. cookLbl=Create("TextLabel",cook,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Cook", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  147. BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  148. cookBtn=Create("ImageButton",cook,{Name="cookBtn", ImageTransparency=1, BorderSizePixel=0, Size=UDim2.new(0.38,0,1,0), BackgroundColor3=Color3.new(0.392,0.392,0.392)})
  149. cookSlider=Create("Frame",cookBtn,{Name="slider", Size=UDim2.new(0.5,-4,1,-4), Position=UDim2.new(doCook and 0.5 or 0,2,0,2), BorderSizePixel=0, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  150. toggleAll=Create("Frame",settings_1,{Name="toggleAll", LayoutOrder=1, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  151. switch=Create("Frame",toggleAll,{Name="switch", BackgroundTransparency=1, Size=UDim2.new(0.75,0,1,0), BackgroundColor3=Color3.new(1,1,1)})
  152. allOffBtn=Create("ImageButton",switch,{Name="allOffBtn", ImageTransparency=1, BorderSizePixel=0, Size=UDim2.new(0.5,0,1,0), BackgroundColor3=Color3.new(0.235,0.235,0.235)})
  153. allOnBtn=Create("ImageButton",switch,{Name="allOnBtn", ImageTransparency=1, BorderSizePixel=0, Size=UDim2.new(0.5,0,1,0), Position=UDim2.new(0.5,0,0,0), BackgroundColor3=Color3.new(0.333,0.333,0.333)})
  154. toggleAllSlider=Create("Frame",switch,{Name="slider", Size=UDim2.new(0.1,0,1,4), Position=UDim2.new(0.45,0,0,-2), BorderSizePixel=0, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  155. messageLbl=Create("TextLabel",topbar,{Name="messageLbl", Size=UDim2.new(0.5,0,1,0), Text="Saved.", TextSize=14, Font="GothamSemibold", BackgroundTransparency=1,
  156. Position=UDim2.new(0.07,0,0,0), TextColor3=Color3.new(1,1,1), Visible=false, TextXAlignment="Left"})
  157. camframe=Create("Frame",gui,{Name="camframe", BackgroundTransparency=1, Size=UDim2.new(0,120,0,40), Position=UDim2.new(0.5,-320,0,-38), BackgroundColor3=Color3.new(0.118,0.118,0.118)})
  158. rightCamBtn=Create("ImageButton",camframe,{Name="rightCamBtn", Image="rbxassetid://144168163", Size=UDim2.new(0.333,0,1,0), Rotation=180, Position=UDim2.new(0.666,0,0,0), BackgroundTransparency=1,
  159. BackgroundColor3=Color3.new(1,1,1)})
  160. leftCamBtn=Create("ImageButton",camframe,{Name="leftCamBtn", Image="rbxassetid://144168163", Size=UDim2.new(0.333,0,1,0), BackgroundTransparency=1, BackgroundColor3=Color3.new(1,1,1)})
  161. centerCamBtn=Create("ImageButton",camframe,{Name="centerCamBtn", Image="rbxassetid://58282192", Size=UDim2.new(0.333,0,1,0), Position=UDim2.new(0.333,0,0,0), BackgroundTransparency=1, BackgroundColor3=Color3.new(1,1,1)})
  162. creditLbl=Create("TextLabel",main,{Position=UDim2.new(0,0,1,5),Size=UDim2.new(0,100,0,15),BackgroundTransparency=1,TextColor3=Color3.new(1,1,1),Text="by sirelKilla",TextScaled=true,TextStrokeTransparency=.8})
  163.  
  164. local function toggleCashier(bool)
  165. if bool~=nil then
  166. doCashier=bool
  167. else
  168. doCashier = not doCashier
  169. end
  170. cashierSlider:TweenPosition(UDim2.new(doCashier and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  171. end
  172. local function toggleCook(bool)
  173. if bool~=nil then
  174. doCook=bool
  175. else
  176. doCook = not doCook
  177. end
  178. cookSlider:TweenPosition(UDim2.new(doCook and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  179. end
  180. local function toggleBoxer(bool)
  181. if bool~=nil then
  182. doBoxer=bool
  183. else
  184. doBoxer = not doBoxer
  185. end
  186. boxerSlider:TweenPosition(UDim2.new(doBoxer and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  187. end
  188. local function toggleDelivery(bool)
  189. if bool~=nil then
  190. doDelivery=bool
  191. else
  192. doDelivery = not doDelivery
  193. end
  194. deliverySlider:TweenPosition(UDim2.new(doDelivery and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  195. end
  196. local function toggleSupplier(bool)
  197. if bool~=nil then
  198. doSupplier=bool
  199. else
  200. doSupplier = not doSupplier
  201. end
  202. supplierSlider:TweenPosition(UDim2.new(doSupplier and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  203. end
  204. cashierBtn.MouseButton1Click:Connect(toggleCashier)
  205. cookBtn.MouseButton1Click:Connect(toggleCook)
  206. boxerBtn.MouseButton1Click:Connect(toggleBoxer)
  207. deliveryBtn.MouseButton1Click:Connect(toggleDelivery)
  208. supplierBtn.MouseButton1Click:Connect(toggleSupplier)
  209. allOffBtn.InputBegan:Connect(function()
  210. if game:GetService("UserInputService"):IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then
  211. toggleCashier(false)
  212. toggleCook(false)
  213. toggleBoxer(false)
  214. toggleDelivery(false)
  215. toggleSupplier(false)
  216. toggleAllSlider:TweenPosition(UDim2.new(0,0,0,-2),nil,"Sine",0.1,true)
  217. wait(1)
  218. if toggleAllSlider.Position.X.Scale<.01 then
  219. toggleAllSlider:TweenPosition(UDim2.new(0.45,0,0,-2),nil,"Sine",0.1,true)
  220. end
  221. end
  222. end)
  223. allOnBtn.InputBegan:Connect(function()
  224. if game:GetService("UserInputService"):IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then
  225. toggleCashier(true)
  226. toggleCook(true)
  227. toggleBoxer(true)
  228. toggleDelivery(true)
  229. toggleSupplier(true)
  230. toggleAllSlider:TweenPosition(UDim2.new(0.9,0,0,-2),nil,"Sine",0.1,true)
  231. wait(1)
  232. if toggleAllSlider.Position.X.Scale>.88 then
  233. toggleAllSlider:TweenPosition(UDim2.new(0.45,0,0,-2),nil,"Sine",0.1,true)
  234. end
  235. end
  236. end)
  237. kitchenBtn.MouseButton1Click:Connect(function()
  238. settings.stay_in_kitchen = not settings.stay_in_kitchen
  239. kitchenBtn.Text = settings.stay_in_kitchen and "X" or ""
  240. end)
  241. local oldRefillAt=refillAtBox.Text
  242. refillAtBox:GetPropertyChangedSignal("Text"):Connect(function()
  243. if #refillAtBox.Text>2 or refillAtBox.Text:match("%D") then
  244. refillAtBox.Text = oldRefillAt
  245. end
  246. oldRefillAt = refillAtBox.Text
  247. end)
  248. refillAtBox.FocusLost:Connect(function()
  249. if tonumber(refillAtBox.Text) then
  250. settings.refill_at=tonumber(refillAtBox.Text)
  251. end
  252. refillAtBox.Text=tostring(settings.refill_at)
  253. end)
  254. local oldRefillEnd=refillEndBox.Text
  255. refillEndBox:GetPropertyChangedSignal("Text"):Connect(function()
  256. if #refillEndBox.Text>2 or refillEndBox.Text:match("%D") then
  257. refillEndBox.Text = oldRefillEnd
  258. end
  259. oldRefillEnd = refillEndBox.Text
  260. end)
  261. refillEndBox.FocusLost:Connect(function()
  262. if tonumber(refillEndBox.Text) then
  263. settings.refill_end=tonumber(refillEndBox.Text)
  264. end
  265. refillEndBox.Text=tostring(settings.refill_end)
  266. end)
  267. closeBtn.MouseButton1Click:Connect(function() gui:Destroy() end)
  268. closeBtn.MouseEnter:Connect(function() closeBtn.TextColor3=Color3.new(.9,0,0) end)
  269. closeBtn.MouseLeave:Connect(function() closeBtn.TextColor3=Color3.new(1,1,1) end)
  270. saveBtn.MouseButton1Click:Connect(function()
  271. if writefile and messageLbl.Visible==false then
  272. writefile("PizzaFarm.txt",game:GetService("HttpService"):JSONEncode(settings))
  273. messageLbl.Visible=true
  274. wait(2)
  275. messageLbl.Visible=false
  276. end
  277. end)
  278. 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)}
  279. local cameraIndex = 0
  280. centerCamBtn.MouseButton1Click:Connect(function()
  281. cameraIndex = 0
  282. workspace.CurrentCamera.CameraType = "Custom"
  283. end)
  284. leftCamBtn.MouseButton1Click:Connect(function()
  285. cameraIndex = cameraIndex - 1
  286. if cameraIndex < 0 then
  287. cameraIndex = #cameraArray
  288. end
  289. if cameraIndex == 0 then
  290. workspace.CurrentCamera.CameraType="Custom"
  291. else
  292. local cf = cameraArray[cameraIndex]
  293. workspace.CurrentCamera.CameraType="Scriptable"
  294. workspace.CurrentCamera:Interpolate(cf,cf+cf.lookVector*10,0.5)
  295. end
  296. end)
  297. rightCamBtn.MouseButton1Click:Connect(function()
  298. cameraIndex = cameraIndex + 1
  299. if cameraIndex > #cameraArray then
  300. cameraIndex = 0
  301. workspace.CurrentCamera.CameraType="Custom"
  302. else
  303. local cf = cameraArray[cameraIndex]
  304. workspace.CurrentCamera.CameraType="Scriptable"
  305. workspace.CurrentCamera:Interpolate(cf,cf+cf.lookVector*10,0.5)
  306. end
  307. end)
  308.  
  309. --//subroutines
  310. local supplyCounts = {TomatoSauce=99,Cheese=99,Sausage=99,Pepperoni=99,Dough=99,Box=99,Dew=99}
  311. for name in pairs(supplyCounts) do
  312. local lbl = workspace.SupplyCounters[name=="Dew" and "CounterMountainDew" or "Counter"..name].a.SG.Counter
  313. supplyCounts[name]=tonumber(lbl.Text)
  314. lbl.Changed:Connect(function()
  315. supplyCounts[name]=tonumber(lbl.Text)
  316. end)
  317. end
  318.  
  319. local function FindFirstCustomer()
  320. local children = workspace.Customers:GetChildren()
  321. for i=1,#children do
  322. local c = children[i]
  323. if ffc(c,"Head") and ffc(c,"Humanoid") and c.Head.CFrame.Z<102 and ffc(c.Head,"Dialog") and ffc(c.Head.Dialog,"Correct") and ((c.Humanoid.SeatPart and c.Humanoid.SeatPart.Anchored) or (c.Humanoid.SeatPart==nil and (c.Head.Velocity.Z^2)^.5<.0001)) then
  324. return c
  325. end
  326. end
  327. end
  328.  
  329. local boxPtick=0
  330. local boxDtick=0
  331. local function FindBoxes()
  332. local c,o,f
  333. local children = workspace.AllBox:GetChildren()
  334. for i=1,#children do
  335. local b = children[i]
  336. if ffc(b,"HasPizzaInside") or ffc(b,"Pizza") then
  337. if c==nil and b.Name=="BoxClosed" and b.Anchored==false and not b.HasPizzaInside.Value then
  338. c=b
  339. elseif o==nil and b.Name=="BoxOpen" and b.Anchored==false and not b.Pizza.Value then
  340. o=b
  341. elseif f==nil and (b.Name=="BoxOpen" and b.Pizza.Value) or (b.Name=="BoxClosed" and b.HasPizzaInside.Value) then
  342. f=b
  343. end
  344. if c and o and f then
  345. return c,o,f
  346. end
  347. end
  348. end
  349. return c,o,f
  350. end
  351. local function FindBoxingFoods()
  352. local p,d
  353. local children = workspace.BoxingRoom:GetChildren()
  354. for i=1,#children do
  355. local f = children[i]
  356. if not f.Anchored then
  357. if p==nil and f.Name=="Pizza" then
  358. p=f
  359. elseif d==nil and f.Name=="Dew" then
  360. d=f
  361. end
  362. if p and d then
  363. return p,d
  364. end
  365. end
  366. end
  367. return p,d
  368. end
  369.  
  370. local orderDict={["3540529228"]="Cheese",["3540530535"]="Sausage",["3540529917"]="Pepperoni",["2512571151"]="Dew",["2512441325"]="Dew"}
  371. local cookingDict = {Cheese=0,Sausage=0,Pepperoni=0,Dew=0}
  372. local cookPtick=0
  373. local cookDtick=0
  374. local cookWarned=false
  375. local boxerWarned=false
  376. local function getOrders()
  377. local orders={}
  378. local tempCookingDict = {}
  379. for i,v in pairs(cookingDict) do tempCookingDict[i]=v end
  380. local children = workspace.Orders:GetChildren()
  381. for i=1,#children do
  382. local o = orderDict[children[i].SG.ImageLabel.Image:match("%d+$")]
  383. if o then
  384. if tempCookin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement