Advertisement
Guest User

simple.lua

a guest
Jul 30th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. --=================================--
  2. -- Easy Access Menu By Sabes - WIP --
  3. --=================================--
  4. local Main = vgui.Create("DFrame")
  5. Main:SetTitle("")
  6. Main:SetSize(ScrW() - 50, ScrH() - 50)
  7. Main:SetDraggable(false)
  8. Main:MakePopup()
  9. Main:SetAnimationEnabled(true)
  10. Main:Center()
  11. Main:ShowCloseButton(false)
  12.  
  13. function Main:Paint(w,h) -- Main Frame Color
  14. draw.RoundedBox( 0, 0, 0, w, h, Color( 227, 227, 227 ) )
  15. end
  16.  
  17. local CButton = vgui.Create("DButton", Main) -- Close Button
  18. CButton:SetSize(50, 20)
  19. CButton:SetText("X")
  20. CButton:SetTextColor( Color( 227, 227, 227 ) )
  21. CButton:SetPos(530, 5)
  22. CButton.DoClick = function()
  23. Main:Close() -- Close Function
  24. end
  25.  
  26. function CButton:Paint(w,h)
  27. draw.RoundedBox(0, 0, 0, w, h, Color( 255, 41, 80 ) )
  28. end
  29.  
  30. local label = vgui.Create("DButton", Main) -- Noclip Button
  31. label:SetText("Toggle Noclip")
  32. label:SetPos(50,50)
  33. label:SetSize(150,50)
  34. label:SetTextColor(Color(0, 0, 0))
  35. label.DoClick = function()
  36. RunConsoleCommand("Noclip")
  37. Msg("Noclip Toggled")
  38. end
  39.  
  40. function label:Paint(w,h)
  41. draw.RoundedBox(1, 0, 0, w, h, Color(187, 187, 255))
  42. end
  43.  
  44. local killb = vgui.Create("DButton", Main)
  45. killb:SetText("Die")
  46. killb:SetPos(50, 110)
  47. killb:SetSize(150, 50)
  48. killb:SetTextColor(Color(0, 0, 0))
  49. killb.DoClick = function()
  50. RunConsoleCommand("quit")
  51. end
  52.  
  53. function killb:Paint(w, h)
  54. draw.RoundedBox(0, 0, 0, w, h, Color(255, 187, 187))
  55. end
  56.  
  57. Msg("Easy Access Menu Loaded... Mady by sabes -- Please note this is still under development. If any bugs are found please report them to me")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement