Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Work At A Pizza Place: Claim Corn Maze Chests
- by darraghd493
- ]]
- repeat task.wait() until game:IsLoaded()
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Workspace = game:GetService("Workspace")
- local StarterGui = game:GetService("StarterGui")
- local Network = require(ReplicatedStorage:WaitForChild("LibraryFolder"):WaitForChild("Network"))
- local Chests = Workspace:WaitForChild("CornMaze"):WaitForChild("Chests")
- local count = 0
- for _, chestObj in pairs(Chests:GetChildren()) do
- if chestObj:FindFirstChild("Index") then
- Network:FireServer("ChestOpened", chestObj.Index.Value)
- count = count + 1
- end
- end
- StarterGui:SetCore("SendNotification", {
- Title = "Script",
- Text = "Claimed "..count.."/" .. #Chests:GetChildren() .. " corn maze chests.",
- Duration = 5
- })
- if getgenv().COMPLETE_MAZE then
- Workspace:WaitForChild("Main"):WaitForChild("MazeComplete"):FireServer()
- end
Advertisement
Add Comment
Please, Sign In to add comment