Advertisement
ERROR_CODE

Dynamic island by ECCS

Jun 16th, 2024 (edited)
787
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.66 KB | None | 0 0
  1. if game:GetService("CoreGui"):FindFirstChild("DI") then
  2. game:GetService("CoreGui"):FindFirstChild("DI"):Destroy()
  3. end
  4. DI = Instance.new("ScreenGui")
  5. DinamicIsland = Instance.new("ImageButton")
  6. DinamicIsland2 = Instance.new("TextLabel")
  7. DinamicIslandUICorner = Instance.new("UICorner")
  8. FullScreenCloseButon = Instance.new("ImageButton")
  9. MainFrame = Instance.new("Frame")
  10. SearchBox = Instance.new("TextBox")
  11. UICorner_3 = Instance.new("UICorner")
  12. ScriptListFrame = Instance.new("ScrollingFrame")
  13. UIPadding = Instance.new("UIPadding")
  14. Scripts = Instance.new("Folder")
  15. UIGridLayout = Instance.new("UIGridLayout")
  16. ScriptFrame = Instance.new("Frame")
  17. ScriptTitle = Instance.new("TextLabel")
  18. ScriptGame = Instance.new("TextLabel")
  19. VerifiedScriptFrame = Instance.new("Frame")
  20. ScriptTitle_2 = Instance.new("TextLabel")
  21. VerifiedIcon = Instance.new("ImageLabel")
  22. ScriptGame_2 = Instance.new("TextLabel")
  23. Info = Instance.new("Frame")
  24. PreviewImage = Instance.new("ImageLabel")
  25. UICorner_14 = Instance.new("UICorner")
  26. Author = Instance.new("Frame")
  27. InfoBoxAuthor = Instance.new("TextLabel")
  28. ProfilePicture = Instance.new("ImageLabel")
  29. UICorner_15 = Instance.new("UICorner")
  30. Title_2 = Instance.new("Frame")
  31. InfoBoxTitle = Instance.new("TextLabel")
  32. Game = Instance.new("TextLabel")
  33. Comments = Instance.new("Frame")
  34. Inner = Instance.new("Frame")
  35. UICorner_21 = Instance.new("UICorner")
  36. Line = Instance.new("Frame")
  37. CommentsText = Instance.new("TextLabel")
  38. Comments_2 = Instance.new("ScrollingFrame")
  39. Comment = Instance.new("Frame")
  40. Content = Instance.new("TextLabel")
  41. Author_2 = Instance.new("TextLabel")
  42. ProfilePicture_2 = Instance.new("ImageLabel")
  43. UICorner_22 = Instance.new("UICorner")
  44. UIListLayout_3 = Instance.new("UIListLayout")
  45. PreviewImage_2 = Instance.new("ImageLabel")
  46. PreviewImageUICorner_2 = Instance.new("UICorner")
  47. KeySystem = Instance.new("TextLabel")
  48. KeySystemUICorner = Instance.new("UICorner")
  49. KeySystem_2 = Instance.new("TextLabel")
  50. KeySystemUICorner_2 = Instance.new("UICorner")
  51. InfoBox = Instance.new("Frame")
  52. ExecuteButton = Instance.new("TextButton")
  53. ExecuteButtonUICorner = Instance.new("UICorner")
  54. ExecuteButton_2 = Instance.new("TextButton")
  55. ExecuteButtonUICorner_2 = Instance.new("UICorner")
  56. CopyScriptButton = Instance.new("TextButton")
  57. CopyScriptButtonUICorner = Instance.new("UICorner")
  58. CopyScriptButton_2 = Instance.new("TextButton")
  59. CopyScriptButtonUICorner_2 = Instance.new("UICorner")
  60. DinamicIsland2TextTransparency = 1
  61.  
  62. HeadFont = Enum.Font.SourceSans
  63.  
  64. DI.Name = "DI"
  65. DI.Parent = game.CoreGui
  66. DI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  67. game.CoreGui.DI.Enabled = true
  68.  
  69. FullScreenCloseButon.Visible = false
  70. FullScreenCloseButon.Parent = DI
  71. FullScreenCloseButon.Size = UDim2.new(1,0,1,100)
  72. FullScreenCloseButon.Position = UDim2.new(0,0,0,-100)
  73. FullScreenCloseButon.BackgroundTransparency = 1
  74.  
  75. DinamicIsland.Name = "DinamicIsland"
  76. DinamicIsland.Parent = DI
  77. DinamicIsland.AnchorPoint = Vector2.new(0, 0)
  78. DinamicIsland.Size = UDim2.new(0, 100, 0, 30)
  79. DinamicIsland.Position = UDim2.new(0.45, 0, -0.05, 0)
  80. DinamicIsland.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  81. DinamicIsland.ZIndex = 2
  82. DinamicIsland.AutoButtonColor = false
  83. DinamicIsland.BorderSizePixel = 0
  84.  
  85. DinamicIslandUICorner.CornerRadius = UDim.new(0, 20)
  86. DinamicIslandUICorner.Parent = DinamicIsland
  87.  
  88. DinamicIsland2.Name = "DinamicIsland2"
  89. DinamicIsland2.Parent = DinamicIsland
  90. DinamicIsland2.Position = UDim2.new(0.25, 0, 0, 0)
  91. DinamicIsland2.Size = UDim2.new(0, 50, 0, 30)
  92. DinamicIsland2.Text = "ERROR"
  93. DinamicIsland2.BackgroundTransparency = 1
  94. DinamicIsland2.Font = HeadFont
  95. DinamicIsland2.TextSize = 28
  96. DinamicIsland2.TextColor3 = Color3.fromRGB(255, 255, 255)
  97. DinamicIsland2.TextTransparency = DinamicIsland2TextTransparency
  98.  
  99. MainFrame.Visible = false
  100. SearchBox.Visible = false
  101.  
  102. spawn(function()
  103. while wait() do
  104. if DinamicIsland.Size == UDim2.new(0, 100, 0, 30) then
  105. DinamicIsland2.Visible = true
  106. MainFrame.Visible = false
  107. SearchBox.Visible = false
  108. else
  109. DinamicIsland2.Visible = false
  110. if DinamicIsland.Size == UDim2.new(0, 500, 0, 100) then
  111. MainFrame.Visible = true
  112. SearchBox.Visible = true
  113. end
  114. if DinamicIsland.Size ~= UDim2.new(0, 500, 0, 100) then
  115. MainFrame.Visible = false
  116. SearchBox.Visible = false
  117. end
  118. end
  119. end
  120. end)
  121.  
  122.  
  123. spawn(function()
  124. while wait() do
  125. local ping = tonumber(game:GetService("Stats"):FindFirstChild("PerformanceStats").Ping:GetValue())
  126. DinamicIsland2.Text = os.date("%H:%M")
  127. wait()
  128. for i = 1,10 do
  129. wait()
  130. DinamicIsland2TextTransparency = DinamicIsland2TextTransparency - 0.1
  131. DinamicIsland2.TextTransparency = DinamicIsland2TextTransparency
  132. end
  133. wait(5)
  134. for i = 1,10 do
  135. wait()
  136. DinamicIsland2TextTransparency = DinamicIsland2TextTransparency + 0.1
  137. DinamicIsland2.TextTransparency = DinamicIsland2TextTransparency
  138. end
  139. if DinamicIsland2TextTransparency <= 1 then
  140. for i = 1,10 do
  141. wait()
  142. DinamicIsland2TextTransparency = DinamicIsland2TextTransparency - 0.1
  143. DinamicIsland2.TextTransparency = DinamicIsland2TextTransparency
  144. ping = math.floor(ping)
  145. DinamicIsland2.Text = ping.."-Ping"
  146. end
  147. end
  148. wait(5)
  149. for i = 1,10 do
  150. wait()
  151. DinamicIsland2TextTransparency = DinamicIsland2TextTransparency + 0.1
  152. DinamicIsland2.TextTransparency = DinamicIsland2TextTransparency
  153. end
  154. end
  155. end)
  156.  
  157. DinamicIsland.MouseButton1Click:Connect(function()
  158. MainFrame.Visible = false
  159. SearchBox.Visible = false
  160. if DinamicIsland.Size == UDim2.new(0, 100, 0, 30) then
  161. FullScreenCloseButon.Visible = true
  162. DinamicIsland:TweenSize(UDim2.new(0, 500, 0, 100),"InOut","Sine",0.2)
  163. DinamicIsland:TweenPosition(UDim2.new(0.25, 0, -0.05, 0),"InOut","Sine",0.2)
  164. end
  165. if DinamicIsland.Size == UDim2.new(0, 500, 0, 100) then
  166. MainFrame.Visible = false
  167. SearchBox.Visible = false
  168. FullScreenCloseButon.Visible = false
  169. DinamicIsland:TweenSize(UDim2.new(0, 100, 0, 30),"InOut","Sine",0.2)
  170. DinamicIsland:TweenPosition(UDim2.new(0.45, 0, -0.05, 0),"InOut","Sine",0.2)
  171. MainFrame.Visible = false
  172. SearchBox.Visible = false
  173. end
  174. end)
  175.  
  176. DinamicIsland.MouseEnter:Connect(function()
  177. FullScreenCloseButon.Visible = true
  178. DinamicIsland:TweenSize(UDim2.new(0, 500, 0, 100),"InOut","Sine",0.2)
  179. DinamicIsland:TweenPosition(UDim2.new(0.25, 0, -0.05, 0),"InOut","Sine",0.2)
  180. end)
  181.  
  182. FullScreenCloseButon.MouseButton1Click:Connect(function()
  183. MainFrame.Visible = false
  184. SearchBox.Visible = false
  185. FullScreenCloseButon.Visible = false
  186. if DinamicIsland.Size == UDim2.new(0, 500, 0, 100) then
  187. MainFrame.Visible = false
  188. SearchBox.Visible = false
  189. DinamicIsland:TweenSize(UDim2.new(0, 100, 0, 30),"InOut","Sine",0.2)
  190. DinamicIsland:TweenPosition(UDim2.new(0.45, 0, -0.05, 0),"InOut","Sine",0.2)
  191. MainFrame.Visible = false
  192. SearchBox.Visible = false
  193. end
  194. end)
  195.  
  196. MainFrame.Name = "MainFrame"
  197. MainFrame.Parent = DinamicIsland
  198. MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  199. MainFrame.BackgroundTransparency = 1
  200. MainFrame.Position = UDim2.new(0.265, 0, 0.58, 0)
  201. MainFrame.Size = UDim2.new(0, 250, 0, 85.5)
  202. MainFrame.ZIndex = 2
  203. MainFrame.BorderSizePixel = 0
  204.  
  205. InfoBox.Name = "InfoBox"
  206. InfoBox.Parent = MainFrame
  207. InfoBox.BackgroundTransparency = 1
  208. InfoBox.BorderSizePixel = 0
  209. InfoBox.Position = UDim2.new(0, 250, 0, 0)
  210. InfoBox.Size = UDim2.new(0, 240, 0, 82)
  211. InfoBox.ZIndex = 3
  212.  
  213. SearchBox.Name = "SearchBox"
  214. SearchBox.Parent = DinamicIsland
  215. SearchBox.BackgroundColor3 = Color3.fromRGB(25, 23, 22)
  216. SearchBox.Position = UDim2.new(0, 8, 0, 1)
  217. SearchBox.Size = UDim2.new(0, 485, 0, 15)
  218. SearchBox.ClearTextOnFocus = false
  219. SearchBox.Font = HeadFont
  220. SearchBox.PlaceholderText = "S                    e                    a                    r                    c                    h"
  221. SearchBox.PlaceholderColor3 = Color3.fromRGB(255, 255, 255)
  222. SearchBox.Text = ""
  223. SearchBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  224. SearchBox.TextScaled = true
  225. SearchBox.TextSize = 14.000
  226. SearchBox.TextWrapped = true
  227.  
  228. UICorner_3.CornerRadius = UDim.new(0, 20)
  229. UICorner_3.Parent = SearchBox
  230.  
  231. ScriptListFrame.Name = "ScriptListFrame"
  232. ScriptListFrame.Parent = MainFrame
  233. ScriptListFrame.Active = true
  234. ScriptListFrame.BackgroundTransparency = 1
  235. ScriptListFrame.BorderSizePixel = 0
  236. ScriptListFrame.Position = UDim2.new(0.012, 0, 0, 0)
  237. ScriptListFrame.Size = UDim2.new(0, 259.5, 0, 82)
  238. ScriptListFrame.ZIndex = 2
  239. ScriptListFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
  240.  
  241. UIPadding.Parent = ScriptListFrame
  242. UIPadding.PaddingBottom = UDim.new(0, 0)
  243. UIPadding.PaddingLeft = UDim.new(0, 0)
  244. UIPadding.PaddingRight = UDim.new(0, 0)
  245. UIPadding.PaddingTop = UDim.new(0, 0)
  246.  
  247. Scripts.Name = "Scripts"
  248. Scripts.Parent = ScriptListFrame
  249.  
  250. UIGridLayout.Parent = Scripts
  251. UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  252. UIGridLayout.CellPadding = UDim2.new(0, 0, 0, 1)
  253. UIGridLayout.CellSize = UDim2.new(0, 250, 0, 85.5)
  254.  
  255. ScriptFrame.Name = "ScriptFrame"
  256. ScriptFrame.Parent = Scripts
  257. ScriptFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  258. ScriptFrame.Size = UDim2.new(0, 370, 0, 700)
  259. ScriptFrame.BorderSizePixel = 0
  260.  
  261. ScriptTitle.Name = "ScriptTitle"
  262. ScriptTitle.Parent = ScriptFrame
  263. ScriptTitle.BackgroundTransparency = 1
  264. ScriptTitle.Position = UDim2.new(0, 85, 0, 0)
  265. ScriptTitle.Size = UDim2.new(0, 160, 0, 25)
  266. ScriptTitle.Font = HeadFont
  267. ScriptTitle.Text = "Script Title"
  268. ScriptTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  269. ScriptTitle.TextScaled = true
  270. ScriptTitle.TextSize = 14.000
  271. ScriptTitle.TextWrapped = true
  272. ScriptTitle.TextXAlignment = Enum.TextXAlignment.Left
  273.  
  274. ExecuteButton.Name = "ExecuteButton"
  275. ExecuteButton.Parent = ScriptFrame
  276. ExecuteButton.Position = UDim2.new(0, 85, 0, 28)
  277. ExecuteButton.Size = UDim2.new(0, 100, 0, 20)
  278. ExecuteButton.Font = HeadFont
  279. ExecuteButton.Text = "Execute"
  280. ExecuteButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  281. ExecuteButton.AutoButtonColor = false
  282. ExecuteButton.TextSize = 15
  283. ExecuteButton.BackgroundColor3 = Color3.fromRGB(80, 200, 120)
  284.  
  285. ExecuteButtonUICorner.CornerRadius = UDim.new(0, 20)
  286. ExecuteButtonUICorner.Parent = ExecuteButton
  287.  
  288. CopyScriptButton.Name = "CopyScriptButton"
  289. CopyScriptButton.Parent = ScriptFrame
  290. CopyScriptButton.Position = UDim2.new(0, 145, 0, 62)
  291. CopyScriptButton.Size = UDim2.new(0, 100, 0, 20)
  292. CopyScriptButton.Font = HeadFont
  293. CopyScriptButton.Text = "Copy"
  294. CopyScriptButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  295. CopyScriptButton.AutoButtonColor = false
  296. CopyScriptButton.TextSize = 15
  297. CopyScriptButton.BackgroundColor3 = Color3.fromRGB(218, 223, 247)
  298.  
  299. CopyScriptButtonUICorner.CornerRadius = UDim.new(0, 20)
  300. CopyScriptButtonUICorner.Parent = CopyScriptButton
  301.  
  302. KeySystem.Name = "KeySystem"
  303. KeySystem.Parent = ScriptFrame
  304. KeySystem.BackgroundColor3 = Color3.fromRGB(242, 191, 33)
  305. KeySystem.Position = UDim2.new(0, 190, 0, 28)
  306. KeySystem.Size = UDim2.new(0, 50, 0, 20)
  307. KeySystem.Font = HeadFont
  308. KeySystem.Text = "Key System"
  309. KeySystem.TextColor3 = Color3.fromRGB(0, 0, 0)
  310.  
  311. KeySystemUICorner.CornerRadius = UDim.new(0, 10)
  312. KeySystemUICorner.Parent = KeySystem
  313.  
  314. ScriptGame.Name = "ScriptGame"
  315. ScriptGame.Parent = ScriptFrame
  316. ScriptGame.BackgroundTransparency = 1
  317. ScriptGame.Position = UDim2.new(0, 0, 0, 375)
  318. ScriptGame.Size = UDim2.new(0, 280, 0, 25)
  319. ScriptGame.Font = HeadFont
  320. ScriptGame.Text = "Game"
  321. ScriptGame.TextColor3 = Color3.fromRGB(255, 255, 255)
  322. ScriptGame.TextSize = 14.000
  323. ScriptGame.TextWrapped = true
  324. ScriptGame.TextXAlignment = Enum.TextXAlignment.Left
  325.  
  326. VerifiedScriptFrame.Name = "VerifiedScriptFrame"
  327. VerifiedScriptFrame.Parent = Scripts
  328. VerifiedScriptFrame.BackgroundColor3 = ScriptFrame.BackgroundColor3
  329. VerifiedScriptFrame.Size = UDim2.new(0, 300, 0, 150)
  330. VerifiedScriptFrame.BorderSizePixel = 0
  331.  
  332. ScriptTitle_2.Name = "ScriptTitle"
  333. ScriptTitle_2.Parent = VerifiedScriptFrame
  334. ScriptTitle_2.BackgroundTransparency = 1
  335. ScriptTitle_2.Position = ScriptTitle.Position
  336. ScriptTitle_2.Size = ScriptTitle.Size
  337. ScriptTitle_2.Font = HeadFont
  338. ScriptTitle_2.Text = "Script Title"
  339. ScriptTitle_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  340. ScriptTitle_2.TextScaled = true
  341. ScriptTitle_2.TextSize = 14.000
  342. ScriptTitle_2.TextWrapped = true
  343. ScriptTitle_2.TextXAlignment = Enum.TextXAlignment.Left
  344.  
  345. ExecuteButton_2.Name = "ExecuteButton"
  346. ExecuteButton_2.Parent = VerifiedScriptFrame
  347. ExecuteButton_2.Position = ExecuteButton.Position
  348. ExecuteButton_2.Size = ExecuteButton.Size
  349. ExecuteButton_2.Font = HeadFont
  350. ExecuteButton_2.Text = "Execute"
  351. ExecuteButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  352. ExecuteButton_2.AutoButtonColor = false
  353. ExecuteButton_2.TextSize = 15
  354. ExecuteButton_2.BackgroundColor3 = ExecuteButton.BackgroundColor3
  355.  
  356. ExecuteButtonUICorner_2.CornerRadius = UDim.new(0, 20)
  357. ExecuteButtonUICorner_2.Parent = ExecuteButton_2
  358.  
  359. CopyScriptButton_2.Name = "CopyScriptButton"
  360. CopyScriptButton_2.Parent = VerifiedScriptFrame
  361. CopyScriptButton_2.Position = CopyScriptButton.Position
  362. CopyScriptButton_2.Size = CopyScriptButton.Size
  363. CopyScriptButton_2.Font = HeadFont
  364. CopyScriptButton_2.Text = "Copy"
  365. CopyScriptButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  366. CopyScriptButton_2.AutoButtonColor = false
  367. CopyScriptButton_2.TextSize = 15
  368. CopyScriptButton_2.BackgroundColor3 = CopyScriptButton.BackgroundColor3
  369.  
  370. CopyScriptButtonUICorner_2.CornerRadius = UDim.new(0, 20)
  371. CopyScriptButtonUICorner_2.Parent = CopyScriptButton_2
  372.  
  373. KeySystem_2.Name = "KeySystem"
  374. KeySystem_2.Parent = VerifiedScriptFrame
  375. KeySystem_2.BackgroundColor3 = Color3.fromRGB(242, 191, 33)
  376. KeySystem_2.Position = KeySystem.Position
  377. KeySystem_2.Size = KeySystem.Size
  378. KeySystem_2.Font = HeadFont
  379. KeySystem_2.Text = "Key System"
  380. KeySystem_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  381.  
  382. KeySystemUICorner_2.CornerRadius = UDim.new(0, 10)
  383. KeySystemUICorner_2.Parent = KeySystem_2
  384.  
  385. KeySystem.Visible = false
  386. KeySystem_2.Visible = false
  387.  
  388. ScriptGame_2.Name = "ScriptGame"
  389. ScriptGame_2.Parent = VerifiedScriptFrame
  390. ScriptGame_2.BackgroundTransparency = 1
  391. ScriptGame_2.Position = ScriptGame.Position
  392. ScriptGame_2.Size = ScriptGame.Size
  393. ScriptGame_2.Font = HeadFont
  394. ScriptGame_2.Text = "Game"
  395. ScriptGame_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  396. ScriptGame_2.TextSize = 14.000
  397. ScriptGame_2.TextWrapped = true
  398. ScriptGame_2.TextXAlignment = Enum.TextXAlignment.Left
  399.  
  400. Info.Name = "Info"
  401. Info.Parent = InfoBox
  402. Info.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  403. Info.BackgroundTransparency = 1
  404. Info.Size = UDim2.new(0, 995, 0, 100)
  405.  
  406. PreviewImage.Name = "PreviewImage"
  407. PreviewImage.Parent = ScriptFrame
  408. PreviewImage.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  409. PreviewImage.BackgroundTransparency = 1
  410. PreviewImage.Position = UDim2.new(0, 1, 0, 2)
  411. PreviewImage.Size = UDim2.new(0, 80, 0, 80)
  412. PreviewImage.Image = "rbxassetid://17093295752"
  413.  
  414. UICorner_14.CornerRadius = UDim.new(0, 5)
  415. UICorner_14.Parent = PreviewImage
  416.  
  417. PreviewImage_2.Name = "PreviewImage"
  418. PreviewImage_2.Parent = VerifiedScriptFrame
  419. PreviewImage_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  420. PreviewImage_2.BackgroundTransparency = 1
  421. PreviewImage_2.Position = PreviewImage.Position
  422. PreviewImage_2.Size = PreviewImage.Size
  423. PreviewImage_2.Image = "rbxassetid://17093295752"
  424.  
  425. PreviewImageUICorner_2.CornerRadius = UDim.new(0, 5)
  426. PreviewImageUICorner_2.Parent = PreviewImage_2
  427.  
  428. VerifiedIcon.Name = "VerifiedIcon"
  429. VerifiedIcon.Parent = VerifiedScriptFrame
  430. VerifiedIcon.BackgroundTransparency = 1
  431. VerifiedIcon.Position = UDim2.new(0, 85, 0, 50)
  432. VerifiedIcon.Size = UDim2.new(0, 40, 0, 30)
  433. VerifiedIcon.Image = "rbxassetid://15621211889"
  434.  
  435. Comments.Name = "Comments"
  436. Comments.Parent = InfoBox
  437. Comments.BackgroundTransparency = 1
  438. Comments.Size = UDim2.new(0, 400, 0, 414)
  439.  
  440. Inner.Name = "Inner"
  441. Inner.Parent = Comments
  442. Inner.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  443. Inner.Position = UDim2.new(0, 0, 0, 10)
  444. Inner.BackgroundTransparency = 1
  445. Inner.Size = UDim2.new(0, 400, 0, 414)
  446.  
  447. UICorner_21.CornerRadius = UDim.new(0, 12)
  448. UICorner_21.Parent = Inner
  449.  
  450. CommentsText.Name = "CommentsText"
  451. CommentsText.Parent = Inner
  452. CommentsText.BackgroundTransparency = 1
  453. CommentsText.Size = UDim2.new(0, 240, 0, 20)
  454. CommentsText.Position = UDim2.new(0, 0, 0, -15)
  455. CommentsText.Font = HeadFont
  456. CommentsText.Text = "Comments"
  457. CommentsText.TextColor3 = Color3.fromRGB(255, 255, 255)
  458. CommentsText.TextSize = 14.000
  459.  
  460. Comments_2.Name = "Comments"
  461. Comments_2.Parent = Inner
  462. Comments_2.Active = true
  463. Comments_2.BackgroundTransparency = 1
  464. Comments_2.BorderSizePixel = 0
  465. Comments_2.Position = UDim2.new(0, 0, 0, 10)
  466. Comments_2.Size = UDim2.new(0, 240, 0, 60)
  467. Comments_2.CanvasSize = UDim2.new(0, 0, 0, 0)
  468.  
  469. Comment.Name = "Comment"
  470. Comment.Parent = Comments_2
  471. Comment.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  472. Comment.BackgroundTransparency = 1
  473. Comment.Size = UDim2.new(0, 400, 0, 50)
  474.  
  475. Content.Name = "Content"
  476. Content.Parent = Comment
  477. Content.BackgroundTransparency = 1
  478. Content.Position = UDim2.new(0, 50, 0, 30)
  479. Content.Size = UDim2.new(0, 190, 0, 20)
  480. Content.Font = HeadFont
  481. Content.Text = "Comment"
  482. Content.TextColor3 = Color3.fromRGB(255, 255, 255)
  483. Content.TextSize = 14
  484. Content.TextWrapped = true
  485. Content.TextXAlignment = Enum.TextXAlignment.Left
  486. Content.TextYAlignment = Enum.TextYAlignment.Top
  487. Content.TextScaled = true
  488.  
  489. Author_2.Name = "Author"
  490. Author_2.Parent = Comment
  491. Author_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  492. Author_2.BackgroundTransparency = 1.000
  493. Author_2.BorderSizePixel = 0
  494. Author_2.Position = UDim2.new(0, 50, 0, 5)
  495. Author_2.Size = UDim2.new(0, 200, 0, 25)
  496. Author_2.Font = HeadFont
  497. Author_2.Text = "Author"
  498. Author_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  499. Author_2.TextSize = 20.000
  500. Author_2.TextWrapped = true
  501. Author_2.TextXAlignment = Enum.TextXAlignment.Left
  502.  
  503. ProfilePicture_2.Name = "ProfilePicture"
  504. ProfilePicture_2.Parent = Comment
  505. ProfilePicture_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  506. ProfilePicture_2.BackgroundTransparency = 1.000
  507. ProfilePicture_2.Position = UDim2.new(0, 5, 0, 5)
  508. ProfilePicture_2.Size = UDim2.new(0, 40, 0, 40)
  509. ProfilePicture_2.Image = "rbxassetid://17093333262"
  510.  
  511. UICorner_22.CornerRadius = UDim.new(1, 0)
  512. UICorner_22.Parent = ProfilePicture_2
  513.  
  514. UIListLayout_3.Parent = Comments_2
  515. UIListLayout_3.SortOrder = Enum.SortOrder.LayoutOrder
  516. UIListLayout_3.Padding = UDim.new(0, 5)
  517.  
  518. getfakeasset = getcustomasset or getsynasset
  519.  
  520. HttpService = game:GetService("HttpService")
  521.  
  522.  
  523. page = 1
  524. gquery = ""
  525.  
  526. function tableConcat(t1,t2)
  527.  for i, v in pairs(t2) do
  528.   table.insert(t1, v)
  529.  end
  530.  return t1
  531. end
  532.  
  533.  
  534. MainFrame.ScriptListFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
  535. MainFrame.ScriptListFrame.ScrollBarImageTransparency = 1
  536. MainFrame.ScriptListFrame.ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0)
  537. MainFrame.InfoBox.Comments.Inner.Comments.AutomaticCanvasSize = Enum.AutomaticSize.Y
  538. MainFrame.InfoBox.Comments.Inner.Comments.ScrollBarImageColor3 = Color3.new(0, 0, 0)
  539. MainFrame.InfoBox.Comments.Inner.Comments.ScrollBarImageTransparency = 1
  540.  
  541. VerifiedScript = MainFrame.ScriptListFrame.Scripts.VerifiedScriptFrame:Clone()
  542. Script = MainFrame.ScriptListFrame.Scripts.ScriptFrame:Clone()
  543. MainFrame.ScriptListFrame.Scripts.ScriptFrame:Destroy()
  544. MainFrame.ScriptListFrame.Scripts.VerifiedScriptFrame:Destroy()
  545.  
  546. Comment = MainFrame.InfoBox.Comments.Inner.Comments.Comment:Clone()
  547. MainFrame.InfoBox.Comments.Inner.Comments.Comment:Destroy()
  548.  
  549.  
  550.  
  551.  
  552. function _if(a, b, c)
  553.  if a then return b else return c end
  554. end
  555.  
  556. function fastmodeExec(func)
  557.  if getgenv().fastmode == true then
  558.   task.spawn(func)
  559.  else
  560.   func()
  561.  end
  562. end
  563.  
  564.  
  565. function fetchScripts(query, page)
  566.  page = page or 1
  567.  query = HttpService:UrlEncode(query)
  568.  
  569.  url = _if(query == "", "https://www.scriptblox.com/api/script/fetch?page="..tostring(page), "https://scriptblox.com/api/script/search?q="..query.."&max=100&mode=free&page=".. tostring(page))
  570.  req = HttpService:JSONDecode(game:HttpGetAsync(url)).result
  571.  
  572.  return req.scripts
  573. end
  574.  
  575. function fetchComments(scriptId, page)
  576.  page = page or 1
  577.  
  578.  url = "https://scriptblox.com/api/comment/" ..scriptId.. "?page=" ..tostring(page).. "&max=100"
  579.  req = HttpService:JSONDecode(game:HttpGetAsync(url)).result
  580.  
  581.  return req.comments
  582. end
  583.  
  584. function fixScript(scriptObj)
  585.    req = HttpService:JSONDecode(game:HttpGetAsync("https://www.scriptblox.com/api/script/"..scriptObj.slug)).script
  586.    scriptObj["script"] = _if(scriptObj["script"], scriptObj["script"], req.script)
  587.    scriptObj["features"] = _if(scriptObj["features"], scriptObj["features"], req.features)
  588.    scriptObj["owner"] = _if(scriptObj["owner"], scriptObj["owner"], req.owner)
  589.    
  590.  return scriptObj
  591. end
  592.  
  593. function updateInfoBox(scriptObj)
  594.  scriptObj = fixScript(scriptObj)
  595.  
  596.  
  597.  commentsUIListLayout = MainFrame.InfoBox.Comments.Inner.Comments.UIListLayout:Clone()
  598.  MainFrame.InfoBox.Comments.Inner.Comments:ClearAllChildren()
  599.  commentsUIListLayout.Parent = MainFrame.InfoBox.Comments.Inner.Comments
  600.  
  601.  task.spawn(function()
  602.   for _, v in pairs(fetchComments(scriptObj["_id"])) do
  603.  
  604.    newComment = Comment:Clone()
  605.    newComment.Parent = MainFrame.InfoBox.Comments.Inner.Comments
  606.    newComment.Content.Text = v.text
  607.    newComment.Author.Text = v.commentBy.username
  608.   end
  609.  end)
  610. end
  611.  
  612.  
  613. function refreshScripts(scriptTbl)
  614.  if #scriptTbl <= 0 then
  615.  
  616.  end
  617.  
  618.  UIGridLayoutCopy = Scripts.UIGridLayout:Clone()
  619.  Scripts:ClearAllChildren()
  620.  UIGridLayoutCopy.Parent = Scripts
  621.  
  622.  addScripts(scriptTbl)
  623. end
  624.  
  625. function addScripts(scriptTbl)
  626.  for i, v in pairs(scriptTbl) do
  627.   fastmodeExec(function()
  628.    local newScript
  629.  
  630.    v = fixScript(v)
  631.  
  632.    if v.verified == true then
  633.     newScript = VerifiedScript:Clone()
  634.     newScript.ScriptTitle.Text = v.title
  635.     newScript.ScriptGame.Text = v.game.name
  636.     newScript.Parent = Scripts
  637.    else
  638.     newScript = Script:Clone()
  639.     newScript.ScriptTitle.Text = v.title
  640.     newScript.ScriptGame.Text = v.game.name
  641.     newScript.Parent = Scripts
  642.    end
  643.    if v.game.name == "Universal Script 📌" then
  644.     newScript.PreviewImage.Image = "rbxassetid://17899810755"
  645.     else
  646.     newScript.PreviewImage.Image = "https://assetgame.roblox.com/Game/Tools/ThumbnailAsset.ashx?aid="..v.game.gameId.."&fmt=png&wd=420&ht=420"
  647.     end
  648. if v.key == true then
  649. newScript.KeySystem.Visible = true
  650. end
  651.  
  652. newScript.ExecuteButton.MouseButton1Click:Connect(function()
  653. loadstring(v.script)()
  654. end)
  655.  
  656. newScript.CopyScriptButton.MouseButton1Click:Connect(function()
  657. setclipboard(v.script)
  658. end)
  659.  
  660. newScript.PreviewImage.MouseEnter:Connect(function()
  661. updateInfoBox(v)
  662. end)
  663.  
  664.   end)
  665.  end
  666.  pagefetchrunning = false
  667. end
  668.  
  669.  
  670. SearchBox.FocusLost:Connect(function(enterPressed)
  671.  if enterPressed then
  672.   gquery = SearchBox.Text
  673.   page = 1
  674.   local scriptsTbl = fetchScripts(SearchBox.Text, 1)
  675.   refreshScripts(scriptsTbl)
  676.  end
  677. end)
  678.  
  679.  
  680.  
  681. refreshScripts(fetchScripts(gquery, 1))
  682.  
  683. ScriptListFrame:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
  684.  if (ScriptListFrame.CanvasPosition.Y + ScriptListFrame.AbsoluteSize.Y) >= ScriptListFrame.AbsoluteCanvasSize.Y -200 and not pagefetchrunning then
  685.   page = page + 1
  686.   pagefetchrunning = true
  687.   addScripts(fetchScripts(gquery, page))
  688.  end
  689. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement