Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Script by Forever4D#5448 :D
- local Pizza_Baker = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local txt = Instance.new("TextLabel")
- local btn = Instance.new("TextButton")
- local main2 = Instance.new("Frame")
- local txt_2 = Instance.new("TextLabel")
- Pizza_Baker.Name = "Pizza_Baker"
- Pizza_Baker.Parent = game.Players.LocalPlayer.PlayerGui
- Main.Name = "Main"
- Main.Parent = Pizza_Baker
- Main.Active = true
- Main.BackgroundColor3 = Color3.new(0.0431373, 0.584314, 1)
- Main.BorderColor3 = Color3.new(1, 1, 1)
- Main.BorderSizePixel = 2
- Main.ClipsDescendants = true
- Main.Position = UDim2.new(0.301336586, 0, 0.384387374, 0)
- Main.Selectable = true
- Main.Size = UDim2.new(0, 235, 0, 117)
- txt.Name = "txt"
- txt.Parent = Main
- txt.BackgroundColor3 = Color3.new(1, 1, 1)
- txt.BackgroundTransparency = 1
- txt.BorderSizePixel = 0
- txt.Position = UDim2.new(0.0744680837, 0, 0, 0)
- txt.Size = UDim2.new(0, 200, 0, 37)
- txt.Font = Enum.Font.Cartoon
- txt.Text = "Bloxburg Pizza Baker"
- txt.TextColor3 = Color3.new(1, 1, 1)
- txt.TextScaled = true
- txt.TextSize = 14
- txt.TextWrapped = true
- txt.TextXAlignment = Enum.TextXAlignment.Left
- btn.Name = "btn"
- btn.Parent = Main
- btn.BackgroundColor3 = Color3.new(0.0431373, 0.584314, 1)
- btn.BorderColor3 = Color3.new(0.313726, 0.623529, 1)
- btn.BorderSizePixel = 2
- btn.Position = UDim2.new(0.165957451, 0, 0.498130351, 0)
- btn.Size = UDim2.new(0, 156, 0, 25)
- btn.Font = Enum.Font.Bodoni
- btn.Text = "Auto Pizza Baker"
- btn.TextColor3 = Color3.new(1, 1, 1)
- btn.TextScaled = true
- btn.TextSize = 14
- btn.TextWrapped = true
- main2.Name = "main2"
- main2.Parent = Main
- main2.BackgroundColor3 = Color3.new(1, 1, 1)
- main2.BorderSizePixel = 0
- main2.Position = UDim2.new(-0.00425531901, 0, 0.316239327, 0)
- main2.Size = UDim2.new(0, 236, 0, 3)
- txt_2.Name = "txt"
- txt_2.Parent = Main
- txt_2.BackgroundColor3 = Color3.new(1, 1, 1)
- txt_2.BackgroundTransparency = 1
- txt_2.BorderSizePixel = 0
- txt_2.Position = UDim2.new(0.165957451, 0, 0.829059839, 0)
- txt_2.Size = UDim2.new(0, 200, 0, 13)
- txt_2.Font = Enum.Font.Cartoon
- txt_2.Text = "Script by Forever4D#5448"
- txt_2.TextColor3 = Color3.new(1, 1, 1)
- txt_2.TextScaled = true
- txt_2.TextSize = 14
- txt_2.TextWrapped = true
- txt_2.TextXAlignment = Enum.TextXAlignment.Left
- Main.Draggable = true
- btn.MouseButton1Click:connect(function()
- local Players = game.Players
- local Player = Players['LocalPlayer']
- local Character = Player.Character or Player.CharacterAdded:wait()
- local HRP = Character['HumanoidRootPart']
- local Stat = workspace.Stats[Player.Name]
- local DE = game.ReplicatedStorage.DataEvent
- local UE = Player.PlayerGui.MainGUI.Scripts.Inventory.UpdateEvent
- local PP = workspace.PizzaPlanet
- local Stations = PP['BakerWorkstations']
- local Crates = PP['IngredientCrates']
- local Working, Stocking = true
- Stat.Job:GetPropertyChangedSignal('Value'):Connect(function()
- if Stat.Job.Value == 'PizzaPlanetBaker' then Working = false
- else Working = true end
- end)
- if Stat.Job.Value == 'PizzaPlanetBaker' then Working = false end
- local Orders = {
- Cheese = {true,true,true,false};
- Vegetable = {true,true,true,'Vegetable'};
- Ham = {true,true,true,'Ham'};
- Pepperoni = {true,true,true,'Pepperoni'}
- }
- local CrateTP = Vector3.new(1163.78955, 13.5, 258.54892)
- local Positions = {
- Vector3.new(1173.34778, 13.5, 226.585571),
- Vector3.new(1172.8501, 13.5, 238.183029),
- Vector3.new(1173.20837, 13.5, 250.465881),
- Vector3.new(1173.47266, 13.5, 259.170837)
- }
- local Part1 = coroutine.wrap(function()
- while wait() do
- for __, station in next, (Stations:GetChildren()) do
- if Working then break end
- local CT = station:FindFirstChild('CounterTop')
- if CT then CT.Parent = nil end
- station.InUse.Value = Player
- local Pos = Positions[__]
- Character.Humanoid.WalkToPoint = Pos
- repeat wait() until (HRP.Position - Pos).magnitude < 2 or Working
- if Working then break end
- local NI = station['OrderDisplay']['DisplayMain']:FindFirstChild('NoIngredients',true)
- if NI and NI.Visible and not Working then
- Stocking = true
- local Pos = CrateTP
- Character.Humanoid.WalkToPoint = Pos
- repeat wait() until (HRP.Position - Pos).magnitude < 2.75 or Working
- if Working then break end
- local Crate = Crates.Crate;
- for __, cr in next, (Crates:GetChildren()) do
- if (cr.Position - HRP.Position).magnitude < (Crate.Position - HRP.Position).magnitude then
- Crate = cr
- end
- end
- Crate.Parent = game.Lighting.TempFolder
- wait()
- DE:FireServer({
- Object = game.Lighting.TempFolder.Crate,
- Type = 'TakeIngredientCrate'
- })
- Crate.Parent = Crates
- UE:Fire(Stat.EquippedItem)
- wait()
- end
- local Pos = Positions[__]
- Character.Humanoid.WalkToPoint = Pos
- repeat wait() until (HRP.Position - Pos).magnitude < 2 or Working
- if Working then break end
- if Stocking then
- DE:FireServer({
- Workstation = station,
- Type = 'RestockIngredients'
- })
- end
- Stocking = false
- end
- for i = #Positions, 1, -1 do
- local station = Stations:GetChildren()[i]
- if Working then break end
- local CT = station:FindFirstChild('CounterTop')
- if CT then CT.Parent = nil end
- station.InUse.Value = Player
- local Pos = Positions[i]
- Character.Humanoid.WalkToPoint = Pos
- repeat wait() until (HRP.Position - Pos).magnitude < 2 or Working
- if Working then break end
- local NI = station['OrderDisplay']['DisplayMain']:FindFirstChild('NoIngredients',true)
- if NI and NI.Visible and not Working then
- Stocking = true
- local Pos = CrateTP
- Character.Humanoid.WalkToPoint = Pos
- repeat wait() until (HRP.Position - Pos).magnitude < 2.75 or Working
- if Working then break end
- local Crate = Crates.Crate;
- for __, cr in next, (Crates:GetChildren()) do
- if (cr.Position - HRP.Position).magnitude < (Crate.Position - HRP.Position).magnitude then
- Crate = cr
- end
- end
- Crate.Parent = game.Lighting.TempFolder
- wait()
- DE:FireServer({
- Object = game.Lighting.TempFolder.Crate,
- Type = 'TakeIngredientCrate'
- })
- Crate.Parent = Crates
- UE:Fire(Stat.EquippedItem)
- wait()
- end
- local Pos = Positions[i]
- Character.Humanoid.WalkToPoint = Pos
- repeat wait() until (HRP.Position - Pos).magnitude < 2 or Working
- if Working then break end
- if Stocking then
- DE:FireServer({
- Workstation = station,
- Type = 'RestockIngredients'
- })
- end
- Stocking = false
- end
- end
- end)
- local Part2 = coroutine.wrap(function()
- while wait(1) do
- for __, station in next, (Stations:GetChildren()) do
- if Working or Stocking then break end
- local send = Orders[station.Order.Value]
- local count = station.Order.IngredientsLeft.Value
- DE:FireServer({
- Workstation = station,
- Type = 'UseWorkstation'
- })
- if Working or Stocking then break end
- if count > 2 then count = count - 1 end
- for i = 1, count do
- DE:FireServer({
- Workstation = station,
- Type = 'UseWorkstation'
- })
- end
- if Working or Stocking then break end
- DE:FireServer({
- Order = send,
- Workstation = station,
- Type = 'FinishOrder'
- })
- UE:Fire(Stat.Job.ShiftEarnings)
- end
- end
- end)
- Part1()
- Part2()
- end)
- repeat
- for hue = 0, 1, .01 do
- Main.BorderColor3 = Color3.fromHSV(hue, 1, 1)
- wait()
- end
- for hue = 1, 0 -.01 do
- Main.BorderColor3 = Color3.fromHSV(hue, 1, 1)
- wait()
- end
- until nil
- repeat
- for hue = 0, 1, .01 do
- main2.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
- wait()
- end
- for hue = 1, 0 -.01 do
- main2.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
- wait()
- end
- until nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement