Advertisement
Animescapetower

Luck's Chat System

Mar 12th, 2018
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.12 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Script0 = Instance.new("Script")
  20. ScreenGui1 = Instance.new("ScreenGui")
  21. Frame2 = Instance.new("Frame")
  22. Script3 = Instance.new("Script")
  23. Color3Value4 = Instance.new("Color3Value")
  24. Color3Value5 = Instance.new("Color3Value")
  25. Color3Value6 = Instance.new("Color3Value")
  26. Color3Value7 = Instance.new("Color3Value")
  27. Color3Value8 = Instance.new("Color3Value")
  28. TextLabel9 = Instance.new("TextLabel")
  29. Color3Value10 = Instance.new("Color3Value")
  30. Script11 = Instance.new("Script")
  31. Script12 = Instance.new("Script")
  32. LocalScript13 = Instance.new("LocalScript")
  33. Script0.Name = "Chatstuff"
  34. Script0.Parent = mas
  35. table.insert(cors,sandbox(Script0,function()
  36. game.Players.PlayerAdded:connect(function(plr)
  37. plr.CharacterAdded:connect(function()
  38. repeat wait() until plr:FindFirstChild("PlayerGui")
  39. script.Chat:clone().Parent = plr.PlayerGui
  40. end)
  41. end)
  42. end))
  43. ScreenGui1.Name = "Chat"
  44. ScreenGui1.Parent = Script0
  45. Frame2.Name = "Chats"
  46. Frame2.Parent = ScreenGui1
  47. Frame2.Transparency = 1
  48. Frame2.Size = UDim2.new(1, -210, 0, 220)
  49. Frame2.Position = UDim2.new(0, 10, 0, 10)
  50. Frame2.BackgroundColor3 = Color3.new(0, 0, 0)
  51. Frame2.BackgroundTransparency = 1
  52. Frame2.BorderColor3 = Color3.new(0, 0, 0)
  53. Frame2.BorderSizePixel = 0
  54. Script3.Name = "Ranks"
  55. Script3.Parent = ScreenGui1
  56. table.insert(cors,sandbox(Script3,function()
  57.  
  58. local chats = script.Parent.Chats
  59. local last
  60.  
  61. function newChat(msg,plr)
  62. if #msg > 0 then
  63. for i, c in pairs(chats:GetChildren()) do
  64. c.Position = c.Position - UDim2.new(0, 0, 0.1, 0)
  65. end
  66. local newMessage = script.Message:clone()
  67. if #chats:GetChildren() == 10 then
  68. chats:GetChildren()[1]:Destroy()
  69. end
  70.  
  71. if plr.Name == "FunTimeArtic" then
  72. newMessage.TextColor3 = script.CONSOLE.Value
  73. newMessage.Text = "[Rank-Admin]: ".. msg
  74.  
  75. elseif plr.Name == "PizzaEater" or plr.Name == "Nebula_Zorua" or plr.Name == "tusKOr661" then
  76. newMessage.TextColor3 = script.Admin.Value
  77. newMessage.Text = "[Rank-Game owner]Rank2: " .. plr.Name ..": ".. msg
  78.  
  79.  
  80.  
  81. elseif plr.Name == "Helper" or plr.Name == "Salvo_Starly" or plr.Name == "Animescapetower" or plr.Name == "Duckenator" or plr.Name == "popperking1011" then
  82. newMessage.TextColor3 = script.CoOwner.Value
  83. newMessage.Text = "[Rank-Scripter/CoOwner] Rank1: ".. msg
  84.  
  85.  
  86. elseif plr.Name == plr.Name then
  87. newMessage.TextColor3 = script.Alt.Value
  88. newMessage.Text = "[Rank-Guest] " .. plr.Name ..": ".. msg
  89.  
  90. elseif game:GetService("GamePassService"):PlayerHasPass(plr, 376847147)then
  91. newMessage.TextColor3 = script.RADIO.Value
  92. newMessage.Text = "[Donor] " .. plr.Name ..": ".. msg
  93.  
  94. elseif game:GetService("GamePassService"):PlayerHasPass(plr, 376847147)then
  95. newMessage.TextColor3 = script.RADIO.Value
  96. newMessage.Text = "Not " .. plr.Name .." says ".. msg
  97.  
  98.  
  99.  
  100.  
  101.  
  102. else
  103. newMessage.Text = plr.Name ..": ".. msg
  104. end
  105.  
  106. newMessage.Position = UDim2.new(0, 0, 0.9, 0)
  107. newMessage.Parent = chats
  108. last = newMessage
  109. end
  110. end
  111.  
  112. function join(plr)
  113. for i, c in pairs(chats:GetChildren()) do
  114. c.Position = c.Position - UDim2.new(0, 0, 0.1, 0)
  115. end
  116. local newMessage = script.Message:clone()
  117. if #chats:GetChildren() == 10 then
  118. chats:GetChildren()[1]:Destroy()
  119. end
  120. newMessage.Text = "[Server] Welcome " .. plr.Name .. ", (Welcome to void sb or galaxy sb) " .. game.Name
  121. newMessage.TextColor3 = script.CONSOLE.Value
  122. newMessage.Position = UDim2.new(0, 0, 0.9, 0)
  123. newMessage.Parent = chats
  124. last = newMessage
  125. end
  126.  
  127. function left(plr)
  128. for i, c in pairs(chats:GetChildren()) do
  129. c.Position = c.Position - UDim2.new(0, 0, 0.1, 0)
  130. end
  131. local newMessage = script.Message:clone()
  132. if #chats:GetChildren() == 10 then
  133. chats:GetChildren()[1]:Destroy()
  134. end
  135. newMessage.Text = "[Console] " .. plr.Name .. " has left"
  136. newMessage.TextColor3 = script.CONSOLE.Value
  137. newMessage.Position = UDim2.new(0, 0, 0.9, 0)
  138. newMessage.Parent = chats
  139. last = newMessage
  140. end
  141.  
  142. game.Players.PlayerAdded:connect(function(plr)
  143. join(plr)
  144. end)
  145.  
  146. game.Players.PlayerRemoving:connect(function(plr)
  147. left(plr)
  148. end)
  149.  
  150. game.Players.PlayerAdded:connect(function(plr)
  151. plr.Chatted:connect(function(msg)
  152. newChat(msg, plr)
  153. end)
  154. end)
  155.  
  156. for i, player in pairs(game.Players:GetPlayers()) do
  157. player.Chatted:connect(function(msg)
  158. newChat(msg, player)
  159. end)
  160. end
  161. end))
  162. Color3Value4.Name = "Owner"
  163. Color3Value4.Parent = Script3
  164. Color3Value4.Value = Color3.new(0.529412, 0.992157, 1)
  165. Color3Value5.Name = "CONSOLE"
  166. Color3Value5.Parent = Script3
  167. Color3Value5.Value = Color3.new(0.529412, 0.992157, 1)
  168. Color3Value6.Name = "Alt"
  169. Color3Value6.Parent = Script3
  170. Color3Value6.Value = Color3.new(0.529412, 0.992157, 1)
  171. Color3Value7.Name = "Admin"
  172. Color3Value7.Parent = Script3
  173. Color3Value7.Value = Color3.new(0.529412, 0.992157, 1)
  174. Color3Value8.Name = "CoOwner"
  175. Color3Value8.Parent = Script3
  176. Color3Value8.Value = Color3.new(0.529412, 0.992157, 1)
  177. TextLabel9.Name = "Message"
  178. TextLabel9.Parent = Script3
  179. TextLabel9.Transparency = 1
  180. TextLabel9.Size = UDim2.new(1, 0, 0.100000001, 0)
  181. TextLabel9.Text = "Player: Message"
  182. TextLabel9.Position = UDim2.new(0, 0, 0.899999976, 0)
  183. TextLabel9.BackgroundColor3 = Color3.new(1, 1, 1)
  184. TextLabel9.BackgroundTransparency = 1
  185. TextLabel9.BorderSizePixel = 0
  186. TextLabel9.ClipsDescendants = true
  187. TextLabel9.Font = Enum.Font.SourceSansBold
  188. TextLabel9.FontSize = Enum.FontSize.Size18
  189. TextLabel9.TextColor3 = Color3.new(1, 1, 1)
  190. TextLabel9.TextStrokeTransparency = 0
  191. TextLabel9.TextXAlignment = Enum.TextXAlignment.Left
  192. Color3Value10.Name = "CHEEP"
  193. Color3Value10.Parent = Script3
  194. Color3Value10.Value = Color3.new(0.529412, 0.992157, 1)
  195. Script11.Name = "READ MEEEEE!!!"
  196. Script11.Parent = Script3
  197. table.insert(cors,sandbox(Script11,function()
  198. -- Go Into the ranks script and change the names in the quotation marks ("") to whoever you want--
  199. -- Make sure you credit me (popperking1011) and my friend (Animescapetower) PL0X--
  200. -- And thats is just change the names and credit us--
  201. end))
  202. Script12.Name = "Read me"
  203. Script12.Parent = Script0
  204. table.insert(cors,sandbox(Script12,function()
  205. --Change the positioning to anywhere you want on the screen.It is up to you.--
  206. end))
  207. LocalScript13.Name = "Chat_Producer"
  208. LocalScript13.Parent = mas
  209. LocalScript13.Disabled = true
  210. table.insert(cors,sandbox(LocalScript13,function()
  211. local x = game.Text_Files.Text.Value
  212. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  213. Text = "" .. x ;
  214. Color = Color3.new(255,255,255);
  215. Font = Enum.Font.SourceSans;
  216. FontSize = Enum.FontSize.Size24;
  217. })
  218. script.Disabled = true
  219. end))
  220. for i,v in pairs(mas:GetChildren()) do
  221. v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  222. pcall(function() v:MakeJoints() end)
  223. end
  224. mas:Destroy()
  225. for i,v in pairs(cors) do
  226. spawn(function()
  227. pcall(v)
  228. end)
  229. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement