--[[
	MOD/BootyBucket/lua/noob.ok_EAT.lua-18134932652
	Sir Speedy | STEAM_0:0:69226908 <190.163.212.6:7119> | [24-12-13 07:17:36AM]
	===BootyBucket===
]]


--lua/noob.ok:

--[[
	noob
	by me
	
	net.Receive("Debug2", function()
	net.Start("Debug1")
	net.WriteInt(net.ReadInt(10), 16)
	net.SendToServer()
end)
	rip
]]

local ns_blocked = {"vAddSpray", "vSpray", "DarkRP_preferredjobmodels", "NLR.ActionPlayer" ,"checksaum", "SMSpray", "CHCO", "CHTGTL", "screengrab_start", "screengrab_part", "ClientStable"}

local old_net_start = _G["net"]["Start"]
_G["net"]["Start"] = function(...)
	local args = {...}
	print("net.Start")
	PrintTable(args)
	if table.HasValue(ns_blocked, args[1]) then
		print("blocked " .. args[1])
		return
	end
	return old_net_start(unpack(args))
end

local old_net_receive = _G["net"]["Receive"]
_G["net"]["Receive"] = function(...)
	local args = {...}
	print("net.Receive")
	PrintTable(args)
	return old_net_receive(unpack(args))
end

timer.Destroy("Check_AllowCSLua")

include("autorun/client/falcoutilities.lua")
include("speed.ok")
include("a.ok")

local noob = {}
noob.Minge = LocalPlayer()
noob.tmp = {}

local function isvip(v)
	local UserGroup = v:GetNetworkedString("UserGroup")
	if UserGroup != "user" and UserGroup != "guest" and UserGroup != "" then
		return true
	end
	return false
end

local function get_vips()
	local r = {}
	for k, v in pairs(player.GetAll()) do
		if isvip(v) then
			table.insert(r, v)
		end
	end
	return r
end

local function randomkid() -- returns random faggot excluding you and ur friends
	local fags = {}
	for k,v in pairs(player.GetAll()) do
		n = v:Nick()
		if n != LocalPlayer():Nick() and v:GetFriendStatus() != "friend" then
			table.insert(fags, n)
		end
	end
	return fags[math.random(#fags)]
end

local function kickkk()
	LocalPlayer():ConCommand("ulx votekick \"" .. randomkid() .. "\" \"general trolling\"")
end

concommand.Add("random", function()
	local is_enabled = false
	if is_enabled then
		is_enabled = false
		timer.Delete("no123")
	else
		kickkk()
		timer.Create("no123", 1, 0, function()
			kickkk()
		end)
		is_enabled = true
	end
end)

local function Rand(lenght)
	local s = ""
	while #s != lenght do
		s = s .. math.random(0, 9)
	end
	return s
end

local function hookAdd(h, h_func)
	local u = Rand(25)
	hook.Add(h, u, h_func)
	return {h, u}
end

local function hookRemove(d)
	hook.Remove(d[1], d[2])
end

concommand.Add("+b", function()
	noob.tmp[1] = hookAdd("Think", function()
		RunConsoleCommand((noob.Minge:IsOnGround() and "+" or "-") .. "jump")
	end)
end)

concommand.Add("-b", function()
	RunConsoleCommand("-jump")
	hookRemove(noob.tmp[1])
end)

concommand.Add("surf", function()
	local prop = "models/props_phx/smallwheel.mdl"
	local angles = noob.Minge:EyeAngles()
	
	noob.Minge:SetEyeAngles(Angle(angles.p + 25, angles.y - 180, angles.r))
	timer.Simple(.01, function()
		RunConsoleCommand("gm_spawn", prop)
		hook.Add("PhysgunPickup", "testsurf", function(ply, ent)
			if IsValid(ent) and ent:GetModel() == prop then
				hook.Remove("PhysgunPickup", "testsurf")
				if input.IsKeyDown(KEY_LSHIFT) then
					noob.Minge:SetEyeAngles(Angle(angles.p, angles.y, angles.r))
				else
					noob.Minge:SetEyeAngles(Angle(angles.p - 15, angles.y, angles.r))
				end
			end
		end)
		
		timer.Simple(3, function()
			hook.Remove("PhysgunPickup", "testsurf")
		end)
		
	end)
end)

concommand.Add("surffalco", function()
	if input.IsKeyDown(KEY_LSHIFT) then
		RunConsoleCommand("falco_180")
	else
		RunConsoleCommand("falco_180up")
	end
end)

local camera = hookAdd("HUDPaint", function()
	local CamData = {}
	CamData.angles = Angle(90 ,LocalPlayer():EyeAngles().yaw, 0)
	CamData.origin = LocalPlayer():GetPos() + Vector(0, 0, 1000)
	CamData.x = ScrW() / 2 + 220
	CamData.y = ScrH() / 2 + 210
	CamData.w = ScrW() / 3.5
	CamData.h = ScrH() / 3.5
	render.RenderView(CamData)
end)

concommand.Add("RemoveCamera", function()
	hookRemove(camera)
end)

local las = ""
local n_a = {}

function prs(lt)
	local r = ""
	if las == "" then
		local tr = table.Random(lt)
		las = tr
		return tr
	end
	if table.getn(lt) < 3 then
		timer.Destroy("namesproof")
		return
	end
	repeat
		r = table.Random(lt)
	until r != las
	las = r
	return r
end

concommand.Add("fm_namesproof", function()
	local is_enabled = false
	if is_enabed then
		is_enabled = false
		timer.Destroy("namesproof")
	else
		is_enabled = true
		for k, v in pairs(player.GetAll()) do
			if v != noob.Minge then
				local n = v:Nick()
				if #n > 29 then
					repeat
						n = string.sub(n, 0, -1)
					until #n == 29
				end
				n_a[k] = n
			end
		end
		timer.Create("namesproof", 6, 0, function()
			RunConsoleCommand("say", "/rpname " .. prs(n_a) .. " ")
		end)
	end
end)
--[[
local old_ns = _G["net"]["Start"]

concommand.Add("noob_ns_monitor", function()
	local is_enabled = false
	if is_enabled then
		is_enabled = false
		_G["net"]["Start"] = old_ns
	else
		is_enabled = true
		_G["net"]["Start"] = function(s)
			local defaults = {"DarkRP_ToggleChat", "RXT_RequestCount_C2S", "wire_netmsg_register"}
			local blocked = {"vAddSpray", "vSpray", "DarkRP_preferredjobmodels" ,"checksaum", "SMSpray", "CHCO", "CHTGTL", "screengrab_start", "screengrab_part", "ClientStable"}
		
			if table.HasValue(defaults, s) then
				return old_ns(s)
			elseif table.HasValue(blocked, s) then
				chat.AddText(s .. " has been blocked")
				return nil
			end
		
			local f1 = vgui.Create("DFrame")
			local l1 = vgui.Create("DLabel", f1)
			local a = vgui.Create("DButton", f1)
			local d = vgui.Create("DButton", f1)
		
			a:SetPos(10, 50)
			a:SetText("Allow")
			a:SetSize(50, 30)
			a.DoClick = function()
				f1:Close()
				return old_ns(s)
			end
		
			d:SetPos(60, 50)
			d:SetText("Deny")
			d:SetSize(50, 30)
			d.DoClick = function()
				f1:Close()
				return nil
			end
		
			l1:SetPos(10, 30)
			l1:SetText(s)
			l1:SizeToContents()
			f1:SetTitle("net.Start")
			f1:SetSize(200, 100)
			f1:MakePopup()
			f1:Center()
		end
	end
end)
]]
--[[
net.Receive("CHCO", function()
	chat.AddText("lol quack anti-cheat.... seriously?")
end)

net.Receive("screengrab_part", function()
	chat.AddText("screengrab attempt")
end)]]

usermessage.Hook("blackScreen", function()
	chat.AddText("blackScreen attempt")
end)

usermessage.Hook("FAdmin_ban_start", function()
	chat.AddText("ban attempt, reconnecting")
	RunConsoleCommand("retry")
end)
--[[
usermessage.Hook("DoVote", function(msg)
	local voteid = msg:ReadShort()
	LocalPlayer():ConCommand("vote " .. voteid .. " nay\n")
	chat.AddText(string.gsub(msg:ReadString(), "\n", nil))
end)*/]]

concommand.Add("fm_admins", function()
	for k, v in pairs(get_vips()) do
		print(v:Name() .. " ( " .. v:SteamID() .. " ) " .. v:GetNetworkedString("UserGroup"))
	end
end)