local a=false local function WaitForChild(b,c)while b:FindFirstChild(c)==nil do b.ChildAdded:wait(0.03)end return b[c]end local function typedef(b)return b end local function IsPhone()local b=Game:GetService'CoreGui'local c=WaitForChild(b, 'RobloxGui')if c.AbsoluteSize.Y<600 then return true end return false end local function StringTrim(b)return(b:gsub('^%s*(.-)%s*$','%1'))end while Game. Players.LocalPlayer==nil do wait(0.03)end local b=Game.Players.LocalPlayer while b.Character==nil do wait(0.03)end local c=LoadLibrary'RbxUtility'local d,e,f,g,h ,i,j=typedef(c),Game.Workspace.CurrentCamera,Game:GetService'CoreGui',Game: GetService'Players',Game:GetService'GuiService',nil,nil do i={}local k={}local l ,m={__call=function(l,m)return l[m]or l[tonumber(m)]end,__index={GetEnumItems= function(l)local m={}for n,o in pairs(l)do if type(n)=='number'then m[#m+1]=o end end table.sort(m,function(p,q)return p.Value (>0_0)> KIRBY DANCE']=true,[")';"]=true,[':3']= true},['Ratings']={['Rate it!']=true,['I give it a 1 out of 10']=true,[ 'I give it a 2 out of 10']=true,['I give it a 3 out of 10']=true,[ 'I give it a 4 out of 10']=true,['I give it a 5 out of 10']=true,[ 'I give it a 6 out of 10']=true,['I give it a 7 out of 10']=true,[ 'I give it a 8 out of 10']=true,['I give it a 9 out of 10']=true,[ 'I give it a 10 out of 10!']=true}},j'SafeChat'{'Level1','Level2','Level3'}, SafeChatTree={},TempSpaceLabel=nil}local function GetNameValue(m)local n=0 for o =1,#m do local p,q=string.byte(string.sub(m,o,o)),#m-o+1 if#m%2==1 then q=q-1 end if q%4>=2 then p=-p end n=n+p end return n%8 end function l:ComputeChatColor (m)return self.ChatColors[GetNameValue(m)+1].Color end function l: EnableScrolling(m)self.MouseOnFrame=false if self.RenderFrame then self. RenderFrame.MouseEnter:connect(function()local n=b.Character local o,p= WaitForChild(n,'Torso'),WaitForChild(n,'Head')if m then self.MouseOnFrame=true e .CameraType='Scriptable'Spawn(function()local q=e.CoordinateFrame.p-o.Position while l.MouseOnFrame do e.CoordinateFrame=CFrame.new(o.Position+q,p.Position) wait(0.015)end end)end end)self.RenderFrame.MouseLeave:connect(function()e. CameraType='Custom'self.MouseOnFrame=false end)end end function l:IsTouchDevice( )local m=false pcall(function()m=Game:GetService'UserInputService'.TouchEnabled end)return m end function l:UpdateQueue(m,n)for o=#self.MessageQueue,1,-1 do if self.MessageQueue[o]then for p,q in pairs(self.MessageQueue[o])do if q and type( q)~='table'and type(q)~='number'then if q:IsA'TextLabel'or q:IsA'TextButton'then if n then q.Position=q.Position-UDim2.new(0,0,n,0)else if m==self.MessageQueue[o ]then q.Position=UDim2.new(self.Configuration.XScale,0,q.Position.Y.Scale-m[ 'Message'].Size.Y.Scale,0)Spawn(function()wait(0.05)while q.TextTransparency>=0 do q.TextTransparency=q.TextTransparency-0.2 wait(0.03)end if q==m['Message'] then q.TextStrokeTransparency=0.8 else q.TextStrokeTransparency=1 end end)else q .Position=UDim2.new(self.Configuration.XScale,0,q.Position.Y.Scale-m['Message']. Size.Y.Scale,0)end if q.Position.Y.Scale<-1E-2 then q.Visible=false q:Destroy() end end end end end end end end function l:CreateScrollBar()end function l: CheckIfInBounds(m)if#l.MessageQueue<3 then return true end if m>0 and l. MessageQueue[1]and l.MessageQueue[1]['Player']and l.MessageQueue[1]['Player']. Position.Y.Scale==0 then return true elseif m<0 and l.MessageQueue[1]and l. MessageQueue[1]['Player']and l.MessageQueue[1]['Player'].Position.Y.Scale<0 then return true else return false end return false end function l:ComputeSpaceString (m)local n=' 'if not self.TempSpaceLabel then self.TempSpaceLabel=d.Create 'TextButton'{Size=UDim2.new(0,m.AbsoluteSize.X,0,m.AbsoluteSize.Y),FontSize=self .Configuration.FontSize,Parent=self.RenderFrame,BackgroundTransparency=1,Text=n, Name='SpaceButton'}else self.TempSpaceLabel.Text=n end while self.TempSpaceLabel .TextBounds.Xself. Configuration.HistoryLength then self.MessageQueue[#self.MessageQueue]=nil end p =d.Create'TextLabel'{Name=o,Text=o..':',FontSize=l.Configuration.FontSize, TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment=Enum.TextYAlignment.Top, Parent=self.RenderFrame,TextWrapped=false,Size=UDim2.new(1,0,0.1,0), BackgroundTransparency=1,TextTransparency=1,Position=UDim2.new(0,0,1,0), BorderSizePixel=0,TextStrokeColor3=Color3.new(0.5,0.5,0.5), TextStrokeTransparency=0.75}if m.Neutral then p.TextColor3=l:ComputeChatColor(o) else p.TextColor3=m.TeamColor.Color end local r if not self. CachedSpaceStrings_List[o]then r=l:ComputeSpaceString(p)else r=self. CachedSpaceStrings_List[o]end q=d.Create'TextLabel'{Name=o..' - message',Size= UDim2.new(1,0,0.5,0),TextColor3=l.Configuration.MessageColor,FontSize=l. Configuration.FontSize,TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment= Enum.TextYAlignment.Top,Text='',Parent=self.RenderFrame,TextWrapped=true, BackgroundTransparency=1,TextTransparency=1,Position=UDim2.new(0,0,1,0), BorderSizePixel=0,TextStrokeColor3=Color3.new(0,0,0)}q.Text=r..n if not o then p .Text=''q.TextColor3=Color3.new(0,0.4,1)end for s,t in pairs(self.Admins_List)do if string.lower(t)==string.lower(o)then q.TextColor3=self.Configuration. AdminMessageColor end end p.Visible=true q.Visible=true local u=q.TextBounds.Y q .Size=UDim2.new(1,0,u/self.RenderFrame.AbsoluteSize.Y,0)p.Size=q.Size local v={} v['Player']=p v['Message']=q v['SpawnTime']=tick()table.insert(self.MessageQueue ,1,v)l:UpdateQueue(v)end function l:ScreenSizeChanged()wait()while self.Frame. AbsoluteSize.Y>120 do self.Frame.Size=self.Frame.Size-UDim2.new(0,0,0.005,0)end l:RecalculateSpacing()end function l:FindButtonTree(m,n)local o={}n=n or self. SafeChatTree for p,q in pairs(n)do if p==m then o=n[p]elseif type(n[p])=='table' then o=l:FindButtonTree(m,n[p])end end return o end function l: ToggleSafeChatMenu(m)local n=l:FindButtonTree(m,self.SafeChatTree)if n then for o,p in pairs(n)do if o:IsA'TextButton'or o:IsA'ImageButton'then o.Visible=not o. Visible end end return true end return false end function l: CreateSafeChatOptions(m,n)local o,p={},0 o[n]={}o[n][1]=m[1]n=n or self. SafeChatButton for q,r in pairs(m)do if type(q)=='string'then local s=d.Create 'TextButton'{Name=q,Text=q,Size=UDim2.new(0,100,0,20),TextXAlignment=Enum. TextXAlignment.Center,TextColor3=Color3.new(0.2,0.1,0.1),BackgroundTransparency= 0.5,BackgroundColor3=Color3.new(1,1,1),Parent=self.SafeChatFrame,Visible=false, Position=UDim2.new(0,n.Position.X.Scale+105,0,n.Position.Y.Scale-((p-3)*100))}p= p+1 if type(m[q])=='table'then o[n][s]=l:CreateSafeChatOptions(m[q],s)end s. MouseEnter:connect(function()l:ToggleSafeChatMenu(s)end)s.MouseLeave:connect( function()l:ToggleSafeChatMenu(s)end)s.MouseButton1Click:connect(function()local t=l:FindButtonTree(s)pcall(function()g:Chat(t[1])end)end)end end return o end function l:CreateSafeChatGui()self.SafeChatFrame=d.Create'Frame'{Name= 'SafeChatFrame',Size=UDim2.new(1,0,1,0),Parent=self.Gui,BackgroundTransparency=1 ,d.Create'ImageButton'{Name='SafeChatButton',Size=UDim2.new(0,44,0,31),Position= UDim2.new(0,1,0.35,0),BackgroundTransparency=1,Image= 'http://www.roblox.com/asset/?id=97080365'}}self.SafeChatButton=self. SafeChatFrame.SafeChatButton self.SafeChatTree[self.SafeChatButton]=l: CreateSafeChatOptions(self.SafeChat_List,self.SafeChatButton)self.SafeChatButton .MouseButton1Click:connect(function()l:ToggleSafeChatMenu(self.SafeChatButton) end)end function l:FocusOnChatBar()if self.ClickToChatButton then self. ClickToChatButton.Visible=false end self.GotFocus=true if self.Frame[ 'Background']then self.Frame.Background.Visible=false end self.ChatBar: CaptureFocus()end function l:CreateTouchButton()self.ChatTouchFrame=d.Create 'Frame'{Name='ChatTouchFrame',Size=UDim2.new(0,128,0,32),Position=UDim2.new(0,88 ,0,0),BackgroundTransparency=1,Parent=self.Gui,d.Create'ImageButton'{Name= 'ChatLabel',Size=UDim2.new(0,74,0,28),Position=UDim2.new(0,0,0,0), BackgroundTransparency=1,ZIndex=2},d.Create'ImageLabel'{Name='Background',Size= UDim2.new(1,0,1,0),Position=UDim2.new(0,0,0,0),BackgroundTransparency=1,Image= 'http://www.roblox.com/asset/?id=97078724'}}self.TapToChatLabel=self. ChatTouchFrame.ChatLabel self.TouchLabelBackground=self.ChatTouchFrame. Background self.ChatBar=d.Create'TextBox'{Name='ChatBar',Size=UDim2.new(1,0,0.2, 0),Position=UDim2.new(0,0,0.8,800),Text='',ZIndex=1,BackgroundTransparency=1, Parent=self.Frame,TextXAlignment=Enum.TextXAlignment.Left,TextColor3=Color3.new( 1,1,1),ClearTextOnFocus=false}self.TapToChatLabel.MouseButton1Click:connect( function()self.TapToChatLabel.Visible=false self.ChatBar:CaptureFocus()self. GotFocus=true if self.TouchLabelBackground then self.TouchLabelBackground. Visible=false end end)end function l:CreateChatBar()local m,n=pcall(function() return h.UseLuaChat end)if a or(m and n)then self.ClickToChatButton=d.Create 'TextButton'{Name='ClickToChat',Size=UDim2.new(1,0,0,20),BackgroundTransparency= 1,ZIndex=2,Parent=self.Gui,Text='To chat click here or press "/" key',TextColor3 =Color3.new(1,1,0.9),Position=UDim2.new(0,0,1,0),TextXAlignment=Enum. TextXAlignment.Left,FontSize=Enum.FontSize.Size12}self.ChatBar=d.Create'TextBox' {Name='ChatBar',Size=UDim2.new(1,0,0,20),Position=UDim2.new(0,0,1,0),Text='', ZIndex=1,BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=0.25,Parent= self.Gui,TextXAlignment=Enum.TextXAlignment.Left,TextColor3=Color3.new(1,1,1), FontSize=Enum.FontSize.Size12,ClearTextOnFocus=false}local o,p=pcall(function()h :SetGlobalGuiInset(0,0,0,20)end)if not o then h:SetGlobalSizeOffsetPixel(0,-20) end h:AddSpecialKey(Enum.SpecialKey.ChatHotkey)h.SpecialKeyPressed:connect( function(q)if q==Enum.SpecialKey.ChatHotkey then l:FocusOnChatBar()end end)self. ClickToChatButton.MouseButton1Click:connect(function()l:FocusOnChatBar()end)end end function l:CreateGui()self.Gui=WaitForChild(f,'RobloxGui')self.Frame=d. Create'Frame'{Name='ChatFrame',Size=UDim2.new(0,500,0,120),Position=UDim2.new(0, 0,0,5),BackgroundTransparency=1,ZIndex=0,Parent=self.Gui,Active=false,d.Create 'ImageLabel'{Name='Background',Image='http://www.roblox.com/asset/?id=97120937', Size=UDim2.new(1.3,0,1.64,0),Position=UDim2.new(0,0,0,0),BackgroundTransparency= 1,ZIndex=0,Visible=false},d.Create'Frame'{Name='Border',Size=UDim2.new(1,0,0,1), Position=UDim2.new(0,0,0.8,0),BackgroundTransparency=0,BackgroundColor3=Color3. new(0.9254901960784314,0.9254901960784314,0.9254901960784314),BorderSizePixel=0, Visible=false},d.Create'Frame'{Name='ChatRenderFrame',Size=UDim2.new(1.02,0,1.01 ,0),Position=UDim2.new(0,0,0,0),BackgroundTransparency=1,ZIndex=0,Active=false}} Spawn(function()wait(0.5)if IsPhone()then self.Frame.Size=UDim2.new(0,280,0,120) end end)self.RenderFrame=self.Frame.ChatRenderFrame if l:IsTouchDevice()then self.Frame.Position=self.Configuration.Position self.RenderFrame.Size=UDim2.new( 1,0,1,0)elseif self.Frame.AbsoluteSize.Y>120 then l:ScreenSizeChanged()self.Gui. Changed:connect(function(m)if m=='AbsoluteSize'then l:ScreenSizeChanged()end end )end if a or b.ChatMode==Enum.ChatMode.TextAndMenu then if l:IsTouchDevice()then l:CreateTouchButton()else l:CreateChatBar()end if self.ChatBar then self.ChatBar .FocusLost:connect(function(m)l.GotFocus=false if l:IsTouchDevice()then self. ChatBar.Visible=false self.TapToChatLabel.Visible=true if self. TouchLabelBackground then self.TouchLabelBackground.Visible=true end end if m and self.ChatBar.Text~=''then local n=self.ChatBar.Text if string.sub(self. ChatBar.Text,1,1)=='%'then n='(TEAM) '..string.sub(n,2,#n)pcall(function()g: TeamChat(n)end)else pcall(function()g:Chat(n)end)end if self.ClickToChatButton then self.ClickToChatButton.Visible=true end self.ChatBar.Text=''end Spawn( function()wait(5)if not l.GotFocus then l.Frame.Background.Visible=false end end )end)end end end function k:OnMouseScroll()Spawn(function()while k.Speed~=0 do if k.Speed>1 then while k.Speed>0 do k.Speed=k.Speed-1 wait(0.25)end elseif k. Speed<0 then while k.Speed<0 do k.Speed=k.Speed+1 wait(0.25)end end wait(0.03) end end)if l:CheckIfInBounds(k.Speed)then return end l:ScrollQueue()end function k:ApplySpeed(m)k.Speed=k.Speed+m if not self.Simulating then k:OnMouseScroll() end end function k:Initialize()self.Mouse.WheelBackward:connect(function()k: ApplySpeed(self.Configuration.DefaultSpeed)end)self.Mouse.WheelForward:connect( function()k:ApplySpeed(self.Configuration.DefaultSpeed)end)end function l: FindMessageInSafeChat(m,n)local o=false for p,q in pairs(n)do if p==m then return true end if type(n[p])=='table'then o=l:FindMessageInSafeChat(m,n[p])if o then return true end end end return o end function l:PlayerChatted(...)local m,n ,o={...},nil,nil if m[2]then n=m[2]end if m[3]then o=m[3]if string.sub(o,1,1)== '%'then o='(TEAM) '..string.sub(o,2,#o)end end if g.ClassicChat then if not( string.sub(o,1,3)=='/e 'or string.sub(o,1,7)=='/emote ')and(a or b.ChatMode== Enum.ChatMode.TextAndMenu)or(b.ChatMode==Enum.ChatMode.Menu and string.sub(o,1,3 )=='/sc')or(l:FindMessageInSafeChat(o,self.SafeChat_List))then l:UpdateChat(n,o) end end end function l:CullThread()while true do if#self.MessageQueue>0 then for m,n in pairs(self.MessageQueue)do if n['SpawnTime']and n['Player']and n[ 'Message']and tick()-n['SpawnTime']>self.Configuration.LifeTime then n['Player'] .Visible=false n['Message'].Visible=false end end end wait(5)end end function l: LockAllFields(m)local n=m:GetChildren()for o=1,#n do n[o].RobloxLocked=true if#n [o]:GetChildren()>0 then l:LockAllFields(n[o])end end end function l: CoreGuiChanged(m,n)if m==Enum.CoreGuiType.Chat or m==Enum.CoreGuiType.All then if self.Frame then self.Frame.Visible=n end if not l:IsTouchDevice()and self. ChatBar then self.ChatBar.Visible=n if n then h:SetGlobalGuiInset(0,0,0,20)else h:SetGlobalGuiInset(0,0,0,0)end end end end function l:Initialize()l:CreateGui() pcall(function()l:CoreGuiChanged(Enum.CoreGuiType.Chat,Game.StarterGui: GetCoreGuiEnabled(Enum.CoreGuiType.Chat))Game.StarterGui.CoreGuiChangedSignal: connect(function(m,n)l:CoreGuiChanged(m,n)end)end)self.EventListener=g. PlayerChatted:connect(function(...)l:PlayerChatted(...)end)self.MessageThread= coroutine.create(function()end)coroutine.resume(self.MessageThread)k:Initialize( )g.ChildAdded:connect(function()l.EventListener:disconnect()self.EventListener=g .PlayerChatted:connect(function(...)l:PlayerChatted(...)end)end)Spawn(function() l:CullThread()end)self.Frame.RobloxLocked=true l:LockAllFields(self.Frame)self. Frame.DescendantAdded:connect(function(m)l:LockAllFields(m)end)end l:Initialize( )