So basically, it works fine in studio but in-game it doesn't even work, the GUI buttons aren't responding at all, the Exit Button won't close the GUI, and the enter button won't activate.
plr = game.Players.LocalPlayer
char = plr.Character
script.Parent.Exit.MouseButton1Click:connect(function()
script.Parent.Visible = false
end)
script.Parent.Enter.MouseButton1Click:connect(function()
if script.Parent.PassBox.Text == "DarkZalSkull" then
script.Parent.PassBox.Text = "Checking."
wait(0.2)
script.Parent.PassBox.Text = "Checking.."
wait(0.2)
script.Parent.PassBox.Text = "Checking..."
wait(0.2)
script.Parent.PassBox.Text = "Access Granted!"
script.Parent.PassBox.TextColor3 = Color3.new(42, 213, 15)
game.Workspace.PassDoor.Transparency = 1
game.Workspace.PassDoor.CanCollide = false
wait(2)
game.Workspace.PassDoor.CanCollide = true
game.Workspace.PassDoor.Transparency = 0.2
script.Parent.Visible = false
else
script.Parent.PassBox.Text = "Checking."
wait(0.2)
script.Parent.PassBox.Text = "Checking.."
wait(0.2)
script.Parent.PassBox.Text = "Checking..."
wait(0.2)
script.Parent.PassBox.Text = "Access DENIED"
char.Humanoid.MaxHealth = 0
char.Humanoid.Health = 0
end
end)

4 comments
I recommend using the Output feature as the studio, as it may help you w/ your problem (it returns feedback). :) From the looks of your script, it may be that "Exit," or the script's parent, as well as other children, may not exist at the time of execution; I recommend using the WaitForChild function to counter this: http://wiki.roblox.com/index.php?title=API:Class/Instance/WaitForChild
I don't think it's that... the GUI is already in StarterGui or PlayerGui, it's loaded already?
Are there any errors in the output via the developer's console in-game when you try to click a button?
Is this a server script or a local script?