--// Techyfied \\--
-- For info, visit https://devforum.roblox.com/t/623798 --
-- Put in ReplicatedFirst to make it work --


local ChatService = game:GetService("Chat") -- Gets the Chat service
ChatService.BubbleChatEnabled = true -- Enables the bubble chat

local settings = {		
	--[[ DELETE THIS LINE IF YOU HAVE BACKGROUND IMAGE
	BackgroundImage = {
		Image = "rbxassetid://6733332557",
		ScaleType = Enum.ScaleType.Slice,
		SliceCenter = Rect.new(40, 40, 360, 160),
		SliceScale = 0.5
	},
	    DELETE THIS LINE IF YOU HAVE BACKGROUND IMAGE ]]
	
	--[[ DELETE THIS LINE IF YOU WANT GRADIENT BACKGROUND
	
	BackgroundGradient = {
		Enabled = true,
		Rotation = 90,
		Color = ColorSequence.new(Color3.fromRGB(150, 225, 255), Color3.fromRGB(50, 115, 255)),
		Transparency = NumberSequence.new({
			NumberSequenceKeypoint.new(0, 0.2),
			NumberSequenceKeypoint.new(1, 0.5)
		})
	},
	
	    DELETE THIS LINE IF YOU WANT GRADIENT BACKGROUND]]

	BubbleDuration = 15, -- How long the bubble chat should stay on player's head
	MaxBubbles = 3, -- How many bubbles can be on a players head at one time
	
	BackgroundColor3 = Color3.fromRGB(250, 250, 250), -- Background Color of the bubblechat
	TextColor3 = Color3.fromRGB(57, 59, 61), -- Text Color of the bubble chat
	TextSize = 16, -- Text size of the text in bubble chat
	Font = Enum.Font.GothamSemibold, -- Font of the text in bubble chat
	Transparency = .1, -- Transparency of the bubble chat (0-1)
	CornerRadius = UDim.new(0, 12), -- CornerRadius of the bubble chat
	TailVisible = true, -- Visiblity of the tail located under bubble chat
	Padding = 8, -- Extra Height of each bubble chat (in studs)
	MaxWidth = 300, -- Max width possible for the bubble chat (in studs)

	VerticalStudsOffset = 0, -- How far (in studs) the bubble will appear from player's head (in studs)

	BubblesSpacing = 6, -- Spacing between each bubble chat

	MinimizeDistance = 40, -- The minimum distance a player must be to see the bubbles. Else it'll appear like "..."
	MaxDistance = 100, -- The maximum distance a player must be to see the bubble chat. If they're far than this, the chat text will appear like "..."
	
	--[[ DELETE THIS LINE IF YOU WANT CUSTOM ANIMATION  
	
	SizeAnimation = {
		SpringDampingRatio = 0.25
	},
	TransparencyAnimation = {
		SpringFrequency = 3
	},
	    DELETE THIS LINE IF YOU WANT CUSTOM ANIMATION]]
	
	
}

pcall(function()
	game:GetService("Chat"):SetBubbleChatSettings(settings)
end)
