Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local url = "http://pastebin.com/raw/g8SXwWxE";
- local search = "http://google.com/search?q=&ARG&+in+hex&oq=16777215+in+hex&aqs=chrome..69i57.6678j0j7&sourceid=chrome&es_sm=93&ie=UTF-8";
- local http = game:GetService("HttpService");
- local raw = http:GetAsync(url);
- local Data = {};
- local width = 105;
- local height = 65;
- for a,b,c in raw:gmatch("%((.-)%)%((.-)%)%((.-)%)|") do
- Data[#Data+1]={x=a,y=b,dat=c}
- end
- function hexToRGB(hex)
- if(string.len(hex) == 3) then hex = hex .. hex end
- if(string.len(hex) ~= 6) then return Color3.new(1, 1, 1) end
- local r = tonumber(string.sub(hex, 1, 2), 16)
- local g = tonumber(string.sub(hex, 3, 4), 16)
- local b = tonumber(string.sub(hex, 5, 6), 16)
- if not r or not g or not b then return Color3.new(1, 1, 1) end
- r=r/255;
- g=g/255;
- b=b/255;
- return r,g,b
- end
- function tohex(num)
- local hexstr = '0123456789abcdef'
- local s = '';
- while num > 0 do
- local mod = math.fmod(num,16)
- s = string.sub(hexstr,mod+1,mod+1)..s
- num = math.floor(num/16)
- end
- if s == '' then s = '0' end
- return s
- end
- local Group = Instance.new("Model",Workspace);
- for i = 1,#Data,1 do
- local data = Data[i];
- local x,y = data.x,data.y;
- local argb = data.dat:gsub("%-","");
- red,green,blue = hexToRGB(tohex(tonumber(argb)));
- local part = Instance.new("Part",Group);
- part.Material = "SmoothPlastic";
- part.FormFactor = "Custom";
- part.Size=Vector3.new(1,1,1);
- part.Anchored = true;
- part.CFrame = CFrame.new(x,100-y,0);
- part.BrickColor = BrickColor.new(Color3.new(red,green,blue));
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement