Hey, I’m wondering how to entire disable and cancel all default scripts provided by Roblox ? (BubbleChat, ChatScript, PlayerScriptsLoader, RbxCharacterSounds, PlayerModule)
Simply deleting them does not stop them from executing. Once they have begun execution, there is a thread in the VM for those scripts that I don’t know a way of stopping. Please help.
Loop through all those services and destroy/disable scripts with their names.
for i, v in pairs(game:GetService("StarterPlayer"):GetDescendants()) do
if v.Name == "RbxCharacterSounds" then
v.Disabled = true -- OR
-- v:Destroy()
end
end
local player = game:GetService("Players").LocalPlayer
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
local function DestroyRbx(child)
if child:GetAttribute("NotRbx") then return end
for _, s in ipairs(child:GetDescendants()) do
if s:IsA("BaseScript") then s.Disabled = true end
end
if child:IsA("BaseScript") then child.Disabled = true end
while child.Parent do child:Destroy() wait() end
end
local function Clear(container)
container.ChildAdded:Connect(DestroyRbx)
for _, child in ipairs(container:GetChildren()) do
DestroyRbx(child)
end
end
Clear(player.PlayerScripts) Clear(player.PlayerGui)
return true
local Game = game
local Script = script
local Players = Game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local PlayerGui = Player:FindFirstChildOfClass("PlayerGui") or Player:WaitForChild("PlayerGui")
local PlayerScripts = Player:FindFirstChildOfClass("PlayerScripts") or Player:WaitForChild("PlayerScripts")
local function OnDescendantAdded(Descendant)
if Descendant == Script then return end
Descendant:Destroy()
end
PlayerGui.DescendantAdded:Connect(OnDescendantAdded)
PlayerScripts.DescendantAdded:Connect(OnDescendantAdded)
for _, Descendant in ipairs(PlayerGui:GetDescendants()) do
OnDescendantAdded(Descendant)
end
for _, Descendant in ipairs(PlayerScripts:GetDescendants()) do
OnDescendantAdded(Descendant)
end