boobster

Untitled

Feb 26th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.93 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. local playerModel
  36. local button
  37. local hoboPanel
  38. local entHolo
  39. hook.Add("KeyPress", "HoboMenuOpen", function(ply, key)
  40.     if ply:KeyDown(IN_SPEED) and key == IN_USE and (not frame or not frame:IsVisible()) and LocalPlayer():Team() == TEAM_HOBO then
  41.         frame = vgui.Create("DFrame")
  42.         frame:SetTitle("")
  43.         frame:SetSize(300, 300)
  44.         frame:Center()
  45.         frame:MakePopup()
  46.         frame:SetVisible(true)
  47.         frame:SetDraggable(false)
  48.         frame:ShowCloseButton(false)
  49.         frame.Paint = function(self, w, h )
  50.         draw.RoundedBox(20, 0, 0, w, h, Color(61, 45, 39, 200) )
  51.         draw.SimpleText("Hobo Menu", "CloseCaption_Bold", 10, 0, Color(62, 173, 69, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  52.         end
  53.  
  54.         local closeButtonColor = Color(255, 0, 0, 255)
  55.         button = vgui.Create("DButton", frame)
  56.         button:SetText("")
  57.         button:SetPos(260, 0)
  58.         button:SetSize(40, 30)
  59.         button.DoClick = function()
  60.             frame:Close()
  61.             surface.PlaySound("buttons/button24.wav")
  62.         end
  63.         button.Paint = function(self, w, h)
  64.         draw.RoundedBox(10, 0, 0 ,w , h, closeButtonColor )
  65.         draw.SimpleText("X", "CloseCaption_Bold", w/2, h/2, Color(255, 255, 255, 255), 1, 1)
  66.         end
  67.         button.OnCursorEntered = function()
  68.             closeButtonColor = Color(130, 0, 0, 255)
  69.         end
  70.         button.OnCursorExited = function()
  71.             closeButtonColor = Color(255, 0, 0, 255)
  72.         end
  73.         hoboPanel = vgui.Create("DPanel", frame)
  74.         hoboPanel:SetSize(300, 280)
  75.         hoboPanel:SetPos(0, 30)
  76.         hoboPanel.Paint = function(self, w, h)
  77.             draw.RoundedBox(20, 0, 0, w, h, Color(255, 255, 255, 0))
  78.         end
  79.  
  80.         playerModel = vgui.Create("DModelPanel", hoboPanel)
  81.         playerModel:SetSize(300, 300)
  82.         playerModel:SetModel(LocalPlayer():GetModel())
  83.         playerModel:SetPos(-100, -40)
  84.         playerModel:SetCamPos(Vector( 70, 0, 40 ))
  85.         function playerModel:LayoutEntity( ent ) ent:SetSequence( ent:LookupSequence( "walk_suitcase" ) ) playerModel:RunAnimation() end
  86.  
  87.         local hoboHaloColor = Color(206, 74, 18, 255)
  88.         local hobohalo = vgui.Create("DButton", hoboPanel)
  89.             hobohalo:SetSize(120, 50)
  90.             hobohalo:SetPos(150, 120)
  91.             hobohalo:SetVisible(true)
  92.             hobohalo:SetText("")
  93.             hobohalo.Paint = function(self, w, h)
  94.                 draw.RoundedBox(20, 0, 0, w, h, hoboHaloColor)
  95.                 draw.SimpleText("Enemies","ChatFont", w-92, h-34, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  96.             end
  97.             hobohalo.OnCursorEntered = function()
  98.                 hoboHaloColor = Color(155, 46, 0, 255)
  99.             end
  100.             hobohalo.OnCursorExited = function()
  101.                 hoboHaloColor = Color(206, 74, 18, 255)
  102.             end
  103.             hobohalo.DoClick = function()
  104.                 surface.PlaySound("npc/zombie/zombie_pain1.wav")
  105.                 hook.Add("PreDrawHalos", "HoboWh", function()
  106.                     local hobos = {}
  107.                         for x, y in pairs(player.GetAll()) do
  108.                         if y == LocalPlayer() then continue end
  109.                         if y:Team() == TEAM_HOBO then
  110.                             table.insert(hobos, y)
  111.                         end
  112.                             halo.Add(hobos, Color(255, 0, 0), 2, 2, 2, true, true) -- Hobos can see each other through the walls
  113.                             end
  114.                 end)
  115.                     timer.Simple(20, function()
  116.                     hook.Remove("PreDrawHalos", "HoboWh")
  117.                 end)
  118.  
  119.         local entHoloText = Color(0, 0, 0, 255)
  120.         local entHoloButton = Color(111, 174, 247, 255)
  121.         entHolo = vgui.Create("DButton", hoboPanel)
  122.         entHolo:SetSize(120, 50)
  123.         entHolo:SetPos(150, 60)
  124.         entHolo:SetText("")
  125.         entHolo.Paint = function(self, w, h)
  126.             draw.RoundedBox(20, 0, 0, w, h, entHoloButton)
  127.             draw.SimpleText("Food Seeker!", "ChatFont", w-60, h-25, entHoloText, 1, 1)
  128.         end
  129.         entHolo.OnCursorEntered = function()
  130.             entHoloButton = Color(0, 48, 104, 255)
  131.             entHoloText = Color(255, 255, 255, 255)
  132.         end
  133.         entHolo.OnCursorExited = function()
  134.             entHoloButton = Color(111, 174, 247, 255)
  135.             entHoloText = Color(0, 0, 0, 255)
  136.         end
  137.         entHolo.DoClick = function()
  138.                         surface.PlaySound("npc/fast_zombie/leap1.wav")
  139.             hook.Add("PreDrawHalos", "FoodWh", function()
  140.                         local WhHoboEnts = {                     -- Table of entities that halos are drawn on.
  141.                                         "food_fatburger",
  142.                                         "food_cola",
  143.                                         "food_burger",
  144.                                         "food_tosty",
  145.                                         "food_zupa",
  146.                                         "food_kanapka",
  147.                                         "food_gofry",
  148.                                         "food_melon"
  149.                                         }
  150.                 if LocalPlayer():Team() == TEAM_HOBO then
  151.                     for k, v in pairs (WhHoboEnts) do
  152.                         local find = ents.FindByClass(v)
  153.                         halo.Add(find, Color(0, 0, 255), 5, 5, 2, true, true)
  154.                     end
  155.                 end
  156.             end)
  157.                 timer.Simple(20, function()
  158.                 hook.Remove("PreDrawHalos", "FoodWh")
  159.                 end)
  160.         end
  161.     end
  162.     end
  163. end)
  164.  
  165.  
  166. --concommand.Add("testhobo",function()
  167.     --PrintTable(Entity(1):GetSequenceList())
  168. --end)
Add Comment
Please, Sign In to add comment