rrixh

rate my avatar

Oct 12th, 2023
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.47 KB | None | 0 0
  1. _G.Enabled = true
  2. if not _G.Enabled then
  3.     d()
  4. end
  5.  
  6. local camera = game.Workspace.CurrentCamera
  7. local screensize = camera.ViewportSize
  8.  
  9.  
  10. local updater = game:GetService("ReplicatedStorage").CustomiseBooth
  11. function update(text)
  12.     local args = {
  13.         [1] = "Update",
  14.         [2] = {
  15.             ["DescriptionText"] = text,
  16.             ["ImageId"] = 0
  17.         }
  18.     }
  19.  
  20.     updater:FireServer(unpack(args))
  21. end
  22.  
  23. local shirtpooll = {"๐Ÿง€", "๐Ÿ‘›", "๐Ÿ’š", "๐Ÿ‹"}
  24. local shirtpool = {
  25.     ["๐Ÿง€"] = "๐Ÿ””",
  26.     ["๐Ÿ‘›"] = "๐Ÿ”ด",
  27.     ["๐Ÿ’š"] = "๐ŸŒณ",
  28.     ["๐Ÿ‹"] = "๐Ÿ”ต",
  29. }
  30.  
  31. local colours = {
  32.     ["๐Ÿ–ค"] = {0, 0, 0},
  33.     ["๐Ÿ’ฟ"] = {192, 192, 192},
  34.     ["๐ŸŒ‘"] = {128, 128, 128},
  35.     ["๐Ÿค"] = {255, 255, 255},
  36.     ["๐Ÿ’"]=  {128, 0, 0},
  37.     ["โค๏ธ"] = {255, 0, 0},
  38.     ["๐Ÿ’œ"] = {128, 0, 128},
  39.     ["๐ŸŒธ"] = {255, 0, 255},
  40.     ["๐ŸŒณ"] = {0, 128, 0},
  41.     ["๐Ÿ“—"] = {0, 255, 0},
  42.     ["๐Ÿฆ–"] = {128, 128, 0},
  43.     ["๐Ÿ‹"] = {255, 255, 0},
  44.     ["๐Ÿ”ต"] = {0, 0, 128},
  45.     ["๐Ÿ“˜"] = {0, 0, 255},
  46.     ["๐Ÿงช"] = {0, 128, 128},
  47.     ["๐Ÿ‹"] = {0, 255, 255},
  48. }
  49.  
  50. function getcolorforrange(r, g, b)
  51.     local closestint = 100000000000000000
  52.     local closestcolour = ""
  53.  
  54.     for i, colour in pairs(colours) do
  55.         local totalint = ((r - colour[1])^2) + ((g - colour[2])^2) + ((b - colour[3])^2) ^ (1/2)
  56.         if totalint < closestint then
  57.             closestint = totalint
  58.             closestcolour = i
  59.         end
  60.     end
  61.     return closestcolour
  62. end
  63.  
  64. local mx = 61
  65. local my = 30
  66. while _G.Enabled do
  67.     local topost = ""
  68.     for y=1, screensize.y, math.floor(screensize.y / my) do
  69.         for x=1, screensize.x, math.floor(screensize.x / mx) do
  70.             local ray = camera:ScreenPointToRay(x, y)
  71.             local rayResult = game.Workspace:Raycast(ray.Origin, ray.Direction * 5000)
  72.             local rc
  73.             if rayResult then
  74.                 local ri = rayResult.Instance
  75.                 if ri.Parent:FindFirstChild("Shirt") then
  76.                     if ri.Parent:FindFirstChild("snes") then
  77.                         local sc = ri.Parent.snes.Value
  78.                         topost = topost .. shirtpooll[sc]
  79.                     else
  80.                         local sval = Instance.new("IntValue")
  81.                         sval.Name = "snes"
  82.                         sval.Parent = rayResult.Instance.Parent
  83.                         sval.Value = math.random(1, #shirtpooll)
  84.                         topost = topost .. shirtpooll[sval.Value]
  85.                     end
  86.                 elseif ri.Parent:FindFirstChild("Pants") then
  87.                     if ri.Parent:FindFirstChild("snes") then
  88.                         local sc = ri.Parent.snes.Value
  89.                         topost = topost .. shirtpool[shirtpooll[sc]]
  90.                     else
  91.                         local sval = Instance.new("IntValue")
  92.                         sval.Name = "snes"
  93.                         sval.Parent = rayResult.Instance.Parent
  94.                         sval.Value = math.random(1, #shirtpooll)
  95.                         topost = topost .. shirtpool[shirtpooll[sval.Value]]
  96.                     end
  97.                 else
  98.                     rc = ri.Color
  99.                     topost = topost .. getcolorforrange(rc.R * 255, rc.G * 255, rc.B * 255)
  100.                 end
  101.             else
  102.                 topost = topost .. "๐Ÿ“˜"
  103.             end
  104.         end
  105.         topost = topost .. "\n"
  106.     end
  107.     coroutine.wrap(update)(topost)
  108.     task.wait(.03)
  109. end
Add Comment
Please, Sign In to add comment