1. local ChangerFound = false
  2. local ChangerRemote = nil
  3. local ToppingFound = false
  4. local ToppingRemote = nil
  5. local FlattenFound = false
  6. local FlattenRemote = nil
  7. local s,f=pcall(function()
  8. local Dough = game:GetService("Workspace").AllDough.Dough
  9. for i,v in pairs(game:GetService("ReplicatedStorage").Communication.Events:GetChildren()) do
  10. if not ChangerFound then
  11. local SpecifiedAnchored = not Dough.Anchored
  12. v:FireServer(Dough,"Anchored",SpecifiedAnchored)
  13. wait(0.1)
  14. if Dough.Anchored == SpecifiedAnchored then
  15. ChangerFound = true
  16. ChangerRemote = v
  17. print("CHANGER REMOTE FOUND")
  18. end
  19. end
  20. end
  21. for i,v in pairs(game:GetService("ReplicatedStorage").Communication.Events:GetChildren()) do
  22. if not ToppingFound then
  23. v:FireServer(Dough, "Cheese")
  24. wait(0.1)
  25. if Dough.SG.Frame:FindFirstChild("Cheese") then
  26. ToppingFound = true
  27. ToppingRemote = v
  28. print("TOPPING REMOTE FOUND")
  29. end
  30. end
  31. end
  32. for i,v in pairs(game:GetService("ReplicatedStorage").Communication.Events:GetChildren()) do
  33. if not FlattenFound then
  34. v:FireServer(Dough)
  35. wait(0.1)
  36. if not Dough:FindFirstChildOfClass("SpecialMesh") then
  37. FlattenFound = true
  38. FlattenRemote = v
  39. print("FLATTEN REMOTE FOUND")
  40. end
  41. end
  42. end
  43. function Change(Instance,Property,Value)
  44. ChangerRemote:FireServer(Instance,Property,Value)
  45. end
  46. function Topping(Instance,Topping)
  47. ToppingRemote:FireServer(Instance,Topping)
  48. end
  49. function Flatten(Instance)
  50. FlattenRemote:FireServer(Instance)
  51. end
  52. game:GetService("UserInputService").InputBegan:Connect(function(inputa,gp)
  53. if gp then return end
  54. if inputa.KeyCode == Enum.KeyCode.Q then
  55. Flatten(game.Players.LocalPlayer:GetMouse().Target)
  56. end
  57. if inputa.KeyCode == Enum.KeyCode.E then
  58. Topping(game.Players.LocalPlayer:GetMouse().Target,"Cheese")
  59. Topping(game.Players.LocalPlayer:GetMouse().Target,"TomatoSauce")
  60. end
  61. if inputa.KeyCode == Enum.KeyCode.R then
  62. Topping(game.Players.LocalPlayer:GetMouse().Target,"Pepperoni")
  63. Topping(game.Players.LocalPlayer:GetMouse().Target,"Cheese")
  64. Topping(game.Players.LocalPlayer:GetMouse().Target,"TomatoSauce")
  65. end
  66. if inputa.KeyCode == Enum.KeyCode.T then
  67. Topping(game.Players.LocalPlayer:GetMouse().Target,"Sausage")
  68. Topping(game.Players.LocalPlayer:GetMouse().Target,"Cheese")
  69. Topping(game.Players.LocalPlayer:GetMouse().Target,"TomatoSauce")
  70. end
  71. if inputa.KeyCode == Enum.KeyCode.Y then
  72. for i,v in pairs(game:GetService("Workspace").AllDough:GetChildren()) do
  73. if v:FindFirstChildOfClass("SpecialMesh") then
  74. Flatten(v)
  75. wait()
  76. end
  77. end
  78. for i,v in pairs(game:GetService("Workspace").AllDough:GetChildren()) do
  79. Topping(v,"TomatoSauce")
  80. wait()
  81. end
  82. for i,v in pairs(game:GetService("Workspace").AllDough:GetChildren()) do
  83. Topping(v,"Cheese")
  84. wait()
  85. end
  86. local OvenPositions = {
  87. CFrame.new(59.3907127, 8.87603855, 55),
  88. CFrame.new(59.3907127, 7.55361891, 60),
  89. CFrame.new(59.3907127, 7.55361891, 65),
  90. CFrame.new(59.3907127, 7.55361891, 50),
  91. CFrame.new(59.3907127, 1.8, 55),
  92. CFrame.new(59.3907127, 1.8, 60),
  93. CFrame.new(59.3907127, 1.8, 65),
  94. CFrame.new(59.3907127, 1.8, 50)
  95. }
  96. for i,v in pairs(game:GetService("Workspace").Ovens:GetChildren()) do
  97. if not v.IsOpen.Value then
  98. v.Door.ClickDetector.Detector:FireServer()
  99. wait()
  100. end
  101. end
  102. for i,v in pairs(game:GetService("Workspace").Ovens:GetChildren()) do
  103. if v.IsOpen.Value then
  104. v.Door.ClickDetector.Detector:FireServer()
  105. wait()
  106. end
  107. end
  108. for i,v in pairs(game:GetService("Workspace").AllDough:GetChildren()) do
  109. i=math.fmod(i,8)+1
  110. Change(v,"CFrame",OvenPositions[i])
  111. wait()
  112. end
  113. end
  114. end)
  115. end) if not s then print(f)end