Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("CoreGui"):FindFirstChild("UIGui") then
- game:GetService("CoreGui"):FindFirstChild("UIGui"):Destroy()
- end
- UIGui = Instance.new("ScreenGui")
- MainFrame = Instance.new("Frame")
- SearchBox = Instance.new("TextBox")
- UICorner_3 = Instance.new("UICorner")
- ScriptAuthor = Instance.new("TextLabel")
- UIPadding = Instance.new("UIPadding")
- Scripts = Instance.new("Folder")
- UIGridLayout = Instance.new("UIGridLayout")
- ScriptFrame = Instance.new("Frame")
- UICorner_6 = Instance.new("UICorner")
- ScriptTitle = Instance.new("TextButton")
- InfoButton = Instance.new("TextButton")
- UICorner_8 = Instance.new("UICorner")
- ScriptGame = Instance.new("TextLabel")
- VerifiedScriptFrame = Instance.new("Frame")
- UICorner_9 = Instance.new("UICorner")
- ScriptTitle_2 = Instance.new("TextButton")
- VerifiedIcon = Instance.new("ImageLabel")
- UICorner_11 = Instance.new("UICorner")
- ScriptAuthor_2 = Instance.new("TextLabel")
- ScriptGame_2 = Instance.new("TextLabel")
- OpenDescriptionButton = Instance.new("TextButton")
- OpenDescriptionButtonUICorner = Instance.new("UICorner")
- OpenDescriptionButton_2 = Instance.new("TextButton")
- OpenDescriptionButtonUICorner_2 = Instance.new("UICorner")
- OpenDescriptionBackground = Instance.new("Frame")
- OpenDescriptionBackgroundUICorner = Instance.new("UICorner")
- OpenDescriptionBackground_2 = Instance.new("Frame")
- OpenDescriptionBackgroundUICorner_2 = Instance.new("UICorner")
- DescriptionScript = Instance.new("TextButton")
- DescriptionScriptUICorner = Instance.new("UICorner")
- SecondFrame = Instance.new("Frame")
- UIGui.Name = "UIGui"
- UIGui.Parent = game.CoreGui
- game.CoreGui.UIGui.Enabled = true
- DescriptionScript.Visible = false
- MainFrame.Parent = UIGui
- MainFrame.Position = UDim2.new(0.25, 0, -0.15, -300)
- MainFrame.Size = UDim2.new(0.5, 0, 0.5, 900)
- MainFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- MainFrame.Rotation = -90
- SecondFrame.Parent = MainFrame
- SecondFrame.Position = UDim2.new(0, 20, 0, 160)
- SecondFrame.Size = UDim2.new(0, 0, 0, 0)
- SecondFrame.BackgroundColor3 = Color3.fromRGB(1, 1, 1)
- SecondFrame.BackgroundTransparency = 1
- SearchBox.Name = "SearchBox"
- SearchBox.Parent = MainFrame
- SearchBox.BackgroundColor3 = Color3.fromRGB(222, 222, 222)
- SearchBox.BackgroundTransparency = 0
- SearchBox.Position = UDim2.new(0, 20, 0, 100)
- SearchBox.Size = UDim2.new(0, 440, 0, 50)
- SearchBox.ClearTextOnFocus = false
- SearchBox.PlaceholderText = "Tap to search"
- SearchBox.PlaceholderColor3 = Color3.fromRGB(200, 200, 200)
- SearchBox.Text = ""
- SearchBox.TextColor3 = Color3.fromRGB(200, 200, 200)
- SearchBox.TextTransparency = 0
- SearchBox.TextScaled = true
- SearchBox.TextSize = 14.000
- SearchBox.TextXAlignment = Enum.TextXAlignment.Left
- SearchBox.TextYAlignment = Enum.TextYAlignment.Center
- UICorner_3.CornerRadius = UDim.new(0, 12)
- UICorner_3.Parent = SearchBox
- ScriptAuthor.Name = "ScriptAuthor"
- ScriptAuthor.Parent = ScriptFrame
- ScriptAuthor.BackgroundTransparency = 1
- ScriptAuthor.Position = UDim2.new(0, 10, 0, 150)
- ScriptAuthor.Size = UDim2.new(0, 280, 0, 30)
- ScriptAuthor.Font = Enum.Font.SourceSansBold
- ScriptAuthor.Text = "by ScriptAuthor"
- ScriptAuthor.TextColor3 = Color3.fromRGB(192, 192, 192)
- ScriptAuthor.TextSize = 14.000
- ScriptAuthor.TextWrapped = true
- ScriptAuthor.TextScaled = true
- ScriptAuthor.TextXAlignment = Enum.TextXAlignment.Left
- UIPadding.Parent = ScriptListFrame
- UIPadding.PaddingBottom = UDim.new(0, 50)
- UIPadding.PaddingLeft = UDim.new(0, 50)
- UIPadding.PaddingRight = UDim.new(0, 50)
- UIPadding.PaddingTop = UDim.new(0, 50)
- Scripts.Name = "Scripts"
- Scripts.Parent = SecondFrame
- UIGridLayout.Parent = Scripts
- UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayout.CellPadding = UDim2.new(0, 10, 0, 10)
- UIGridLayout.CellSize = UDim2.new(0, 440, 0, 220)
- ScriptFrame.Name = "ScriptFrame"
- ScriptFrame.Parent = Scripts
- ScriptFrame.BackgroundColor3 = Color3.fromRGB(222, 222, 222)
- ScriptFrame.Size = UDim2.new(0, 200, 0, 100)
- ScriptFrame.Position = UDim2.new(0, 400, 0, 200)
- UICorner_6.CornerRadius = UDim.new(0, 12)
- UICorner_6.Parent = ScriptFrame
- ScriptTitle.Name = "ScriptTitle"
- ScriptTitle.Parent = ScriptFrame
- ScriptTitle.BackgroundTransparency = 1
- ScriptTitle.Position = UDim2.new(0, 5, 0, 1)
- ScriptTitle.Size = UDim2.new(0, 425, 0, 40)
- ScriptTitle.Font = Enum.Font.SourceSansBold
- ScriptTitle.Text = "Script Title"
- ScriptTitle.TextColor3 = Color3.fromRGB(100, 36, 255)
- ScriptTitle.TextScaled = true
- ScriptTitle.TextSize = 14.000
- ScriptTitle.TextWrapped = true
- ScriptTitle.TextXAlignment = Enum.TextXAlignment.Left
- ScriptTitle.TextYAlignment = Enum.TextYAlignment.Top
- OpenDescriptionBackground.Name = "OpenDescriptionBackground"
- OpenDescriptionBackground.Parent = ScriptFrame
- OpenDescriptionBackground.BackgroundColor3 = Color3.fromRGB(55,55, 55)
- OpenDescriptionBackground.Position = UDim2.new(0.747, 0, 0.794, 0)
- OpenDescriptionBackground.Size = UDim2.new(0, 205, 0, 55)
- OpenDescriptionBackgroundUICorner.Parent = OpenDescriptionBackground
- OpenDescriptionBackgroundUICorner.CornerRadius = UDim.new(0, 15)
- OpenDescriptionButton.Name = "OpenDescriptionButton"
- OpenDescriptionButton.Parent = ScriptFrame
- OpenDescriptionButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- OpenDescriptionButton.Position = UDim2.new(0.75, 0, 0.8, 0)
- OpenDescriptionButton.Size = UDim2.new(0, 200, 0, 50)
- OpenDescriptionButton.AutoButtonColor = false
- OpenDescriptionButton.Font = Enum.Font.SourceSansBold
- OpenDescriptionButton.Text = "Description"
- OpenDescriptionButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- OpenDescriptionButton.TextSize = 14.000
- OpenDescriptionButton.TextScaled = true
- OpenDescriptionButton.TextWrapped = true
- OpenDescriptionButtonUICorner.CornerRadius = UDim.new(0, 12)
- OpenDescriptionButtonUICorner.Parent = OpenDescriptionButton
- ScriptGame.Name = "ScriptGame"
- ScriptGame.Parent = ScriptFrame
- ScriptGame.BackgroundTransparency = 1
- ScriptGame.Position = UDim2.new(0, 10, 0, 220)
- ScriptGame.Size = UDim2.new(0, 280, 0, 30)
- ScriptGame.Font = Enum.Font.SourceSansBold
- ScriptGame.Text = "Game"
- ScriptGame.TextColor3 = Color3.fromRGB(192, 192, 192)
- ScriptGame.TextSize = 14
- ScriptGame.TextWrapped = true
- ScriptGame.TextScaled = true
- ScriptGame.TextXAlignment = Enum.TextXAlignment.Left
- VerifiedScriptFrame.Name = "VerifiedScriptFrame"
- VerifiedScriptFrame.Parent = Scripts
- VerifiedScriptFrame.BackgroundColor3 = ScriptFrame.BackgroundColor3
- VerifiedScriptFrame.Size = ScriptFrame.Size
- UICorner_9.CornerRadius = UDim.new(0, 12)
- UICorner_9.Parent = VerifiedScriptFrame
- ScriptTitle_2.Name = "ScriptTitle"
- ScriptTitle_2.Parent = VerifiedScriptFrame
- ScriptTitle_2.BackgroundTransparency = 1
- ScriptTitle_2.Position = ScriptTitle.Position
- ScriptTitle_2.Size = ScriptTitle.Size
- ScriptTitle_2.Font = Enum.Font.SourceSansBold
- ScriptTitle_2.Text = "Script Title"
- ScriptTitle_2.TextColor3 = ScriptTitle.TextColor3
- ScriptTitle_2.TextScaled = true
- ScriptTitle_2.TextSize = 14.000
- ScriptTitle_2.TextWrapped = true
- ScriptTitle_2.TextXAlignment = Enum.TextXAlignment.Left
- ScriptTitle_2.TextYAlignment = Enum.TextYAlignment.Top
- VerifiedIcon.Name = "VerifiedIcon"
- VerifiedIcon.Parent = VerifiedScriptFrame
- VerifiedIcon.BackgroundTransparency = 0
- VerifiedIcon.Position = UDim2.new(0, 100, 0, 90)
- VerifiedIcon.Size = UDim2.new(0, 80, 0, 55)
- VerifiedIcon.Image = "rbxassetid://15621211889"
- VerifiedIcon.BackgroundTransparency = 1
- OpenDescriptionBackground_2.Name = "OpenDescriptionBackground_2"
- OpenDescriptionBackground_2.Parent = VerifiedScriptFrame
- OpenDescriptionBackground_2.BackgroundColor3 = Color3.fromRGB(55,55, 55)
- OpenDescriptionBackground_2.Position = UDim2.new(0.747, 0, 0.794, 0)
- OpenDescriptionBackground_2.Size = UDim2.new(0, 205, 0, 55)
- OpenDescriptionBackgroundUICorner_2.Parent = OpenDescriptionBackground_2
- OpenDescriptionBackgroundUICorner_2.CornerRadius = UDim.new(0, 15)
- OpenDescriptionButton_2.Name = "OpenDescriptionButton"
- OpenDescriptionButton_2.Parent = VerifiedScriptFrame
- OpenDescriptionButton_2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- OpenDescriptionButton_2.Position = UDim2.new(0.75, 0, 0.8, 0)
- OpenDescriptionButton_2.Size = UDim2.new(0, 200, 0, 50)
- OpenDescriptionButton_2.AutoButtonColor = false
- OpenDescriptionButton_2.Font = Enum.Font.SourceSansBold
- OpenDescriptionButton_2.Text = "Description"
- OpenDescriptionButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- OpenDescriptionButton_2.TextSize = 14.000
- OpenDescriptionButton_2.TextScaled = true
- OpenDescriptionButton_2.TextWrapped = true
- OpenDescriptionButtonUICorner_2.CornerRadius = UDim.new(0, 12)
- OpenDescriptionButtonUICorner_2.Parent = OpenDescriptionButton_2
- ScriptAuthor_2.Name = "ScriptAuthor"
- ScriptAuthor_2.Parent = VerifiedScriptFrame
- ScriptAuthor_2.BackgroundTransparency = 1
- ScriptAuthor_2.Position = ScriptAuthor.Position
- ScriptAuthor_2.Size = ScriptAuthor.Size
- ScriptAuthor_2.Font = Enum.Font.SourceSansBold
- ScriptAuthor_2.Text = "by ScriptAuthor"
- ScriptAuthor_2.TextColor3 = ScriptAuthor.TextColor3
- ScriptAuthor_2.TextSize = 14.000
- ScriptAuthor_2.TextWrapped = true
- ScriptAuthor_2.TextScaled = true
- ScriptAuthor_2.TextXAlignment = Enum.TextXAlignment.Left
- ScriptGame_2.Name = "ScriptGame"
- ScriptGame_2.Parent = VerifiedScriptFrame
- ScriptGame_2.BackgroundTransparency = 1
- ScriptGame_2.Position = ScriptGame.Position
- ScriptGame_2.Size = ScriptGame.Size
- ScriptGame_2.Font = Enum.Font.Code
- ScriptGame_2.Text = "Game"
- ScriptGame_2.TextColor3 = ScriptGame.TextColor3
- ScriptGame_2.TextSize = 14.000
- ScriptGame_2.TextWrapped = true
- ScriptGame_2.TextScaled = true
- ScriptGame_2.TextXAlignment = Enum.TextXAlignment.Left
- DescriptionScript.Name = "DescriptionScript"
- DescriptionScript.Parent = MainFrame
- DescriptionScript.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- DescriptionScript.Position = UDim2.new(-3.55, 0, -1.4, 0)
- DescriptionScript.Size = UDim2.new(0, 855, 0, 400)
- DescriptionScript.BackgroundTransparency = 0.3
- DescriptionScript.AutoButtonColor = false
- DescriptionScript.Font = Enum.Font.SourceSansBold
- DescriptionScript.Text = "Description"
- DescriptionScript.TextColor3 = Color3.fromRGB(255, 255, 255)
- DescriptionScript.TextSize = 14.000
- DescriptionScript.TextScaled = true
- DescriptionScript.TextWrapped = true
- DescriptionScriptUICorner.CornerRadius = UDim.new(0, 12)
- DescriptionScriptUICorner.Parent = DescriptionScript
- local getfakeasset = getcustomasset or getsynasset
- local HttpService = game:GetService("HttpService")
- local TweenService = game:GetService("TweenService")
- local TextService = game:GetService("TextService")
- local page = 1
- local gquery = ""
- function tableConcat(t1,t2)
- for i, v in pairs(t2) do
- table.insert(t1, v)
- end
- return t1
- end
- local VerifiedScript = VerifiedScriptFrame:Clone()
- local Script = ScriptFrame:Clone()
- ScriptFrame:Destroy()
- VerifiedScriptFrame:Destroy()
- function _if(a, b, c)
- if a then return b else return c end
- end
- function fastmodeExec(func)
- if getgenv().fastmode == true then
- task.spawn(func)
- else
- func()
- end
- end
- function fetchScripts(query, page)
- page = page or 1
- query = HttpService:UrlEncode(query)
- 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))
- local req = HttpService:JSONDecode(game:HttpGetAsync(url)).result
- return req.scripts
- end
- function fixScript(scriptObj)
- if not scriptObj["script"] or not scriptObj["owner"] or not scriptObj["features"] then
- local req = HttpService:JSONDecode(game:HttpGetAsync("https://www.scriptblox.com/api/script/".. scriptObj.slug)).script
- scriptObj["script"] = _if(scriptObj["script"], scriptObj["script"], req.script)
- scriptObj["features"] = _if(scriptObj["features"], scriptObj["features"], req.features)
- scriptObj["owner"] = _if(scriptObj["owner"], scriptObj["owner"], req.owner)
- end
- return scriptObj
- end
- function refreshScripts(scriptTbl)
- if #scriptTbl <= 0 then
- SearchBox.Text = ""
- SearchBox.PlaceholderText = "No script founded"
- wait(1)
- SearchBox.PlaceholderText = "Tap to search"
- return
- else
- SearchBox.PlaceholderText = "Tap to search"
- end
- local UIGridLayoutCopy = UIGridLayout:Clone()
- Scripts:ClearAllChildren()
- UIGridLayoutCopy.Parent = Scripts
- addScripts(scriptTbl)
- end
- function addScripts(scriptTbl)
- for i, v in pairs(scriptTbl) do
- fastmodeExec(function()
- local newScript
- v = fixScript(v)
- if v.verified == true then
- newScript = VerifiedScript:Clone()
- newScript.ScriptTitle.Text = v.title
- newScript.ScriptAuthor.Text = "by ".. v.owner.username
- newScript.ScriptGame.Text = v.game.name
- newScript.Parent = Scripts
- else
- newScript = Script:Clone()
- newScript.ScriptTitle.Text = v.title
- newScript.ScriptAuthor.Text = "by ".. v.owner.username
- newScript.ScriptGame.Text = v.game.name
- newScript.Parent = Scripts
- end
- newScript.ScriptTitle.MouseButton1Click:Connect(function()
- loadstring(v.script)()
- end)
- newScript.OpenDescriptionButton.MouseButton1Click:Connect(function()
- DescriptionScript.Visible = true
- DescriptionScript.Text = v.features
- end)
- end)
- end
- pagefetchrunning = false
- end
- DescriptionScript.MouseButton1Click:Connect(function()
- DescriptionScript.Visible = false
- end)
- SearchBox.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- gquery = SearchBox.Text
- page = 1
- local scriptsTbl = fetchScripts(SearchBox.Text, 1)
- refreshScripts(scriptsTbl)
- end
- end)
- refreshScripts(fetchScripts(gquery, 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement