SHOW:
|
|
- or go back to the newest paste.
1 | -- "Any parent chat" made by 12GaugeNick | |
2 | -- Reason : Bored. | |
3 | -- Date : 8 / 22 / 15 | |
4 | -- Just run it, no need to edit | |
5 | ||
6 | -- Made in 30 minutes or less.. Dont expect clean code. | |
7 | repeat wait() until game:service'Players'.LocalPlayer | |
8 | - | wait() |
8 | + | |
9 | - | if game.PlaceId == 178350907 then |
9 | + | |
10 | - | script.Parent = nil |
10 | + | |
11 | - | else |
11 | + | |
12 | - | local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call) |
12 | + | |
13 | - | local oxbox = getfenv() |
13 | + | |
14 | - | setfenv(1, setmetatable({}, {__index = Environment})) |
14 | + | |
15 | - | Environment.coroutine.yield() |
15 | + | |
16 | - | oxbox.script:Destroy() |
16 | + | |
17 | local TextLabels = {} | |
18 | local UIFrames = {} | |
19 | ||
20 | ||
21 | function Create(obj,tble) | |
22 | if not type(tble) == "table" then return end | |
23 | local Object = Instance.new(obj) | |
24 | for i,v in next,tble do | |
25 | if Object[i] then | |
26 | Object[i] = v | |
27 | end | |
28 | end | |
29 | return Object | |
30 | end | |
31 | ||
32 | function GetColor() | |
33 | local pi = math.pi | |
34 | local sin = math.sin | |
35 | local cos = math.cos | |
36 | local s=sin(tick())%1*3; | |
37 | local r=.5*pi*(s%1)if(s<1) | |
38 | then | |
39 | return(Color3.new(1,1-cos(r),1-sin(r))) | |
40 | elseif s<2 then | |
41 | return(Color3.new(1-sin(r),1,1-cos(r))) | |
42 | else | |
43 | return(Color3.new(1-cos(r),1-sin(r),1)) | |
44 | end; | |
45 | end | |
46 | ||
47 | function GetObject() | |
48 | return Mouse.Target | |
49 | end | |
50 | ||
51 | function Sub(obj,msg) | |
52 | msg = msg:gsub('','\5') | |
53 | for i = 1,#msg do | |
54 | obj.Text = string.sub(msg,1,i) | |
55 | RunService.RenderStepped:wait() | |
56 | end | |
57 | end | |
58 | ||
59 | function Clr3(a,b,c) | |
60 | return Color3.new(a/255,b/255,c/255) | |
61 | end | |
62 | ||
63 | function Destroy(obj) | |
64 | for i,v in next,TextLabels do | |
65 | if v == obj then | |
66 | table.remove(TextLabels, i) | |
67 | end | |
68 | end | |
69 | return Debris:AddItem(obj,0) | |
70 | end | |
71 | ||
72 | function FadeGui(obj,toggle) | |
73 | if obj then -- obj should be the frame | |
74 | if toggle == true then | |
75 | for trans = 0,.4,.1 do | |
76 | obj.BackgroundTransparency = obj.BackgroundTransparency + .1 | |
77 | wait() | |
78 | end | |
79 | else | |
80 | for trans = 0,.4,.1 do | |
81 | obj.BackgroundTransparency = obj.BackgroundTransparency - .1 | |
82 | wait() | |
83 | end | |
84 | end | |
85 | end | |
86 | end | |
87 | ||
88 | function FadeChatFrame(obj,toggle) | |
89 | if obj then -- obj should be the frame | |
90 | if toggle == true then | |
91 | for trans = 0,.2,.1 do | |
92 | obj.BackgroundTransparency = obj.BackgroundTransparency + .1 | |
93 | wait() | |
94 | end | |
95 | else | |
96 | for trans = 0,.2,.1 do | |
97 | obj.BackgroundTransparency = obj.BackgroundTransparency - .1 | |
98 | wait() | |
99 | end | |
100 | end | |
101 | end | |
102 | end | |
103 | ||
104 | function MakeHologram(msg) | |
105 | local NewGui = nil | |
106 | if GuiParent and GuiParent:FindFirstChild("BillboardGui") then | |
107 | NewGui = GuiParent.BillboardGui | |
108 | end | |
109 | if NewGui == nil then | |
110 | NewGui = Create("BillboardGui",{ | |
111 | Parent = GuiParent, | |
112 | Size = UDim2.new(4,0,2.5,0), | |
113 | StudsOffset = Vector3.new(-2,2,0) | |
114 | }) | |
115 | end | |
116 | for _,v in next,NewGui:GetChildren() do | |
117 | local TextLab = v.TextLabel | |
118 | for trans = 0,.9,.1 do | |
119 | TextLab.TextTransparency = TextLab.TextTransparency + .1 | |
120 | RunService.RenderStepped:wait() | |
121 | end | |
122 | wait() | |
123 | pcall(function() | |
124 | v:TweenSize(UDim2.new(2,0,0,0),"Out","Quad",.2) | |
125 | wait(.3) | |
126 | Destroy(v) | |
127 | end) | |
128 | end | |
129 | local Frame = Create("Frame",{ | |
130 | Parent = NewGui, | |
131 | BackgroundColor3 = Clr3(0,0,0), | |
132 | BackgroundTransparency = 1, | |
133 | BorderColor3 = Clr3(0,0,0), | |
134 | BorderSizePixel = 5, | |
135 | Size = UDim2.new(2,0,.4,0) | |
136 | });table.insert(UIFrames,Frame) | |
137 | local TextLab = Create("TextLabel",{ | |
138 | Parent = Frame, | |
139 | BackgroundTransparency = 1, | |
140 | Size = UDim2.new(1,0,1,0), | |
141 | Font = "ArialBold", | |
142 | FontSize = "Size18", | |
143 | Text = "", | |
144 | }) | |
145 | table.insert(TextLabels, TextLab) | |
146 | FadeGui(Frame, false) | |
147 | Sub(TextLab, msg) | |
148 | delay(6,function() | |
149 | FadeGui(Frame, true) | |
150 | Destroy(Frame) | |
151 | end) | |
152 | end | |
153 | ||
154 | ||
155 | LocalPlayer.Chatted:connect(function(msg) | |
156 | if msg:lower():sub(1,3) == "/e " then return end | |
157 | MakeHologram(msg) | |
158 | end) | |
159 | ||
160 | LocalPlayer.CharacterAdded:connect(function() | |
161 | GuiParent = LocalPlayer.Character:WaitForChild("Head") | |
162 | end) | |
163 | ||
164 | Mouse.Button2Down:connect(function() | |
165 | local Object = GetObject() | |
166 | if Object then | |
167 | GuiParent = Object | |
168 | end | |
169 | end) | |
170 | ||
171 | Mouse.KeyDown:connect(function(key) | |
172 | if key:lower() == "h" then | |
173 | GuiParent = Character:WaitForChild("Head") | |
174 | end | |
175 | end) | |
176 | ||
177 | RunService.Stepped:connect(function() | |
178 | local Clr = GetColor() | |
179 | for _,v in next,TextLabels do | |
180 | v.TextColor3 = Clr | |
181 | end | |
182 | for _,v in next,UIFrames do | |
183 | v.BorderColor3 = Clr | |
184 | end | |
185 | end); MakeHologram("Gauge chat 1.0 loaded");wait(1);MakeHologram("Created by 12GaugeNick") | |
186 | ||
187 | while wait(3) do | |
188 | for _,v in next,UIFrames do | |
189 | spawn(function() | |
190 | FadeChatFrame(v, true) | |
191 | wait() | |
192 | FadeChatFrame(v, false) | |
193 | end) | |
194 | end | |
195 | end |