Advertisement
Gerard_games

Untitled

Apr 1st, 2021
1,067
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. local function reverseColor(color)
  2.     local h, s, v = Color3.toHSV(color);
  3.     if(h == 0 and s == 0) then
  4.         return Color3.fromHSV(h, s, 1 - v);        
  5.     end;
  6.  
  7.     return color;
  8. end;
  9.  
  10. local old;
  11. old = hookfunction(Drawing.new, function(type)
  12.     local obj = old(type);
  13.     if(type == 'Text') then
  14.         obj.OutlineColor = reverseColor(obj.OutlineColor);
  15.     end;
  16.  
  17.     local fakeObj = setmetatable({}, {
  18.         __index = function(self, i)
  19.             return obj[i];
  20.         end,
  21.  
  22.         __newindex = function(self, p, v)
  23.             if(p == 'Color' or p == 'OutlineColor') then
  24.                 v = reverseColor(v);
  25.             end;
  26.        
  27.             obj[p] = v;
  28.         end;
  29.     });
  30.  
  31.     return fakeObj;
  32. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement