The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Work in a pizzeria script pastebin roblox
By Work in a pizzeria on 2024-11-24 08:00 am | Syntax: LUA | Views: 20



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1. --https://v3rmillion.net/showthread.php?tid=723696
  2. getupvalues = getupvalues or debug.getupvalues
  3. setupvalue = setupvalue or debug.setupvalue
  4. if not (getrawmetatable and getupvalues and setupvalue and (getreg or debug.getregistry)) then
  5.     local h = Instance.new("Hint",workspace)
  6.     h.Text = "Incompatible exploit."
  7.     wait(3)
  8.     h:Destroy()
  9.     return
  10. end
  11. local settings = {refill_at=50, refill_end=97, stay_in_kitchen=true}
  12. local doCashier,doBoxer,doCook,doSupplier,doDelivery = true,true,true,true,true
  13. if readfile then
  14.     pcall(function()
  15.         local new = game:GetService("HttpService"):JSONDecode(readfile("PizzaFarm.txt"))
  16.         --corruption?
  17.         local doOverwrite=false
  18.         for k,v in pairs(new) do
  19.             if settings[k]==nil then
  20.                 doOverwrite=true
  21.                 new[k]=nil
  22.             end
  23.         end
  24.         for k,v in pairs(settings) do
  25.             if new[k]==nil then
  26.                 doOverwrite=true
  27.                 new[k]=v
  28.             end
  29.         end
  30.         --use input
  31.         if doOverwrite then
  32.             warn("Settings overwritten")
  33.             writefile("PizzaFarm.txt",game:GetService("HttpService"):JSONEncode(new))
  34.         end
  35.         settings = new
  36.     end)
  37. end
  38.  
  39. if getconnections then
  40.     for _,c in next,getconnections(game:GetService("ScriptContext").Error) do
  41.         c:Disable()
  42.     end
  43. end
  44.  
  45. local player = game:GetService("Players").LocalPlayer
  46. local ffc = game.FindFirstChild
  47. local RNG = Random.new()
  48. local network
  49. local character,root
  50. do
  51.     local reg = (getreg or debug.getregistry)()
  52.     for i=1,#reg do
  53.         local f = reg[i]
  54.         if type(f)=="function" and tostring(getfenv(f).script)=="Paycheck" then
  55.             for k,v in next,getupvalues(f) do
  56.                 if tostring(v) == "CashOut" then
  57.                     setupvalue(f,k,{MouseButton1Click={wait=function()end,Wait=function()end}})
  58.                     break
  59.                 end
  60.             end
  61.         elseif type(f)=="table" and rawget(f,"FireServer") and rawget(f,"BindEvents") then
  62.             network = f
  63.         end
  64.     end
  65.     local mt=getrawmetatable(game)
  66.     if setreadonly then
  67.         setreadonly(mt,false)
  68.     elseif make_writeable then
  69.         make_writeable(mt)
  70.     end
  71.     local old__newindex=mt.__newindex
  72.     if newcclosure then
  73.         mt.__newindex=newcclosure(function(t,k,v)
  74.             if t~=workspace.CurrentCamera or tostring(getfenv(2).script)~="LocalMain" then
  75.                 return old__newindex(t,k,v)
  76.             end
  77.         end)
  78.     else
  79.         mt.__newindex=function(t,k,v)
  80.             if t~=workspace.CurrentCamera or tostring(getfenv(2).script)~="LocalMain" then
  81.                 return old__newindex(t,k,v)
  82.             end
  83.         end
  84.     end
  85.     workspace.Main.RealignCamera.RealignCamera:Destroy()
  86.     Instance.new("BindableEvent",workspace.Main.RealignCamera).Name="RealignCamera"
  87. end
  88. assert(network,"failed to find network")
  89. --//gui
  90. Create = function(class,parent,props)
  91.     local new = Instance.new(class)
  92.     for k,v in next,props do
  93.         new[k]=v
  94.     end
  95.     new.Parent = parent
  96.     return new
  97. end
  98. gui=Create("ScreenGui",game.CoreGui,{Name="Farm", ZIndexBehavior="Sibling"})
  99. 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)})
  100. topbar=Create("Frame",main,{Name="topbar", Size=UDim2.new(1,0,0.15,0), BackgroundColor3=Color3.new(0.255,0.255,0.255)})
  101. 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,
  102.     Font="GothamSemibold", Position=UDim2.new(0.96,0,0,0), TextSize=14, TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  103. titleLbl=Create("TextLabel",topbar,{Name="titleLbl", TextWrapped=true, Size=UDim2.new(0.5,0,1,0), Text="Pizza Factory", TextSize=14, Font="GothamSemibold",
  104.     BackgroundTransparency=1, Position=UDim2.new(0.25,0,0,0), TextColor3=Color3.new(1,1,1), BackgroundColor3=Color3.new(1,1,1)})
  105. 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})
  106. 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)})
  107. 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)})
  108. cashier=Create("Frame",settings_1,{Name="cashier", LayoutOrder=4, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  109. Label=Create("TextLabel",cashier,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Cashier", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  110.     BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  111. 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)})
  112. 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)})
  113. kitchen=Create("Frame",settings_1,{Name="kitchen", LayoutOrder=9, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  114. Label_2=Create("TextLabel",kitchen,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="[redacted]:", TextSize=14, TextXAlignment="Right", Font="SourceSans",
  115.     BackgroundTransparency=1, TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  116. 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",
  117.     Position=UDim2.new(0.62,0,0,0), TextSize=35, TextScaled=true, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  118. refillEnd=Create("Frame",settings_1,{Name="refillEnd", LayoutOrder=8, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  119. 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(),
  120.     Font="Code", Position=UDim2.new(0.62,0,0,0), TextScaled=true, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  121. Label_3=Create("TextLabel",refillEnd,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Refill End:", TextSize=14, TextXAlignment="Right", Font="SourceSans",
  122.     BackgroundTransparency=1, TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  123. refillAt=Create("Frame",settings_1,{Name="refillAt", LayoutOrder=7, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  124. Label_4=Create("TextLabel",refillAt,{TextWrapped=true, Size=UDim2.new(0.5,0,1,0), Text="Refill At:", TextSize=14, TextXAlignment="Right", Font="SourceSans",
  125.     BackgroundTransparency=1, TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  126. 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(),
  127.     Font="Code", Position=UDim2.new(0.52,0,0,0), TextScaled=true, BackgroundColor3=Color3.new(0.784,0.784,0.784)})
  128. supplier=Create("Frame",settings_1,{Name="supplier", LayoutOrder=6, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  129. Label_5=Create("TextLabel",supplier,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Supplier", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  130.     BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  131. 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)})
  132. 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)})
  133. delivery=Create("Frame",settings_1,{Name="delivery", LayoutOrder=5, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  134. Label_6=Create("TextLabel",delivery,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Delivery", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  135.     BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  136. 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)})
  137. 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)})
  138. boxer=Create("Frame",settings_1,{Name="boxer", LayoutOrder=2, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  139. boxerLbl=Create("TextLabel",boxer,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Boxer", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  140.     BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  141. 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)})
  142. 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)})
  143. cook=Create("Frame",settings_1,{Name="cook", LayoutOrder=3, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  144. cookLbl=Create("TextLabel",cook,{TextWrapped=true, Size=UDim2.new(0.6,0,1,0), Text="Cook", TextSize=14, TextXAlignment="Left", Font="SourceSans",
  145.     BackgroundTransparency=1, Position=UDim2.new(0.4,0,0,0), TextColor3=Color3.new(1,1,1), TextScaled=true, BackgroundColor3=Color3.new(1,1,1)})
  146. 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)})
  147. 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)})
  148. toggleAll=Create("Frame",settings_1,{Name="toggleAll", LayoutOrder=1, BackgroundTransparency=1, Size=UDim2.new(0,100,0,100), BackgroundColor3=Color3.new(1,1,1)})
  149. switch=Create("Frame",toggleAll,{Name="switch", BackgroundTransparency=1, Size=UDim2.new(0.75,0,1,0), BackgroundColor3=Color3.new(1,1,1)})
  150. 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)})
  151. 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)})
  152. 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)})
  153. messageLbl=Create("TextLabel",topbar,{Name="messageLbl", Size=UDim2.new(0.5,0,1,0), Text="Saved.", TextSize=14, Font="GothamSemibold", BackgroundTransparency=1,
  154.     Position=UDim2.new(0.07,0,0,0), TextColor3=Color3.new(1,1,1), Visible=false, TextXAlignment="Left"})
  155. 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)})
  156. 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,
  157.     BackgroundColor3=Color3.new(1,1,1)})
  158. 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)})
  159. 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)})
  160. 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})
  161.  
  162. local function toggleCashier(bool)
  163.     if bool~=nil then
  164.         doCashier=bool
  165.     else
  166.         doCashier = not doCashier
  167.     end
  168.     cashierSlider:TweenPosition(UDim2.new(doCashier and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  169. end
  170. local function toggleCook(bool)
  171.     if bool~=nil then
  172.         doCook=bool
  173.     else
  174.         doCook = not doCook
  175.     end
  176.     cookSlider:TweenPosition(UDim2.new(doCook and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  177. end
  178. local function toggleBoxer(bool)
  179.     if bool~=nil then
  180.         doBoxer=bool
  181.     else
  182.         doBoxer = not doBoxer
  183.     end
  184.     boxerSlider:TweenPosition(UDim2.new(doBoxer and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  185. end
  186. local function toggleDelivery(bool)
  187.     if bool~=nil then
  188.         doDelivery=bool
  189.     else
  190.         doDelivery = not doDelivery
  191.     end
  192.     deliverySlider:TweenPosition(UDim2.new(doDelivery and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  193. end
  194. local function toggleSupplier(bool)
  195.     if bool~=nil then
  196.         doSupplier=bool
  197.     else
  198.         doSupplier = not doSupplier
  199.     end
  200.     supplierSlider:TweenPosition(UDim2.new(doSupplier and 0.5 or 0,2,0,2),nil,"Sine",0.1,true)
  201. end
  202. cashierBtn.MouseButton1Click:Connect(toggleCashier)
  203. cookBtn.MouseButton1Click:Connect(toggleCook)
  204. boxerBtn.MouseButton1Click:Connect(toggleBoxer)
  205. deliveryBtn.MouseButton1Click:Connect(toggleDelivery)
  206. supplierBtn.MouseButton1Click:Connect(toggleSupplier)
  207. allOffBtn.InputBegan:Connect(function()
  208.     if game:GetService("UserInputService"):IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then
  209.         toggleCashier(false)
  210.         toggleCook(false)
  211.         toggleBoxer(false)
  212.         toggleDelivery(false)
  213.         toggleSupplier(false)
  214.         toggleAllSlider:TweenPosition(UDim2.new(0,0,0,-2),nil,"Sine",0.1,true)
  215.         wait(1)
  216.         if toggleAllSlider.Position.X.Scale<.01 then
  217.             toggleAllSlider:TweenPosition(UDim2.new(0.45,0,0,-2),nil,"Sine",0.1,true)
  218.         end
  219.     end
  220. end)
  221. allOnBtn.InputBegan:Connect(function()
  222.     if game:GetService("UserInputService"):IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then
  223.         toggleCashier(true)
  224.         toggleCook(true)
  225.         toggleBoxer(true)
  226.         toggleDelivery(true)
  227.         toggleSupplier(true)
  228.         toggleAllSlider:TweenPosition(UDim2.new(0.9,0,0,-2),nil,"Sine",0.1,true)
  229.         wait(1)
  230.         if toggleAllSlider.Position.X.Scale>.88 then
  231.             toggleAllSlider:TweenPosition(UDim2.new(0.45,0,0,-2),nil,"Sine",0.1,true)
  232.         end
  233.     end
  234. end)
  235. kitchenBtn.MouseButton1Click:Connect(function()
  236.     settings.stay_in_kitchen = not settings.stay_in_kitchen
  237.     kitchenBtn.Text = settings.stay_in_kitchen and "X" or ""
  238. end)
  239. local oldRefillAt=refillAtBox.Text
  240. refillAtBox:GetPropertyChangedSignal("Text"):Connect(function()
  241.     if #refillAtBox.Text>2 or refillAtBox.Text:match("%D") then
  242.         refillAtBox.Text = oldRefillAt
  243.     end
  244.     oldRefillAt = refillAtBox.Text
  245. end)
  246. refillAtBox.FocusLost:Connect(function()
  247.     if tonumber(refillAtBox.Text) then
  248.         settings.refill_at=tonumber(refillAtBox.Text)
  249.     end
  250.     refillAtBox.Text=tostring(settings.refill_at)
  251. end)
  252. local oldRefillEnd=refillEndBox.Text
  253. refillEndBox:GetPropertyChangedSignal("Text"):Connect(function()
  254.     if #refillEndBox.Text>2 or refillEndBox.Text:match("%D") then
  255.         refillEndBox.Text = oldRefillEnd
  256.     end
  257.     oldRefillEnd = refillEndBox.Text
  258. end)
  259. refillEndBox.FocusLost:Connect(function()
  260.     if tonumber(refillEndBox.Text) then
  261.         settings.refill_end=tonumber(refillEndBox.Text)
  262.     end
  263.     refillEndBox.Text=tostring(settings.refill_end)
  264. end)
  265. closeBtn.MouseButton1Click:Connect(function() gui:Destroy() end)
  266. closeBtn.MouseEnter:Connect(function() closeBtn.TextColor3=Color3.new(.9,0,0) end)
  267. closeBtn.MouseLeave:Connect(function() closeBtn.TextColor3=Color3.new(1,1,1) end)
  268. saveBtn.MouseButton1Click:Connect(function()
  269.     if writefile and messageLbl.Visible==false then
  270.         writefile("PizzaFarm.txt",game:GetService("HttpService"):JSONEncode(settings))
  271.         messageLbl.Visible=true
  272.         wait(2)
  273.         messageLbl.Visible=false
  274.     end
  275. end)
  276. 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)}
  277. local cameraIndex = 0
  278. centerCamBtn.MouseButton1Click:Connect(function()
  279.     cameraIndex = 0
  280.     workspace.CurrentCamera.CameraType = "Custom"
  281. end)
  282. leftCamBtn.MouseButton1Click:Connect(function()
  283.     cameraIndex = cameraIndex - 1
  284.     if cameraIndex < 0 then
  285.         cameraIndex = #cameraArray
  286.     end
  287.     if cameraIndex == 0 then
  288.         workspace.CurrentCamera.CameraType="Custom"
  289.     else
  290.         local cf = cameraArray[cameraIndex]
  291.         workspace.CurrentCamera.CameraType="Scriptable"
  292.         workspace.CurrentCamera:Interpolate(cf,cf+cf.lookVector*10,0.5)
  293.     end
  294. end)
  295. rightCamBtn.MouseButton1Click:Connect(function()
  296.     cameraIndex = cameraIndex + 1
  297.     if cameraIndex > #cameraArray then
  298.         cameraIndex = 0
  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.  
  307. --//subroutines
  308. local supplyCounts = {TomatoSauce=99,Cheese=99,Sausage=99,Pepperoni=99,Dough=99,Box=99,Dew=99}
  309. for name in pairs(supplyCounts) do
  310.     local lbl = workspace.SupplyCounters[name=="Dew" and "CounterMountainDew" or "Counter"..name].a.SG.Counter
  311.     supplyCounts[name]=tonumber(lbl.Text)
  312.     lbl.Changed:Connect(function()
  313.         supplyCounts[name]=tonumber(lbl.Text)
  314.     end)
  315. end
  316.  
  317. local function FindFirstCustomer()
  318.     local children = workspace.Customers:GetChildren()
  319.     for i=1,#children do
  320.         local c = children[i]
  321.         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
  322.             return c
  323.         end
  324.     end
  325. end
  326.  
  327. local boxPtick=0
  328. local boxDtick=0
  329. local function FindBoxes()
  330.     local c,o,f
  331.     local children = workspace.AllBox:GetChildren()
  332.     for i=1,#children do
  333.         local b = children[i]
  334.         if ffc(b,"HasPizzaInside") or ffc(b,"Pizza") then
  335.             if c==nil and b.Name=="BoxClosed" and b.Anchored==false and not b.HasPizzaInside.Value then
  336.                 c=b
  337.             elseif o==nil and b.Name=="BoxOpen" and b.Anchored==false and not b.Pizza.Value then
  338.                 o=b
  339.             elseif f==nil and (b.Name=="BoxOpen" and b.Pizza.Value) or (b.Name=="BoxClosed" and b.HasPizzaInside.Value) then
  340.                 f=b
  341.             end
  342.             if c and o and f then
  343.                 return c,o,f
  344.             end
  345.         end
  346.     end
  347.     return c,o,f
  348. end
  349. local function FindBoxingFoods()
  350.     local p,d
  351.     local children = workspace.BoxingRoom:GetChildren()
  352.     for i=1,#children do
  353.         local f = children[i]
  354.         if not f.Anchored then
  355.             if p==nil and f.Name=="Pizza" then
  356.                 p=f
  357.             elseif d==nil and f.Name=="Dew" then
  358.                 d=f
  359.             end
  360.             if p and d then
  361.                 return p,d
  362.             end
  363.         end
  364.     end
  365.     return p,d
  366. end
  367.  
  368. local orderDict={["3540529228"]="Cheese",["3540530535"]="Sausage",["3540529917"]="Pepperoni",["2512571151"]="Dew",["2512441325"]="Dew"}
  369. local cookingDict = {Cheese=0,Sausage=0,Pepperoni=0,Dew=0}
  370. local cookPtick=0
  371. local cookDtick=0
  372. local cookWarned=false
  373. local boxerWarned=false
  374. local function getOrders()
  375.     local orders={}
  376.     local tempCookingDict = {}
  377.     for i,v in pairs(cookingDict) do tempCookingDict[i]=v end
  378.     local children = workspace.Orders:GetChildren()
  379.     for i=1,#children do
  380.         local o = orderDict[children[i].SG.ImageLabel.Image:match("%d+$")]
  381.         if o then
  382.             if tempCookingDict[o]>0 then
  383.                 --ignores oven pizzas, so new orders are priority
  384.                 tempCookingDict[o]=tempCookingDict[o]-1
  385.             elseif (o=="Dew" and #workspace.AllMountainDew:GetChildren()>0) or (supplyCounts[o]>0 and supplyCounts.TomatoSauce>0 and supplyCounts.Cheese>0) then
  386.                 --need supplies
  387.                 orders[#orders+1]=o
  388.             end
  389.         end
  390.     end
  391.     return orders
  392. end
  393. local function FindFirstDew()
  394.     local children = workspace.AllMountainDew:GetChildren()
  395.     for i=1,#children do
  396.         if not children[i].Anchored then
  397.             return children[i]
  398.         end
  399.     end
  400. end
  401. local function FindDoughAndWithout(str)
  402.     local goodraw,p,raw,trash
  403.     local children = workspace.AllDough:GetChildren()
  404.     for i = #children, 2, -1 do --shuffle
  405.         local j = RNG:NextInteger(1, i)
  406.         children[j], children[i] = children[i], children[j]
  407.     end
  408.     for i=1,#children do
  409.         local d = children[i]
  410.         if d.Anchored==false and #d:GetChildren()>9 then
  411.             if d.IsBurned.Value or d.HasBugs.Value or d.Cold.Value or (d.BrickColor.Name=="Bright orange" and ffc(d,"XBillboard")) then
  412.                 if trash==nil and d.Position.Y > 0 then
  413.                     trash=d
  414.                 end
  415.             elseif p==nil and d.BrickColor.Name=="Bright orange" then
  416.                 p=d
  417.             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
  418.                 --prefers flat
  419.                 if d.Mesh.Scale.Y<1.1 then
  420.                     goodraw=d
  421.                 else
  422.                     raw=d
  423.                 end
  424.             end
  425.             if goodraw and p and trash then
  426.                 return goodraw,p,trash
  427.             end
  428.         end
  429.     end
  430.     return goodraw or raw,p,trash
  431. end
  432. local function getOvenNear(pos)
  433.     local children = workspace.Ovens:GetChildren()
  434.     for i=1,#children do
  435.         if (children[i].Bottom.Position-pos).magnitude < 1.5 then
  436.             return children[i]
  437.         end
  438.     end
  439. end
  440. local function getDoughNear(pos)
  441.     local children = workspace.AllDough:GetChildren()
  442.     for i=1,#children do
  443.         if (children[i].Position-pos).magnitude < 1.5 then
  444.             return children[i]
  445.         end
  446.     end
  447. end
  448. local function isFullyOpen(oven)
  449.     return oven.IsOpen.Value==true and (oven.Door.Meter.RotVelocity.Z^2)^.5<.0001
  450. end
  451.  
  452. local bcolorToSupply = {["Dark orange"]="Sausage",["Bright blue"]="Pepperoni",["Bright yellow"]="Cheese",["Bright red"]="TomatoSauce",["Dark green"]="Dew",["Brick yellow"]="Dough",["Light stone grey"]="Box",["Really black"]="Dew"}
  453. local supplyButtons = {}
  454. for _,button in ipairs(workspace.SupplyButtons:GetChildren()) do
  455.     supplyButtons[bcolorToSupply[button.Unpressed.BrickColor.Name]] = button.Unpressed
  456. end
  457.  
  458. local delTool
  459. local function FindFirstDeliveryTool()
  460.     local t
  461.     local children = workspace:GetChildren()
  462.     for i=1,#children do
  463.         local v = children[i]
  464.         if v.ClassName=="Tool" and v.Name:match("^%u%d$") and ffc(v,"House") and ffc(v,"Handle") and ffc(v,"Order") and v.Order.Value:match("%a") then
  465.             if ffc(v.Handle,"X10") then
  466.                 return v
  467.             end
  468.             t = v
  469.         end
  470.     end
  471.     return t
  472. end
  473. local function getHousePart(address)
  474.     local houses = workspace.Houses:GetChildren()
  475.     for i=1,#houses do
  476.         local h = houses[i]
  477.         if ffc(h,"Address") and h.Address.Value==address and ffc(h,"Upgrades") and h.Upgrades:GetChildren()[1] and ffc(h.Upgrades:GetChildren()[1],"GivePizza") then
  478.             return h.Upgrades:GetChildren()[1].GivePizza
  479.         end
  480.     end
  481. end
  482. local delTouched=false
  483. local function forgetDeliveryTool()
  484.     if delTool then
  485.         if delTool.Parent==player.Backpack then
  486.             delTool.Parent = character
  487.         end
  488.         if delTool.Parent==character then
  489.             wait(0.1)
  490.             delTool.Parent = workspace
  491.             wait(0.1)
  492.         end
  493.     end
  494.     delTool=nil
  495.     delTouched=false
  496.     if ffc(character,"RightHand") and ffc(character.RightHand,"RightGrip") then
  497.         character.RightHand.RightGrip:Destroy()
  498.     end
  499. end
  500.  
  501. local function onCharacterAdded(char)
  502.     if not char then return end
  503.     character=char
  504.     root = character:WaitForChild("HumanoidRootPart")
  505.     character:WaitForChild("Humanoid"):GetPropertyChangedSignal("WalkSpeed"):Connect(function()
  506.         if delTool then
  507.             character.Humanoid.WalkSpeed=16
  508.         end
  509.     end)
  510. end
  511. onCharacterAdded(player.Character or player.CharacterAdded:Wait())
  512. player.CharacterAdded:Connect(onCharacterAdded)
  513.  
  514. local function simTouch(part)
  515.     local oldcc = part.CanCollide
  516.     local oldcf = part.CFrame
  517.     part.CanCollide = false
  518.     part.CFrame = root.CFrame
  519.     delay(0.01,function()
  520.         part.CFrame = oldcf
  521.         part.CanCollide = oldcc
  522.     end)
  523. end
  524. --//main loop
  525. while gui.Parent do
  526.     wait(0.3)
  527.     local hum = character:FindFirstChild("Humanoid")
  528.     if hum and hum.Sit then hum.Jump = true end
  529.     if doCashier then
  530.         local c = FindFirstCustomer()
  531.         if c then
  532.             local dialog = c.Head.Dialog.Correct.ResponseDialog or ''
  533.             local rootMoved = false
  534.             if (root.Position-Vector3.new(46.34, 3.80, 82.02)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(46.34, 3.80, 82.02) wait(.1) end
  535.             local order = "MountainDew"
  536.             if dialog:sub(-8)=="instead." then
  537.                 dialog = dialog:sub(-30)
  538.             end
  539.             if dialog:find("pepperoni",1,true) then
  540.                 order = "PepperoniPizza"
  541.             elseif dialog:find("sausage",1,true) then
  542.                 order = "SausagePizza"
  543.             elseif dialog:find("cheese",1,true) then
  544.                 order = "CheesePizza"
  545.             end
  546.            
  547.             network:FireServer("OrderComplete", c, order, workspace.Register3)
  548.             if rootMoved then wait(.1) end
  549.         end
  550.     end
  551.     if doCook then
  552.         local order = getOrders()[1]
  553.         local topping
  554.         if order=="Pepperoni" or order=="Sausage" then topping=order end
  555.         local cookD = FindFirstDew()
  556.         local raw,cookP,trash
  557.         if topping then
  558.             --pepperoni order avoids sausage dough and vice verca
  559.             raw,cookP,trash = FindDoughAndWithout(topping=="Pepperoni" and "Sausage" or "Pepperoni")
  560.         else
  561.             raw,cookP,trash = FindDoughAndWithout()
  562.         end
  563.         local rootMoved = false
  564.         local ovens = workspace.Ovens:GetChildren()
  565.         for i = #ovens, 2, -1 do --shuffle
  566.             local j = RNG:NextInteger(1, i)
  567.             ovens[j], ovens[i] = ovens[i], ovens[j]
  568.         end
  569.         --move final pizza
  570.         if cookP and tick()-cookPtick>0.8 then
  571.             local oven = getOvenNear(cookP.Position)
  572.             if oven==nil or oven.IsOpen.Value then
  573.                 cookPtick=tick()
  574.                 if (root.Position-Vector3.new(44.63, 6.60, 45.20)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(44.63, 6.60, 45.20) wait(.1) end
  575.                 network:FireServer("UpdateProperty", cookP, "CFrame", CFrame.new(56,4.1,38))
  576.             end
  577.         end
  578.         if order then
  579.             if order=="Dew" and cookD and tick()-cookDtick>0.8 then
  580.                 --move dew if ordered
  581.                 cookDtick=tick()
  582.                 if (root.Position-Vector3.new(44.63, 6.60, 45.20)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(44.63, 6.60, 45.20) wait(.1) end
  583.                 network:FireServer("UpdateProperty", cookD, "CFrame", CFrame.new(53,4.68,36.5))
  584.             elseif order~="Dew" and raw and raw.Parent and supplyCounts[order]>0 and supplyCounts.TomatoSauce>0 and supplyCounts.Cheese>0 then
  585.                 --make pizza
  586.                 if raw.Mesh.Scale.Y>1.5 then
  587.                     if (root.Position-Vector3.new(44.63, 6.60, 45.20)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(44.63, 6.60, 45.20) wait(.1) end
  588.                     network:FireServer("UpdateProperty", raw, "CFrame", CFrame.new(RNG:NextNumber(29.6,44.6),3.7,RNG:NextNumber(42.5,48.5)))
  589.                     wait()
  590.                     network:FireServer("SquishDough", raw)
  591.                 else
  592.                     --make sure it will have an oven
  593.                     local oven
  594.                     for _,o in ipairs(ovens) do
  595.                         if isFullyOpen(o) then
  596.                             local other = getDoughNear(o.Bottom.Position)
  597.                             if other==nil or not (other.BrickColor.Name=="Bright orange" and ffc(other.SG.Frame,"TomatoSauce") and ffc(other.SG.Frame,"MeltedCheese")) then
  598.                                 if other then
  599.                                     --replace mistaken dough
  600.                                     if (root.Position-Vector3.new(44.63, 6.60, 45.20)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(44.63, 6.60, 45.20) wait(.1) end
  601.                                     network:FireServer("UpdateProperty", other, "CFrame", CFrame.new(RNG:NextNumber(29.6,44.6),3.7,RNG:NextNumber(42.5,48.5)))
  602.                                     wait()
  603.                                 end
  604.                                 oven=o
  605.                                 break
  606.                             end
  607.                         end
  608.                     end
  609.                     if oven and raw.Parent==workspace.AllDough then
  610.                         --make
  611.                         if (root.Position-Vector3.new(44.63, 6.60, 45.20)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(44.63, 6.60, 45.20) wait(.1) end
  612.                         network:FireServer("AddIngredientToPizza", raw,"TomatoSauce")
  613.                         network:FireServer("AddIngredientToPizza", raw,"Cheese")
  614.                         network:FireServer("AddIngredientToPizza", raw,topping)
  615.                         network:FireServer("UpdateProperty", raw, "CFrame", oven.Bottom.CFrame+Vector3.new(0,0.7,0))
  616.                         oven.Door.ClickDetector.Detector:FireServer()
  617.                         --mark as cooking
  618.                         cookingDict[order]=cookingDict[order]+1
  619.                         local revoked=false
  620.                         spawn(function()
  621.                             raw.AncestryChanged:Wait()
  622.                             if not revoked then
  623.                                 cookingDict[order]=cookingDict[order]-1
  624.                                 revoked=true
  625.                             end
  626.                         end)
  627.                         delay(40, function()
  628.                             if not revoked then
  629.                                 cookingDict[order]=cookingDict[order]-1
  630.                                 revoked=true
  631.                             end
  632.                         end)
  633.                     end
  634.                 end
  635.             end
  636.         end
  637.         --open unnecessarily closed ovens
  638.         for _,o in ipairs(ovens) do
  639.             local bar = o.Door.Meter.SurfaceGui.ProgressBar.Bar
  640.             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
  641.                 if (root.Position-Vector3.new(44.63, 6.60, 45.20)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(44.63, 6.60, 45.20) wait(.1) end
  642.                 o.Door.ClickDetector.Detector:FireServer()
  643.                 break
  644.             end
  645.         end
  646.         --trash
  647.         if trash and (trash.IsBurned.Value==false or getOvenNear(trash.Position)==nil or getOvenNear(trash.Position).IsOpen.Value) then
  648.             --closed oven breaks if you take burnt out of it
  649.             if (root.Position-Vector3.new(44.63, 6.60, 45.20)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(44.63, 6.60, 45.20) wait(.1) end
  650.             network:FireServer("UpdateProperty", trash, "CFrame", CFrame.new(47.9,RNG:NextNumber(-10,-30),72.5))
  651.         end
  652.         if rootMoved then wait(.1) end
  653.     end
  654.     if doBoxer then
  655.         local boxP,boxD = FindBoxingFoods()
  656.         local closedBox,openBox,fullBox = FindBoxes()
  657.         local rootMoved = false
  658.         if boxD and tick()-boxDtick>0.8 then
  659.             boxDtick=tick()
  660.             if (root.Position-Vector3.new(54.09, 3.80, 23.150)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(54.09, 3.80, 23.15) wait(.1) end
  661.             network:FireServer("UpdateProperty", boxD, "CFrame", CFrame.new(63,4.9,-1,-1,0,0,0,1,0,0,0,-1))
  662.         end
  663.         if fullBox then
  664.             if fullBox.Name=="BoxOpen" then
  665.                 if (root.Position-Vector3.new(54.09, 3.80, 23.150)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(54.09, 3.80, 23.15) wait(.1) end
  666.                 network:FireServer("CloseBox", fullBox)
  667.                 --will be moved next loop
  668.             elseif tick()-boxPtick>0.8 then
  669.                 if (root.Position-Vector3.new(54.09, 3.80, 23.150)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(54.09, 3.80, 23.15) wait(.1) end
  670.                 network:FireServer("UpdateProperty", fullBox, "CFrame", CFrame.new(68.2,4.4,-1,-1,0,0,0,1,0,0,0,-1))
  671.                 boxPtick=tick()
  672.             end
  673.         end
  674.         if closedBox and not openBox then
  675.             if (root.Position-Vector3.new(54.09, 3.80, 23.150)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(54.09, 3.80, 23.15) wait(.1) end
  676.             network:FireServer("UpdateProperty", closedBox, "CFrame", CFrame.new(RNG:NextNumber(62.5,70.5),3.5,RNG:NextNumber(11,25)))
  677.             wait()
  678.             network:FireServer("OpenBox", closedBox)
  679.         end
  680.         if openBox and boxP then
  681.             if (root.Position-Vector3.new(54.09, 3.80, 23.150)).magnitude>9 then rootMoved = true root.CFrame = CFrame.new(54.09, 3.80, 23.15) wait(.1) end
  682.             network:FireServer("UpdateProperty", boxP, "Anchored", true)
  683.             network:FireServer("UpdateProperty", openBox, "Anchored", true)
  684.             wait()
  685.             network:FireServer("UpdateProperty", boxP, "CFrame", openBox.CFrame+Vector3.new(0,-2,0))
  686.             wait()
  687.             network:FireServer("AssignPizzaToBox", openBox, boxP)
  688.         end
  689.         if rootMoved then wait(.1) end
  690.     end
  691.     if doSupplier then
  692.         local refill=false
  693.         for s,c in pairs(supplyCounts) do
  694.             if c <= settings.refill_at then
  695.                 refill=true
  696.                 break
  697.             end
  698.         end
  699.         if refill then
  700.             local oldcf = root.CFrame
  701.             local alt=0
  702.             local waiting = false
  703.             local waitingTick = 0
  704.             local lastBox
  705.             while doSupplier do
  706.                 --check if refill is done otherwise hit buttons
  707.                 local fulfilled=true
  708.                 local boxes = workspace.AllSupplyBoxes:GetChildren()
  709.                 for s,c in pairs(supplyCounts) do
  710.                     if c<settings.refill_end then
  711.                         fulfilled=false
  712.                         local count = 0
  713.                         if #boxes > 30 then
  714.                             for i=1,#boxes do
  715.                                 local box = boxes[i]
  716.                                 if bcolorToSupply[box.BrickColor.Name]==s and box.Anchored==false and box.Position.Z < -940 then
  717.                                     count=count+1
  718.                                 end
  719.                             end
  720.                         end
  721.                         if count < 2 then
  722.                             simTouch(supplyButtons[s])
  723.                         end
  724.                     end
  725.                 end
  726.                 if fulfilled then
  727.                     break
  728.                 end
  729.                 wait(1.5)
  730.                 --check if can finish waiting for boxes to move
  731.                 if waiting and (lastBox.Position.X>42 or tick()-waitingTick>5) then
  732.                     waiting=false
  733.                     if lastBox.Position.X<42 then
  734.                         --clear boxes if stuck
  735.                         root.CFrame=CFrame.new(20.5,8,-35)
  736.                         wait(0.1)
  737.                         local boxes = workspace.AllSupplyBoxes:GetChildren()
  738.                         for i=1,#boxes do
  739.                             local box = boxes[i]
  740.                             if box.Anchored==false and box.Position.Z>-55 then
  741.                                 network:FireServer("UpdateProperty", box, "CFrame", CFrame.new(RNG:NextNumber(0,40),RNG:NextNumber(-10,-30),-70))
  742.                                 wait()
  743.                             end
  744.                         end
  745.                         wait(0.1)
  746.                     end
  747.                 end
  748.                 if not waiting then
  749.                     --move boxes
  750.                     root.CFrame=CFrame.new(8,12.4,-1020)
  751.                     wait(0.1)
  752.                     alt=1-alt
  753.                     lastBox=nil
  754.                     local j=0
  755.                     local boxes = workspace.AllSupplyBoxes:GetChildren()
  756.                     for i=1,#boxes do
  757.                         local box = boxes[i]
  758.                         if box.Anchored==false and box.Position.Z < -940 and bcolorToSupply[box.BrickColor.Name] and supplyCounts[bcolorToSupply[box.BrickColor.Name]]<settings.refill_end then
  759.                             box.CFrame = CFrame.new(38-4*j,5,-7-5*alt)
  760.                             network:FireServer("UpdateProperty", box, "CFrame", box.CFrame)
  761.                             lastBox=box
  762.                             j=j+1
  763.                             if j>8 then break end
  764.                         end
  765.                     end
  766.                     if alt==0 and lastBox then
  767.                         waiting=true
  768.                         waitingTick=tick()
  769.                     end
  770.                 end
  771.             end
  772.             root.CFrame=oldcf
  773.         end
  774.     end
  775.     if doDelivery then
  776.         local del = FindFirstDeliveryTool()
  777.         if delTool==nil and del then
  778.             --get tool
  779.             delTool=del
  780.             if (root.Position-delTool.Handle.Position).magnitude>19 then
  781.                 root.CFrame = CFrame.new(delTool.Handle.Position+Vector3.new(0,1,-15))
  782.             end
  783.             delTool.Handle.CanCollide=false
  784.             delTool.Handle.CFrame = root.CFrame
  785.             wait(0.9)
  786.             delay(6,forgetDeliveryTool)
  787.         elseif delTool and delTool.Parent==character and delTouched==false then
  788.             --deliver to house
  789.             local housePart = getHousePart(delTool.Name)
  790.             if housePart then
  791.                 delTouched=true
  792.                 root.CFrame = housePart.CFrame+Vector3.new(0,9,0)
  793.                 wait(0.3)
  794.             end
  795.         end
  796.     end
  797. end



  • Recent Roblox Scripts