Advertisement
Fullgamer309

testing

Mar 14th, 2020
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.72 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.1
  3.  
  4. -- Instances:
  5.  
  6. local Test = Instance.new("ScreenGui")
  7. local ChatFrame = Instance.new("Frame")
  8. local ChatTemplate = Instance.new("TextLabel")
  9. local TextLabel = Instance.new("TextLabel")
  10. local ChatTemplateAlternate = Instance.new("TextLabel")
  11. local TextLabel_2 = Instance.new("TextLabel")
  12.  
  13. --Properties:
  14.  
  15. Test.Name = "Test"
  16. Test.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  17.  
  18. ChatFrame.Name = "ChatFrame"
  19. ChatFrame.Parent = Test
  20. ChatFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  21. ChatFrame.BackgroundTransparency = 1.000
  22. ChatFrame.BorderSizePixel = 0
  23. ChatFrame.Position = UDim2.new(0, 15, 0, 120)
  24. ChatFrame.Size = UDim2.new(0, 510, 0, 200)
  25.  
  26. ChatTemplate.Name = "ChatTemplate"
  27. ChatTemplate.Parent = Test
  28. ChatTemplate.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  29. ChatTemplate.BackgroundTransparency = 1.000
  30. ChatTemplate.BorderSizePixel = 0
  31. ChatTemplate.ClipsDescendants = true
  32. ChatTemplate.Size = UDim2.new(1, 0, 0, 90)
  33. ChatTemplate.ZIndex = 2
  34. ChatTemplate.Text = ""
  35. ChatTemplate.TextColor3 = Color3.fromRGB(47, 95, 199)
  36. ChatTemplate.TextSize = 12.000
  37. ChatTemplate.TextStrokeColor3 = Color3.fromRGB(27, 42, 53)
  38. ChatTemplate.TextTransparency = 1.000
  39. ChatTemplate.TextXAlignment = Enum.TextXAlignment.Left
  40. ChatTemplate.TextYAlignment = Enum.TextYAlignment.Top
  41.  
  42. TextLabel.Parent = ChatTemplate
  43. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  44. TextLabel.BackgroundTransparency = 1.000
  45. TextLabel.BorderSizePixel = 0
  46. TextLabel.Size = UDim2.new(1, 0, 0, 90)
  47. TextLabel.Text = ""
  48. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  49. TextLabel.TextSize = 12.000
  50. TextLabel.TextStrokeColor3 = Color3.fromRGB(27, 42, 53)
  51. TextLabel.TextTransparency = 1.000
  52. TextLabel.TextWrapped = true
  53. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  54. TextLabel.TextYAlignment = Enum.TextYAlignment.Top
  55.  
  56. ChatTemplateAlternate.Name = "ChatTemplateAlternate"
  57. ChatTemplateAlternate.Parent = Test
  58. ChatTemplateAlternate.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  59. ChatTemplateAlternate.BackgroundTransparency = 1.000
  60. ChatTemplateAlternate.BorderSizePixel = 0
  61. ChatTemplateAlternate.ClipsDescendants = true
  62. ChatTemplateAlternate.Size = UDim2.new(1, 0, 0, 90)
  63. ChatTemplateAlternate.ZIndex = 2
  64. ChatTemplateAlternate.Font = Enum.Font.SourceSansBold
  65. ChatTemplateAlternate.Text = "Constantine:"
  66. ChatTemplateAlternate.TextColor3 = Color3.fromRGB(47, 95, 199)
  67. ChatTemplateAlternate.TextSize = 18.000
  68. ChatTemplateAlternate.TextStrokeColor3 = Color3.fromRGB(27, 42, 53)
  69. ChatTemplateAlternate.TextTransparency = 1.000
  70. ChatTemplateAlternate.TextXAlignment = Enum.TextXAlignment.Left
  71. ChatTemplateAlternate.TextYAlignment = Enum.TextYAlignment.Top
  72.  
  73. TextLabel_2.Parent = ChatTemplateAlternate
  74. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  75. TextLabel_2.BackgroundTransparency = 1.000
  76. TextLabel_2.BorderSizePixel = 0
  77. TextLabel_2.Size = UDim2.new(1, 0, 0, 90)
  78. TextLabel_2.Font = Enum.Font.SourceSansBold
  79. TextLabel_2.Text = ""
  80. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  81. TextLabel_2.TextSize = 18.000
  82. TextLabel_2.TextStrokeColor3 = Color3.fromRGB(27, 42, 53)
  83. TextLabel_2.TextTransparency = 1.000
  84. TextLabel_2.TextWrapped = true
  85. TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left
  86. TextLabel_2.TextYAlignment = Enum.TextYAlignment.Top
  87.  
  88. -- Scripts:
  89.  
  90. local function RAXVUW_fake_script() -- ChatFrame.LocalChatScript
  91. local script = Instance.new('LocalScript', ChatFrame)
  92.  
  93. print("Chiefryanz Custom Chat Gui: Gui Loaded")
  94. local sp=script.Parent
  95.  
  96.  
  97. local runservice=game:GetService("RunService")
  98. local sharedstorage=game:GetService("ReplicatedStorage")
  99. local chatevent=sharedstorage:WaitForChild("ChatEvent")
  100. local startergui=game:GetService("StarterGui")
  101. local chatframe=sp
  102. local chatguitemplate=sharedstorage:WaitForChild("ChatTemplateAlternate"):WaitForChild("TextLabel") and sharedstorage:WaitForChild("ChatTemplateAlternate")
  103. local stack={}
  104.  
  105. local tweentime=.5
  106. local chatspacing=3
  107. local spacepixelratio=31/88
  108.  
  109. function swait()
  110. runservice.RenderStepped:wait()
  111. end
  112.  
  113. function figurestack()
  114. local stacksize=0
  115. local i=#stack
  116. while i>0 do
  117. local gui=stack[i]
  118. if gui then
  119. stacksize=stacksize+gui.AbsoluteSize.Y
  120. local desiredpos=UDim2.new(0,0,1,-stacksize)
  121. if gui.Position~=desiredpos then
  122. gui:TweenPosition(desiredpos,"Out","Quad",tweentime,true)
  123. if desiredpos.Y.Offset<-chatframe.AbsoluteSize.Y and gui.Name~="RemovingThis" then
  124. gui.Name="RemovingThis"
  125. table.remove(stack,i)
  126. delay(0,function()
  127. local starttime=tick()
  128. while gui do
  129. local chatlabel=gui:FindFirstChild("TextLabel")
  130. if chatlabel then
  131. local fadepercent=math.min((tick()-starttime)/tweentime,1)
  132. gui.TextTransparency=fadepercent
  133. gui.TextStrokeTransparency=.5+fadepercent*.5
  134. chatlabel.TextTransparency=fadepercent
  135. chatlabel.TextStrokeTransparency=.5+fadepercent*.5
  136. if fadepercent>=1 then
  137. break
  138. end
  139. else
  140. break
  141. end
  142. swait()
  143. end
  144. if gui then
  145. gui:remove()
  146. end
  147. end)
  148. end
  149. end
  150. end
  151. i=i-1
  152. end
  153. end
  154.  
  155. function createguimessage(username,text,namecolor,chatcolor)
  156. local namelabel=chatguitemplate:clone()
  157. local chatlabel=namelabel.TextLabel
  158. namelabel.Parent=chatframe
  159. namelabel.Text=(username or "")
  160. if namecolor then
  161. namelabel.TextColor3=namecolor
  162. end
  163. local spacing=string.rep(" ",math.ceil(namelabel.TextBounds.x*spacepixelratio)).." "
  164. if not username then
  165. spacing=""
  166. end
  167. chatlabel.Text=spacing..(text or "")
  168. if chatlabel.Text=="" then
  169. chatlabel.Text=spacing.."#?%@&!"
  170. end
  171. if chatcolor then
  172. chatlabel.TextColor3=chatcolor
  173. end
  174. local size=math.max(18,chatlabel.TextBounds.y)+chatspacing
  175. namelabel.Size=UDim2.new(1,0,0,size)
  176. chatlabel.Size=namelabel.Size
  177. namelabel.Position=UDim2.new(0,0,1,0)
  178. table.insert(stack,namelabel)
  179. figurestack()
  180. delay(0,function()
  181. local starttime=tick()
  182. while true do
  183. if namelabel and chatlabel and namelabel.Name~="RemovingThis" then
  184. local percent=math.min((tick()-starttime)/tweentime,1)
  185. local fadepercent=1-percent
  186. namelabel.TextTransparency=fadepercent
  187. namelabel.TextStrokeTransparency=.5+fadepercent*.5
  188. chatlabel.TextTransparency=fadepercent
  189. chatlabel.TextStrokeTransparency=.5+fadepercent*.5
  190. if percent>=1 then
  191. break
  192. end
  193. else
  194. break
  195. end
  196. swait()
  197. end
  198. end)
  199. end
  200.  
  201. chatevent.OnClientEvent:connect(function(...)
  202. local tuple={...}
  203. createguimessage(tuple[1],tuple[2],tuple[3],tuple[4])
  204. end)
  205. -- Questions? Ask Chiefryanz.
  206. end
  207. coroutine.wrap(RAXVUW_fake_script)()
  208. local function PAMO_fake_script() -- Test.GameChatScript
  209. local script = Instance.new('Script', Test)
  210.  
  211. print("Chiefryanz Custom Chat Gui: GameChatScript Loaded")
  212. local storage=game:GetService("ServerStorage")
  213. local sharedstorage=game:GetService("ReplicatedStorage")
  214. local chatevent=sharedstorage:WaitForChild("ChatEvent")
  215.  
  216.  
  217. local systemfontcolor=Color3.new(.83,.83,.83)
  218.  
  219.  
  220. function sendchat(chattype,name,chat,namecolor,textcolor)
  221. if chattype=="system" or chattype=="outmatch" then
  222. for _,plr in pairs(game.Players:GetPlayers()) do
  223. if true then
  224. chatevent:FireClient(plr,name,chat,namecolor,textcolor)
  225. end
  226. end
  227. elseif chattype=="inmatch" then
  228. chatevent:FireAllClients(name,chat,namecolor,textcolor)
  229. else
  230. chatevent:FireAllClients(name,chat,namecolor,textcolor)
  231. end
  232. end
  233.  
  234. function newplayer(plr)
  235. print("Player added yes",plr)
  236. sendchat("system",nil,""..plr.Name..": Joined the server.",systemfontcolor,systemfontcolor)
  237. local lastchattime=tick()
  238. local lastmsg=""
  239. plr.Chatted:connect(function(msg)
  240. local currenttime=tick()
  241. if plr and msg and msg~="" and string.sub(msg,1,2)~="/w" and string.sub(msg,1,2)~="/e" and(msg~=lastmsg or (currenttime-lastchattime)>3) and (currenttime-lastchattime)>.5 then
  242. lastchattime=currenttime
  243. local lastmsg=msg
  244. if hascharactertag and hascharactertag.Value and plr.Character then
  245. sendchat("outmatch",plr.Name..":",msg)
  246. else
  247. sendchat("inmatch",plr.Character.Name..":",msg,Color3.new(.509,.796,1))
  248. end
  249. end
  250. end)
  251. end
  252.  
  253. game.Players.PlayerAdded:connect(newplayer)
  254. for _,plr in pairs(game.Players:GetPlayers()) do
  255. newplayer(plr)
  256. end
  257.  
  258. game.Players.PlayerRemoving:connect(function(plr)
  259. if plr then
  260. sendchat("system",nil,""..plr.Name..": Left the server",systemfontcolor,systemfontcolor)
  261. end
  262. end)
  263. -- Questions? Ask ChiefRyanz
  264. end
  265. coroutine.wrap(PAMO_fake_script)()
  266. local function GHOODZ_fake_script() -- Test.Place Objects Script
  267. local script = Instance.new('Script', Test)
  268.  
  269. local sp = script.Parent
  270.  
  271. while true do
  272. sp.Parent = game.StarterGui
  273. sp.ChatEvent.Parent = game.ReplicatedStorage
  274. sp.ChatTemplate.Parent = game.ReplicatedStorage
  275. sp.ChatTemplateAlternate.Parent = game.ReplicatedStorage
  276. sp.GameChatScript.Parent = game.ServerScriptService
  277. print("Loading Complete!1!1!")
  278. print("Script Dead lol ")
  279. script:remove()
  280. end
  281. end
  282. coroutine.wrap(GHOODZ_fake_script)()
  283. local function EAVSIBT_fake_script() -- Test.Script
  284. local script = Instance.new('Script', Test)
  285.  
  286. script:remove() -- Removes Script so you don't have too
  287.  
  288. --[[
  289. Hey guys, ChiefRyanz here.
  290.  
  291. You don't have to do anything with this model. There is a place objects script that I made to put each script/chatevent/gui
  292. in the correct spot.
  293.  
  294. You may use in your game without giveing credit however if you decide to uncopylock the place or reupload this as a model you
  295. should give credit to me.
  296.  
  297. More Cheeze pls?
  298.  
  299. --]]
  300.  
  301. end
  302. coroutine.wrap(EAVSIBT_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement