Advertisement
Honansik

Work at a Pizza Place Auto Farm Script

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