Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function Bleh()
- local Frame = vgui.Create( "DFrame" )
- Frame:SetPos( 5, 5 )
- Frame:SetSize( 300, 300 )
- Frame:SetTitle( "Admin Stuff" )
- Frame:SetVisible( true )
- Frame:SetDraggable( false )
- Frame:ShowCloseButton( true )
- Frame:MakePopup()
- local Button = vgui.Create( "DButton", Frame )
- Button:SetText( "Return Me" )
- Button:SetTextColor( Color( 255, 255, 255 ) )
- Button:SetPos( 50, 50 )
- Button:SetSize( 100, 30 )
- Button.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 41, 128, 185, 250 ) ) -- Draw a blue button
- end
- Button.DoClick = function()
- RunConsoleCommand("ulx", "return")
- end
- Button.Drag = false
- Frame.OnMousePressed = function(self, key)
- if (key == MOUSE_LEFT) then
- Button.Drag = false
- end
- end
- Button.DoClick = function(self)
- self.Drag = not self.Drag
- local x, y = self:GetPos()
- end
- Button.Think = function(self)
- if (self.Drag) then
- local x, y = input.GetCursorPos()
- self:SetPos(x, y)
- end
- end
- local Button = vgui.Create( "DButton", Frame )
- Button:SetText( "Enable Godmode" )
- Button:SetTextColor( Color( 255, 255, 255 ) )
- Button:SetPos( 90, 90 )
- Button:SetSize( 100, 30 )
- Button.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 41, 128, 185, 250 ) ) -- Draw a blue button
- end
- Button.DoClick = function()
- RunConsoleCommand("ulx", "god")
- end
- end
- concommand.Add("bleh", Bleh)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement