Advertisement
Existence_YT

[RobloxStudioProjects] AdminCommandBar - AdminBar_Client

Oct 27th, 2019
2,769
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local UI = script.Parent
  2. local MainFrame = UI.MainFrame
  3. local Input = MainFrame.Input
  4. local Output = MainFrame.Output
  5.  
  6. MainFrame.Draggable = true
  7. game.Players.LocalPlayer:GetMouse().KeyDown:Connect(function(key)
  8.     if key == "'" then
  9.         Input:CaptureFocus()
  10.         spawn(function()
  11.             Input.Text = ""
  12.         end)
  13.     end
  14. end)
  15. Input.FocusLost:Connect(function(enterPressed)
  16.     if enterPressed then
  17.         game.ReplicatedStorage.Remotes.ExecuteCommand:FireServer(Input.Text)
  18.     end
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement