boobster

Untitled

Feb 26th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.39 KB | None | 0 0
  1. /////////////HOBO HALO DRAWING\\\\\\\\\\\\\\\\\\\      
  2. --[[hook.Add("PreDrawHalos", "HoboWh", function()
  3.     local WhHoboEnts = {                     -- Table of entities that halos are drawn on.
  4.                         "food_fatburger",
  5.                         "food_cola",
  6.                         "food_burger",
  7.                         "food_tosty",
  8.                         "food_zupa",
  9.                         "food_kanapka",
  10.                         "food_gofry",
  11.                         "food_melon"
  12.                         }
  13.     if LocalPlayer():Team() == TEAM_HOBO then
  14.         for k, v in pairs (WhHoboEnts) do
  15.             local find = ents.FindByClass(v)
  16.             halo.Add(find, Color(0, 0, 255), 2, 2, 2, true, true) -- Actual function that draws halo around those entities.
  17.         end
  18.     end
  19.         local hobos = {}
  20.         for x, y in pairs(player.GetAll()) do
  21.             if y == LocalPlayer() then continue end
  22.             if y:Team() == TEAM_HOBO then
  23.                 table.insert(hobos, y)
  24.             end
  25.                 halo.Add(hobos, Color(255, 0, 0), 2, 2, 2, true, true) -- Hobos can see each other through the walls
  26.         end
  27.  
  28.  
  29. end)]]
  30.  
  31.  
  32.  
  33. //////////HOBO GUI DRAW\\\\\\\\\\
  34. local frame
  35. hook.Add("KeyPress", "HoboMenuOpen", function(ply, key)
  36.     if ply:KeyDown(IN_SPEED) and key == IN_USE and (not frame or not frame:IsVisible()) and ply:Team() == TEAM_HOBO then
  37.         frame = vgui.Create("DFrame")
  38.         frame:SetTitle("")
  39.         frame:SetSize(300, 300)
  40.         frame:Center()
  41.         frame:MakePopup()
  42.         frame:SetVisible(true)
  43.         frame:SetDraggable(false)
  44.         frame:ShowCloseButton(false)
  45.         frame.Paint = function(self, w, h )
  46.         draw.RoundedBox(20, 0, 0, w, h, Color(61, 45, 39, 200) )
  47.         draw.SimpleText("Hobo Menu", "CloseCaption_Bold", 10, 0, Color(62, 173, 69, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  48.         end
  49.         local closeButtonColor = Color(255, 0, 0, 255)
  50.         local button = vgui.Create("DButton", frame)
  51.         button:SetText("")
  52.         button:SetPos(260, 0)
  53.         button:SetSize(40, 30)
  54.         button.DoClick = function()
  55.             frame:Close()
  56.             surface.PlaySound("buttons/button24.wav")
  57.         end
  58.         button.Paint = function(self, w, h)
  59.         draw.RoundedBox(10, 0, 0 ,w , h, closeButtonColor )
  60.         draw.SimpleText("X", "CloseCaption_Bold", w/2, h/2, Color(255, 255, 255, 255), 1, 1)
  61.         end
  62.         button.OnCursorEntered = function()
  63.             closeButtonColor = Color(130, 0, 0, 255)
  64.         end
  65.         button.OnCursorExited = function()
  66.             closeButtonColor = Color(255, 0, 0, 255)
  67.         end
  68.  
  69.         local playerModel = vgui.Create("DModelPanel", frame)
  70.         playerModel:SetSize(300, 300)
  71.         playerModel:SetModel(LocalPlayer():GetModel())
  72.         playerModel:SetPos(-100, 0)
  73.         playerModel:SetCamPos(Vector( 70, 0, 40 ))
  74.         function playerModel:LayoutEntity( ent ) ent:SetSequence( ent:LookupSequence( "walk_suitcase" ) ) playerModel:RunAnimation() end
  75.  
  76.         local entHoloText = Color(0, 0, 0, 255)
  77.         local entHoloButton = Color(111, 174, 247, 255)
  78.         local entHolo = vgui.Create("DButton", frame)
  79.         entHolo:SetSize(120, 50)
  80.         entHolo:SetPos(150, 60)
  81.         entHolo:SetText("")
  82.         entHolo.Paint = function(self, w, h)
  83.             draw.RoundedBox(20, 0, 0, w, h, entHoloButton)
  84.             draw.SimpleText("Food Seeker!", "ChatFont", w-60, h-25, entHoloText, 1, 1)
  85.         end
  86.         entHolo.OnCursorEntered = function()
  87.             entHoloButton = Color(0, 48, 104, 255)
  88.             entHoloText = Color(255, 255, 255, 255)
  89.         end
  90.         entHolo.OnCursorExited = function()
  91.             entHoloButton = Color(111, 174, 247, 255)
  92.             entHoloText = Color(0, 0, 0, 255)
  93.         end
  94.         entHolo.DoClick = function()
  95.             frame:Close()
  96.             surface.PlaySound("npc/fast_zombie/leap1.wav")
  97.             hook.Add("PreDrawHalos", "HoboWh", function()
  98.                         local WhHoboEnts = {                     -- Table of entities that halos are drawn on.
  99.                                         "food_fatburger",
  100.                                         "food_cola",
  101.                                         "food_burger",
  102.                                         "food_tosty",
  103.                                         "food_zupa",
  104.                                         "food_kanapka",
  105.                                         "food_gofry",
  106.                                         "food_melon"
  107.                                         }
  108.                 if LocalPlayer():Team() == TEAM_HOBO then
  109.                     for k, v in pairs (WhHoboEnts) do
  110.                         local find = ents.FindByClass(v)
  111.                         halo.Add(find, Color(0, 0, 255), 2, 2, 2, true, true)
  112.                     end
  113.  
  114.                 end
  115.             end)
  116.         end
  117.     end
  118. end)
  119.  
  120.  
  121.  
  122. --concommand.Add("testhobo",function()
  123.     --PrintTable(Entity(1):GetSequenceList())
  124. --end)
Add Comment
Please, Sign In to add comment