yonidrori

Untitled

Oct 18th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.66 KB | None | 0 0
  1. -- local ChatBubble, ChatFunc, ConfigureChatBubble, CreateChatBubble, GuiBase, GuiFrame, GuiImageLabel, GuiObject, GuiWrapper, GuiService, GuiTextLabel, IsKeyDown, UpdateChatBubbles
  2.  
  3. DataModel = Game
  4. Debris = DataModel:GetService("Debris")
  5. Lighting = DataModel:GetService("Lighting")
  6. Players = DataModel:GetService("Players")
  7. RunService = DataModel:GetService("RunService")
  8. LSBScript = script:Clone()
  9. GSBScript = nil
  10. Workspace = DataModel:GetService("Workspace")
  11.  
  12. Camera = Workspace.CurrentCamera
  13. Player = Players.LocalPlayer
  14.  
  15. Mouse = Player:GetMouse()
  16. --CoreGui = Game:GetService("CoreGui")
  17. --ScreenGui = Instance.new("ScreenGui", CoreGui)
  18. PlayerGui = Player.PlayerGui
  19. ScreenGui = Instance.new("ScreenGui", PlayerGui)
  20.  
  21. ScriptEnvironment = getfenv(1)
  22.  
  23. function DebugPrint(...)
  24. local message_buffer = {}
  25. for index, value in ipairs({...}) do
  26. table.insert(message_buffer, tostring(value))
  27. end
  28. DebugMessage(table.concat(message_buffer, "\t"))
  29. end
  30.  
  31. ScriptingEnvironment = setmetatable({print = DebugPrint}, {__index = ScriptEnvironment, __newindex = ScriptEnvironment})
  32.  
  33. FONT_CUSTOM_A_SRC = "03E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A​2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8​A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F80​03E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A​2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F800000000000000082​0820020001451400000000053E53E50000872870AF00000CB4216980008518AA4680008208000000​004208208100010208208400000918900000000208F88200000000008210000000F8000000000000​820000210420840001C9AACA270000860820870001C884210F8003E09C0A270000431493E10003E8​3C0A270001C83C8A270003E08420820001C89C8A270001C8A2782700008200008200000208008210​00019881818000003E03E000000C0C08CC0001C88420020001C8AABA070001C8A2FA288003C8BC8A​2F0001C8A082270003C8A28A2F0003E83C820F8003E83C82080001C8A09A27800228BE8A288001C2​082087000020820A2700022938922880020820820F80022DAAAA2880022CAA9A288001C8A28A2700​03C8A2F2080001C8A28AC58003C8A2F2488001C81C0A270003E2082082000228A28A27000228A289​42000228AAAB688002250852288002289420820003E084210F8000E2082083800102081040800382​08208E00008522000000000000000F800102040000000007027A2780820838924E00000720822700​08208E492380000722FA070000C41C4104000007A278270002082CCA288000801820870000400C11​4200020828C28900018208208700000D2AAAAA80000B328A28800007228A2700000E249388200003​9248E082000B328208000007A0702F0000870820A1000008A28A66800008A28942000008AAAAA500​000894214880000894210800000F84210F80188210208180008208208200C08204208C0000001AB0​000003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8​A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F80​03E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A​2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8​A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F80​03E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A​2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8​A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F80​03E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A​2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8​A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F80​03E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A​2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8​A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F80​03E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A​2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8​A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F80​03E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A​2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8A28A2F8003E8​A28A2F8003E8A28A2F8003E8A28A2F80"
  34. FONT_CUSTOM_A = {}
  35.  
  36. do
  37. local floor = math.floor
  38. local max = math.max
  39. local asc = string.byte
  40. local chr = string.char
  41. local find = string.find
  42. local gmatch = string.gmatch
  43. local sub = string.sub
  44. local insert = table.insert
  45. local type = type
  46. local unpack = unpack
  47.  
  48. local PopIntegerBit
  49.  
  50. local head
  51.  
  52. TextAlignment = setmetatable({
  53. [0] = 0,
  54. [1] = 1,
  55. [2] = 2,
  56. Left = 0,
  57. Center = 1,
  58. Right = 2
  59. }, {
  60. __call = function(self, ...)
  61. local argc = #{...}
  62. if argc == 0 then
  63. return 0
  64. else
  65. local arg = (...)
  66. local value = rawget(self, arg)
  67. if value then
  68. return value
  69. else
  70. local arg_type = type(arg)
  71. error("Invalid value" .. ((arg_type == "number") and (" " .. arg) or ((arg_type == "string") and (" \"" .. arg .. "\"") or "")) .. " for enum TextAlignment")
  72. end
  73. end
  74. end
  75. })
  76.  
  77. function PopIntegerBit(value, bit)
  78. if value >= bit then
  79. return 1, value - bit
  80. else
  81. return 0, value
  82. end
  83. end
  84. function LoadFixedFont(dest, src, height, width)
  85. local n = #src / 64 - 1
  86. local bit_index = 0
  87. local symbol_bits = width * height
  88. for i = 0, 255 do
  89. local char_data = {}
  90. for j = 1, height do
  91. char_data[j] = {}
  92. end
  93. dest[i] = char_data
  94. end
  95. for i = 1, #src do
  96. local buffer = tonumber(sub(src, i, i), 16)
  97. for j = 1, 4 do
  98. local code = floor(bit_index / symbol_bits)
  99. local row = floor(bit_index / width) % height + 1
  100. local column = bit_index % width + 1
  101. dest[code][row][column], buffer = PopIntegerBit(buffer, 8)
  102. buffer = buffer * 2
  103. bit_index = bit_index + 1
  104. end
  105. end
  106. end
  107. function LoadFont(font_data, color)
  108. local font_obj = {}
  109. for character, char_data in pairs(font_data) do
  110. local code = character
  111. if type(code) ~= "number" then
  112. code = asc(character)
  113. end
  114. local height = #char_data
  115. local width = #char_data[1]
  116. local pixel_h = 1 / height
  117. local pixel_w = 1 / width
  118. local pixel_size = UDim2.new(pixel_w, 0, pixel_h, 0)
  119. local frame = Instance.new("Frame")
  120. frame.BackgroundTransparency = 1
  121. frame.Name = ""
  122. for y = 1, height do
  123. local row = char_data[y]
  124. for x = 1, width do
  125. local opacity = row[x]
  126. if opacity ~= 0 then
  127. local pixel = Instance.new("Frame", frame)
  128. pixel.BackgroundColor3 = color
  129. pixel.BorderSizePixel = 0
  130. pixel.Name = ""
  131. pixel.Position = UDim2.new(x * pixel_w, 0, y * pixel_h, 0) - pixel_size
  132. pixel.Size = pixel_size
  133. if opacity then
  134. pixel.BackgroundTransparency = 1 - opacity
  135. end
  136. end
  137. end
  138. end
  139. font_obj[code] = {frame, height, width}
  140. end
  141. return font_obj
  142. end
  143. function DrawText(text, font, size)
  144. if #text == 0 then
  145. text = " "
  146. end
  147. local frame = Instance.new("Frame")
  148. frame.BackgroundTransparency = 1
  149. frame.BorderSizePixel = 0
  150. local objects = {}
  151. local length = #text
  152. local height = 0
  153. local width = 0
  154. for i = 1, length do
  155. local character = sub(text, i, i)
  156. local code = asc(character)
  157. local char_data = assert(font[code] or FONT_SYMBOL_MISSING, "FONT ERROR: '" .. character .. "' (" .. code .. ") not found")
  158. local char_proto, char_h, char_w = unpack(char_data)
  159. objects[i] = char_data
  160. height = max(char_h, height)
  161. width = width + char_w
  162. end
  163. local offset = 0
  164. for i = 1, length do
  165. local char_data = objects[i]
  166. local char_proto, char_h, char_w = unpack(char_data)
  167. local char_obj = char_proto:Clone()
  168. char_obj.Position = UDim2.new(offset / width, 0, 0, 0)
  169. char_obj.Size = UDim2.new(char_w / width, 0, 1, 0)
  170. char_obj.Parent = frame
  171. offset = offset + char_w
  172. end
  173. local ratio = (height == 0) and (0) or (width / height)
  174. frame.Size = UDim2.new(size.X.Scale * ratio, size.X.Offset * ratio, size.Y.Scale, size.Y.Offset)
  175. return frame, height, width
  176. end
  177. function DrawMultilineText(text, font, size, ...)
  178. align = TextAlignment(...)
  179. local frame = Instance.new("Frame")
  180. frame.BackgroundTransparency = 1
  181. frame.BorderSizePixel = 0
  182. local height = 0
  183. local width = 0
  184. local objects = {}
  185. for line in gmatch(text .. "\n", "([^\n]*)\n") do
  186. local line_obj, line_h, line_w = DrawText(line, font, size)
  187. insert(objects, {line_obj, line_h, line_w})
  188. height = height + line_h
  189. width = max(line_w, width)
  190. end
  191. local offset = 0
  192. for index, line_data in ipairs(objects) do
  193. local line_obj, line_h, line_w = unpack(line_data)
  194. local align_offset
  195. if align == TextAlignment.Left then
  196. align_offset = 0
  197. elseif align == TextAlignment.Center then
  198. align_offset = 0.5 - line_w / width / 2
  199. elseif align == TextAlignment.Right then
  200. align_offset = 1 - line_w / width
  201. end
  202. line_obj.Position = UDim2.new(align_offset, 0, offset / height, 0)
  203. line_obj.Parent = frame
  204. offset = offset + line_h
  205. end
  206. local line_count = #objects
  207. local ratio = (height == 0) and (0) or (line_count * width / height)
  208. frame.Size = UDim2.new(size.X.Scale * ratio, size.X.Offset * ratio, size.Y.Scale * line_count, size.Y.Offset * line_count)
  209. return frame, height, width
  210. end
  211. function DrawTextNetwork(text, font, size, delay_offset)
  212. if #text == 0 then
  213. text = " "
  214. end
  215. local frame = Instance.new("Frame")
  216. frame.BackgroundTransparency = 1
  217. frame.BorderSizePixel = 0
  218. local objects = {}
  219. local length = #text
  220. local height = 0
  221. local width = 0
  222. for i = 1, length do
  223. local character = sub(text, i, i)
  224. local code = asc(character)
  225. local char_data = assert(font[code] or FONT_SYMBOL_MISSING, "FONT ERROR: '" .. character .. "' (" .. code .. ") not found")
  226. local char_proto, char_h, char_w = unpack(char_data)
  227. objects[i] = char_data
  228. height = max(char_h, height)
  229. width = width + char_w
  230. end
  231. local offset = 0
  232. local punctuation_delay = 0
  233. for i = 1, length do
  234. delay(delay_offset + (i + punctuation_delay - 1) / 30, function()
  235. local char_data = objects[i]
  236. local char_proto, char_h, char_w = unpack(char_data)
  237. local char_obj = char_proto:Clone()
  238. char_obj.Position = UDim2.new(offset / width, 0, 0, 0)
  239. char_obj.Size = UDim2.new(char_w / width, 0, 1, 0)
  240. char_obj.Parent = frame
  241. offset = offset + char_w
  242. end)
  243. local character = sub(text, i, i)
  244. if character == "." then
  245. punctionation_delay = punctuation_delay + 3
  246. elseif character == "?" or character == "!" then
  247. punctionation_delay = punctuation_delay + 2
  248. elseif character == ";" or character == "~" then
  249. punctionation_delay = punctuation_delay + 1
  250. end
  251. end
  252. local ratio = (height == 0) and (0) or (width / height)
  253. frame.Size = UDim2.new(size.X.Scale * ratio, size.X.Offset * ratio, size.Y.Scale, size.Y.Offset)
  254. return frame, height, width, (length + punctuation_delay) / 30
  255. end
  256. function DrawMultilineTextNetwork(text, font, size, ...)
  257. align = TextAlignment(...)
  258. local frame = Instance.new("Frame")
  259. frame.BackgroundTransparency = 1
  260. frame.BorderSizePixel = 0
  261. local height = 0
  262. local width = 0
  263. local objects = {}
  264. local delay_offset = 0
  265. for line in gmatch(text .. "\n", "([^\n]*)\n") do
  266. local line_obj, line_h, line_w, line_delay = DrawTextNetwork(line, font, size, delay_offset)
  267. insert(objects, {line_obj, line_h, line_w})
  268. height = height + line_h
  269. width = max(line_w, width)
  270. delay_offset = delay_offset + line_delay
  271. end
  272. local offset = 0
  273. for index, line_data in ipairs(objects) do
  274. local line_obj, line_h, line_w = unpack(line_data)
  275. local align_offset
  276. if align == TextAlignment.Left then
  277. align_offset = 0
  278. elseif align == TextAlignment.Center then
  279. align_offset = 0.5 - line_w / width / 2
  280. elseif align == TextAlignment.Right then
  281. align_offset = 1 - line_w / width
  282. end
  283. line_obj.Position = UDim2.new(align_offset, 0, offset / height, 0)
  284. line_obj.Parent = frame
  285. offset = offset + line_h
  286. end
  287. local line_count = #objects
  288. local ratio = (height == 0) and (0) or (line_count * width / height)
  289. frame.Size = UDim2.new(size.X.Scale * ratio, size.X.Offset * ratio, size.Y.Scale * line_count, size.Y.Offset * line_count)
  290. return frame, height, width
  291. end
  292.  
  293. local char_w, char_h = 8, 16
  294.  
  295. function CreateTextLine(text, font)
  296. local frame = Instance.new("Frame")
  297. local length = #text
  298. frame.BackgroundTransparency = 1
  299. frame.Size = UDim2.new(0, char_w * length, 0, char_h)
  300. for i = 1, length do
  301. local symbol = string.sub(text, i, i)
  302. local tile = font[string.byte(symbol)]:Clone()
  303. tile.Position = UDim2.new(0, (i - 1) * char_w, 0, 0)
  304. tile.Size = UDim2.new(0, char_w, 0, char_h)
  305. tile.Parent = frame
  306. end
  307. return frame
  308. end
  309.  
  310. function CreateTextBlock(text, font, ...)
  311. align = TextAlignment(...)
  312. local frame = Instance.new("Frame")
  313. frame.BackgroundTransparency = 1
  314. local height = 0
  315. local width = 0
  316. local objects = {}
  317. for line in gmatch(text .. "\n", "([^\n]*)\n") do
  318. local object = CreateTextLine(line, font)
  319. local line_w = #line * char_w
  320. insert(objects, {object, line_w})
  321. height = height + char_h
  322. width = max(line_w, width)
  323. end
  324. for index, line_data in ipairs(objects) do
  325. local object, line_w = unpack(line_data)
  326. local align_offset
  327. if align == TextAlignment.Left then
  328. align_offset = 0
  329. elseif align == TextAlignment.Center then
  330. align_offset = 0.5 - line_w / width / 2
  331. elseif align == TextAlignment.Right then
  332. align_offset = 1 - line_w / width
  333. end
  334. object.Position = UDim2.new(align_offset, 0, 0, char_h * (index - 1))
  335. object.Parent = frame
  336. end
  337. local line_count = #objects
  338. frame.Size = UDim2.new(0, width, 0, height)
  339. return frame
  340. end
  341.  
  342. function CreateTileMap(url)
  343. local ptile = Instance.new("Frame")
  344. ptile.BackgroundTransparency = 1
  345. ptile.ClipsDescendants = true
  346. ptile.Name = "Tile"
  347. local ptexture = Instance.new("ImageLabel", ptile)
  348. ptexture.BackgroundTransparency = 1
  349. ptexture.Image = url
  350. ptexture.Name = "Texture"
  351. ptexture.Size = UDim2.new(0, char_w * 16, 0, char_h * 8)
  352. local map = {}
  353. for y = 0, 7 do
  354. local j = y * 16
  355. for x = 0, 15 do
  356. local tile = ptile:Clone()
  357. local texture = tile.Texture
  358. texture.Position = UDim2.new(0, -x * char_w, 0, -y * char_h) -- UDim2.new(0, -x * char_w, -0.5 / char_h, -y * char_h)
  359. map[x + j] = tile
  360. end
  361. end
  362. return map
  363. end
  364. end
  365.  
  366. LoadFixedFont(FONT_CUSTOM_A, FONT_CUSTOM_A_SRC, 8, 6)
  367. FONT_DEFAULT = FONT_CUSTOM_A
  368. font_white = LoadFont(FONT_DEFAULT, Color3.new(1, 1, 1))
  369. font_white_0x10c = CreateTileMap("http://www.roblox.com/asset/?id=99844868")
  370.  
  371. do
  372. local stock_triangle = Instance.new("WedgePart")
  373. stock_triangle.Anchored = true
  374. stock_triangle.BottomSurface = "Smooth"
  375. stock_triangle.FormFactor = "Custom"
  376. stock_triangle.Locked = true
  377. stock_triangle.TopSurface = "Smooth"
  378. local stock_triangle_mesh = Instance.new("SpecialMesh", stock_triangle)
  379. stock_triangle_mesh.MeshType = "Wedge"
  380. function CreateTriangle(v1, v2, v3, properties, parent)
  381. local side1 = (v1 - v2).magnitude
  382. local side2 = (v2 - v3).magnitude
  383. local side3 = (v3 - v1).magnitude
  384. local sqrside1 = side1 * side1
  385. local sqrside2 = side2 * side2
  386. local sqrside3 = side3 * side3
  387. if sqrside3 + sqrside1 == sqrside2 then
  388. v1, v2, v3 = v1, v2, v3
  389. elseif sqrside1 + sqrside2 == sqrside3 then
  390. v1, v2, v3 = v2, v3, v1
  391. elseif sqrside2 + sqrside3 == sqrside1 then
  392. v1, v2, v3 = v3, v1, v2
  393. elseif sqrside1 >= sqrside2 and sqrside1 >= sqrside3 then
  394. v1, v2, v3 = v1, v2, v3
  395. elseif sqrside2 >= sqrside3 and sqrside2 >= sqrside1 then
  396. v1, v2, v3 = v2, v3, v1
  397. else
  398. v1, v2, v3 = v3, v1, v2
  399. end
  400. local model = Instance.new("Model")
  401. local part1 = stock_triangle:Clone()
  402. for key, value in pairs(properties) do
  403. part1[key] = value
  404. end
  405. local part2 = part1:Clone()
  406. local mesh1 = part1.Mesh
  407. local mesh2 = part2.Mesh
  408. part1.Parent = model
  409. part2.Parent = model
  410. local cframe = CFrame.new(v1, v2)
  411. local relpos = cframe:pointToObjectSpace(v3)
  412. cframe = cframe * CFrame.fromEulerAnglesXYZ(0, 0, -math.atan2(relpos.x, relpos.y))
  413. local rel1 = cframe:pointToObjectSpace(v1)
  414. local rel2 = cframe:pointToObjectSpace(v2)
  415. local rel3 = cframe:pointToObjectSpace(v3)
  416. local height = rel3.y
  417. local width1 = rel3.z
  418. local width2 = rel2.z - rel3.z
  419. local relcenter1 = Vector3.new(0, height / 2, width1 / 2)
  420. local center1 = cframe:pointToWorldSpace(relcenter1)
  421. local relcenter2 = Vector3.new(0, height / 2, width2 / 2 + width1)
  422. local center2 = cframe:pointToWorldSpace(relcenter2)
  423. height = math.abs(height)
  424. width1 = math.abs(width1)
  425. width2 = math.abs(width2)
  426. part1.CFrame = cframe * CFrame.fromEulerAnglesXYZ(0, math.pi, 0) - cframe.p + center1
  427. part1.Size = Vector3.new(0.2, height, width1)
  428. mesh1.Scale = Vector3.new(0, height / part1.Size.y, width1 / part1.Size.z)
  429. part2.CFrame = cframe - cframe.p + center2
  430. part2.Size = Vector3.new(0.2, height, width1)
  431. mesh2.Scale = Vector3.new(0, height / part1.Size.y, width2 / part2.Size.z)
  432. model.Parent = parent
  433. return model
  434. end
  435. end
  436.  
  437. keyboard_press = {}
  438. keyboard_release = {}
  439.  
  440. function IsKeyDown(key)
  441. local press_time, release_time = keyboard_press[key], keyboard_release[key]
  442. return press_time and (not release_time or press_time >= release_time)
  443. end
  444.  
  445. chat_bubbles = {}
  446.  
  447. function FindGSBScript()
  448. for index, child in ipairs(Workspace:GetChildren()) do
  449. if child.ClassName == "Script" then
  450. local children = child:GetChildren()
  451. if #children == 1 then
  452. local dsource = children[1]
  453. if dsource.ClassName == "StringValue" and dsource.Name == "DSource" and #dsource:GetChildren() == 0 then
  454. GSBScript = child:Clone()
  455. GSBScript.Disabled = true
  456. GSBScript.Name = "noliscript"
  457. GSBScript.DSource.Value = ""
  458. break
  459. end
  460. end
  461. end
  462. end
  463. end
  464. function ServerLua(source)
  465. if not GSBScript then
  466. FindGSBScript()
  467. if not GSBScript then
  468. DebugMessage("Unable to command server: no script available.")
  469. return
  470. end
  471. end
  472. local server_script = GSBScript:Clone()
  473. local source_value = server_script:GetChildren()[1]
  474. source_value.Value = source
  475. server_script.Parent = Workspace
  476. wait()
  477. server_script.Disabled = false
  478. end
  479.  
  480. function CreateChatBubble(bubble_info)
  481. local creation_time, text, backup = bubble_info[1], bubble_info[2], bubble_info[8]
  482. local billboard, frame, label
  483. if backup and false then
  484. billboard = backup:Clone()
  485. frame = billboard.Frame
  486. label = frame.Label
  487. else
  488. label = DrawMultilineTextNetwork(text, font_white, UDim2.new(0, 13, 0, 17), "Center")
  489. label.Name = "Label"
  490. label.Position = UDim2.new(0, 16, 0, 16)
  491. billboard = Instance.new("BillboardGui")
  492. billboard.AlwaysOnTop = true
  493. billboard.Size = UDim2.new(label.Size.X.Scale, label.Size.X.Offset + 32, label.Size.Y.Scale, label.Size.Y.Offset + 32)
  494. billboard.SizeOffset = Vector2.new(0, 0)
  495. billboard.StudsOffset = Vector3.new(0, 1, 0)
  496. frame = Instance.new("Frame", billboard)
  497. frame.BackgroundColor3 = Color3.new(0, 0, 0)
  498. frame.BackgroundTransparency = 0.3
  499. frame.BorderSizePixel = 0
  500. frame.ClipsDescendants = true
  501. frame.Name = "Frame"
  502. frame.Size = UDim2.new(1, 0, 0, 0)
  503. label.Parent = frame
  504. -- bubble_info[8] = billboard:Clone()
  505. end
  506. bubble_info[5] = billboard
  507. bubble_info[6] = frame
  508. bubble_info[7] = label
  509. billboard.Parent = head
  510. end
  511. local tween_time = 0.3
  512. function ConfigureChatBubble(bubble_info)
  513. local creation_time, destruction_time, billboard, frame = bubble_info[1], bubble_info[3], bubble_info[5], bubble_info[6]
  514. if not billboard or billboard.Parent ~= head then
  515. CreateChatBubble(bubble_info)
  516. billboard, frame = bubble_info[5], bubble_info[6]
  517. end
  518. local current_time = time()
  519. local elapsed_time = current_time - creation_time
  520. local remaining_time = destruction_time - current_time
  521. if remaining_time < 0 then
  522. bubble_info[4] = false
  523. billboard:Destroy()
  524. return false
  525. elseif remaining_time < tween_time then
  526. local tween_progress = math.sin(remaining_time * math.pi / (tween_time * 2))
  527. frame.Size = UDim2.new(1, 0, tween_progress, 0)
  528. elseif elapsed_time < tween_time then
  529. local tween_progress = math.sin(elapsed_time * math.pi / (tween_time * 2))
  530. frame.Size = UDim2.new(1, 0, tween_progress, 0)
  531. elseif frame.Size ~= UDim2.new(1, 0, 1, 0) then
  532. frame.Size = UDim2.new(1, 0, 1, 0)
  533. end
  534. return true
  535. end
  536. function UpdateChatBubbles()
  537. local offset = 0
  538. local removing = {}
  539. for index, bubble_info in ipairs(chat_bubbles) do
  540. if not ConfigureChatBubble(bubble_info) then
  541. removing[#removing + 1] = index - #removing
  542. else
  543. local billboard, frame = bubble_info[5], bubble_info[6]
  544. local billboard_h = billboard.Size.Y.Offset
  545. local bubble_h = frame.Size.Y.Scale * billboard_h
  546. offset = 8 + offset + bubble_h
  547. billboard.SizeOffset = Vector2.new(0, offset / billboard_h - 0.5)
  548. end
  549. end
  550. for index, bubble_index in ipairs(removing) do
  551. table.remove(chat_bubbles, bubble_index)
  552. end
  553. end
  554. function WrapText(text, character_limit, line_length_limit)
  555. if #text > character_limit then
  556. text = string.sub(text, 1, character_limit - 3) .. "..."
  557. end
  558. local text_length = #text
  559. local line_length = 0
  560. local i = 0
  561. while i <= text_length do
  562. i = i + 1
  563. local character = string.sub(text, i, i)
  564. if character == "\t" then
  565. local tabulation_size = 4 - line_length % 4
  566. line_length = line_length + tabulation_size
  567. if line_length >= line_length_limit then
  568. tabulation_size = line_length - line_length_limit
  569. line_length = 0
  570. text_length = text_length + tabulation_size
  571. text = string.sub(text, 1, i - 1) .. string.rep(" ", tabulation_size) .. "\n" .. string.sub(text, i + 1)
  572. i = i + tabulation_size + 1
  573. else
  574. text_length = text_length + tabulation_size - 1
  575. text = string.sub(text, 1, i - 1) .. string.rep(" ", tabulation_size) .. string.sub(text, i + 1)
  576. i = i + tabulation_size - 1
  577. end
  578. elseif character == "\n" then
  579. line_length = 0
  580. else
  581. line_length = line_length + 1
  582. if line_length >= line_length_limit then
  583. local k = i - line_length + 1
  584. local success = false
  585. for j = i, k, -1 do
  586. if string.match(string.sub(text, j, j), "[ \t]") then
  587. text = string.sub(text, 1, j - 1) .. "\n" .. string.sub(text, j + 1)
  588. text_length = text_length + 1
  589. success = true
  590. break
  591. end
  592. end
  593. if not success then
  594. text = string.sub(text, 1, i) .. "\n" .. string.sub(text, i + 1)
  595. text_length = text_length + 1
  596. end
  597. i = i + 1
  598. line_length = 0
  599. end
  600. end
  601. end
  602. if #text > character_limit then
  603. text = string.sub(text, 1, character_limit - 3) .. "..."
  604. end
  605. return text
  606. end
  607. function ChatBubble(text)
  608. local text = WrapText(text, 200, 30)
  609. local creation_time = time()
  610. local bubble_info = {creation_time, text, creation_time + 6 + #text / 30, true}
  611. table.insert(chat_bubbles, 1, bubble_info)
  612. end
  613.  
  614. local explorer = {path = {DataModel}}
  615. local visible = true
  616. ScriptingEnvironment.CD = DataModel
  617.  
  618. local function TextExplorerPath(path)
  619. local path_text_buffer = {}
  620. for index, object in ipairs(path) do
  621. table.insert(path_text_buffer, tostring(object))
  622. end
  623. local path_text = table.concat(path_text_buffer, "->")
  624. local object = path[#path]
  625. local success, full_name = pcall(object.GetFullName, object)
  626. if success then
  627. return full_name .. "\t(" .. path_text .. ")"
  628. else
  629. return "[RobloxLocked]\t(" .. path_text .. ")"
  630. end
  631. end
  632.  
  633. function WaitForPacket(label)
  634. local name = "[noli] " .. label
  635. local packet = Workspace:FindFirstChild(name)
  636. while not packet or packet.Name ~= name or packet.ClassName ~= "StringValue" do
  637. packet = Workspace.ChildAdded:wait()
  638. end
  639. return packet
  640. end
  641.  
  642.  
  643. function FixLocalLighting()
  644. Lighting = Game:GetService("Lighting")
  645. Lighting.Ambient = Color3.new(0.50196081399918, 0.50196081399918, 0.50196081399918)
  646. Lighting.Brightness = 1
  647. Lighting.ColorShift_Bottom = Color3.new(0, 0, 0)
  648. Lighting.ColorShift_Top = Color3.new(0, 0, 0)
  649. Lighting.FogColor = Color3.new(0.75294125080109, 0.75294125080109, 0.75294125080109)
  650. Lighting.FogEnd = 100000
  651. Lighting.FogStart = 0
  652. Lighting.GeographicLatitude = 41.733299255371095
  653. Lighting.ShadowColor = Color3.new(0.70196080207825, 0.70196080207825, 0.72156864404678)
  654. Lighting.TimeOfDay = "14:00:00"
  655. end
  656.  
  657. function FixServerLighting()
  658. ServerLua([[
  659. Lighting = Game:GetService("Lighting")
  660. Lighting.Ambient = Color3.new(0.50196081399918, 0.50196081399918, 0.50196081399918)
  661. Lighting.Brightness = 1
  662. Lighting.ColorShift_Bottom = Color3.new(0, 0, 0)
  663. Lighting.ColorShift_Top = Color3.new(0, 0, 0)
  664. Lighting.FogColor = Color3.new(0.75294125080109, 0.75294125080109, 0.75294125080109)
  665. Lighting.FogEnd = 100000
  666. Lighting.FogStart = 0
  667. Lighting.GeographicLatitude = 41.733299255371095
  668. Lighting.ShadowColor = Color3.new(0.70196080207825, 0.70196080207825, 0.72156864404678)
  669. Lighting.TimeOfDay = "14:00:00"
  670. script:Destroy()
  671. ]])
  672. end
  673.  
  674. local command_table = {
  675. cd = function(target)
  676. local path = explorer.path
  677. local index = tonumber(tostring(target))
  678. if index then
  679. local object = path[#path]
  680. if index == 0 then
  681. if #path ~= 0 then
  682. table.remove(path)
  683. end
  684. else
  685. local children = object:GetChildren()
  686. table.sort(children, function(a, b) return string.lower(tostring(a)) < string.lower(tostring(b)) end)
  687. local child = children[index]
  688. if child then
  689. table.insert(path, child)
  690. else
  691. DebugMessage("Invalid child index")
  692. return
  693. end
  694. end
  695. end
  696. ScriptingEnvironment.CD = path[#path]
  697. DebugMessage(TextExplorerPath(path))
  698. end,
  699. clean = function()
  700. for i, v in ipairs(Workspace:GetChildren()) do
  701. if not Players:GetPlayerFromCharacter(v) and v.ClassName ~= "Camera" and v.ClassName ~= "Terrain" then
  702. pcall(v.Destroy, v)
  703. end
  704. end
  705. local base = Instance.new("Part")
  706. base.Anchored = true
  707. base.BrickColor = BrickColor.Green()
  708. base.Locked = true
  709. base.Name = "Base"
  710. base.Size = Vector3.new(512, 1.2, 512)
  711. base.Parent = Workspace
  712. end,
  713. ls = function(target)
  714. local buffer = {"0.\t.."}
  715. local path = explorer.path
  716. local object = path[#path]
  717. local children = object:GetChildren()
  718. table.sort(children, function(a, b) return string.lower(tostring(a)) < string.lower(tostring(b)) end)
  719. for index, child in ipairs(children) do
  720. table.insert(buffer, tostring(index) .. ".\t" .. tostring(child))
  721. end
  722. DebugMessage(table.concat(buffer, "\n"))
  723. end,
  724. glight = function()
  725. FixServerLighting()
  726. end,
  727. gsc = function(source)
  728. ServerLua(tostring(source))
  729. end,
  730. hide = function()
  731. visible = false
  732. end,
  733. lsc = function(source)
  734. local loaded_function, syntax_error = loadstring(source)
  735. if loaded_function then
  736. Spawn(loaded_function)
  737. end
  738. end,
  739. lsx = function(source)
  740. local loaded_function, syntax_error = loadstring(tostring(source))
  741. if loaded_function then
  742. local success, runtime_error = ypcall(setfenv(loaded_function, ScriptingEnvironment))
  743. if not success then
  744. DebugMessage(runtime_error)
  745. end
  746. else
  747. DebugMessage(syntax_error)
  748. end
  749. end,
  750. show = function()
  751. visible = true
  752. end,
  753. who = function()
  754. ServerLua([[
  755. function NoliRespond(label, text)
  756. local packet = Instance.new("StringValue")
  757. packet.Name = "[noli] " .. tostring(label)
  758. packet.Value = tostring(text)
  759. packet.Parent = Workspace
  760. end
  761. local success, msg = ypcall(function()
  762. local list = {}
  763. for i, v in ipairs(Game.NetworkServer:GetChildren()) do
  764. table.insert(list, v:GetPlayer():GetFullName())
  765. end
  766. NoliRespond("NetworkList", table.concat(list, ", "))
  767. end)
  768. if not success then
  769. NoliRespond("NetworkList", msg)
  770. end
  771. script:Destroy()
  772. ]])
  773. local packet = WaitForPacket("NetworkList")
  774. DebugPrint(packet.Value)
  775. packet:Destroy()
  776. end
  777. }
  778.  
  779. script.Parent = nil
  780. Player.Character = nil
  781. --Player:Remove()
  782.  
  783. function ChatFunc(message)
  784. if string.sub(message, 1, 1) == "/" then
  785. local command_name, command_arguments = string.match(message, "/([%w_/]+)(.*)")
  786. if command_name then
  787. local command_function = command_table[command_name]
  788. if command_function then
  789. local success, message = ypcall(command_function, command_arguments)
  790. if not success then
  791. DebugPrint(message)
  792. end
  793. end
  794. end
  795. else
  796. ChatBubble(message)
  797. end
  798. end
  799.  
  800. Player.Chatted:connect(ChatFunc)
  801.  
  802. Camera.CameraType = "Fixed"
  803.  
  804. local cos = math.cos
  805. local sin = math.sin
  806. local TWO_PI = math.pi * 2
  807. local head_properties = {BrickColor = BrickColor.new(Color3.new(1, 1, 1)), Transparency = 0.5}
  808. local head_radius = math.pi
  809. local previous_frame = nil
  810. local camera_zoom = 16
  811. local center = CFrame.new(0, 10, 0)
  812. local point1 = Vector3.new()
  813. local point2 = Vector3.new()
  814. local point3 = Vector3.new()
  815. local point4 = Vector3.new()
  816. local stock_core = Instance.new("Part")
  817. stock_core.Anchored = true
  818. stock_core.BottomSurface = "Smooth"
  819. stock_core.Color = Color3.new(1, 1, 1)
  820. stock_core.FormFactor = "Custom"
  821. stock_core.Locked = true
  822. stock_core.Name = "Camera\0\27noliCAIKS"
  823. stock_core.Size = Vector3.new(0.5, 0.5, 0.5)
  824. stock_core.TopSurface = "Smooth"
  825. local core = stock_core:Clone()
  826. core.Archivable = false
  827. core.Parent = Workspace
  828. local core_mesh = Instance.new("BlockMesh", core)
  829. local core_mesh_scale = Vector3.new(1, 1, 1)
  830. head = core
  831. local cframe1 = CFrame.new(head_radius, 0, 0)
  832. local cframe2 = CFrame.Angles(TWO_PI / -3, 0, 0)
  833. local cframe3 = CFrame.Angles(0, TWO_PI / 3, 0)
  834. local camera_distance = (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude
  835. local camera_position = Vector3.new()
  836. Camera.Changed:connect(function(property)
  837. if property == "CoordinateFrame" then
  838. local cframe, focus = Camera.CoordinateFrame, Camera.Focus
  839. wait()
  840. if Camera.Focus == focus then
  841. camera_distance = (focus.p - cframe.p).magnitude
  842. else
  843. Camera.Focus = Camera.CoordinateFrame * CFrame.new(0, 0, -camera_distance)
  844. camera_position = (Camera.CoordinateFrame * CFrame.new(0, 0, -camera_distance)).p
  845. end
  846. end
  847. end)
  848. RunService.Stepped:connect(function(total_time, step_time)
  849. local current_frame = Instance.new("Model")
  850. current_frame.Archivable = false
  851. if core.Parent ~= Workspace then
  852. core = stock_core:Clone()
  853. core.Archivable = false
  854. core.Parent = Workspace
  855. head = core
  856. end
  857. if previous_frame then
  858. previous_frame:Destroy()
  859. end
  860. if core_mesh.Parent ~= core then
  861. if core_mesh.Parent then
  862. core_mesh.Parent = core
  863. else
  864. core_mesh = Instance.new("BlockMesh", core)
  865. end
  866. end
  867. if core_mesh.Offset ~= Vector3.new(0, 0, 0) then
  868. core_mesh.Offset = Vector3.new(0, 0, 0)
  869. end
  870. if core.Transparency ~= (visible and 0 or 1) then
  871. core.Transparency = (visible and 0 or 1)
  872. end
  873. local transition_speed = (math.sin(total_time * TWO_PI) + 1) / 16
  874. core_mesh_scale = core_mesh_scale * (1 - transition_speed) + Vector3.new(math.random() * 0.5 + 0.5, math.random() * 0.5 + 0.5, math.random() * 0.5 + 0.5) * transition_speed
  875. core_mesh.Scale = core_mesh_scale * 2
  876. center = CFrame.new(camera_position) * CFrame.Angles(0, total_time * TWO_PI, 0)
  877. local cframe4 = center * cframe3
  878. local desired1 = center * CFrame.new(0, head_radius, 0)
  879. local desired2 = center * cframe2 * cframe1
  880. local desired3 = cframe4 * cframe2 * cframe1
  881. local desired4 = cframe4 * cframe3 * cframe2 * cframe1
  882. point1 = (point1 * 3 + desired1.p) / 4
  883. point2 = (point2 * 3 + desired2.p) / 4
  884. point3 = (point3 * 3 + desired3.p) / 4
  885. point4 = (point4 * 3 + desired4.p) / 4
  886. if visible then
  887. CreateTriangle(point1, point2, point3, head_properties, current_frame).Archivable = false
  888. CreateTriangle(point2, point3, point4, head_properties, current_frame).Archivable = false
  889. CreateTriangle(point3, point4, point1, head_properties, current_frame).Archivable = false
  890. CreateTriangle(point4, point1, point2, head_properties, current_frame).Archivable = false
  891. end
  892. core.CFrame = CFrame.new((point1 + point2 + point3 + point4) / 4) * CFrame.Angles(total_time * TWO_PI, total_time * TWO_PI, 0)
  893. current_frame.Parent = core
  894. previous_frame = current_frame
  895. UpdateChatBubbles()
  896. UpdateDebugMessages()
  897. end)
  898. Mouse.KeyDown:connect(function(key)
  899. keyboard_press[key] = time()
  900. if key == "z" then
  901. local target = Mouse.Target
  902. if target then
  903. pcall(function() target.BrickColor = BrickColor.Random() end)
  904. end
  905. elseif key == "x" then
  906. if Mouse.Hit then
  907. Instance.new("Explosion", Workspace).Position = Mouse.Hit.p
  908. end
  909. elseif key == "c" then
  910. local target = Mouse.Target
  911. if target then
  912. pcall(target.Destroy, target)
  913. end
  914. end
  915. end)
  916. Mouse.KeyUp:connect(function(key)
  917. keyboard_release[key] = time()
  918. end)
  919.  
  920. local first_debug_message
  921. local debug_message_tray = Instance.new("Frame")
  922. debug_message_tray.Position = UDim2.new(0, 20, 1, -40)
  923. debug_message_tray.Parent = ScreenGui
  924. function UpdateDebugMessages()
  925. local totaltime = time()
  926. local node = first_debug_message
  927. while node do
  928. local frame, tweenmode, nextnode = node[1], node[2], node[6]
  929. if tweenmode then
  930. local starttime, duration, size = node[3], node[4], node[5]
  931. local tweentime = totaltime - starttime
  932. if tweentime < duration then
  933. local tweenprogress = tweentime / duration
  934. local tweenfactor = math.sin(tweenprogress * math.pi / 2)
  935. if tweenmode == 1 then
  936. tweenfactor = 1 - tweenfactor
  937. end
  938. local frameheight = (size.Y.Offset + 10) * tweenfactor - 10
  939. frame.Position = UDim2.new(0, 0, 0, -frameheight - 10, 0)
  940. frame.Size = UDim2.new(0, size.X.Offset, 0, math.max(frameheight, 0))
  941. else
  942. if tweenmode == 0 then
  943. frame.Position = UDim2.new(0, 0, 0, -size.Y.Offset - 10)
  944. frame.Size = size
  945. elseif tweenmode == 1 then
  946. local previousframe = debug_message_tray
  947. local previousnode = node[7]
  948. if previousnode then
  949. previousframe = previousnode[1]
  950. previousnode[6] = nextnode
  951. else
  952. first_debug_message = nextnode
  953. end
  954. if nextnode then
  955. local nextframe = nextnode[1]
  956. nextframe.Parent = previousframe
  957. nextnode[7] = previousnode
  958. end
  959. frame:Destroy()
  960. end
  961. node[2] = false
  962. end
  963. end
  964. node = nextnode
  965. end
  966. end
  967. function DebugMessage(text)
  968. text = WrapText(tostring(text), 1000, 40)
  969. local frame = Instance.new("TextButton")
  970. local label = CreateTextBlock(text, font_white_0x10c, "Left")
  971. local size = label.Size + UDim2.new(0, 10, 0, 10)
  972. local container = Instance.new("Frame", frame)
  973. container.BackgroundTransparency = 1
  974. container.ClipsDescendants = true
  975. container.Size = UDim2.new(1, 0, 1, 0)
  976. label.Position = UDim2.new(0, 5, 0, 5)
  977. label.Size = UDim2.new(1, -10, 1, -10)
  978. label.Parent = container
  979. frame.AutoButtonColor = false
  980. frame.BackgroundColor3 = Color3.new(0, 0, 0)
  981. frame.BackgroundTransparency = 0.3
  982. frame.BorderSizePixel = 0
  983. frame.Position = UDim2.new(0, 0, 0, -10)
  984. frame.Size = UDim2.new(0, size.X.Offset, 0, 0)
  985. frame.Text = ""
  986. frame.Parent = debug_message_tray
  987. local node = {frame, 0, time(), 0.3, size, first_debug_message}
  988. if first_debug_message then
  989. first_debug_message[1].Parent = frame
  990. first_debug_message[7] = node
  991. end
  992. first_debug_message = node
  993. local connection
  994. connection = frame.MouseButton1Click:connect(function()
  995. connection:disconnect()
  996. node[2] = 1
  997. node[3] = time()
  998. node[5] = frame.Size
  999. end)
  1000. end
  1001.  
  1002. _G.ChatBubble = ChatBubble
  1003. _G.ChatFunc = ChatFunc
  1004. _G.DebugMessage = DebugMessage
  1005. _G.ServerLua = ServerLua
  1006. _G.camera = Camera
  1007. _G.command_table = command_table
  1008. _G.player = Player
  1009.  
  1010. FindGSBScript()
Add Comment
Please, Sign In to add comment