Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.1
- -- Instances:
- local Test = Instance.new("ScreenGui")
- local ChatFrame = Instance.new("Frame")
- local ChatTemplate = Instance.new("TextLabel")
- local TextLabel = Instance.new("TextLabel")
- local ChatTemplateAlternate = Instance.new("TextLabel")
- local TextLabel_2 = Instance.new("TextLabel")
- --Properties:
- Test.Name = "Test"
- Test.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ChatFrame.Name = "ChatFrame"
- ChatFrame.Parent = Test
- ChatFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ChatFrame.BackgroundTransparency = 1.000
- ChatFrame.BorderSizePixel = 0
- ChatFrame.Position = UDim2.new(0, 15, 0, 120)
- ChatFrame.Size = UDim2.new(0, 510, 0, 200)
- ChatTemplate.Name = "ChatTemplate"
- ChatTemplate.Parent = Test
- ChatTemplate.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ChatTemplate.BackgroundTransparency = 1.000
- ChatTemplate.BorderSizePixel = 0
- ChatTemplate.ClipsDescendants = true
- ChatTemplate.Size = UDim2.new(1, 0, 0, 90)
- ChatTemplate.ZIndex = 2
- ChatTemplate.Text = ""
- ChatTemplate.TextColor3 = Color3.fromRGB(47, 95, 199)
- ChatTemplate.TextSize = 12.000
- ChatTemplate.TextStrokeColor3 = Color3.fromRGB(27, 42, 53)
- ChatTemplate.TextTransparency = 1.000
- ChatTemplate.TextXAlignment = Enum.TextXAlignment.Left
- ChatTemplate.TextYAlignment = Enum.TextYAlignment.Top
- TextLabel.Parent = ChatTemplate
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.BorderSizePixel = 0
- TextLabel.Size = UDim2.new(1, 0, 0, 90)
- TextLabel.Text = ""
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextSize = 12.000
- TextLabel.TextStrokeColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.TextTransparency = 1.000
- TextLabel.TextWrapped = true
- TextLabel.TextXAlignment = Enum.TextXAlignment.Left
- TextLabel.TextYAlignment = Enum.TextYAlignment.Top
- ChatTemplateAlternate.Name = "ChatTemplateAlternate"
- ChatTemplateAlternate.Parent = Test
- ChatTemplateAlternate.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ChatTemplateAlternate.BackgroundTransparency = 1.000
- ChatTemplateAlternate.BorderSizePixel = 0
- ChatTemplateAlternate.ClipsDescendants = true
- ChatTemplateAlternate.Size = UDim2.new(1, 0, 0, 90)
- ChatTemplateAlternate.ZIndex = 2
- ChatTemplateAlternate.Font = Enum.Font.SourceSansBold
- ChatTemplateAlternate.Text = "Constantine:"
- ChatTemplateAlternate.TextColor3 = Color3.fromRGB(47, 95, 199)
- ChatTemplateAlternate.TextSize = 18.000
- ChatTemplateAlternate.TextStrokeColor3 = Color3.fromRGB(27, 42, 53)
- ChatTemplateAlternate.TextTransparency = 1.000
- ChatTemplateAlternate.TextXAlignment = Enum.TextXAlignment.Left
- ChatTemplateAlternate.TextYAlignment = Enum.TextYAlignment.Top
- TextLabel_2.Parent = ChatTemplateAlternate
- TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.BackgroundTransparency = 1.000
- TextLabel_2.BorderSizePixel = 0
- TextLabel_2.Size = UDim2.new(1, 0, 0, 90)
- TextLabel_2.Font = Enum.Font.SourceSansBold
- TextLabel_2.Text = ""
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextSize = 18.000
- TextLabel_2.TextStrokeColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel_2.TextTransparency = 1.000
- TextLabel_2.TextWrapped = true
- TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left
- TextLabel_2.TextYAlignment = Enum.TextYAlignment.Top
- -- Scripts:
- local function RAXVUW_fake_script() -- ChatFrame.LocalChatScript
- local script = Instance.new('LocalScript', ChatFrame)
- print("Chiefryanz Custom Chat Gui: Gui Loaded")
- local sp=script.Parent
- local runservice=game:GetService("RunService")
- local sharedstorage=game:GetService("ReplicatedStorage")
- local chatevent=sharedstorage:WaitForChild("ChatEvent")
- local startergui=game:GetService("StarterGui")
- local chatframe=sp
- local chatguitemplate=sharedstorage:WaitForChild("ChatTemplateAlternate"):WaitForChild("TextLabel") and sharedstorage:WaitForChild("ChatTemplateAlternate")
- local stack={}
- local tweentime=.5
- local chatspacing=3
- local spacepixelratio=31/88
- function swait()
- runservice.RenderStepped:wait()
- end
- function figurestack()
- local stacksize=0
- local i=#stack
- while i>0 do
- local gui=stack[i]
- if gui then
- stacksize=stacksize+gui.AbsoluteSize.Y
- local desiredpos=UDim2.new(0,0,1,-stacksize)
- if gui.Position~=desiredpos then
- gui:TweenPosition(desiredpos,"Out","Quad",tweentime,true)
- if desiredpos.Y.Offset<-chatframe.AbsoluteSize.Y and gui.Name~="RemovingThis" then
- gui.Name="RemovingThis"
- table.remove(stack,i)
- delay(0,function()
- local starttime=tick()
- while gui do
- local chatlabel=gui:FindFirstChild("TextLabel")
- if chatlabel then
- local fadepercent=math.min((tick()-starttime)/tweentime,1)
- gui.TextTransparency=fadepercent
- gui.TextStrokeTransparency=.5+fadepercent*.5
- chatlabel.TextTransparency=fadepercent
- chatlabel.TextStrokeTransparency=.5+fadepercent*.5
- if fadepercent>=1 then
- break
- end
- else
- break
- end
- swait()
- end
- if gui then
- gui:remove()
- end
- end)
- end
- end
- end
- i=i-1
- end
- end
- function createguimessage(username,text,namecolor,chatcolor)
- local namelabel=chatguitemplate:clone()
- local chatlabel=namelabel.TextLabel
- namelabel.Parent=chatframe
- namelabel.Text=(username or "")
- if namecolor then
- namelabel.TextColor3=namecolor
- end
- local spacing=string.rep(" ",math.ceil(namelabel.TextBounds.x*spacepixelratio)).." "
- if not username then
- spacing=""
- end
- chatlabel.Text=spacing..(text or "")
- if chatlabel.Text=="" then
- chatlabel.Text=spacing.."#?%@&!"
- end
- if chatcolor then
- chatlabel.TextColor3=chatcolor
- end
- local size=math.max(18,chatlabel.TextBounds.y)+chatspacing
- namelabel.Size=UDim2.new(1,0,0,size)
- chatlabel.Size=namelabel.Size
- namelabel.Position=UDim2.new(0,0,1,0)
- table.insert(stack,namelabel)
- figurestack()
- delay(0,function()
- local starttime=tick()
- while true do
- if namelabel and chatlabel and namelabel.Name~="RemovingThis" then
- local percent=math.min((tick()-starttime)/tweentime,1)
- local fadepercent=1-percent
- namelabel.TextTransparency=fadepercent
- namelabel.TextStrokeTransparency=.5+fadepercent*.5
- chatlabel.TextTransparency=fadepercent
- chatlabel.TextStrokeTransparency=.5+fadepercent*.5
- if percent>=1 then
- break
- end
- else
- break
- end
- swait()
- end
- end)
- end
- chatevent.OnClientEvent:connect(function(...)
- local tuple={...}
- createguimessage(tuple[1],tuple[2],tuple[3],tuple[4])
- end)
- -- Questions? Ask Chiefryanz.
- end
- coroutine.wrap(RAXVUW_fake_script)()
- local function PAMO_fake_script() -- Test.GameChatScript
- local script = Instance.new('Script', Test)
- print("Chiefryanz Custom Chat Gui: GameChatScript Loaded")
- local storage=game:GetService("ServerStorage")
- local sharedstorage=game:GetService("ReplicatedStorage")
- local chatevent=sharedstorage:WaitForChild("ChatEvent")
- local systemfontcolor=Color3.new(.83,.83,.83)
- function sendchat(chattype,name,chat,namecolor,textcolor)
- if chattype=="system" or chattype=="outmatch" then
- for _,plr in pairs(game.Players:GetPlayers()) do
- if true then
- chatevent:FireClient(plr,name,chat,namecolor,textcolor)
- end
- end
- elseif chattype=="inmatch" then
- chatevent:FireAllClients(name,chat,namecolor,textcolor)
- else
- chatevent:FireAllClients(name,chat,namecolor,textcolor)
- end
- end
- function newplayer(plr)
- print("Player added yes",plr)
- sendchat("system",nil,""..plr.Name..": Joined the server.",systemfontcolor,systemfontcolor)
- local lastchattime=tick()
- local lastmsg=""
- plr.Chatted:connect(function(msg)
- local currenttime=tick()
- 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
- lastchattime=currenttime
- local lastmsg=msg
- if hascharactertag and hascharactertag.Value and plr.Character then
- sendchat("outmatch",plr.Name..":",msg)
- else
- sendchat("inmatch",plr.Character.Name..":",msg,Color3.new(.509,.796,1))
- end
- end
- end)
- end
- game.Players.PlayerAdded:connect(newplayer)
- for _,plr in pairs(game.Players:GetPlayers()) do
- newplayer(plr)
- end
- game.Players.PlayerRemoving:connect(function(plr)
- if plr then
- sendchat("system",nil,""..plr.Name..": Left the server",systemfontcolor,systemfontcolor)
- end
- end)
- -- Questions? Ask ChiefRyanz
- end
- coroutine.wrap(PAMO_fake_script)()
- local function GHOODZ_fake_script() -- Test.Place Objects Script
- local script = Instance.new('Script', Test)
- local sp = script.Parent
- while true do
- sp.Parent = game.StarterGui
- sp.ChatEvent.Parent = game.ReplicatedStorage
- sp.ChatTemplate.Parent = game.ReplicatedStorage
- sp.ChatTemplateAlternate.Parent = game.ReplicatedStorage
- sp.GameChatScript.Parent = game.ServerScriptService
- print("Loading Complete!1!1!")
- print("Script Dead lol ")
- script:remove()
- end
- end
- coroutine.wrap(GHOODZ_fake_script)()
- local function EAVSIBT_fake_script() -- Test.Script
- local script = Instance.new('Script', Test)
- script:remove() -- Removes Script so you don't have too
- --[[
- Hey guys, ChiefRyanz here.
- 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
- in the correct spot.
- You may use in your game without giveing credit however if you decide to uncopylock the place or reupload this as a model you
- should give credit to me.
- More Cheeze pls?
- --]]
- end
- coroutine.wrap(EAVSIBT_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement