local function a(a,I)script.BeepSound:Play()INFO_GUI.Visible=true INFO_GUI.Position=UDim2.new(.5,0,.15,0)INFO_GUI.InfoLabel.TextTransparency=1 INFO_GUI.InfoLabel.TextStrokeTransparency=1 INFO_GUI.InfoLabel.Text=a INFO_GUI.BackgroundLabel.Size=UDim2.new(0,0,1,0)if I then if script:FindFirstChild(I.."\083\111\117\110\100")then script[I.."\083\111\117\110\100"]:Play()end end local X=TweenInfo.new(.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)local u=TweenInfo.new(.5,Enum.EasingStyle.Sine,Enum.EasingDirection.In)local M=TweenService:Create(INFO_GUI.InfoLabel,X,{TextTransparency=0,TextStrokeTransparency=0;Position=UDim2.new(.5,0,.2,0)})local U=TweenService:Create(INFO_GUI.BackgroundLabel,X,{Size=UDim2.new(1,0,1,0)})M:Play()U:Play()wait(5)local w=TweenService:Create(INFO_GUI.InfoLabel,u,{TextTransparency=1,TextStrokeTransparency=1;Position=UDim2.new(.5,0,.15,0)})local v=TweenService:Create(INFO_GUI.BackgroundLabel,u,{Size=UDim2.new(0,0,1,0)})w:Play()v:Play()wait(.5)INFO_GUI.Visible=false end
-- functions

local function Display(text, sound)
	script.BeepSound:Play()

	INFO_GUI.Visible = true
	INFO_GUI.Position = UDim2.new(0.5, 0, 0.15, 0)
	INFO_GUI.InfoLabel.TextTransparency = 1
	INFO_GUI.InfoLabel.TextStrokeTransparency = 1
	INFO_GUI.InfoLabel.Text = text

	INFO_GUI.BackgroundLabel.Size = UDim2.new(0, 0, 1, 0)

	if sound then
		if script:FindFirstChild(sound .. "Sound") then
			script[sound .. "Sound"]:Play()
		end
	end

	local openInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
	local closeInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In)

	local openTweenA = TweenService:Create(
		INFO_GUI.InfoLabel,
		openInfo,
		{ TextTransparency = 0, TextStrokeTransparency = 0, Position = UDim2.new(0.5, 0, 0.2, 0) }
	)
	local openTweenB = TweenService:Create(INFO_GUI.BackgroundLabel, openInfo, { Size = UDim2.new(1, 0, 1, 0) })

	openTweenA:Play()
	openTweenB:Play()

	wait(5)

	local closeTweenA = TweenService:Create(
		INFO_GUI.InfoLabel,
		closeInfo,
		{ TextTransparency = 1, TextStrokeTransparency = 1, Position = UDim2.new(0.5, 0, 0.15, 0) }
	)
	local closeTweenB = TweenService:Create(INFO_GUI.BackgroundLabel, closeInfo, { Size = UDim2.new(0, 0, 1, 0) })

	closeTweenA:Play()
	closeTweenB:Play()

	wait(0.5)
	INFO_GUI.Visible = false
end
