Advertisement
Alex7077

Kwkwkq

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