TheUltimateRG

SirelKilla's pizza farm, but with any exploit

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