Advertisement
Guest User

fe chat art script

a guest
Jun 24th, 2023
8,583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.87 KB | None | 0 0
  1. -- FE Chat Art Script | Draw or type word to chat it as a drawing
  2.  
  3. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  4. local SayMessageRequest = ReplicatedStorage:FindFirstChild("SayMessageRequest", true)
  5. if SayMessageRequest then
  6.  
  7. local okPressed = false
  8. local cancelPressed = false
  9. local gui = Instance.new("ScreenGui")
  10. gui.Parent = game.Players.LocalPlayer.PlayerGui
  11.  
  12. local frame = Instance.new("Frame")
  13. frame.Size = UDim2.new(0, 210, 0, 210)
  14. frame.Position = UDim2.new(0.5, -300, 0.5, -350)
  15. frame.Parent = gui
  16.  
  17. local squareSize = 30
  18. local squares = {}
  19.  
  20. for i = 1, 7 do
  21. squares[i] = {}
  22.  
  23. for j = 1, 7 do
  24. local square = Instance.new("TextButton")
  25. square.Size = UDim2.new(0, squareSize, 0, squareSize)
  26. square.Position = UDim2.new(0, (j - 1) * squareSize, 0, (i - 1) * squareSize)
  27. square.BackgroundColor3 = Color3.new(1, 1, 1)
  28. square.Text = ""
  29. square.Parent = frame
  30.  
  31. square.MouseButton1Down:Connect(function()
  32. if square.BackgroundColor3 == Color3.new(1, 1, 1) then
  33. square.BackgroundColor3 = Color3.new(0, 0, 0)
  34. else
  35. square.BackgroundColor3 = Color3.new(1, 1, 1)
  36. end
  37. end)
  38.  
  39. squares[i][j] = square
  40. end
  41. end
  42.  
  43. local printButton = Instance.new("TextButton")
  44. printButton.Size = UDim2.new(0, 210, 0, 30)
  45. printButton.Position = UDim2.new(0.5, -300, 0.86, -370)
  46. printButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  47. printButton.TextColor3 = Color3.new(0, 0, 0)
  48. printButton.Text = "Draw to chat!"
  49. printButton.TextScaled = true
  50. printButton.Parent = gui
  51.  
  52. printButton.MouseButton1Down:Connect(function()
  53.  
  54. for i = 1, 7 do
  55. local row = ""
  56.  
  57. for j = 1, 7 do
  58. if squares[i][j].BackgroundColor3 == Color3.new(1, 1, 1) then
  59. row = row .. "⚪"
  60. else
  61. row = row .. "⚫"
  62. end
  63. end
  64.  
  65. if SayMessageRequest then
  66. SayMessageRequest:FireServer(row, "All")
  67. end
  68. end
  69. end)
  70.  
  71. local filereadButton = Instance.new("TextButton")
  72. filereadButton.Size = UDim2.new(0, 210, 0, 30)
  73. filereadButton.Position = UDim2.new(0.5, -300, 0.93, -370)
  74. filereadButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  75. filereadButton.TextColor3 = Color3.new(0, 0, 0)
  76. filereadButton.Text = "Import from file"
  77. filereadButton.TextScaled = true
  78. filereadButton.Parent = gui
  79.  
  80. local filewriteButton = Instance.new("TextButton")
  81. filewriteButton.Size = UDim2.new(0, 210, 0, 30)
  82. filewriteButton.Position = UDim2.new(0.5, -300, 1, -370)
  83. filewriteButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  84. filewriteButton.TextColor3 = Color3.new(0, 0, 0)
  85. filewriteButton.Text = "Export to file"
  86. filewriteButton.TextScaled = true
  87. filewriteButton.Parent = gui
  88.  
  89. local textBox = Instance.new("TextBox")
  90. textBox.Size = UDim2.new(0, 210, 0, 30)
  91. textBox.Position = UDim2.new(0.5, -300, 0.93, -370)
  92. textBox.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  93. textBox.TextColor3 = Color3.new(0, 0, 0)
  94. textBox.Text = "File name"
  95. textBox.Visible = false
  96. textBox.TextScaled = true
  97. textBox.Parent = gui
  98.  
  99. local okButton = Instance.new("TextButton")
  100. okButton.Size = UDim2.new(0, 105, 0, 30)
  101. okButton.Position = UDim2.new(0.5, -300, 1, -370)
  102. okButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  103. okButton.TextColor3 = Color3.new(0, 0, 0)
  104. okButton.Text = "OK"
  105. okButton.Visible = false
  106. okButton.TextScaled = true
  107. okButton.Parent = gui
  108.  
  109. local cancelButton = Instance.new("TextButton")
  110. cancelButton.Size = UDim2.new(0, 105, 0, 30)
  111. cancelButton.Position = UDim2.new(0.58, -300, 1, -370)
  112. cancelButton.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  113. cancelButton.TextColor3 = Color3.new(0, 0, 0)
  114. cancelButton.Text = "Cancel"
  115. cancelButton.Visible = false
  116. cancelButton.TextScaled = true
  117. cancelButton.Parent = gui
  118.  
  119. okButton.MouseButton1Down:Connect(function()
  120. okPressed = true
  121. end)
  122.  
  123. cancelButton.MouseButton1Down:Connect(function()
  124. cancelPressed = true
  125. end)
  126.  
  127. filereadButton.MouseButton1Down:Connect(function()
  128. while true do
  129. filewriteButton.Visible = false
  130. textBox.Visible = true
  131. okButton.Visible = true
  132. cancelButton.Visible = true
  133. while okPressed == false do
  134. if cancelPressed == true then
  135. break
  136. end
  137. wait(0)
  138. end
  139. okPressed = false
  140. if cancelPressed == false then
  141. local file
  142. local fileName
  143. local name = textBox.Text
  144. if name:sub(-3) == '.cd' then
  145. pcall(function() file = readfile(name) end)
  146. fileName = name
  147. else
  148. pcall(function() file = readfile(name..'.cd') end)
  149. fileName = name..'.cd'
  150. end
  151. if file then
  152. if string.len(file) ~= 49 then
  153. textBox.Text = 'This file is corrupted'
  154. else
  155. err = false
  156. for i = 1, 49 do
  157. local char = string.sub(file, i, i)
  158. if char ~= "0" and char ~= "1" then
  159. textBox.Text = 'This file is corrupted'
  160. err = true
  161. break
  162. end
  163. end
  164. if err == false then
  165. lol = 1
  166. for i = 1, 7 do
  167. for j = 1, 7 do
  168. if string.sub(file, lol, lol) == '0' then
  169. squares[i][j].BackgroundColor3 = Color3.new(0, 0, 0)
  170. else
  171. squares[i][j].BackgroundColor3 = Color3.new(1, 1, 1)
  172. end
  173. lol = lol + 1
  174. end
  175. end
  176. cancelPressed = false
  177. textBox.Visible = false
  178. okButton.Visible = false
  179. cancelButton.Visible = false
  180. filewriteButton.Visible = true
  181. break
  182. end
  183. end
  184. else
  185. textBox.Text = 'Cannot locate file "'..fileName..'". Does your executor have workspace folder?'
  186. end
  187. else
  188. cancelPressed = false
  189. textBox.Visible = false
  190. okButton.Visible = false
  191. cancelButton.Visible = false
  192. filewriteButton.Visible = true
  193. break
  194. end
  195. end
  196. end)
  197.  
  198. filewriteButton.MouseButton1Down:Connect(function()
  199. data = ''
  200. filereadButton.Visible = false
  201. filewriteButton.Visible = false
  202. textBox.Visible = true
  203. okButton.Visible = true
  204. cancelButton.Visible = true
  205. while okPressed == false do
  206. if cancelPressed == true then
  207. break
  208. end
  209. wait(0)
  210. end
  211. okPressed = false
  212. if cancelPressed == false then
  213. local fileName
  214. local name = textBox.Text
  215. if name:sub(-3) == '.cd' then
  216. fileName = name
  217. else
  218. fileName = name..'.cd'
  219. end
  220.  
  221. for i = 1, 7 do
  222. for j = 1, 7 do
  223. if squares[i][j].BackgroundColor3 == Color3.new(0, 0, 0) then
  224. data = data..'0'
  225. else
  226. data = data..'1'
  227. end
  228. end
  229. end
  230.  
  231. writefile(fileName, data)
  232. end
  233. cancelPressed = false
  234. textBox.Visible = false
  235. okButton.Visible = false
  236. cancelButton.Visible = false
  237. filereadButton.Visible = true
  238. filewriteButton.Visible = true
  239. end)
  240.  
  241. local letters = {
  242. ["a"] = {
  243. "⬛⬛⬛⬛⬛",
  244. "⬛🔴🔴🔴⬛",
  245. "⬛🔴⬛🔴⬛",
  246. "⬛🔴🔴🔴⬛",
  247. "⬛🔴⬛🔴⬛",
  248. "⬛🔴⬛🔴⬛",
  249. "⬛⬛⬛⬛⬛",
  250. },
  251. ["b"] = {
  252. "⬛⬛⬛⬛⬛",
  253. "⬛🔴🔴🔴⬛",
  254. "⬛🔴⬛🔴⬛",
  255. "⬛🔴🔴⬛⬛",
  256. "⬛🔴⬛🔴⬛",
  257. "⬛🔴🔴🔴⬛",
  258. "⬛⬛⬛⬛⬛",
  259. },
  260. ["c"] = {
  261. "⬛⬛⬛⬛⬛",
  262. "⬛🔴🔴🔴⬛",
  263. "⬛🔴⬛⬛⬛",
  264. "⬛🔴⬛⬛⬛",
  265. "⬛🔴⬛⬛⬛",
  266. "⬛🔴🔴🔴⬛",
  267. "⬛⬛⬛⬛⬛",
  268. },
  269. ["d"] = {
  270. "⬛⬛⬛⬛⬛",
  271. "⬛🔴🔴⬛⬛",
  272. "⬛🔴⬛🔴⬛",
  273. "⬛🔴⬛🔴⬛",
  274. "⬛🔴⬛🔴⬛",
  275. "⬛🔴🔴⬛⬛",
  276. "⬛⬛⬛⬛⬛",
  277. },
  278. ["e"] = {
  279. "⬛⬛⬛⬛⬛",
  280. "⬛🔴🔴🔴⬛",
  281. "⬛🔴⬛⬛⬛",
  282. "⬛🔴🔴🔴⬛",
  283. "⬛🔴⬛⬛⬛",
  284. "⬛🔴🔴🔴⬛",
  285. "⬛⬛⬛⬛⬛",
  286. },
  287. ["f"] = {
  288. "⬛⬛⬛⬛⬛",
  289. "⬛🔴🔴🔴⬛",
  290. "⬛🔴⬛⬛⬛",
  291. "⬛🔴🔴🔴⬛",
  292. "⬛🔴⬛⬛⬛",
  293. "⬛🔴⬛⬛⬛",
  294. "⬛⬛⬛⬛⬛",
  295. },
  296. ["g"] = {
  297. "⬛⬛⬛⬛⬛",
  298. "⬛🔴🔴🔴⬛",
  299. "⬛🔴⬛⬛⬛",
  300. "⬛🔴⬛🔴⬛",
  301. "⬛🔴⬛🔴⬛",
  302. "⬛🔴🔴🔴⬛",
  303. "⬛⬛⬛⬛⬛",
  304. },
  305. ["h"] = {
  306. "⬛⬛⬛⬛⬛",
  307. "⬛🔴⬛🔴⬛",
  308. "⬛🔴⬛🔴⬛",
  309. "⬛🔴🔴🔴⬛",
  310. "⬛🔴⬛🔴⬛",
  311. "⬛🔴⬛🔴⬛",
  312. "⬛⬛⬛⬛⬛",
  313. },
  314. ["i"] = {
  315. "⬛⬛⬛⬛⬛",
  316. "⬛🔴🔴🔴⬛",
  317. "⬛⬛🔴⬛⬛",
  318. "⬛⬛🔴⬛⬛",
  319. "⬛⬛🔴⬛⬛",
  320. "⬛🔴🔴🔴⬛",
  321. "⬛⬛⬛⬛⬛",
  322. },
  323. ["j"] = {
  324. "⬛⬛⬛⬛⬛",
  325. "⬛🔴🔴🔴⬛",
  326. "⬛⬛⬛🔴⬛",
  327. "⬛⬛⬛🔴⬛",
  328. "⬛⬛⬛🔴⬛",
  329. "⬛🔴🔴⬛⬛",
  330. "⬛⬛⬛⬛⬛",
  331. },
  332. ["k"] = {
  333. "⬛⬛⬛⬛⬛",
  334. "⬛🔴⬛🔴⬛",
  335. "⬛🔴⬛🔴⬛",
  336. "⬛🔴🔴⬛⬛",
  337. "⬛🔴⬛🔴⬛",
  338. "⬛🔴⬛🔴⬛",
  339. "⬛⬛⬛⬛⬛",
  340. },
  341. ["l"] = {
  342. "⬛⬛⬛⬛⬛",
  343. "⬛🔴⬛⬛⬛",
  344. "⬛🔴⬛⬛⬛",
  345. "⬛🔴⬛⬛⬛",
  346. "⬛🔴⬛⬛⬛",
  347. "⬛🔴🔴🔴⬛",
  348. "⬛⬛⬛⬛⬛",
  349. },
  350. ["m"] = {
  351. "⬛⬛⬛⬛⬛",
  352. "🔴⬛⬛⬛🔴",
  353. "🔴🔴⬛🔴🔴",
  354. "🔴⬛🔴⬛🔴",
  355. "🔴⬛⬛⬛🔴",
  356. "🔴⬛⬛⬛🔴",
  357. "⬛⬛⬛⬛⬛",
  358. },
  359. ["n"] = {
  360. "⬛⬛⬛⬛⬛",
  361. "⬛🔴🔴🔴⬛",
  362. "⬛🔴⬛🔴⬛",
  363. "⬛🔴⬛🔴⬛",
  364. "⬛🔴⬛🔴⬛",
  365. "⬛🔴⬛🔴⬛",
  366. "⬛⬛⬛⬛⬛",
  367. },
  368. ["o"] = {
  369. "⬛⬛⬛⬛⬛",
  370. "⬛🔴🔴🔴⬛",
  371. "⬛🔴⬛🔴⬛",
  372. "⬛🔴⬛🔴⬛",
  373. "⬛🔴⬛🔴⬛",
  374. "⬛🔴🔴🔴⬛",
  375. "⬛⬛⬛⬛⬛",
  376. },
  377. ["p"] = {
  378. "⬛⬛⬛⬛⬛",
  379. "⬛🔴🔴🔴⬛",
  380. "⬛🔴⬛🔴⬛",
  381. "⬛🔴🔴🔴⬛",
  382. "⬛🔴⬛⬛⬛",
  383. "⬛🔴⬛⬛⬛",
  384. "⬛⬛⬛⬛⬛",
  385. },
  386. ["q"] = {
  387. "⬛⬛⬛⬛⬛",
  388. "⬛🔴🔴🔴⬛",
  389. "⬛🔴⬛🔴⬛",
  390. "⬛🔴⬛🔴⬛",
  391. "⬛🔴🔴🔴⬛",
  392. "⬛⬛⬛🔴⬛",
  393. "⬛⬛⬛⬛⬛",
  394. },
  395. ["r"] = {
  396. "⬛⬛⬛⬛⬛",
  397. "⬛🔴🔴🔴⬛",
  398. "⬛🔴⬛🔴⬛",
  399. "⬛🔴🔴🔴⬛",
  400. "⬛🔴🔴⬛⬛",
  401. "⬛🔴⬛🔴⬛",
  402. "⬛⬛⬛⬛⬛",
  403. },
  404. ["s"] = {
  405. "⬛⬛⬛⬛⬛",
  406. "⬛🔴🔴🔴⬛",
  407. "⬛🔴⬛⬛⬛",
  408. "⬛⬛🔴⬛⬛",
  409. "⬛⬛⬛🔴⬛",
  410. "⬛🔴🔴🔴⬛",
  411. "⬛⬛⬛⬛⬛",
  412. },
  413. ["t"] = {
  414. "⬛⬛⬛⬛⬛",
  415. "⬛🔴🔴🔴⬛",
  416. "⬛⬛🔴⬛⬛",
  417. "⬛⬛🔴⬛⬛",
  418. "⬛⬛🔴⬛⬛",
  419. "⬛⬛🔴⬛⬛",
  420. "⬛⬛⬛⬛⬛",
  421. },
  422. ["u"] = {
  423. "⬛⬛⬛⬛⬛",
  424. "⬛🔴⬛🔴⬛",
  425. "⬛🔴⬛🔴⬛",
  426. "⬛🔴⬛🔴⬛",
  427. "⬛🔴⬛🔴⬛",
  428. "⬛🔴🔴🔴⬛",
  429. "⬛⬛⬛⬛⬛",
  430. },
  431. ["v"] = {
  432. "⬛⬛⬛⬛⬛",
  433. "⬛🔴⬛🔴⬛",
  434. "⬛🔴⬛🔴⬛",
  435. "⬛🔴⬛🔴⬛",
  436. "⬛🔴⬛🔴⬛",
  437. "⬛⬛🔴⬛⬛",
  438. "⬛⬛⬛⬛⬛",
  439. },
  440. ["w"] = {
  441. "⬛⬛⬛⬛⬛",
  442. "⬛🔴⬛🔴⬛",
  443. "⬛🔴⬛🔴⬛",
  444. "⬛🔴🔴🔴⬛",
  445. "⬛🔴⬛🔴⬛",
  446. "⬛⬛⬛⬛⬛",
  447. "⬛⬛⬛⬛⬛",
  448. },
  449. ["x"] = {
  450. "⬛⬛⬛⬛⬛",
  451. "⬛🔴⬛🔴⬛",
  452. "⬛🔴⬛🔴⬛",
  453. "⬛⬛🔴⬛⬛",
  454. "⬛🔴⬛🔴⬛",
  455. "⬛🔴⬛🔴⬛",
  456. "⬛⬛⬛⬛⬛",
  457. },
  458. ["y"] = {
  459. "⬛⬛⬛⬛⬛",
  460. "⬛🔴⬛🔴⬛",
  461. "⬛🔴⬛🔴⬛",
  462. "⬛⬛🔴⬛⬛",
  463. "⬛⬛🔴⬛⬛",
  464. "⬛⬛🔴⬛⬛",
  465. "⬛⬛⬛⬛⬛",
  466. },
  467. ["z"] = {
  468. "⬛⬛⬛⬛⬛",
  469. "⬛🔴🔴🔴⬛",
  470. "⬛⬛⬛🔴⬛",
  471. "⬛⬛🔴⬛⬛",
  472. "⬛🔴⬛⬛⬛",
  473. "⬛🔴🔴🔴⬛",
  474. "⬛⬛⬛⬛⬛",
  475. },
  476. [" "] = {
  477. "⬛⬛⬛⬛⬛",
  478. "⬛⬛⬛⬛⬛",
  479. "⬛⬛⬛⬛⬛",
  480. "⬛⬛⬛⬛⬛",
  481. "⬛⬛⬛⬛⬛",
  482. "⬛⬛⬛⬛⬛",
  483. "⬛⬛⬛⬛⬛",
  484. }
  485. }
  486.  
  487. local gui = Instance.new("ScreenGui")
  488. gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  489.  
  490. local frame = Instance.new("Frame")
  491. frame.Size = UDim2.new(0, 200, 0, 100)
  492. frame.Position = UDim2.new(1, -220, 0, 20)
  493. frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  494. frame.BorderSizePixel = 0
  495. frame.Parent = gui
  496.  
  497. local textBox = Instance.new("TextBox")
  498. textBox.Size = UDim2.new(1, 0, 0.5, 0)
  499. textBox.Position = UDim2.new(0, 0, 0, 0)
  500. textBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  501. textBox.BorderSizePixel = 0
  502. textBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  503. textBox.Text = "Write a word"
  504. textBox.Parent = frame
  505.  
  506. local button = Instance.new("TextButton")
  507. button.Size = UDim2.new(1, 0, 0.5, 0)
  508. button.Position = UDim2.new(0, 0, 0.5, 0)
  509. button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  510. button.BorderSizePixel = 0
  511. button.TextColor3 = Color3.fromRGB(0, 0, 0)
  512. button.Text = "Draw to chat"
  513. button.Parent = frame
  514.  
  515. local function printTextBoxContents()
  516. local message = textBox.Text
  517. local final = {"","","","","","",""}
  518. for i = 1, #message do
  519. local l = message:sub(i,i)
  520. for x, line in pairs(letters[string.lower(l)]) do
  521. final[x] = final[x] .. line
  522. end
  523. end
  524. for _, v in pairs(final) do
  525. game:GetService("ReplicatedStorage")["DefaultChatSystemChatEvents"].SayMessageRequest:FireServer(v, "All")
  526. end
  527. end
  528.  
  529. button.MouseButton1Click:Connect(printTextBoxContents)
  530. else
  531. print("Not working? Try a game that has the default roblox chat")
  532. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement