Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ScreenGui = Instance.new("ScreenGui")
- SearchBox = Instance.new("TextBox")
- SavedScriptsScrollingFrame = Instance.new("ScrollingFrame")
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- SearchBox.Parent = ScreenGui
- SearchBox.Size = UDim2.new(0, 200, 0, 50)
- SearchBox.Position = UDim2.new(0.5, 0, 0.2, 0)
- SearchBox.PlaceholderText = "Введите текст..."
- SavedScriptsScrollingFrame.Parent = ScreenGui
- SavedScriptsScrollingFrame.Size = UDim2.new(0, 395, 0, 229.9)
- SavedScriptsScrollingFrame.Position = UDim2.new(0.5, 0, 0.4, 0)
- SavedScriptsScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- SavedScriptsScrollingFrame.ScrollBarThickness = 0
- local Saves = {}
- if not isfile("Test.ECCS") then
- writefile("Test.ECCS", "")
- end
- File1 = readfile("Test.ECCS")
- for s in string.gmatch(File1, '([^,]+)') do
- table.insert(Saves, s:match("^%s*(.-)%s*$"))
- end
- local function findResult(tbl, value)
- local index = table.find(tbl, value)
- if index then
- return true
- else
- return false
- end
- end
- SavedScriptsScrollingFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
- local function updateSaves()
- SavedScriptsScrollingFrame:ClearAllChildren()
- for _, SavedS in ipairs(Saves) do
- local scriptName, imageId, showLabel, VerAuthor, author, gameName, scriptContent = SavedS:match("^(.-)~(%d+)~(.-)~(.-)~(.-)~(.-)~(.+)$")
- UIGridLayoutSaves = Instance.new("UIGridLayout")
- UIPaddingSaves = Instance.new("UIPadding")
- UIGridLayoutSaves.Parent = SavedScriptsScrollingFrame
- UIGridLayoutSaves.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayoutSaves.CellPadding = UDim2.new(0, 0, 0, 5)
- UIGridLayoutSaves.CellSize = UDim2.new(0, 395, 0, 220)
- UIGridLayoutSaves.HorizontalAlignment = Enum.HorizontalAlignment.Left
- UIGridLayoutSaves.SortOrder = Enum.SortOrder.LayoutOrder
- UIGridLayoutSaves.VerticalAlignment = Enum.VerticalAlignment.Top
- UIPaddingSaves.Parent = SavedScriptsScrollingFrame
- UIPaddingSaves.PaddingBottom = UDim.new(0, 5)
- UIPaddingSaves.PaddingLeft = UDim.new(0, 0)
- UIPaddingSaves.PaddingRight = UDim.new(0, 0)
- UIPaddingSaves.PaddingTop = UDim.new(0, 5)
- local SavedScriptsFrame = Instance.new("Frame")
- SavedScriptsFrame.Parent = SavedScriptsScrollingFrame
- local SavedScriptImage = Instance.new("ImageLabel")
- SavedScriptImage.Parent = SavedScriptsFrame
- SavedScriptImage.Size = UDim2.new(0, 395, 0, 220)
- SavedScriptImage.AnchorPoint = Vector2.new(0.5, 0.5)
- SavedScriptImage.Position = UDim2.new(0.5, 0, 0.5, 0)
- SavedScriptImage.BackgroundTransparency = 1
- local SavedScriptImageUICorner = Instance.new("UICorner")
- SavedScriptImageUICorner.CornerRadius = UDim.new(0, 10)
- SavedScriptImageUICorner.Parent = SavedScriptImage
- if game.PlaceId then
- SavedScriptImage.Image = "https://assetgame.roblox.com/Game/Tools/ThumbnailAsset.ashx?aid="..imageId.."&fmt=png&wd=420&ht=420"
- else
- SavedScriptImage.Image = "rbxassetid://"..imageId
- end
- local SavedScriptImageShadow = Instance.new("Frame")
- SavedScriptImageShadow.Name = "SImgShadow"
- SavedScriptImageShadow.Parent = SavedScriptImage
- SavedScriptImageShadow.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- SavedScriptImageShadow.BackgroundTransparency = 0.5
- SavedScriptImageShadow.AnchorPoint = Vector2.new(0.5, 0.5)
- SavedScriptImageShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
- SavedScriptImageShadow.Size = UDim2.new(0, 395, 0, 220)
- local SavedScriptImageShadowUICorner = Instance.new("UICorner")
- SavedScriptImageShadowUICorner.CornerRadius = UDim.new(0, 10)
- SavedScriptImageShadowUICorner.Parent = SavedScriptImageShadow
- local ScriptSavesTitle = Instance.new("TextLabel")
- ScriptSavesTitle.Name = "ScriptSavesTitle"
- ScriptSavesTitle.Parent = SavedScriptsFrame
- ScriptSavesTitle.BackgroundTransparency = 1
- ScriptSavesTitle.Position = UDim2.new(0, 10, 0, 5)
- ScriptSavesTitle.Size = UDim2.new(0, 375, 0, 55)
- ScriptSavesTitle.Font = Enum.Font.ArimoBold
- ScriptSavesTitle.Text = scriptName
- ScriptSavesTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
- ScriptSavesTitle.TextScaled = true
- ScriptSavesTitle.TextSize = 14.000
- ScriptSavesTitle.TextWrapped = true
- ScriptSavesTitle.TextXAlignment = Enum.TextXAlignment.Left
- if VerAuthor == "true" then
- local AuthorLabel = Instance.new("TextLabel")
- AuthorLabel.Parent = SavedScriptsFrame
- AuthorLabel.Size = UDim2.new(0, 375, 0, 40)
- AuthorLabel.Position = UDim2.new(0, 10, 0, 110)
- AuthorLabel.Text = author
- AuthorLabel.TextXAlignment = Enum.TextXAlignment.Left
- AuthorLabel.Font = Enum.Font.ArimoBold
- AuthorLabel.TextSize = 20
- AuthorLabel.TextWrapped = true
- AuthorLabel.TextColor3 = Color3.fromRGB(0, 125, 255)
- AuthorLabel.BackgroundTransparency = 1
- else
- local AuthorLabel = Instance.new("TextLabel")
- AuthorLabel.Parent = SavedScriptsFrame
- AuthorLabel.Size = UDim2.new(0, 375, 0, 40)
- AuthorLabel.Position = UDim2.new(0, 10, 0, 110)
- AuthorLabel.Text = author
- AuthorLabel.TextXAlignment = Enum.TextXAlignment.Left
- AuthorLabel.Font = Enum.Font.ArimoBold
- AuthorLabel.TextSize = 20
- AuthorLabel.TextWrapped = true
- AuthorLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- AuthorLabel.BackgroundTransparency = 1
- end
- local GameNameLabel = Instance.new("TextLabel")
- GameNameLabel.Parent = SavedScriptsFrame
- GameNameLabel.Size = UDim2.new(0, 375, 0, 30)
- GameNameLabel.Position = UDim2.new(0, 10, 0, 70)
- GameNameLabel.Text = gameName
- GameNameLabel.TextXAlignment = Enum.TextXAlignment.Left
- GameNameLabel.Font = Enum.Font.ArimoBold
- GameNameLabel.TextSize = 30
- GameNameLabel.TextWrapped = true
- GameNameLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- GameNameLabel.BackgroundTransparency = 1
- if showLabel == "true" then
- local KeySystemSaved = Instance.new("TextLabel")
- KeySystemSaved.Name = "KeySystemSaved"
- KeySystemSaved.Parent = SavedScriptsFrame
- KeySystemSaved.BackgroundColor3 = Color3.fromRGB(255, 200, 31)
- KeySystemSaved.Position = UDim2.new(0.025, 0, 0.85, 0)
- KeySystemSaved.Size = UDim2.new(0, 85, 0, 25)
- KeySystemSaved.Font = Enum.Font.ArimoBold
- KeySystemSaved.Text = " Key"
- KeySystemSaved.TextColor3 = Color3.fromRGB(255, 255, 255)
- KeySystemSaved.TextSize = 17
- KeySystemSaved.TextXAlignment = Enum.TextXAlignment.Left
- KeySystemSaved.TextYAlignment = Enum.TextYAlignment.Center
- local KeySystemSavedUICorner = Instance.new("UICorner")
- KeySystemSavedUICorner.CornerRadius = UDim.new(0, 10)
- KeySystemSavedUICorner.Parent = KeySystemSaved
- local KeySystemSavedImg = Instance.new("ImageLabel")
- KeySystemSavedImg.Name = "KeySystemSavedImg"
- KeySystemSavedImg.Parent = KeySystemSaved
- KeySystemSavedImg.BackgroundTransparency = 1
- KeySystemSavedImg.AnchorPoint = Vector2.new(0.5, 0.5)
- KeySystemSavedImg.Position = UDim2.new(0.85, 0, 0.5, 0)
- KeySystemSavedImg.Size = UDim2.new(0, 18, 0, 18)
- KeySystemSavedImg.Image = "rbxassetid://121862914614673"
- end
- local ExecuteSavedScriptButton = Instance.new("TextButton")
- ExecuteSavedScriptButton.Name = "ExecuteSavedScriptButton"
- ExecuteSavedScriptButton.Parent = SavedScriptsFrame
- ExecuteSavedScriptButton.BackgroundColor3 = Color3.fromRGB(66, 170, 255)
- ExecuteSavedScriptButton.Position = UDim2.new(0.75, 0, 0.7, 0)
- ExecuteSavedScriptButton.Size = UDim2.new(0, 85, 0, 25)
- ExecuteSavedScriptButton.AutoButtonColor = false
- ExecuteSavedScriptButton.Font = Enum.Font.ArimoBold
- ExecuteSavedScriptButton.Text = " Execute"
- ExecuteSavedScriptButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ExecuteSavedScriptButton.TextSize = 17
- ExecuteSavedScriptButton.TextXAlignment = Enum.TextXAlignment.Left
- ExecuteSavedScriptButton.TextYAlignment = Enum.TextYAlignment.Center
- local ExecuteSavedScriptButtonUICorner = Instance.new("UICorner")
- ExecuteSavedScriptButtonUICorner.CornerRadius = UDim.new(0, 10)
- ExecuteSavedScriptButtonUICorner.Parent = ExecuteSavedScriptButton
- local ExecuteSavedScriptButtonImg = Instance.new("ImageLabel")
- ExecuteSavedScriptButtonImg.Name = "ExecuteSavedScriptButton"
- ExecuteSavedScriptButtonImg.Parent = ExecuteSavedScriptButton
- ExecuteSavedScriptButtonImg.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- ExecuteSavedScriptButtonImg.BackgroundTransparency = 1
- ExecuteSavedScriptButtonImg.AnchorPoint = Vector2.new(0.5, 0.5)
- ExecuteSavedScriptButtonImg.Position = UDim2.new(0.85, 0, 0.5, 0)
- ExecuteSavedScriptButtonImg.Size = UDim2.new(0, 18, 0, 18)
- ExecuteSavedScriptButtonImg.Image = "rbxassetid://94761665022976"
- ExecuteSavedScriptButton.MouseButton1Click:Connect(function()
- loadstring(scriptContent)()
- end)
- end
- end
- updateSaves()
- SearchBox.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- if SearchBox.Text ~= " " then
- local newSText = SearchBox.Text
- local exists_2 = false
- for _, SavedS in ipairs(Saves) do
- if SavedS:lower() == newSText:lower() then
- exists_2 = true
- break
- end
- end
- if not exists_2 then
- table.insert(Saves, newSText)
- writefile("Test.ECCS", table.concat(Saves, ", "))
- end
- end
- updateSaves()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement