LynXS_

Untitled

Jun 14th, 2024
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. local VoiceChat = game:GetService("VoiceChatInternal");
  2. local UserInputService = game:GetService("UserInputService");
  3.  
  4. local toggleKey = "T";
  5. local enumKey = Enum.KeyCode[toggleKey];
  6. local vc_enabled = true; --Don't touch this
  7.  
  8. local function pushToTalk(inputObj)
  9. if inputObj.KeyCode ~= enumKey then return; end
  10.  
  11. vc_enabled = (not vc_enabled);
  12. VoiceChat:PublishPause(vc_enabled);
  13. end
  14.  
  15. UserInputService.InputBegan:Connect(pushToTalk);
  16. UserInputService.InputEnded:Connect(pushToTalk);
Add Comment
Please, Sign In to add comment