Xfer1111

[PATCHED] Starving Artists Copy Art

Mar 17th, 2022 (edited)
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.77 KB | None | 0 0
  1. -- Execute the script and then sit on the chair (must own a stand/stall), you will get the gui to copy other peoples art.
  2.  
  3. local collectionService = game:GetService("CollectionService")
  4. local player = game.Players.LocalPlayer
  5. _G.refreshing = true
  6. local cloneGui = {}
  7.  
  8. function cloneGui.buildRoot()
  9.    local paintFrame = player.PlayerGui.MainGui.PaintFrame
  10.    local cloneFrame = paintFrame:Clone()
  11.    
  12.    -- Initialize root frame.
  13.    cloneFrame.Name = 'CloneFrame'
  14.    cloneFrame.Parent = paintFrame
  15.    cloneFrame.ToolsFrame:Destroy()
  16.    cloneFrame.ColorFrame:Destroy()
  17.    cloneFrame.NextButton:Destroy()
  18.    cloneFrame.UIAspectRatioConstraint:Destroy()
  19.    cloneFrame.Grid:Destroy()
  20.    cloneFrame.Confirmation:Destroy()
  21.    cloneFrame.AnchorPoint = Vector2.new(0, 0.5)
  22.    cloneFrame.Position = UDim2.new(1, 10, 0.5, 0)
  23.    cloneFrame.Size = UDim2.new(0.5, 0, 1, 0)
  24.    cloneFrame.Visible = true
  25.    
  26.    paintFrame.Position = UDim2.new(0.5, -((cloneFrame.AbsoluteSize.X / 2) + 5), 0.5, 0)
  27.    
  28.    cloneGui.root = cloneFrame
  29. end
  30.  
  31. function cloneGui.buildButtons()
  32.    local nextButton = player.PlayerGui.MainGui.PaintFrame.NextButton
  33.    local copyButton = nextButton:Clone()
  34.    local cloneButton = nextButton:Clone()
  35.    local buttonSize = UDim2.new(0.4, 0, 0.09, 0)
  36.    
  37.    -- Initialize copy button.
  38.    copyButton.Parent = cloneGui.root
  39.    copyButton.Size = buttonSize
  40.    copyButton.Position = UDim2.new(0.28, 0, 0.895)
  41.    copyButton.Label.Text = 'COPY'
  42.    copyButton.Name = 'CopyButton'
  43.    
  44.    -- Initialize clone button.
  45.    cloneButton.Parent = cloneGui.root
  46.    cloneButton.Size = buttonSize
  47.    cloneButton.Position = UDim2.new(0.72, 0, 0.895)
  48.    cloneButton.Label.Text = 'CLONE'
  49.    cloneButton.Name = 'CloneButton'
  50.  
  51.    -- Animation functions.
  52.    for i, button in pairs({cloneButton, copyButton}) do
  53.        button.MouseEnter:Connect(function()
  54.            button:TweenSize(UDim2.new(buttonSize.X.Scale + 0.015, 0, buttonSize.Y.Scale + 0.015, 0), 'Out', 'Quad', 0.2, true)
  55.        end)
  56.        
  57.        button.MouseLeave:Connect(function()
  58.            button:TweenSize(buttonSize, 'Out', 'Quad', 0.2, true)
  59.        end)
  60.    end
  61.    
  62.    -- Button actions.
  63.    copyButton.MouseButton1Click:Connect(copyGrid)
  64.    
  65.    cloneButton.MouseButton1Click:Connect(cloneGrid)
  66. end
  67.  
  68. function cloneGui.buildScrollingFrame()
  69.    local scrollingFrame = Instance.new('ScrollingFrame')
  70.    local uiListLayout = Instance.new('UIListLayout')
  71.    local uiPadding = Instance.new('UIPadding')
  72.    
  73.    -- Initialize scrolling frame.
  74.    scrollingFrame.Parent = cloneGui.root
  75.    scrollingFrame.AnchorPoint = Vector2.new(0.5, 0)
  76.    scrollingFrame.Position = UDim2.new(0.5, 0, 0.05, 0)
  77.    scrollingFrame.Size = UDim2.new(0.8, 0, 0.75, 0)
  78.    scrollingFrame.BackgroundTransparency = 1
  79.    scrollingFrame.BorderSizePixel = 0
  80.    scrollingFrame.ScrollBarImageColor3 = Color3.new((210 / 255), (76 / 255), (71 / 255))
  81.    scrollingFrame.ScrollBarThickness = 4
  82.    scrollingFrame.ZIndex = 3
  83.    
  84.    -- Configure layout.
  85.    uiListLayout.Parent = scrollingFrame
  86.    uiListLayout.Padding = UDim.new(0, 10)
  87.    uiPadding.Parent = scrollingFrame
  88.    uiPadding.PaddingLeft = UDim.new(0.08, 0)
  89.    uiPadding.PaddingRight = UDim.new(0.08, 0)
  90.    uiPadding.PaddingTop = UDim.new(0, 5)
  91.    
  92.    uiListLayout.Changed:Connect(function()
  93.        scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, uiListLayout.AbsoluteContentSize.Y + 10)
  94.    end)
  95.    
  96.    cloneGui.scrollingFrame = scrollingFrame
  97. end
  98.  
  99. function cloneGui.addGrid(grid)
  100.    local UIStroke = player.PlayerGui.MainGui.PaintFrame.Grid.UIStroke:Clone()
  101.    local container = Instance.new('Frame')
  102.    local preview = grid:Clone()
  103.    
  104.    -- Initialize new container.
  105.    container.Parent = cloneGui.scrollingFrame
  106.    container.Size = UDim2.new(1, 0, 1, 0)
  107.    container.SizeConstraint = Enum.SizeConstraint.RelativeXX
  108.    container.BackgroundTransparency = 0.8
  109.    container.ZIndex = 4
  110.    UIStroke.Thickness = 4.5
  111.    UIStroke.Parent = container
  112.    UIStroke.Enabled = false
  113.    
  114.    -- Clone grid into container.
  115.    preview.Parent = container
  116.    
  117.    if (cloneGui.selected == nil) then
  118.        cloneGui.selected = container
  119.        UIStroke.Enabled = true
  120.    end
  121.    
  122.    container.InputBegan:Connect(function(userInput)
  123.        if (userInput.UserInputType == Enum.UserInputType.MouseButton1) then
  124.            cloneGui.selected.UIStroke.Enabled = false
  125.            UIStroke.Enabled = true
  126.            cloneGui.selected = container
  127.        end
  128.    end)
  129. end
  130.  
  131. function copyGrid()
  132.    if (cloneGui.selected ~= nil) then
  133.        local target = cloneGui.selected.Grid
  134.        local destination = player.PlayerGui.MainGui.PaintFrame.Grid
  135.        
  136.        for i = 1, 1024 do
  137.            destination[i].BackgroundColor3 = target[i].BackgroundColor3
  138.        end
  139.    end
  140. end
  141.  
  142. function cloneGrid()
  143.    local remote = game.ReplicatedStorage.Remotes.CreateArt
  144.    local frameColor = "ffffff"
  145.    local frame = "Starter Frame"
  146.    local name = "a"
  147.    local cells = {}
  148.    
  149.    local grid = cloneGui.selected.Grid
  150.    for i = 1, 1024 do
  151.       cells[i] = grid[i].BackgroundColor3:ToHex()
  152.    end
  153.  
  154.    local payload = {}
  155.    payload["FrameColor"] = frameColor
  156.    payload["Frame"] = frame
  157.    payload["Name"] = name
  158.    payload["Cells"] = cells
  159.    
  160.    remote:InvokeServer(payload)
  161. end
  162.  
  163. function refreshGrids()
  164.    local objects = game.Workspace.Plots:GetDescendants()
  165.    for i, v in ipairs(objects) do
  166.        if (v.Name == 'Grid' and v.ClassName == 'Frame' and not collectionService:HasTag(v, 'cloned')) then
  167.            if (#v:GetChildren() == 1027) then
  168.                collectionService:AddTag(v, 'cloned')
  169.                cloneGui.addGrid(v)
  170.            end
  171.        end
  172.    end
  173. end
  174.  
  175. cloneGui.buildRoot()
  176. cloneGui.buildButtons()
  177. cloneGui.buildScrollingFrame()
  178.  
  179. while (_G.refreshing) do
  180.    refreshGrids()
  181.    wait(0.1)
  182. end
Add Comment
Please, Sign In to add comment