local s=require(game.ReplicatedStorage.Modules.CameraShaker)local I=game.Workspace.CurrentCamera local c={}local M=s.new(Enum.RenderPriority.Camera.Value,function(s)I.CFrame=I.CFrame*s end)M:Start()local e=300 function c.Initialize()while script.Parent and script.Parent~=nil do wait(math.random(60,120))local c=(I.CFrame.Position-script.Parent.Position).Magnitude if c<=e then M:Shake(s.Presets.Earthquake)end script.Parent.Erupt:Play()script.Parent.ParticleEmitter.Enabled=true wait(8)script.Parent.ParticleEmitter.Enabled=false end end return c

local CameraShaker = require(game.ReplicatedStorage.Modules.CameraShaker)
local camera = game.Workspace.CurrentCamera

local module = {}
	
local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCFrame)
	camera.CFrame = camera.CFrame * shakeCFrame
end)

camShake:Start()

local minimumDistance = 300

function module.Initialize()
	while script.Parent and script.Parent ~= nil do
		wait(math.random(60,120))
		local distance = (camera.CFrame.Position - script.Parent.Position).Magnitude
		if distance <= minimumDistance then
			camShake:Shake(CameraShaker.Presets.Earthquake)
		end
			script.Parent.Erupt:Play()
			script.Parent.ParticleEmitter.Enabled = true
			wait(8)
			script.Parent.ParticleEmitter.Enabled = false
	end
end

return module
