game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
for i,v in ipairs(game:GetDescendants())do
if v:IsA('ScreenGui')then
v.Enabled = false
end end
If you want to hide the ScreenGui's then you would have to loop through PlayerGui and set .Enabled property to false. And if you want to hide only the GUIs in some ScreenGui then you just loop through the ScreenGui and set .Visible property to false.