darraghd493

Work At A Pizza Place: Claim Corn Maze Chests

Oct 30th, 2025 (edited)
1,089
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | Source Code | 0 0
  1. --[[
  2.     Work At A Pizza Place: Claim Corn Maze Chests
  3.     by darraghd493
  4. ]]
  5.  
  6. repeat task.wait() until game:IsLoaded()
  7.  
  8. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  9. local Workspace = game:GetService("Workspace")
  10. local StarterGui = game:GetService("StarterGui")
  11.  
  12. local Network = require(ReplicatedStorage:WaitForChild("LibraryFolder"):WaitForChild("Network"))
  13. local Chests = Workspace:WaitForChild("CornMaze"):WaitForChild("Chests")
  14.  
  15. local count = 0
  16. for _, chestObj in pairs(Chests:GetChildren()) do
  17.     if chestObj:FindFirstChild("Index") then
  18.         Network:FireServer("ChestOpened", chestObj.Index.Value)
  19.         count = count + 1
  20.     end
  21. end
  22.  
  23. StarterGui:SetCore("SendNotification", {
  24.     Title = "Script",
  25.     Text = "Claimed "..count.."/" .. #Chests:GetChildren() .. " corn maze chests.",
  26.     Duration = 5
  27. })
  28.  
  29. if getgenv().COMPLETE_MAZE then
  30.     Workspace:WaitForChild("Main"):WaitForChild("MazeComplete"):FireServer()
  31. end
Advertisement
Add Comment
Please, Sign In to add comment