Leodu41

ColorPicker

Oct 27th, 2020
125
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Cpicker = Instance.new("Frame")
  2. local Slide = Instance.new("Frame")
  3. local UIListLayout = Instance.new("UIListLayout")
  4. local ColorPickerI = Instance.new("ImageLabel")
  5. local Value = Instance.new("ImageLabel")
  6. local Marker = Instance.new("Frame")
  7. local RGB = Instance.new("ImageLabel")
  8. local Marker_2 = Instance.new("Frame")
  9. local Preview = Instance.new("ImageLabel")
  10. local Info = Instance.new("Frame")
  11. local Apply = Instance.new("TextButton")
  12. local Background = Instance.new("ImageLabel")
  13. local Background_2 = Instance.new("ImageLabel")
  14. local Menu = Instance.new("ImageButton")
  15. local Title = Instance.new("TextLabel")
  16. local Title_2 = Instance.new("TextLabel")
  17. local TextButton = Instance.new("TextButton")
  18.  
  19. Cpicker.Name = "Cpicker"
  20. Cpicker.Parent = game.CoreGui.Vape
  21. Cpicker.BackgroundColor3 = Color3.fromRGB(0, 255, 162)
  22. Cpicker.BorderSizePixel = 0
  23. Cpicker.Position = UDim2.new(0.559482813, 0, 0.320328534, 0)
  24. Cpicker.Size = UDim2.new(0, 196, 0, 41)
  25.  
  26. Slide.Name = "Slide"
  27. Slide.Parent = Cpicker
  28. Slide.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  29. Slide.BackgroundTransparency = 0.500
  30. Slide.BorderSizePixel = 0
  31. Slide.ClipsDescendants = true
  32. Slide.Position = UDim2.new(0.023292074, 0, 0.977238715, 0)
  33. Slide.Size = UDim2.new(0, 186, 0, 144)
  34.  
  35. UIListLayout.Parent = Slide
  36. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  37.  
  38. ColorPickerI.Name = "ColorPickerI"
  39. ColorPickerI.Parent = Slide
  40. ColorPickerI.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  41. ColorPickerI.BackgroundTransparency = 1.000
  42. ColorPickerI.Size = UDim2.new(0, 186, 0, 144)
  43. ColorPickerI.Image = "rbxassetid://3570695787"
  44. ColorPickerI.ImageColor3 = Color3.fromRGB(50, 50, 50)
  45. ColorPickerI.ScaleType = Enum.ScaleType.Slice
  46. ColorPickerI.SliceCenter = Rect.new(100, 100, 100, 100)
  47.  
  48. Value.Name = "Value"
  49. Value.Parent = ColorPickerI
  50. Value.AnchorPoint = Vector2.new(0.5, 0)
  51. Value.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  52. Value.BorderColor3 = Color3.fromRGB(40, 40, 40)
  53. Value.BorderSizePixel = 2
  54. Value.Position = UDim2.new(0.875926912, 0, 0.0362744816, 0)
  55. Value.Size = UDim2.new(0.152402624, 0, 0.693020642, 0)
  56. Value.ZIndex = 4
  57. Value.Image = "rbxassetid://359311684"
  58. Value.SliceCenter = Rect.new(10, 10, 90, 90)
  59.  
  60. Marker.Name = "Marker"
  61. Marker.Parent = Value
  62. Marker.AnchorPoint = Vector2.new(0.5, 0.5)
  63. Marker.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  64. Marker.BorderColor3 = Color3.fromRGB(0, 0, 0)
  65. Marker.BorderSizePixel = 2
  66. Marker.Position = UDim2.new(0.5, 0, 0, 0)
  67. Marker.Size = UDim2.new(1, 4, 0, 2)
  68. Marker.ZIndex = 5
  69.  
  70. RGB.Name = "RGB"
  71. RGB.Parent = ColorPickerI
  72. RGB.AnchorPoint = Vector2.new(0.5, 0)
  73. RGB.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  74. RGB.BorderColor3 = Color3.fromRGB(40, 40, 40)
  75. RGB.BorderSizePixel = 2
  76. RGB.Position = UDim2.new(0.408735216, 0, 0.0362745039, 0)
  77. RGB.Size = UDim2.new(0.703724325, 0, 0.693020642, 0)
  78. RGB.ZIndex = 4
  79. RGB.Image = "rbxassetid://1433361550"
  80. RGB.SliceCenter = Rect.new(10, 10, 90, 90)
  81.  
  82. Marker_2.Name = "Marker"
  83. Marker_2.Parent = RGB
  84. Marker_2.AnchorPoint = Vector2.new(0.5, 0.5)
  85. Marker_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  86. Marker_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  87. Marker_2.BorderSizePixel = 2
  88. Marker_2.Position = UDim2.new(0.5, 0, 1, 0)
  89. Marker_2.Size = UDim2.new(0, 4, 0, 4)
  90. Marker_2.ZIndex = 5
  91.  
  92. Preview.Name = "Preview"
  93. Preview.Parent = ColorPickerI
  94. Preview.AnchorPoint = Vector2.new(0.5, 0)
  95. Preview.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  96. Preview.BorderColor3 = Color3.fromRGB(40, 40, 40)
  97. Preview.BorderSizePixel = 2
  98. Preview.Position = UDim2.new(0.504234493, 0, 0.77313441, 0)
  99. Preview.Size = UDim2.new(0.895787001, 0, 0.0893596485, 0)
  100. Preview.ZIndex = 4
  101. Preview.SliceCenter = Rect.new(10, 10, 90, 90)
  102.  
  103. Info.Name = "Info"
  104. Info.Parent = ColorPickerI
  105. Info.AnchorPoint = Vector2.new(0.5, 0)
  106. Info.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  107. Info.BackgroundTransparency = 1.000
  108. Info.Position = UDim2.new(0.5, 0, 1.03699994, 0)
  109. Info.Size = UDim2.new(1, 0, 0.296299994, 0)
  110.  
  111. Apply.Name = "Apply"
  112. Apply.Parent = Info
  113. Apply.AnchorPoint = Vector2.new(0.5, 0.5)
  114. Apply.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  115. Apply.BackgroundTransparency = 0.400
  116. Apply.BorderSizePixel = 0
  117. Apply.Position = UDim2.new(0.509950399, 0, -0.300898612, 0)
  118. Apply.Size = UDim2.new(0.907218456, 0, 0.352050453, 0)
  119. Apply.ZIndex = 7
  120. Apply.Font = Enum.Font.SourceSansBold
  121. Apply.Text = "APPLY"
  122. Apply.TextColor3 = Color3.fromRGB(255, 255, 255)
  123. Apply.TextSize = 13.000
  124. Apply.TextWrapped = true
  125.  
  126. Background.Name = "Background"
  127. Background.Parent = Info
  128. Background.AnchorPoint = Vector2.new(0.5, 0.5)
  129. Background.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  130. Background.BackgroundTransparency = 1.000
  131. Background.Position = UDim2.new(0.5, 0, 0.5, 0)
  132. Background.Size = UDim2.new(1, 0, 1, 0)
  133. Background.Visible = false
  134. Background.ZIndex = 4
  135. Background.Image = "rbxassetid://399416860"
  136. Background.ImageColor3 = Color3.fromRGB(60, 60, 60)
  137. Background.ScaleType = Enum.ScaleType.Slice
  138. Background.SliceCenter = Rect.new(10, 10, 90, 90)
  139.  
  140. Background_2.Name = "Background"
  141. Background_2.Parent = Background
  142. Background_2.AnchorPoint = Vector2.new(0.5, 0.5)
  143. Background_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  144. Background_2.BackgroundTransparency = 1.000
  145. Background_2.Position = UDim2.new(0.5, 0, 0.5, 0)
  146. Background_2.Size = UDim2.new(1, 4, 1, 4)
  147. Background_2.ZIndex = 3
  148. Background_2.Image = "rbxassetid://399416860"
  149. Background_2.ImageColor3 = Color3.fromRGB(40, 40, 40)
  150. Background_2.ScaleType = Enum.ScaleType.Slice
  151. Background_2.SliceCenter = Rect.new(10, 10, 90, 90)
  152.  
  153. Menu.Name = "Menu"
  154. Menu.Parent = Cpicker
  155. Menu.BackgroundColor3 = Color3.fromRGB(54, 48, 84)
  156. Menu.BackgroundTransparency = 1.000
  157. Menu.BorderColor3 = Color3.fromRGB(255, 255, 255)
  158. Menu.BorderSizePixel = 0
  159. Menu.Position = UDim2.new(-0.00287550315, 0, 0.0205517281, 0)
  160. Menu.Size = UDim2.new(0, 41, 0, 39)
  161. Menu.Image = "http://www.roblox.com/asset/?id=5402357141"
  162. Menu.ScaleType = Enum.ScaleType.Fit
  163.  
  164. Title.Name = "Title"
  165. Title.Parent = Cpicker
  166. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  167. Title.BackgroundTransparency = 1.000
  168. Title.Position = UDim2.new(0.230000004, 0, 0.282999992, -1)
  169. Title.Size = UDim2.new(0, 101, 0, 20)
  170. Title.ZIndex = 12
  171. Title.Font = Enum.Font.FredokaOne
  172. Title.Text = "Color Picker"
  173. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  174. Title.TextScaled = true
  175. Title.TextSize = 14.000
  176. Title.TextWrapped = true
  177.  
  178. Title_2.Name = "Title"
  179. Title_2.Parent = Cpicker
  180. Title_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  181. Title_2.BackgroundTransparency = 1.000
  182. Title_2.Position = UDim2.new(0.241999999, 0, 0.261000007, 0)
  183. Title_2.Size = UDim2.new(0, 101, 0, 20)
  184. Title_2.Font = Enum.Font.FredokaOne
  185. Title_2.Text = "Color Picker"
  186. Title_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  187. Title_2.TextScaled = true
  188. Title_2.TextSize = 14.000
  189. Title_2.TextWrapped = true
  190.  
  191. TextButton.Parent = Cpicker
  192. TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  193. TextButton.BackgroundTransparency = 1.000
  194. TextButton.Position = UDim2.new(0.71938777, 0, 0.243902206, 0)
  195. TextButton.Size = UDim2.new(0, 55, 0, 18)
  196. TextButton.Font = Enum.Font.Bangers
  197. TextButton.Text = "-"
  198. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  199. TextButton.TextScaled = true
  200. TextButton.TextSize = 14.000
  201. TextButton.TextWrapped = true
  202.  
  203. -- Scripts:
  204.  
  205. local function MJIGHN_fake_script() -- ColorPickerI.ColorMain
  206.     local script = Instance.new('LocalScript', ColorPickerI)
  207.  
  208.     local player = game.Players.LocalPlayer
  209.     local mouse = player:GetMouse()
  210.    
  211.     local rgb = script.Parent:WaitForChild("RGB")
  212.     local value = script.Parent:WaitForChild("Value")
  213.     local preview = script.Parent:WaitForChild("Preview")
  214.    
  215.    
  216.     local selectedColor = Color3.fromHSV(1,1,1)
  217.     local colorData = {1,1,1}
  218.     local mouse1down = false
  219.    
  220.     local Apply  = script.Parent.Info.Apply
  221.    
  222.     local function setColor(hue,sat,val)
  223.         colorData = {hue or colorData[1],sat or colorData[2],val or colorData[3]}
  224.         selectedColor = Color3.fromHSV(colorData[1],colorData[2],colorData[3])
  225.         preview.BackgroundColor3 = selectedColor
  226.         value.ImageColor3 = Color3.fromHSV(colorData[1],colorData[2],1)
  227.     end
  228.    
  229.     local function inBounds(frame)
  230.         local x,y = mouse.X - frame.AbsolutePosition.X,mouse.Y - frame.AbsolutePosition.Y
  231.         local maxX,maxY = frame.AbsoluteSize.X,frame.AbsoluteSize.Y
  232.         if x >= 0 and y >= 0 and x <= maxX and y <= maxY then
  233.             return x/maxX,y/maxY
  234.         end
  235.     end
  236.    
  237.     local function updateRGB()
  238.         if mouse1Down then
  239.             local x,y = inBounds(rgb)
  240.             if x and y then
  241.                 rgb:WaitForChild("Marker").Position = UDim2.new(x,0,y,0)
  242.                 setColor(1 - x,1 - y)
  243.             end
  244.            
  245.             local x,y = inBounds(value)
  246.             if x and y then
  247.                 value:WaitForChild("Marker").Position = UDim2.new(0.5,0,y,0)
  248.                 setColor(nil,nil,1 - y)
  249.             end
  250.         end
  251.     end
  252.    
  253.     mouse.Move:connect(updateRGB)
  254.    
  255.     mouse.Button1Down:connect(function()mouse1Down = true end)
  256.     mouse.Button1Up:connect(function()mouse1Down = false end)
  257.    
  258.     Apply.MouseButton1Click:Connect(function()
  259.         script.Parent.Parent.Parent.Parent.Visual.BackgroundColor3 = selectedColor
  260.         script.Parent.Parent.Parent.Parent.Settings.BackgroundColor3 = selectedColor
  261.         script.Parent.Parent.Parent.Parent.Main.BackgroundColor3 = selectedColor
  262.         script.Parent.Parent.Parent.Parent.Credits.BackgroundColor3 = selectedColor
  263.         script.Parent.Parent.Parent.Parent.Utility.BackgroundColor3 = selectedColor
  264.     end)
  265.    
  266.    
  267. end
  268. coroutine.wrap(MJIGHN_fake_script)()
  269. local function JSQC_fake_script() -- Menu.LocalScript
  270.     local script = Instance.new('LocalScript', Menu)
  271.  
  272.     function openGui()
  273.         script.Parent.Parent.Slide:TweenSize(UDim2.new(0, 186,0, 144), "Out", "Quint", 0.7, true)
  274.     end
  275.    
  276.     function closeGui()
  277.         script.Parent.Parent.Slide:TweenSize(UDim2.new(0,186,0,0), "Out", "Quint", 0.7, false)
  278.     end
  279.    
  280.     script.Parent.MouseButton1Down:Connect(function()
  281.         if script.Parent.Parent.Slide.Size == UDim2.new(0, 186, 0, 144) then
  282.             closeGui()
  283.         else
  284.             openGui()
  285.         end
  286.     end)
  287.    
  288.    
  289. end
  290. coroutine.wrap(JSQC_fake_script)()
  291. local function SVKXTSM_fake_script() -- Cpicker.Dragify
  292.     local script = Instance.new('LocalScript', Cpicker)
  293.  
  294.     local UIS = game:GetService("UserInputService")
  295.     function dragify(Frame)
  296.         dragToggle = nil
  297.         local dragSpeed = 0
  298.         dragInput = nil
  299.         dragStart = nil
  300.         local dragPos = nil
  301.         function updateInput(input)
  302.             local Delta = input.Position - dragStart
  303.             local Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  304.             game:GetService("TweenService"):Create(Frame, TweenInfo.new(0.25), {Position = Position}):Play()
  305.         end
  306.         Frame.InputBegan:Connect(function(input)
  307.             if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and UIS:GetFocusedTextBox() == nil then
  308.                 dragToggle = true
  309.                 dragStart = input.Position
  310.                 startPos = Frame.Position
  311.                 input.Changed:Connect(function()
  312.                     if input.UserInputState == Enum.UserInputState.End then
  313.                         dragToggle = false
  314.                     end
  315.                 end)
  316.             end
  317.         end)
  318.         Frame.InputChanged:Connect(function(input)
  319.             if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  320.                 dragInput = input
  321.             end
  322.         end)
  323.         game:GetService("UserInputService").InputChanged:Connect(function(input)
  324.             if input == dragInput and dragToggle then
  325.                 updateInput(input)
  326.             end
  327.         end)
  328.     end
  329.    
  330.     dragify(script.Parent)
  331. end
  332. coroutine.wrap(SVKXTSM_fake_script)()
  333. local function GRXBYB_fake_script() -- TextButton.LocalScript
  334.     local script = Instance.new('LocalScript', TextButton)
  335.  
  336.     script.Parent.MouseButton1Click:Connect(function()
  337.         script.Parent.Parent.Slide:TweenSize(UDim2.new(0,186,0,0), "Out", "Quint", 0.7, false)
  338.         wait(0.7)
  339.         script.Parent.Parent.Parent.Credits.Visible = false
  340.     end)
  341. end
  342. coroutine.wrap(GRXBYB_fake_script)()
  343.  
RAW Paste Data Copied