Alpha chat
Key Required

Alpha chat

Brookhaven 🏡RPgunjanshukla507gunjanshukla507 180 views 14 executesUpdated Aug 7, 2026
Unrated
00
Lua Script•235 lines (8411 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

if playerGui:FindFirstChild("AlphaChatGui") then
	playerGui.AlphaChatGui:Destroy()
end

-- Shared Global Table for Custom Title & Colors (Alpha Iconic link)
getgenv().AlphaChatConfig = {
	CustomTitle = "[👑 OWNER]",
	RainbowSpeed = 2
}

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "AlphaChatGui"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

---------------------------------------------------------
-- FLOATING TOGGLE ORB (🌸) - For Chat
---------------------------------------------------------
local toggleBtn = Instance.new("TextButton")
toggleBtn.Name = "ToggleFlower"
toggleBtn.Size = UDim2.new(0, 50, 0, 50)
toggleBtn.Position = UDim2.new(0, 15, 0.4, 0)
toggleBtn.Text = "🌸"
toggleBtn.TextSize = 26
toggleBtn.BackgroundColor3 = Color3.fromRGB(25, 15, 30)
toggleBtn.BorderSizePixel = 0
toggleBtn.Active = true
toggleBtn.Parent = screenGui

Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(1, 0)
local btnStroke = Instance.new("UIStroke", toggleBtn)
btnStroke.Color = Color3.fromRGB(255, 105, 180)
btnStroke.Thickness = 2.5

RunService.RenderStepped:Connect(function(delta)
	toggleBtn.Rotation = (toggleBtn.Rotation + (60 * delta)) % 360
end)

---------------------------------------------------------
-- MAIN CHAT FRAME
---------------------------------------------------------
local mainFrame = Instance.new("Frame")
mainFrame.Name = "MainChatFrame"
mainFrame.Size = UDim2.new(0, 340, 0, 260)
mainFrame.Position = UDim2.new(0.5, -170, 0.5, -130)
mainFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 22)
mainFrame.BackgroundTransparency = 0.05
mainFrame.BorderSizePixel = 0
mainFrame.Visible = false
mainFrame.ClipsDescendants = true
mainFrame.Parent = screenGui

Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 14)
local frameStroke = Instance.new("UIStroke", mainFrame)
frameStroke.Color = Color3.fromRGB(255, 105, 180)
frameStroke.Thickness = 2

-- DRAGGING LOGIC
local dragging, dragStart, startPos
mainFrame.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
		dragging = true
		dragStart = input.Position
		startPos = mainFrame.Position
	end
end)

UserInputService.InputChanged:Connect(function(input)
	if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
		local delta = input.Position - dragStart
		mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
	end
end)

UserInputService.InputEnded:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
		dragging = false
	end
end)

-- HEADER
local header = Instance.new("Frame")
header.Size = UDim2.new(1, 0, 0, 38)
header.BackgroundColor3 = Color3.fromRGB(30, 20, 40)
header.BorderSizePixel = 0
header.Parent = mainFrame
Instance.new("UICorner", header).CornerRadius = UDim.new(0, 14)

local headerGradient = Instance.new("UIGradient", header)
headerGradient.Color = ColorSequence.new{
	ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 105, 180)),
	ColorSequenceKeypoint.new(1, Color3.fromRGB(138, 43, 226))
}

local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(0.75, 0, 1, 0)
titleLabel.Position = UDim2.new(0.04, 0, 0, 0)
titleLabel.Text = "✨ 🌸 ALPHA CHAT 🌸 ✨"
titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
titleLabel.TextSize = 15
titleLabel.Font = Enum.Font.FredokaOne
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
titleLabel.BackgroundTransparency = 1
titleLabel.Parent = header

-- MINIMIZE BUTTON
local minimizeBtn = Instance.new("TextButton")
minimizeBtn.Size = UDim2.new(0, 28, 0, 28)
minimizeBtn.Position = UDim2.new(1, -34, 0.5, -14)
minimizeBtn.Text = "-"
minimizeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
minimizeBtn.TextSize = 20
minimizeBtn.Font = Enum.Font.SourceSansBold
minimizeBtn.BackgroundColor3 = Color3.fromRGB(255, 50, 90)
minimizeBtn.BorderSizePixel = 0
minimizeBtn.Parent = header
Instance.new("UICorner", minimizeBtn).CornerRadius = UDim.new(0, 6)

local isMinimized = false
minimizeBtn.MouseButton1Click:Connect(function()
	isMinimized = not isMinimized
	if isMinimized then
		mainFrame:TweenSize(UDim2.new(0, 340, 0, 38), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.2, true)
		minimizeBtn.Text = "+"
	else
		mainFrame:TweenSize(UDim2.new(0, 340, 0, 260), Enum.EasingDirection.Out, Enum.EasingStyle.Back, 0.2, true)
		minimizeBtn.Text = "-"
	end
end)

-- SCROLLING AREA
local scrollFrame = Instance.new("ScrollingFrame")
scrollFrame.Size = UDim2.new(1, -16, 1, -95)
scrollFrame.Position = UDim2.new(0, 8, 0, 44)
scrollFrame.BackgroundTransparency = 1
scrollFrame.ScrollBarThickness = 4
scrollFrame.ScrollBarImageColor3 = Color3.fromRGB(255, 105, 180)
scrollFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
scrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
scrollFrame.Parent = mainFrame

local UIListLayout = Instance.new("UIListLayout")
UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIListLayout.Padding = UDim.new(0, 6)
UIListLayout.Parent = scrollFrame

-- TEXT INPUT BOX
local inputContainer = Instance.new("Frame")
inputContainer.Size = UDim2.new(1, -16, 0, 35)
inputContainer.Position = UDim2.new(0, 8, 1, -42)
inputContainer.BackgroundColor3 = Color3.fromRGB(25, 25, 35)
inputContainer.Parent = mainFrame
Instance.new("UICorner", inputContainer).CornerRadius = UDim.new(0, 8)
local inputStroke = Instance.new("UIStroke", inputContainer)
inputStroke.Color = Color3.fromRGB(255, 105, 180)
inputStroke.Thickness = 1

local textBox = Instance.new("TextBox")
textBox.Size = UDim2.new(1, -10, 1, 0)
textBox.Position = UDim2.new(0, 6, 0, 0)
textBox.PlaceholderText = "💬 Type message..."
textBox.PlaceholderColor3 = Color3.fromRGB(150, 150, 170)
textBox.Text = ""
textBox.TextColor3 = Color3.fromRGB(255, 255, 255)
textBox.BackgroundTransparency = 1
textBox.Font = Enum.Font.SourceSansBold
textBox.TextSize = 14
textBox.ClearTextOnFocus = false
textBox.Parent = inputContainer

-- ADD MESSAGE FUNCTION WITH RAINBOW TITLE EFFECT
local function AddMessage(messageText)
	local msgContainer = Instance.new("Frame")
	msgContainer.Size = UDim2.new(1, -8, 0, 0)
	msgContainer.AutomaticSize = Enum.AutomaticSize.Y
	msgContainer.BackgroundColor3 = Color3.fromRGB(45, 25, 55)
	msgContainer.Parent = scrollFrame

	Instance.new("UICorner", msgContainer).CornerRadius = UDim.new(0, 6)
	local msgStroke = Instance.new("UIStroke", msgContainer)
	msgStroke.Color = Color3.fromRGB(255, 105, 180)
	msgStroke.Thickness = 1

	local msgLabel = Instance.new("TextLabel")
	msgLabel.Size = UDim2.new(1, -12, 0, 0)
	msgLabel.Position = UDim2.new(0, 6, 0, 4)
	msgLabel.AutomaticSize = Enum.AutomaticSize.Y
	msgLabel.BackgroundTransparency = 1
	msgLabel.TextXAlignment = Enum.TextXAlignment.Left
	msgLabel.TextWrapped = true
	msgLabel.Font = Enum.Font.SourceSansBold
	msgLabel.TextSize = 13
	msgLabel.TextColor3 = Color3.fromRGB(255, 192, 203)
	msgLabel.Parent = msgContainer

	-- Rainbow Color Updater for Title
	RunService.RenderStepped:Connect(function()
		if msgContainer and msgContainer.Parent then
			local currentTitle = getgenv().AlphaChatConfig.CustomTitle or ""
			local rainbowColor = Color3.fromHSV((tick() * (getgenv().AlphaChatConfig.RainbowSpeed or 2)) % 1, 1, 1)
			msgLabel.RichText = true
			msgLabel.Text = string.format("<font color=\"rgb(%d,%d,%d)\">%s</font> <b>[%s]:</b> %s", 
				rainbowColor.R * 255, rainbowColor.G * 255, rainbowColor.B * 255, 
				currentTitle, player.Name, messageText)
		end
	end)

	local padding = Instance.new("UIPadding", msgContainer)
	padding.PaddingBottom = UDim.new(0, 4)

	task.wait(0.05)
	scrollService = scrollFrame
	scrollFrame.CanvasPosition = Vector2.new(0, scrollFrame.AbsoluteCanvasSize.Y)
end

toggleBtn.MouseButton1Click:Connect(function()
	mainFrame.Visible = not mainFrame.Visible
end)

textBox.FocusLost:Connect(function(enterPressed)
	if enterPressed and textBox.Text ~= "" then
		local textToSend = textBox.Text
		textBox.Text = ""
		AddMessage(textToSend)
	end
end)

print("🌸 Alpha Chat Loaded!")

Features & Information

Alpha chat
#Alpha chat

Community Comments (0)

No comments yet for this script.

More Scripts for Brookhaven 🏡RP