Advertisement
ERROR_CODE

Browser

Mar 18th, 2024 (edited)
551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.52 KB | None | 0 0
  1. if game:GetService("CoreGui"):FindFirstChild("UIGui") then
  2. game:GetService("CoreGui"):FindFirstChild("UIGui"):Destroy()
  3. end
  4. UIGui = Instance.new("ScreenGui")
  5. MainFrame = Instance.new("Frame")
  6. SearchBox = Instance.new("TextBox")
  7. UICorner_3 = Instance.new("UICorner")
  8. ScriptAuthor = Instance.new("TextLabel")
  9. UIPadding = Instance.new("UIPadding")
  10. Scripts = Instance.new("Folder")
  11. UIGridLayout = Instance.new("UIGridLayout")
  12. ScriptFrame = Instance.new("Frame")
  13. UICorner_6 = Instance.new("UICorner")
  14. ScriptTitle = Instance.new("TextButton")
  15. InfoButton = Instance.new("TextButton")
  16. UICorner_8 = Instance.new("UICorner")
  17. ScriptGame = Instance.new("TextLabel")
  18. VerifiedScriptFrame = Instance.new("Frame")
  19. UICorner_9 = Instance.new("UICorner")
  20. ScriptTitle_2 = Instance.new("TextButton")
  21. VerifiedIcon = Instance.new("ImageLabel")
  22. UICorner_11 = Instance.new("UICorner")
  23. ScriptAuthor_2 = Instance.new("TextLabel")
  24. ScriptGame_2 = Instance.new("TextLabel")
  25. OpenDescriptionButton = Instance.new("TextButton")
  26. OpenDescriptionButtonUICorner = Instance.new("UICorner")
  27. OpenDescriptionButton_2 = Instance.new("TextButton")
  28. OpenDescriptionButtonUICorner_2 = Instance.new("UICorner")
  29. OpenDescriptionBackground = Instance.new("Frame")
  30. OpenDescriptionBackgroundUICorner = Instance.new("UICorner")
  31. OpenDescriptionBackground_2 = Instance.new("Frame")
  32. OpenDescriptionBackgroundUICorner_2 = Instance.new("UICorner")
  33. DescriptionScript = Instance.new("TextButton")
  34. DescriptionScriptUICorner = Instance.new("UICorner")
  35. SecondFrame = Instance.new("Frame")
  36.  
  37.  
  38.  
  39.  
  40.  
  41. UIGui.Name = "UIGui"
  42. UIGui.Parent = game.CoreGui
  43. game.CoreGui.UIGui.Enabled = true
  44.  
  45. DescriptionScript.Visible = false
  46.  
  47.  
  48. MainFrame.Parent = UIGui
  49. MainFrame.Position = UDim2.new(0.25, 0, -0.15, -300)
  50. MainFrame.Size = UDim2.new(0.5, 0, 0.5, 900)
  51. MainFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  52. MainFrame.Rotation = -90
  53.  
  54. SecondFrame.Parent = MainFrame
  55. SecondFrame.Position = UDim2.new(0, 20, 0, 160)
  56. SecondFrame.Size = UDim2.new(0, 0, 0, 0)
  57. SecondFrame.BackgroundColor3 = Color3.fromRGB(1, 1, 1)
  58. SecondFrame.BackgroundTransparency = 1
  59.  
  60. SearchBox.Name = "SearchBox"
  61. SearchBox.Parent = MainFrame
  62. SearchBox.BackgroundColor3 = Color3.fromRGB(222, 222, 222)
  63. SearchBox.BackgroundTransparency = 0
  64. SearchBox.Position = UDim2.new(0, 20, 0, 100)
  65. SearchBox.Size = UDim2.new(0, 440, 0, 50)
  66. SearchBox.ClearTextOnFocus = false
  67. SearchBox.PlaceholderText = "Tap to search"
  68. SearchBox.PlaceholderColor3 = Color3.fromRGB(200, 200, 200)
  69. SearchBox.Text = ""
  70. SearchBox.TextColor3 = Color3.fromRGB(200, 200, 200)
  71. SearchBox.TextTransparency = 0
  72. SearchBox.TextScaled = true
  73. SearchBox.TextSize = 14.000
  74. SearchBox.TextXAlignment = Enum.TextXAlignment.Left
  75. SearchBox.TextYAlignment = Enum.TextYAlignment.Center
  76.  
  77. UICorner_3.CornerRadius = UDim.new(0, 12)
  78. UICorner_3.Parent = SearchBox
  79.  
  80. ScriptAuthor.Name = "ScriptAuthor"
  81. ScriptAuthor.Parent = ScriptFrame
  82. ScriptAuthor.BackgroundTransparency = 1
  83. ScriptAuthor.Position = UDim2.new(0, 10, 0, 150)
  84. ScriptAuthor.Size = UDim2.new(0, 280, 0, 30)
  85. ScriptAuthor.Font = Enum.Font.SourceSansBold
  86. ScriptAuthor.Text = "by ScriptAuthor"
  87. ScriptAuthor.TextColor3 = Color3.fromRGB(192, 192, 192)
  88. ScriptAuthor.TextSize = 14.000
  89. ScriptAuthor.TextWrapped = true
  90. ScriptAuthor.TextScaled = true
  91. ScriptAuthor.TextXAlignment = Enum.TextXAlignment.Left
  92.  
  93. UIPadding.Parent = ScriptListFrame
  94. UIPadding.PaddingBottom = UDim.new(0, 50)
  95. UIPadding.PaddingLeft = UDim.new(0, 50)
  96. UIPadding.PaddingRight = UDim.new(0, 50)
  97. UIPadding.PaddingTop = UDim.new(0, 50)
  98.  
  99. Scripts.Name = "Scripts"
  100. Scripts.Parent = SecondFrame
  101.  
  102. UIGridLayout.Parent = Scripts
  103. UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  104. UIGridLayout.CellPadding = UDim2.new(0, 10, 0, 10)
  105. UIGridLayout.CellSize = UDim2.new(0, 440, 0, 220)
  106.  
  107. ScriptFrame.Name = "ScriptFrame"
  108. ScriptFrame.Parent = Scripts
  109. ScriptFrame.BackgroundColor3 = Color3.fromRGB(222, 222, 222)
  110. ScriptFrame.Size = UDim2.new(0, 200, 0, 100)
  111. ScriptFrame.Position = UDim2.new(0, 400, 0, 200)
  112.  
  113. UICorner_6.CornerRadius = UDim.new(0, 12)
  114. UICorner_6.Parent = ScriptFrame
  115.  
  116. ScriptTitle.Name = "ScriptTitle"
  117. ScriptTitle.Parent = ScriptFrame
  118. ScriptTitle.BackgroundTransparency = 1
  119. ScriptTitle.Position = UDim2.new(0, 5, 0, 1)
  120. ScriptTitle.Size = UDim2.new(0, 425, 0, 40)
  121. ScriptTitle.Font = Enum.Font.SourceSansBold
  122. ScriptTitle.Text = "Script Title"
  123. ScriptTitle.TextColor3 = Color3.fromRGB(100, 36, 255)
  124. ScriptTitle.TextScaled = true
  125. ScriptTitle.TextSize = 14.000
  126. ScriptTitle.TextWrapped = true
  127. ScriptTitle.TextXAlignment = Enum.TextXAlignment.Left
  128. ScriptTitle.TextYAlignment = Enum.TextYAlignment.Top
  129.  
  130. OpenDescriptionBackground.Name = "OpenDescriptionBackground"
  131. OpenDescriptionBackground.Parent = ScriptFrame
  132. OpenDescriptionBackground.BackgroundColor3 = Color3.fromRGB(55,55, 55)
  133. OpenDescriptionBackground.Position = UDim2.new(0.747, 0, 0.794, 0)
  134. OpenDescriptionBackground.Size = UDim2.new(0, 205, 0, 55)
  135.  
  136. OpenDescriptionBackgroundUICorner.Parent = OpenDescriptionBackground
  137. OpenDescriptionBackgroundUICorner.CornerRadius = UDim.new(0, 15)
  138.  
  139.  
  140. OpenDescriptionButton.Name = "OpenDescriptionButton"
  141. OpenDescriptionButton.Parent = ScriptFrame
  142. OpenDescriptionButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  143. OpenDescriptionButton.Position = UDim2.new(0.75, 0, 0.8, 0)
  144. OpenDescriptionButton.Size = UDim2.new(0, 200, 0, 50)
  145. OpenDescriptionButton.AutoButtonColor = false
  146. OpenDescriptionButton.Font = Enum.Font.SourceSansBold
  147. OpenDescriptionButton.Text = "Description"
  148. OpenDescriptionButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  149. OpenDescriptionButton.TextSize = 14.000
  150. OpenDescriptionButton.TextScaled = true
  151. OpenDescriptionButton.TextWrapped = true
  152.  
  153. OpenDescriptionButtonUICorner.CornerRadius = UDim.new(0, 12)
  154. OpenDescriptionButtonUICorner.Parent = OpenDescriptionButton
  155.  
  156. ScriptGame.Name = "ScriptGame"
  157. ScriptGame.Parent = ScriptFrame
  158. ScriptGame.BackgroundTransparency = 1
  159. ScriptGame.Position = UDim2.new(0, 10, 0, 220)
  160. ScriptGame.Size = UDim2.new(0, 280, 0, 30)
  161. ScriptGame.Font = Enum.Font.SourceSansBold
  162. ScriptGame.Text = "Game"
  163. ScriptGame.TextColor3 = Color3.fromRGB(192, 192, 192)
  164. ScriptGame.TextSize = 14
  165. ScriptGame.TextWrapped = true
  166. ScriptGame.TextScaled = true
  167. ScriptGame.TextXAlignment = Enum.TextXAlignment.Left
  168.  
  169. VerifiedScriptFrame.Name = "VerifiedScriptFrame"
  170. VerifiedScriptFrame.Parent = Scripts
  171. VerifiedScriptFrame.BackgroundColor3 = ScriptFrame.BackgroundColor3
  172. VerifiedScriptFrame.Size = ScriptFrame.Size
  173.  
  174. UICorner_9.CornerRadius = UDim.new(0, 12)
  175. UICorner_9.Parent = VerifiedScriptFrame
  176.  
  177. ScriptTitle_2.Name = "ScriptTitle"
  178. ScriptTitle_2.Parent = VerifiedScriptFrame
  179. ScriptTitle_2.BackgroundTransparency = 1
  180. ScriptTitle_2.Position = ScriptTitle.Position
  181. ScriptTitle_2.Size = ScriptTitle.Size
  182. ScriptTitle_2.Font = Enum.Font.SourceSansBold
  183. ScriptTitle_2.Text = "Script Title"
  184. ScriptTitle_2.TextColor3 = ScriptTitle.TextColor3
  185. ScriptTitle_2.TextScaled = true
  186. ScriptTitle_2.TextSize = 14.000
  187. ScriptTitle_2.TextWrapped = true
  188. ScriptTitle_2.TextXAlignment = Enum.TextXAlignment.Left
  189. ScriptTitle_2.TextYAlignment = Enum.TextYAlignment.Top
  190.  
  191. VerifiedIcon.Name = "VerifiedIcon"
  192. VerifiedIcon.Parent = VerifiedScriptFrame
  193. VerifiedIcon.BackgroundTransparency = 0
  194. VerifiedIcon.Position = UDim2.new(0, 100, 0, 90)
  195. VerifiedIcon.Size = UDim2.new(0, 80, 0, 55)
  196. VerifiedIcon.Image = "rbxassetid://15621211889"
  197. VerifiedIcon.BackgroundTransparency = 1
  198.  
  199. OpenDescriptionBackground_2.Name = "OpenDescriptionBackground_2"
  200. OpenDescriptionBackground_2.Parent = VerifiedScriptFrame
  201. OpenDescriptionBackground_2.BackgroundColor3 = Color3.fromRGB(55,55, 55)
  202. OpenDescriptionBackground_2.Position = UDim2.new(0.747, 0, 0.794, 0)
  203. OpenDescriptionBackground_2.Size = UDim2.new(0, 205, 0, 55)
  204.  
  205. OpenDescriptionBackgroundUICorner_2.Parent = OpenDescriptionBackground_2
  206. OpenDescriptionBackgroundUICorner_2.CornerRadius = UDim.new(0, 15)
  207.  
  208.  
  209. OpenDescriptionButton_2.Name = "OpenDescriptionButton"
  210. OpenDescriptionButton_2.Parent = VerifiedScriptFrame
  211. OpenDescriptionButton_2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  212. OpenDescriptionButton_2.Position = UDim2.new(0.75, 0, 0.8, 0)
  213. OpenDescriptionButton_2.Size = UDim2.new(0, 200, 0, 50)
  214. OpenDescriptionButton_2.AutoButtonColor = false
  215. OpenDescriptionButton_2.Font = Enum.Font.SourceSansBold
  216. OpenDescriptionButton_2.Text = "Description"
  217. OpenDescriptionButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  218. OpenDescriptionButton_2.TextSize = 14.000
  219. OpenDescriptionButton_2.TextScaled = true
  220. OpenDescriptionButton_2.TextWrapped = true
  221.  
  222. OpenDescriptionButtonUICorner_2.CornerRadius = UDim.new(0, 12)
  223. OpenDescriptionButtonUICorner_2.Parent = OpenDescriptionButton_2
  224.  
  225. ScriptAuthor_2.Name = "ScriptAuthor"
  226. ScriptAuthor_2.Parent = VerifiedScriptFrame
  227. ScriptAuthor_2.BackgroundTransparency = 1
  228. ScriptAuthor_2.Position = ScriptAuthor.Position
  229. ScriptAuthor_2.Size = ScriptAuthor.Size
  230. ScriptAuthor_2.Font = Enum.Font.SourceSansBold
  231. ScriptAuthor_2.Text = "by ScriptAuthor"
  232. ScriptAuthor_2.TextColor3 = ScriptAuthor.TextColor3
  233. ScriptAuthor_2.TextSize = 14.000
  234. ScriptAuthor_2.TextWrapped = true
  235. ScriptAuthor_2.TextScaled = true
  236. ScriptAuthor_2.TextXAlignment = Enum.TextXAlignment.Left
  237.  
  238. ScriptGame_2.Name = "ScriptGame"
  239. ScriptGame_2.Parent = VerifiedScriptFrame
  240. ScriptGame_2.BackgroundTransparency = 1
  241. ScriptGame_2.Position = ScriptGame.Position
  242. ScriptGame_2.Size = ScriptGame.Size
  243. ScriptGame_2.Font = Enum.Font.Code
  244. ScriptGame_2.Text = "Game"
  245. ScriptGame_2.TextColor3 = ScriptGame.TextColor3
  246. ScriptGame_2.TextSize = 14.000
  247. ScriptGame_2.TextWrapped = true
  248. ScriptGame_2.TextScaled = true
  249. ScriptGame_2.TextXAlignment = Enum.TextXAlignment.Left
  250.  
  251. DescriptionScript.Name = "DescriptionScript"
  252. DescriptionScript.Parent = MainFrame
  253. DescriptionScript.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  254. DescriptionScript.Position = UDim2.new(-3.55, 0, -1.4, 0)
  255. DescriptionScript.Size = UDim2.new(0, 855, 0, 400)
  256. DescriptionScript.BackgroundTransparency = 0.3
  257. DescriptionScript.AutoButtonColor = false
  258. DescriptionScript.Font = Enum.Font.SourceSansBold
  259. DescriptionScript.Text = "Description"
  260. DescriptionScript.TextColor3 = Color3.fromRGB(255, 255, 255)
  261. DescriptionScript.TextSize = 14.000
  262. DescriptionScript.TextScaled = true
  263. DescriptionScript.TextWrapped = true
  264.  
  265. DescriptionScriptUICorner.CornerRadius = UDim.new(0, 12)
  266. DescriptionScriptUICorner.Parent = DescriptionScript
  267.  
  268.  
  269. local getfakeasset = getcustomasset or getsynasset
  270.  
  271. local HttpService = game:GetService("HttpService")
  272. local TweenService = game:GetService("TweenService")
  273. local TextService = game:GetService("TextService")
  274.  
  275. local page = 1
  276. local gquery = ""
  277.  
  278. function tableConcat(t1,t2)
  279.     for i, v in pairs(t2) do
  280.         table.insert(t1, v)
  281.     end
  282.     return t1
  283. end
  284.  
  285.  
  286.  
  287.  
  288. local VerifiedScript = VerifiedScriptFrame:Clone()
  289. local Script = ScriptFrame:Clone()
  290. ScriptFrame:Destroy()
  291. VerifiedScriptFrame:Destroy()
  292.  
  293.  
  294.  
  295. function _if(a, b, c)
  296.     if a then return b else return c end
  297. end
  298.  
  299. function fastmodeExec(func)
  300.     if getgenv().fastmode == true then
  301.         task.spawn(func)
  302.     else
  303.         func()
  304.     end
  305. end
  306.  
  307. function fetchScripts(query, page)
  308.     page = page or 1
  309.     query = HttpService:UrlEncode(query)
  310.    
  311.     local 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))
  312.     local req = HttpService:JSONDecode(game:HttpGetAsync(url)).result
  313.    
  314.     return req.scripts
  315. end
  316.  
  317. function fixScript(scriptObj)
  318.     if not scriptObj["script"] or not scriptObj["owner"] or not scriptObj["features"] then
  319.        
  320.        
  321.             local req = HttpService:JSONDecode(game:HttpGetAsync("https://www.scriptblox.com/api/script/".. scriptObj.slug)).script
  322.             scriptObj["script"] = _if(scriptObj["script"], scriptObj["script"], req.script)
  323.             scriptObj["features"] = _if(scriptObj["features"], scriptObj["features"], req.features)
  324.             scriptObj["owner"] = _if(scriptObj["owner"], scriptObj["owner"], req.owner)
  325.            
  326.            
  327.    
  328.     end
  329.     return scriptObj
  330. end
  331.  
  332.  
  333.  
  334. function refreshScripts(scriptTbl)
  335.     if #scriptTbl <= 0 then
  336.         SearchBox.Text = ""
  337.       SearchBox.PlaceholderText = "No script founded"
  338. wait(1)
  339. SearchBox.PlaceholderText = "Tap to search"
  340.         return
  341.     else
  342.         SearchBox.PlaceholderText = "Tap to search"
  343.     end
  344.    
  345.     local UIGridLayoutCopy = UIGridLayout:Clone()
  346.     Scripts:ClearAllChildren()
  347.     UIGridLayoutCopy.Parent = Scripts
  348.    
  349.     addScripts(scriptTbl)
  350. end
  351.  
  352. function addScripts(scriptTbl)
  353.     for i, v in pairs(scriptTbl) do
  354.         fastmodeExec(function()
  355.             local newScript
  356.  
  357.             v = fixScript(v)
  358.  
  359.             if v.verified == true then
  360.                 newScript = VerifiedScript:Clone()
  361.                 newScript.ScriptTitle.Text = v.title
  362.                 newScript.ScriptAuthor.Text = "by ".. v.owner.username
  363.                 newScript.ScriptGame.Text = v.game.name
  364.                 newScript.Parent = Scripts
  365.             else
  366.                 newScript = Script:Clone()
  367.                 newScript.ScriptTitle.Text = v.title
  368.                 newScript.ScriptAuthor.Text = "by ".. v.owner.username
  369.                 newScript.ScriptGame.Text = v.game.name
  370.                 newScript.Parent = Scripts
  371.             end
  372.  
  373.             newScript.ScriptTitle.MouseButton1Click:Connect(function()
  374.  
  375.                 loadstring(v.script)()
  376.             end)
  377.  
  378.            
  379.  
  380.  
  381.  
  382. newScript.OpenDescriptionButton.MouseButton1Click:Connect(function()
  383. DescriptionScript.Visible = true
  384. DescriptionScript.Text = v.features
  385. end)
  386.  
  387.  
  388. end)
  389. end
  390.  
  391.    
  392.     pagefetchrunning = false
  393. end
  394.  
  395. DescriptionScript.MouseButton1Click:Connect(function()
  396. DescriptionScript.Visible = false
  397. end)
  398.  
  399. SearchBox.FocusLost:Connect(function(enterPressed)
  400.     if enterPressed then
  401.         gquery = SearchBox.Text
  402.         page = 1
  403.         local scriptsTbl = fetchScripts(SearchBox.Text, 1)
  404.         refreshScripts(scriptsTbl)
  405.     end
  406. end)
  407.  
  408.  
  409. refreshScripts(fetchScripts(gquery, 1))
  410.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement