local StarterGui = game:GetService("StarterGui") local player = game:GetService("Players").LocalPlayer local muteLength = tonumber(script.Name) StarterGui:SetCoreGuiEnabled('Chat',false) wait(muteLength) StarterGui:SetCoreGuiEnabled('Chat',true) script:Destroy()
And Before you ask, Yes i do have a main script, I think is working! this is my main Script:
local muteAt = 10 local muteDuration = 60 local timePeriod = 40 if script.Parent == workspace then script.Parent = game:GetService("ServerScriptService") end local Players = game:GetService("Players") local chatBucket = {} function mute(player) local character = player.Character if character and not character:FindFirstChild("FloodcheckWarning") then local warning = script:FindFirstChild("FloodcheckWarning"):Clone() warning.Name = tostring(muteDuration) warning.Disabled = false warning.Parent = character end end function onChatted(player) local chats = (chatBucket[player] or 0) + 1 if (chats > muteAt) then mute(player) end chatBucket[player] = chats end function onPlayerAdded(player) player.Chatted:connect(function(msg) onChatted(player) end) end Players.PlayerAdded:connect(onPlayerAdded) while wait(timePeriod) do chatBucket = {} end