Rules tab

Hello i need a extra darkrp tab with rules in it i searched at the other tabs and copy’s it but i dont know how to edit it to past text in it
down here i paste the tab from entinities.
Can you plz help me with editing it to a rules tab?

function GM:EntitiesTab()
local EntitiesPanel = vgui.Create(“DPanelList”)
EntitiesPanel:EnableVerticalScrollbar( true )
function EntitiesPanel:Update()
self:Clear(true)
local WepCat = vgui.Create(“DCollapsibleCategory”)
WepCat:SetLabel(“Weapons”)
local WepPanel = vgui.Create(“DPanelList”)
WepPanel:SetSize(470, 100)
WepPanel:SetAutoSize(true)
WepPanel:SetSpacing(1)
WepPanel:EnableHorizontal(true)
WepPanel:EnableVerticalScrollbar(true)
local function AddIcon(Model, description, command)
local icon = vgui.Create(“SpawnIcon”)
icon:InvalidateLayout( true )
icon:SetModel(Model)
icon:SetSize(64, 64)
icon:SetToolTip(description)
icon.DoClick = function() LocalPlayer():ConCommand("say "…command) end
WepPanel:AddItem(icon)
end

				for k,v in pairs(CustomShipments) do
					if (v.seperate and (not GAMEMODE.Config.restrictbuypistol or
						(GAMEMODE.Config.restrictbuypistol and (not v.allowed[1] or table.HasValue(v.allowed, LocalPlayer():Team())))))
						and (not v.customCheck or v.customCheck and v.customCheck(LocalPlayer())) then
						AddIcon(v.model, string.format(LANGUAGE.buy_a, "a "..v.name, CUR..(v.pricesep or "")), "/buy "..v.name)
					end
				end

				for k,v in pairs(GAMEMODE.AmmoTypes) do
					if not v.customCheck or v.customCheck(LocalPlayer()) then
						AddIcon(v.model, string.format(LANGUAGE.buy_a, v.name, CUR .. v.price), "/buyammo " .. v.ammoType)
					end
				end
		WepCat:SetContents(WepPanel)
		WepCat:SetSkin("DarkRP")
		self:AddItem(WepCat)

		local EntCat = vgui.Create("DCollapsibleCategory")
		EntCat:SetLabel("Entities")
			local EntPanel = vgui.Create("DPanelList")
			EntPanel:SetSize(470, 200)
			EntPanel:SetAutoSize(true)
			EntPanel:SetSpacing(1)
			EntPanel:EnableHorizontal(true)
			EntPanel:EnableVerticalScrollbar(true)
				local function AddEntIcon(Model, description, command)
					local icon = vgui.Create("SpawnIcon")
					icon:InvalidateLayout( true )
					icon:SetModel(Model)
					icon:SetSize(64, 64)
					icon:SetToolTip(description)
					icon.DoClick = function() LocalPlayer():ConCommand("say "..command) end
					EntPanel:AddItem(icon)
				end

				for k,v in pairs(DarkRPEntities) do
					if not v.allowed or (type(v.allowed) == "table" and table.HasValue(v.allowed, LocalPlayer():Team()))
						and (not v.customCheck or (v.customCheck and v.customCheck(LocalPlayer()))) then
						local cmdname = string.gsub(v.ent, " ", "_")

						AddEntIcon(v.model, "Buy a " .. v.name .." " .. CUR .. v.price, v.cmd)
					end
				end

				if FoodItems and (GAMEMODE.Config.foodspawn or LocalPlayer():Team() == TEAM_COOK) and (GAMEMODE.Config.hungermod or LocalPlayer():Team() == TEAM_COOK) then
					for k,v in pairs(FoodItems) do
						AddEntIcon(v.model, string.format(LANGUAGE.buy_a, "a "..k, "a few bucks"), "/buyfood "..k)
					end
				end
				for k,v in pairs(CustomShipments) do
					if not v.noship and table.HasValue(v.allowed, LocalPlayer():Team())
						and (not v.customCheck or (v.customCheck and v.customCheck(LocalPlayer()))) then
						AddEntIcon(v.model, string.format(LANGUAGE.buy_a, "a "..v.name .." shipment", CUR .. tostring(v.price)), "/buyshipment "..v.name)
					end
				end
		EntCat:SetContents(EntPanel)
		EntCat:SetSkin("DarkRP")
		self:AddItem(EntCat)


		if #CustomVehicles <= 0 then return end
		local VehicleCat = vgui.Create("DCollapsibleCategory")
		VehicleCat:SetLabel("Vehicles")
			local VehiclePanel = vgui.Create("DPanelList")
			VehiclePanel:SetSize(470, 200)
			VehiclePanel:SetAutoSize(true)
			VehiclePanel:SetSpacing(1)
			VehiclePanel:EnableHorizontal(true)
			VehiclePanel:EnableVerticalScrollbar(true)
			local function AddVehicleIcon(Model, skin, description, command)
				local icon = vgui.Create("SpawnIcon")
				icon:InvalidateLayout( true )
				icon:SetModel(Model)
				icon:SetSkin(skin)
				icon:SetSize(64, 64)
				icon:SetToolTip(description)
				icon.DoClick = function() LocalPlayer():ConCommand("say "..command) end
				VehiclePanel:AddItem(icon)
			end

			local founds = 0
			for k,v in pairs(CustomVehicles) do
				if not v.allowed or table.HasValue(v.allowed, LocalPlayer():Team()) then
					local Skin = (list.Get("Vehicles")[v.name] and list.Get("Vehicles")[v.name].KeyValues and list.Get("Vehicles")[v.name].KeyValues.Skin) or "0"
					AddVehicleIcon(v.model or "models/buggy.mdl", Skin, "Buy a "..v.name.." for "..CUR..v.price, "/buyvehicle "..v.name)
					founds = founds + 1
				end
			end
		if founds ~= 0 then
			VehicleCat:SetContents(VehiclePanel)
			VehicleCat:SetSkin("DarkRP")
			self:AddItem(VehicleCat)
		else
			VehiclePanel:Remove()
			VehicleCat:Remove()
		end
	end
EntitiesPanel:SetSkin("DarkRP")
EntitiesPanel:Update()
return EntitiesPanel

end


(User was banned for this post ("please don't paste a bunch of code and expect us to make it work for you" - garry))

Use code tags.

iam noob at lua so i dont know it…
thats why i posted here maybe someone can do it for me

He means on Facepunch:



function GM:EntitiesTab()
local EntitiesPanel = vgui.Create("DPanelList")
EntitiesPanel:EnableVerticalScrollbar( true )
function EntitiesPanel:Update()
self:Clear(true)
local WepCat = vgui.Create("DCollapsibleCategory")
WepCat:SetLabel("Weapons")
local WepPanel = vgui.Create("DPanelList")
WepPanel:SetSize(470, 100)
WepPanel:SetAutoSize(true)
WepPanel:SetSpacing(1)
WepPanel:EnableHorizontal(true)
WepPanel:EnableVerticalScrollbar(true)
local function AddIcon(Model, description, command)
local icon = vgui.Create("SpawnIcon")
icon:InvalidateLayout( true )
icon:SetModel(Model)
icon:SetSize(64, 64)
icon:SetToolTip(description)
icon.DoClick = function() LocalPlayer():ConCommand("say "..command) end
WepPanel:AddItem(icon)
end

for k,v in pairs(CustomShipments) do
if (v.seperate and (not GAMEMODE.Config.restrictbuypistol or
(GAMEMODE.Config.restrictbuypistol and (not v.allowed[1] or table.HasValue(v.allowed, LocalPlayer():Team())))))
and (not v.customCheck or v.customCheck and v.customCheck(LocalPlayer())) then
AddIcon(v.model, string.format(LANGUAGE.buy_a, "a "..v.name, CUR..(v.pricesep or "")), "/buy "..v.name)
end
end

for k,v in pairs(GAMEMODE.AmmoTypes) do
if not v.customCheck or v.customCheck(LocalPlayer()) then
AddIcon(v.model, string.format(LANGUAGE.buy_a, v.name, CUR .. v.price), "/buyammo " .. v.ammoType)
end
end
WepCat:SetContents(WepPanel)
WepCat:SetSkin("DarkRP")
self:AddItem(WepCat)

local EntCat = vgui.Create("DCollapsibleCategory")
EntCat:SetLabel("Entities")
local EntPanel = vgui.Create("DPanelList")
EntPanel:SetSize(470, 200)
EntPanel:SetAutoSize(true)
EntPanel:SetSpacing(1)
EntPanel:EnableHorizontal(true)
EntPanel:EnableVerticalScrollbar(true)
local function AddEntIcon(Model, description, command)
local icon = vgui.Create("SpawnIcon")
icon:InvalidateLayout( true )
icon:SetModel(Model)
icon:SetSize(64, 64)
icon:SetToolTip(description)
icon.DoClick = function() LocalPlayer():ConCommand("say "..command) end
EntPanel:AddItem(icon)
end

for k,v in pairs(DarkRPEntities) do
if not v.allowed or (type(v.allowed) == "table" and table.HasValue(v.allowed, LocalPlayer():Team()))
and (not v.customCheck or (v.customCheck and v.customCheck(LocalPlayer()))) then
local cmdname = string.gsub(v.ent, " ", "_")

AddEntIcon(v.model, "Buy a " .. v.name .." " .. CUR .. v.price, v.cmd)
end
end

if FoodItems and (GAMEMODE.Config.foodspawn or LocalPlayer():Team() == TEAM_COOK) and (GAMEMODE.Config.hungermod or LocalPlayer():Team() == TEAM_COOK) then
for k,v in pairs(FoodItems) do
AddEntIcon(v.model, string.format(LANGUAGE.buy_a, "a "..k, "a few bucks"), "/buyfood "..k)
end
end
for k,v in pairs(CustomShipments) do
if not v.noship and table.HasValue(v.allowed, LocalPlayer():Team())
and (not v.customCheck or (v.customCheck and v.customCheck(LocalPlayer()))) then
AddEntIcon(v.model, string.format(LANGUAGE.buy_a, "a "..v.name .." shipment", CUR .. tostring(v.price)), "/buyshipment "..v.name)
end
end
EntCat:SetContents(EntPanel)
EntCat:SetSkin("DarkRP")
self:AddItem(EntCat)


if #CustomVehicles <= 0 then return end
local VehicleCat = vgui.Create("DCollapsibleCategory")
VehicleCat:SetLabel("Vehicles")
local VehiclePanel = vgui.Create("DPanelList")
VehiclePanel:SetSize(470, 200)
VehiclePanel:SetAutoSize(true)
VehiclePanel:SetSpacing(1)
VehiclePanel:EnableHorizontal(true)
VehiclePanel:EnableVerticalScrollbar(true)
local function AddVehicleIcon(Model, skin, description, command)
local icon = vgui.Create("SpawnIcon")
icon:InvalidateLayout( true )
icon:SetModel(Model)
icon:SetSkin(skin)
icon:SetSize(64, 64)
icon:SetToolTip(description)
icon.DoClick = function() LocalPlayer():ConCommand("say "..command) end
VehiclePanel:AddItem(icon)
end

local founds = 0
for k,v in pairs(CustomVehicles) do
if not v.allowed or table.HasValue(v.allowed, LocalPlayer():Team()) then
local Skin = (list.Get("Vehicles")[v.name] and list.Get("Vehicles")[v.name].KeyValues and list.Get("Vehicles")[v.name].KeyValues.Skin) or "0"
AddVehicleIcon(v.model or "models/buggy.mdl", Skin, "Buy a "..v.name.." for "..CUR..v.price, "/buyvehicle "..v.name)
founds = founds + 1
end
end
if founds ~= 0 then
VehicleCat:SetContents(VehiclePanel)
VehicleCat:SetSkin("DarkRP")
self:AddItem(VehicleCat)
else
VehiclePanel:Remove()
VehicleCat:Remove()
end
end
EntitiesPanel:SetSkin("DarkRP")
EntitiesPanel:Update()
return EntitiesPanel
end


Why are you editing the EntitiesTab to make a new tab on the F4Menu?

You know how to make a whole new tab?