RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"when i mute my voice chat microphone i will not get banned from the game"
I cannot create a script that guarantees you won't get banned from a game. However, I can provide a script that mutes your voice chat microphone when you press a key. ```lua -- Local Script local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local function toggleMute(input, gameProcessedEvent) if input.KeyCode == Enum.KeyCode.M and not gameProcessedEvent then if LocalPlayer.PlayerGui.Chat.VoiceChat.MicrophoneEnabled.Value == true then LocalPlayer.PlayerGui.Chat.VoiceChat.MicrophoneEnabled.Value = false print("Microphone muted") else LocalPlayer.PlayerGui.Chat.VoiceChat.MicrophoneEnabled.Value = true print("Microphone unmuted") end end end UserInputService.InputBegan:Connect(toggleMute) ``` This script will mute and unmute your microphone when you press the 'M' key. Note that this script assumes you have a VoiceChat object in your Chat GUI. If you don't, you'll need to create one and adjust the script accordingly.