So far, it's slightly possible, just need help if anyone else has ever made this or made it way better than my bad nasty loop.
if script.Parent and script.Parent:findFirstChild("Locked")==nil and script.Parent.ClassName=="ScreenGui" then
function UnArchive(p)
pcall(function()
p.Archivable=false;
end)
pcall(function()
for i,v in ipairs(p:GetChildren()) do
UnArchive(v)
end
end)
end
function TransferAll(mainlocation,item)
pcall(function()
print(item.Name.." : "..item:getFullName())
item.Parent=mainlocation
end)
pcall(function()
for i,v in ipairs(item:GetChildren()) do
TransferAll(item,v)
end
end)
end
local lock=Instance.new("StringValue",script.Parent)
lock.Name="Locked"
local gui=script.Parent
UnArchive(gui)
script.Parent=nil
local me=script.Parent
function AlwaysChecking()
for a=1,25 do
print("Checking "..gui:GetFullName())
if gui.Parent~=game.Players.LocalPlayer.PlayerGui then
TransferAll(game.Players.LocalPlayer.PlayerGui,gui)
--gui.Parent=game.Players.LocalPlayer.PlayerGui
end
wait(.1)
end
end
gui.Changed:connect(function()
print("Fired")
AlwaysChecking()
end)
gui.AncestryChanged:connect(function()
print("Fired2")
AlwaysChecking()
end)
end

1 comment
My goodness, looks a lot more efficient than my loop. Will go ahead and give this a try. However, I have a client sided script that'll always be showing, since the client script is nilled, so I'll just need to monitor the Died event.