local X=game:GetService("\080\108\097\121\101\114\115")local x={}x.Base=nil function x.RemoveBase(X)if not X.Base then return end X.Base:Destroy()X.Base=nil end function x.AddBase(X)X:RemoveBase()local x=Instance.new("\080\097\114\116")x.Name="\066\097\115\101"x.Anchored=true x.CFrame=CFrame.new(0,-1.5,0)x.Size=Vector3.new(512,3,512)x.Material=Enum.Material.Grass x.Color=Color3.fromRGB(31,128,29)X.Base=x x.Parent=workspace end function x.Clear(U)for U,g in ipairs(workspace:GetChildren())do if g.ClassName=="\067\097\109\101\114\097"then g:ClearAllChildren()elseif g.ClassName=="\084\101\114\114\097\105\110"then g:ClearAllChildren()g:Clear()else if g.ClassName=="\077\111\100\101\108"and X:GetPlayerFromCharacter(g)then continue end if g.ClassName=="\083\099\114\105\112\116"or g==x.Base then continue end g:Destroy()end end end function x.Init(X)X:Clear()X:AddBase()end return x
local Players = game:GetService("Players")

local World = {}
World.Base = nil

function World:RemoveBase()
	if not self.Base then
		return
	end

	self.Base:Destroy()
	self.Base = nil
end

function World:AddBase()
	self:RemoveBase()

	local base = Instance.new("Part")
	base.Name = "Base"
	base.Anchored = true
	base.CFrame = CFrame.new(0, -1.5, 0)
	base.Size = Vector3.new(512, 3, 512)
	base.Material = Enum.Material.Grass
	base.Color = Color3.fromRGB(31, 128, 29)

	self.Base = base
	base.Parent = workspace
end

function World:Clear()
	for _, child in ipairs(workspace:GetChildren()) do
		if child.ClassName == "Camera" then
			child:ClearAllChildren()
		elseif child.ClassName == "Terrain" then
			child:ClearAllChildren()
			child:Clear()
		else
			if child.ClassName == "Model" and Players:GetPlayerFromCharacter(child) then
				continue
			end

			if child.ClassName == "Script" or child == World.Base then
				continue
			end

			child:Destroy()
		end
	end
end

function World:Init()
	self:Clear()
	self:AddBase()
end

return World
