local Z=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local I=Z:WaitForChild("\077\111\100\117\108\101\115")local S=game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")local C=require(I.src.AudioPlayer)C.preloadAudio({Scary_bg=1838699126,Desert_Sands=1848350335;Simple_Click=3061551819,Notification=2296072875;Finish=5105488525;Evil_Laugh=4515583231;Charlie_Head=1051288871;Coin_Collect=930700226;Effect_Mouse=4925151540,Effect_Scream1=932049501;Effect_Scream2=3382463374,Effect_Scream3=3806051152;Effect_Scream4=9043345732,Effect_Scream5=3382463374,Effect_Chainsaw1=5593083406;Effect_Chainsaw2=3698278783,Effect_Whisper1=244480574,Effect_Whisper2=5362062455,Effect_Whisper3=441243549,Effect_ISeeYou=913821443,Effect_Fart=251309043;Effect_Barking=4058571629;Effect_WindHowl=5516579371,Effect_WolfHowl=9120789596;Effect_Snarl=1843130339;Effect_WolfSnarl=357353759;Effect_ZombieSnarl=4974305427})C.playBackgroundAudio("\068\101\115\101\114\116\095\083\097\110\100\115")local f=require(I.src.gui.LoadingScreen)local L=game:GetService("\080\108\097\121\101\114\115")local n=L.LocalPlayer f:show(n)local y=require(Z.HotReloadClient)local i=y.getSavedState()local s={}if i~=nil then s=i.savedActions end local U={destructors={};savedActions=s;running=true,wasReloaded=i~=nil}y.start({getNext=function()return S.StarterPlayerScripts.clientSrc:Clone()end;getCurrent=function()return script end;beforeUnload=function()U.running=false for Z,I in ipairs(U.destructors)do local S,C=pcall(I)if not S then warn("\070\097\105\108\117\114\101 \100\117\114\105\110\103 \100\101\115\116\114\117\099\116\105\111\110\058 "..C)end end return{savedActions=U.savedActions}end})local k=require(script.main)k(U)local r=n.Character or n.CharacterAdded:Wait()f:hide(r)
--[[
	This is the entry-point for the client.

	It mostly just contains setup code for hot-reloading, which is used in
	development only.
]]

local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Modules = ReplicatedStorage:WaitForChild('Modules')
local StarterPlayer = game:GetService('StarterPlayer')

local AudioPlayer = require(Modules.src.AudioPlayer)

AudioPlayer.preloadAudio({
	Scary_bg = 1838699126,
	Desert_Sands = 1848350335,
	Simple_Click = 3061551819,
	Notification = 2296072875,
	Finish = 5105488525,
	Evil_Laugh = 4515583231,
	Charlie_Head = 1051288871,
	Coin_Collect = 930700226,
	Effect_Mouse = 4925151540,
	Effect_Scream1 = 932049501,
	Effect_Scream2 = 3382463374,
	Effect_Scream3 = 3806051152,
	Effect_Scream4 = 9043345732,
	Effect_Scream5 = 3382463374,
	Effect_Chainsaw1 = 5593083406,
	Effect_Chainsaw2 = 3698278783,
	Effect_Whisper1 = 244480574,
	Effect_Whisper2 = 5362062455,
	Effect_Whisper3 = 441243549,
	Effect_ISeeYou = 913821443,
	Effect_Fart = 251309043,
	Effect_Barking = 4058571629,
	Effect_WindHowl = 5516579371,
	Effect_WolfHowl = 9120789596,
	Effect_Snarl = 1843130339,
	Effect_WolfSnarl = 357353759,
	Effect_ZombieSnarl = 4974305427,
})

AudioPlayer.playBackgroundAudio('Desert_Sands')

local loadingScreen = require(Modules.src.gui.LoadingScreen)
local Players = game:GetService('Players')
local localPlayer = Players.LocalPlayer

loadingScreen:show(localPlayer)

local HotReloadClient = require(ReplicatedStorage.HotReloadClient)

local savedState = HotReloadClient.getSavedState()
local savedActions = {}

if savedState ~= nil then
	savedActions = savedState.savedActions
end

local context = {
	destructors = {},
	savedActions = savedActions,
	running = true,
	wasReloaded = savedState ~= nil,
}

HotReloadClient.start({
	getNext = function()
		return StarterPlayer.StarterPlayerScripts.clientSrc:Clone()
	end,
	getCurrent = function()
		return script
	end,
	beforeUnload = function()
		context.running = false

		for _, destructor in ipairs(context.destructors) do
			local ok, result = pcall(destructor)

			if not ok then
				warn('Failure during destruction: ' .. result)
			end
		end

		return { savedActions = context.savedActions }
	end,
})

local main = require(script.main)
main(context)

local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()

loadingScreen:hide(character)