I have two scripts that make them invisible one is if you don’t press the enter key and one is if you do the press the enter key
script 1:
local cooldown = 5
local gui = script.Parent
local guiStyle = Enum.EasingStyle.Quad
local guiDirection = Enum.EasingDirection.Out
wait(cooldown)
if gui.Frame.bloxGear.Visible == false then
wait(1)
gui.Frame.Size = UDim2.new(0.661,0,0.608,0)
gui.Frame:TweenSize(UDim2.new(0,0,0,0), guiDirection, guiStyle, 0.25, false)
wait(0.25)
gui.Frame.Visible = false
wait()
gui:Destroy()
end
script 2:
local cooldown = 3
local UIS = game:GetService(“UserInputService”)
local Messages = {“in life there’s roblox”, “don’t let nothing stop you cause we ain’t stopping”}
UIS.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.Return then
local gui = script.Parent
local dialogue = script:FindFirstChild(“dialogue”)
local openNoise = script:FindFirstChild(“open”)
local closeNoise = script:FindFirstChild(“close”)
local bloxGear = gui.Frame.bloxGear
local guiStyle = Enum.EasingStyle.Quad
local guiDirection = Enum.EasingDirection.Out
local noTalking = "13834387600"
local talking = "13833621044"
bloxGear.Visible = false
bloxGear.Visible = true
bloxGear.static.Frame.Visible = false
bloxGear.static2.Frame.Visible = false
bloxGear.static.Frame.Size = UDim2.new(0,0,0,0)
bloxGear.static2.Frame.Size = UDim2.new(0,0,0,0)
wait(0.75)
bloxGear.static.Frame.Visible = true
bloxGear.static2.Frame.Visible = true
bloxGear.static.Frame.Size = UDim2.new(1,0,0,0)
bloxGear.static2.Frame.Size = UDim2.new(1,0,0,0)
bloxGear.static.Frame:TweenSize(UDim2.new(1,0,1,0), guiDirection, guiStyle, 0.25, false)
bloxGear.static2.Frame:TweenSize(UDim2.new(1,0,1,0), guiDirection, guiStyle, 0.25, false)
dialogue:Play()
openNoise:Play()
wait(0.25)
bloxGear.static.ImageTransparency = 1
bloxGear.static2.ImageTransparency = 1
bloxGear.static.Frame.BackgroundTransparency = 1
bloxGear.static2.Frame.BackgroundTransparency = 1
wait(1.75)
for i, v in pairs(Messages) do
for i = 1, string.len(v) do wait(0.045)
gui.Frame.DialogueText.Text = string.sub(v, 1, i)
bloxGear.static2.Frame.guy.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", talking)
wait(0)
bloxGear.static2.Frame.guy.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", noTalking)
end
wait(1)
end
bloxGear.static.ImageTransparency = 0
bloxGear.static2.ImageTransparency = 0
bloxGear.static.Frame.BackgroundTransparency = 0
bloxGear.static2.Frame.BackgroundTransparency = 0
wait(0.25)
bloxGear.static.Frame.Size = UDim2.new(1,0,1,0)
bloxGear.static2.Frame.Size = UDim2.new(1,0,1,0)
bloxGear.static.Frame:TweenSize(UDim2.new(1,0,0,0), guiDirection, guiStyle, 0.25, false)
bloxGear.static2.Frame:TweenSize(UDim2.new(1,0,0,0), guiDirection, guiStyle, 0.25, false)
closeNoise:Play()
wait(1)
gui.Frame.Size = UDim2.new(0.661,0,0.608,0)
gui.Frame:TweenSize(UDim2.new(0,0,0,0), guiDirection, guiStyle, 0.25, false)
wait(0.25)
gui.Frame.Visible = false
wait()
gui:Destroy()
end
end
end)
the second one is kinda messy but the end is basically the same for both
(sorry for making it messy idk how to fix it)