Booga Booga. Gui cheat with a bunch of cool features called Tribooga
local library = {
backgroundImage = game:HttpGet("https://cdn.pixabay.com/photo/2017/08/30/12/23/black-2696879_1280.jpg"),
backgroundOutlineImage = game:HttpGet("https://wallpaperaccess.com/full/1556608.jpg"),
logoImage = game:HttpGet("https://i.ibb.co/5FJD5Vd/Icon.png"),
mainColor = Color3.fromRGB(255, 175, 0),
uiName = "Tribooga"
}
local uis = game:GetService("UserInputService")
local rs = game:GetService("RunService")
local ContextActionService = game:GetService("ContextActionService")
local mouse1 = Enum.UserInputType.MouseButton1;
local mouse2 = Enum.UserInputType.MouseButton2;
local cam = workspace.CurrentCamera;
local vp = cam.ViewportSize;
local v2new = Vector2.new;
local old = Drawing.new
local insert = table.insert;
local colorPickerOpen = false;
local dropDownOpen = false;
local function mouseOnDrawing(drawing)
local mouse = uis:GetMouseLocation()
local x = (mouse.x >= drawing.Position.x and mouse.x <= drawing.Position.x + drawing.Size.x)
local y = (mouse.y >= drawing.Position.y and mouse.y <= drawing.Position.y + drawing.Size.y)
return ((x and y) and drawing.Visible)
end
local function mouseOnDrawingX(drawing)
local mouse = uis:GetMouseLocation()
local x = (mouse.x >= drawing.Position.x and mouse.x <= drawing.Position.x + drawing.Size.x)
return (x and drawing.Visible)
end
local function mouseOnText(Text)
local mouse = uis:GetMouseLocation()
local x = (mouse.x >= Text.Position.x and mouse.x <= Text.Position.x + Text.TextBounds.x)
local y = (mouse.y >= Text.Position.y and mouse.y <= Text.Position.y + Text.TextBounds.y)
return ((x and y) and Text.Visible)
end
local function mouseDown(x)
if x == 1 then
return uis:IsMouseButtonPressed(mouse1)
else
return uis:IsMouseButtonPressed(mouse2)
end
end
local sqrt = math.sqrt;
local function distance( x1, y1, x2, y2 )
return sqrt( (x2-x1)^2 + (y2-y1)^2 )
end
local function HSVtoRGB(hsv)
local color3 = hsv
local r = math.floor(color3.R * 255)
local g = math.floor(color3.G * 255)
local b = math.floor(color3.B * 255)
return Color3.new(r, g, b)
end
local drawnObjects = { }
local draw = function(class)
if class == "Button" then
local Button, ghost_Button = newproxy(true), {
Text = "",
TextSize = 13,
TextFont = Drawing.Fonts.Plex,
Outline = true,
TextOutline = true,
TextColor = Color3.new(1, 1, 1),
OutlineTextColor = Color3.new(0, 0, 0),
ButtonColor = Color3.new(0.25, 0.25, 0.25),
ButtonHoverColor = Color3.new(0.3, 0.3, 0.3),
ButtonPressedColor = Color3.new(0.4, 0.4, 0.4),
OutlineButtonColor = library.mainColor,
Size = Vector2.new(0, 0),
Position = Vector2.new(0, 0),
OnClick = function() end,
Visible = true,
ZIndex = 0,
Transparency = 1
}
local mainSquare = old("Square")
mainSquare.Filled = true;
mainSquare.Color = ghost_Button.ButtonColor;
drawnObjects[#drawnObjects + 1] = mainSquare
local outerSquare = old("Square")
outerSquare.Thickness = 1;
outerSquare.Color = ghost_Button.OutlineButtonColor;
drawnObjects[#drawnObjects + 1] = outerSquare
local Text = old("Text")
Text.Center = true;
Text.Size = ghost_Button.TextSize;
Text.Font = ghost_Button.TextFont;
Text.Color = ghost_Button.TextColor;
Text.OutlineColor = ghost_Button.OutlineTextColor;
Text.Outline = ghost_Button.TextOutline;
Text.Visible = ghost_Button.Visible;
Text.ZIndex = 2;
drawnObjects[#drawnObjects + 1] = Text
coroutine.wrap(function()
local t = false;
while wait() do
if not mainSquare.Position then break end
if t and mouseDown(1) then
mainSquare.Color = ghost_Button.ButtonPressedColor;
repeat wait()
if mouseOnDrawing(mainSquare) then
mainSquare.Color = ghost_Button.ButtonPressedColor;
else
mainSquare.Color = ghost_Button.ButtonHoverColor;
end
until not mouseDown(1)
if mouseOnDrawing(mainSquare) then
ghost_Button.OnClick()
end
elseif not dropDownOpen and not colorPickerOpen and mouseOnDrawing(mainSquare) and not mouseDown(1) then
mainSquare.Color = ghost_Button.ButtonHoverColor;
t = true;
elseif not t and mouseOnDrawing(mainSquare) and mouseDown(1) then
elseif not mouseOnDrawing(mainSquare) then
mainSquare.Color = ghost_Button.ButtonColor;
t = false;
end
end
end)()
local ButtonMT = getmetatable(Button)
ButtonMT.__index = ghost_Button;
ButtonMT.__newindex = (function(t, k, v)
ghost_Button[k] = v;
if k == "Size" then
mainSquare.Size = v;
outerSquare.Size = v;
Text.Position = Vector2.new(mainSquare.Position.X + (v.X / 2), mainSquare.Position.Y + (v.Y / 2) - 8)
elseif k == "Position" then
mainSquare.Position = v;
outerSquare.Position = v;
Text.Position = Vector2.new(v.X + (mainSquare.Size.X / 2), v.Y + (mainSquare.Size.Y / 2) - 8)
elseif k == "Visible" then
mainSquare.Visible = v;
if ghost_Button.Outline then
outerSquare.Visible = v;
end
Text.Visible = v;
elseif k == "ButtonColor" then
mainSquare.Color = v;
elseif k == "OutlineButtonColor" then
outerSquare.Color = v;
elseif k == "Outline" then
if ghost_Button.Visible then
outerSquare.Visible = v;
end
elseif k == "TextOutline" then
Text.Outline = v;
elseif k == "Text" then
Text.Text = v;
elseif k == "Transparency" then
mainSquare.Transparency = v;
outerSquare.Transparency = v;
Text.Transparency = v;
elseif k == "ZIndex" then
mainSquare.ZIndex = v;
outerSquare.ZIndex = v;
Text.ZIndex = v;
elseif k == "TextFont" then
Text.Font = v;
elseif k == "TextSize" then
Text.Size = v;
elseif k == "TextColor" then
Text.Color = v;
elseif k == "OutlineTextColor" then
Text.OutlineColor = v;
end
end)
ButtonMT.__namecall = (function()
local method = getnamecallmethod();
if method == "Remove" or method == "Destroy" then
mainSquare:Remove()
outerSquare:Remove()
Text:Remove()
end
end)
drawnObjects[#drawnObjects + 1] = Button
return Button;
elseif class == "Tab" then
local Tab, ghost_Tab = newproxy(true), {
Text = "",
TextSize = 13,
Font = Drawing.Fonts.Plex,
Outline = true,
Color = Color3.new(1, 1, 1),
OutlineTextColor = Color3.new(0, 0, 0),
Position = Vector2.new(0, 0),
OnClick = function() end,
Visible = true,
ZIndex = 0,
Transparency = 1
}
local Text = old("Text")
Text.Size = ghost_Tab.TextSize;
Text.Font = ghost_Tab.Font;
Text.Color = ghost_Tab.Color;
Text.OutlineColor = ghost_Tab.OutlineTextColor;
Text.Outline = ghost_Tab.Outline;
Text.Visible = ghost_Tab.Visible;
Text.Position = ghost_Tab.Position;
Text.ZIndex = 2;
drawnObjects[#drawnObjects + 1] = Text
coroutine.wrap(function()
local t = false;
while wait() do
if t and mouseDown(1) then
repeat wait() until not mouseDown(1)
if mouseOnText(Text) then
ghost_Tab.OnClick()
end
elseif mouseOnText(Text) and not mouseDown(1) then
t = true;
elseif not mouseOnText(Text) then
t = false;
end
end
end)()
local TabMT = getmetatable(Tab)
TabMT.__index = ghost_Tab;
TabMT.__newindex = (function(t, k, v)
ghost_Tab[k] = v;
if k == "Position" then
Text.Position = v;
elseif k == "Visible" then
Text.Visible = v;
elseif k == "Outline" then
Text.Outline = v;
elseif k == "Text" then
Text.Text = v;
ghost_Tab.TextBounds = Text.TextBounds;
elseif k == "Transparency" then
Text.Transparency = v;
elseif k == "ZIndex" then
Text.ZIndex = v;
elseif k == "Font" then
Text.Font = v;
elseif k == "TextSize" then
Text.Size = v;
elseif k == "Color" then
Text.Color = v;
elseif k == "OutlineTextColor" then
Text.OutlineColor = v;
end
end)
TabMT.__namecall = (function()
local method = getnamecallmethod();
if method == "Remove" or method == "Destroy" then
Text:Remove()
end
end)
drawnObjects[#drawnObjects + 1] = Tab
return Tab;
elseif class == "Slider" then
local Slider, ghost_Slider = newproxy(true), {
Text = "",
TextSize = 13,
TextFont = Drawing.Fonts.Plex,
Min = 0,
Max = 10,
Default = 5,
Outline = true,
TextOutline = true,
TextColor = Color3.new(1, 1, 1),
OutlineTextColor = Color3.new(0, 0, 0),
SliderColor = Color3.new(0.2, 0.2, 0.2),
SliderPickedColor = library.mainColor,
OutlineSliderColor = library.mainColor,
Size = Vector2.new(0, 0),
Position = Vector2.new(0, 0),
OnClick = function() end,
Visible = true,
ZIndex = 0,
Transparency = 1
}
local mainSquare = old("Square")
mainSquare.Filled = true;
mainSquare.Color = ghost_Slider.SliderColor;
drawnObjects[#drawnObjects + 1] = mainSquare
local pickedSquare = old("Square")
pickedSquare.Filled = true;
pickedSquare.Color = ghost_Slider.SliderPickedColor;
drawnObjects[#drawnObjects + 1] = pickedSquare
local outerSquare = old("Square")
outerSquare.Thickness = 1;
outerSquare.Color = ghost_Slider.OutlineSliderColor;
drawnObjects[#drawnObjects + 1] = outerSquare
local Text = old("Text")
Text.Center = true;
Text.Size = ghost_Slider.TextSize;
Text.Font = ghost_Slider.TextFont;
Text.Color = ghost_Slider.TextColor;
Text.OutlineColor = ghost_Slider.OutlineTextColor;
Text.Outline = ghost_Slider.TextOutline;
Text.Text = ghost_Slider.Text .. " [" .. tostring(ghost_Slider.Default) .. " ]";
Text.ZIndex = 2;
drawnObjects[#drawnObjects + 1] = Text
local VALUE = ghost_Slider.Default;
coroutine.wrap(function()
local t = false;
while rs.RenderStepped:wait() do
if not mainSquare.Position then break end
if t and mouseDown(1) then
local mouse = uis:GetMouseLocation()
local min, max = ghost_Slider.Min, ghost_Slider.Max;
local size_x = math.clamp(mouse.X-mainSquare.Position.X,0,mainSquare.Size.X)
local v = ((size_x/mainSquare.Size.X)*(max-min))+min;
pickedSquare.Size = v2new(size_x, pickedSquare.Size.Y)
VALUE = math.floor(v+.5)
Text.Text = ghost_Slider.Text .. " [" .. tostring(VALUE) .. "]";
ghost_Slider.OnClick(v)
elseif not dropDownOpen and ((ghost_Slider.Text == "R" or ghost_Slider.Text == "G" or ghost_Slider.Text == "B") or not colorPickerOpen) and mouseOnDrawing(mainSquare) and not mouseDown(1) then
t = true;
elseif not mouseOnDrawing(mainSquare) then
t = false;
end
end
end)()
local SliderMT = getmetatable(Slider)
SliderMT.__index = ghost_Slider;
SliderMT.__newindex = (function(t, k, v)
ghost_Slider[k] = v;
if k == "Default" then
Text.Text = ghost_Slider.Text .. " [" .. tostring(v) .. "]";
elseif k == "Size" then
mainSquare.Size = v2new(v.X, v.Y)
pickedSquare.Size = v2new(0, v.Y)
outerSquare.Size = v2new(v.X, v.Y)
Text.Position = v2new(mainSquare.Position.X + (v.X / 2), mainSquare.Position.Y + (v.Y / 2) - 7)
elseif k == "Position" then
mainSquare.Position = v2new(v.X, v.Y)
pickedSquare.Position = v2new(v.X, v.Y)
outerSquare.Position = v2new(v.X, v.Y)
Text.Position = v2new(v.X + (mainSquare.Size.X / 2), v.Y + (mainSquare.Size.Y / 2) - 7)
elseif k == "Visible" then
mainSquare.Visible = v;
pickedSquare.Visible = v;
if ghost_Slider.Outline then
outerSquare.Visible = v;
end
Text.Visible = v;
elseif k == "SliderColor" then
mainSquare.Color = v;
elseif k == "OutlineSliderColor" then
outerSquare.Color = v;
elseif k == "Outline" then
if ghost_Slider.Visible then
outerSquare.Visible = v;
end
elseif k == "TextOutline" then
Text.Outline = v;
elseif k == "Text" then
Text.Text = v .. " [" .. tostring(ghost_Slider.Default) .. "]";
elseif k == "Transparency" then
mainSquare.Transparency = v;
outerSquare.Transparency = v;
Text.Transparency = v;
elseif k == "ZIndex" then
mainSquare.ZIndex = v;
outerSquare.ZIndex = v;
pickedSquare.ZIndex = v;
Text.ZIndex = v;
elseif k == "TextFont" then
Text.Font = v;
elseif k == "TextSize" then
Text.Size = v;
elseif k == "TextColor" then
Text.Color = v;
elseif k == "OutlineTextColor" then
Text.OutlineColor = v;
end
end)
SliderMT.__namecall = (function(self, v)
local method = getnamecallmethod();
if method == "Remove" or method == "Destroy" then
mainSquare:Remove()
pickedSquare:Remove()
outerSquare:Remove()
Text:Remove()
elseif method:lower() == "set" then
local min, max = ghost_Slider.Min, ghost_Slider.Max;
local _max = max-min;
pickedSquare.Size = v2new(mainSquare.Size.X*((v-min)/_max), pickedSquare.Size.Y)
VALUE = math.floor(v+.5)
Text.Text = ghost_Slider.Text .. " [" .. tostring(VALUE) .. "]";
ghost_Slider.OnClick(v)
elseif method:lower() == "setdefault" then
VALUE = v;
local min, max = ghost_Slider.Min, ghost_Slider.Max;
local _max = max-min;
pickedSquare.Size = v2new(mainSquare.Size.X*((v-min)/_max), pickedSquare.Size.Y)
Text.Text = ghost_Slider.Text .. " [" .. tostring(v) .. "]";
elseif method:lower() == "getvalue" then
return VALUE;
end
end)
drawnObjects[#drawnObjects + 1] = Slider
return Slider;
end
local obj = old(class)
drawnObjects[#drawnObjects + 1] = obj
return obj
end
local heartbeat = rs.Heartbeat;
local function tween(p, t1)
if p.From == v2new(0, 0) then
p.From = v2new(t1.Position.X, 240+t1.TextBounds.Y)
p.To = v2new(t1.Position.X + t1.TextBounds.X, 240+t1.TextBounds.Y)
end
coroutine.wrap(function()
local smoothness = 5;
local a, b, c, d = (t1.Position.X - p.From.X), (240+t1.TextBounds.Y - p.From.Y), (t1.Position.X + t1.TextBounds.X - p.To.X), (240+t1.TextBounds.Y - p.To.Y)
local e, f, g, h = a/smoothness, b/smoothness, c/smoothness, d/smoothness;
for i = 1, smoothness do
heartbeat:wait()
p.From = v2new(p.From.X + e, p.From.Y + f)
p.To = v2new(p.To.X + g, p.To.Y + h)
end
end)()
end
local aData, bData, cData = game:HttpGet("https://i.imgur.com/7sH3meu.png"), game:HttpGet("https://media.discordapp.net/attachments/748153339413266432/925435582719606834/test1.png"), game:HttpGet("https://i.imgur.com/b8wgmE7.png")
library.new = function()
local background = draw("Image")
background.Data = library.backgroundImage;
background.Size = v2new(350, 450)
background.Position = v2new(100, 200)
background.Rounding = 5;
background.Visible = true;
local backgroundOutline = draw("Image")
backgroundOutline.Data = library.backgroundOutlineImage;
backgroundOutline.Size = v2new(352, 452)
backgroundOutline.Position = v2new(99, 199)
backgroundOutline.Rounding = 5;
backgroundOutline.ZIndex = -10000;
backgroundOutline.Visible = true;
local logo = draw("Image")
logo.Data = library.logoImage;
logo.Size = v2new(25, 25)
logo.Position = v2new(107, 204)
logo.Visible = true;
local name = draw("Text")
name.Position = v2new(135, 210)
name.Font = Drawing.Fonts.Plex;
name.Size = 13;
name.Color = Color3.new(1,1,1)
name.Outline = true;
name.Text = library.uiName;
name.Visible = true;
local border = draw("Line")
border.From = v2new(105, 230)
border.To = v2new(445, 230)
border.Color = library.mainColor;
border.Visible = true;
local picker = draw("Line")
picker.Thickness = 2;
picker.Visible = true;
picker.ZIndex = 99999999;
picker.Color = library.mainColor;
picker.From = v2new(0,0)
picker.To = v2new(0,0)
local aaa, tabs = { }, { }
function aaa:addTab(name)
local tab, t = { }, #tabs + 1;
tabButton = draw("Tab")
tabButton.Text = name;
tabButton.Visible = true;
if t == 1 then
tabButton.Position = v2new(107, 235)
else
local c = 0;
for i = 1, (t - 1) do
c = c + tabs[i].tabButton.TextBounds.X + 10;
end
tabButton.Position = v2new(107 + c, 235)
end
tabButton.OnClick = function()
local tb = tabs[t].tabButton;
tween(picker, tb)
tb.Color = library.mainColor;
for i,v in next, tabs do
local b = v.tabButton;
if b ~= tb then
b.Color = Color3.new(1,1,1)
for i2,v2 in next, v do
if v2 ~= b then
v2.Visible = false;
end
end
else
for i2,v2 in next, v do
if v2 ~= tb then
v2.Visible = true;
end
end
end
end
end
tab.tabButton = tabButton;
tab.stuffs = { }
tab.stuffs.yaxis = 0;
tab.stuffs.yaxis2 = 0;
tabs[t] = tab;
local ff = { }
ff.set = tabButton.OnClick;
local secs = 0;
local secs2 = 0;
local a = false;
function ff:addSection(name, side)
if side == 2 then
secs2 = secs2 + 1;
else
secs = secs + 1;
end
local this = tabs[t].stuffs;
local label = draw("Text")
label.Text = name;
label.Font = Drawing.Fonts.Plex;
label.Size = 13;
label.Position = v2new(side == 2 and 362.5 or 187.5, 258+(side == 2 and this.yaxis2 or this.yaxis))
label.Visible = true;
label.Color = Color3.new(1,1,1)
label.Outline = true;
label.ZIndex = 5;
label.Center = true;
local sq = draw("Square")
sq.Thickness = 2;
sq.Color = library.mainColor;
sq.Size = v2new(165, 200)
sq.Position = v2new((side == 2 and 280 or 105), 265+(side == 2 and this.yaxis2 or this.yaxis))
sq.Visible = true;
if side == 2 then
this.yaxis2 = this.yaxis2 + label.TextBounds.Y + 10;
else
this.yaxis = this.yaxis + label.TextBounds.Y + 10;
end
insert(tabs[t], label)
insert(tabs[t], sq)
local Functions = { }
function Functions:addLabel(text)
local this = tabs[t].stuffs;
local label = draw("Text")
label.Text = text;
label.Font = Drawing.Fonts.Plex;
label.Size = 13;
label.Position = v2new((side==2 and 175 or 0)+110, 250+(side == 2 and this.yaxis2 or this.yaxis))
label.Visible = true;
label.Color = Color3.new(1,1,1)
label.Outline = true;
label.ZIndex = 5;
if side == 2 then
this.yaxis2 = this.yaxis2 + label.TextBounds.Y + 5;
else
this.yaxis = this.yaxis + label.TextBounds.Y + 5;
end
sq.Size = v2new(sq.Size.X, 250+(side == 2 and this.yaxis2 or this.yaxis)-sq.Position.Y)
insert(tabs[t], label)
end
local pi = math.pi;
local pi2 = pi*2;
local piby2 = pi/2;
local sin = math.sin;
local cos = math.cos;
function Functions:addToggle(text, callback, defaultColor, callback2, defaultColor2, callback3, fontsize)
local this, flag = tabs[t].stuffs, false;
text = text or "";
callback = callback or function()end;
local sq1 = draw("Square")
sq1.Thickness = 1;
sq1.Filled = true;
sq1.Color = Color3.new(0,0,0)
sq1.Size = v2new(12, 12)
sq1.Position = v2new((side==2 and 175 or 0)+111, 251+(side == 2 and this.yaxis2 or this.yaxis))
sq1.Visible = true;
local sq2 = draw("Square")
sq2.Thickness = 1;
sq2.Filled = true;
sq2.Color = Color3.new(0.3, 0.3, 0.3);
sq2.Size = v2new(8, 8)
sq2.Position = v2new((side==2 and 175 or 0)+113, 253+(side == 2 and this.yaxis2 or this.yaxis))
sq2.Visible = true;
local label = draw("Text")
label.Text = " " .. text;
label.Font = Drawing.Fonts.Plex;
label.Size = 13;
label.Position = v2new((side==2 and 175 or 0)+112, 250+(side == 2 and this.yaxis2 or this.yaxis))
label.Visible = true;
label.Color = Color3.new(1,1,1)
label.Outline = true;
label.ZIndex = 5;
if side == 2 then
this.yaxis2 = this.yaxis2 + label.TextBounds.Y + 7;
else
this.yaxis = this.yaxis + label.TextBounds.Y + 7;
end
sq.Size = v2new(sq.Size.X, 250+(side == 2 and this.yaxis2 or this.yaxis)-sq.Position.Y)
coroutine.wrap(function()
local t = false;
while wait() do
if t and mouseDown(1) then
repeat wait() until not mouseDown(1)
if mouseOnText(label) then
flag = not flag;
sq2.Color = flag and library.mainColor or Color3.new(0.3, 0.3, 0.3)
callback(flag)
end
elseif not dropDownOpen and not colorPickerOpen and mouseOnText(label) and not mouseDown(1) then
t = true;
elseif not mouseOnText(label) then
t = false;
end
end
end)()
local set, set2;
if defaultColor then
callback2 = callback2 or function()end;
local _hue, _sat;
local _v = 1;
local col = draw("Square")
col.Color = defaultColor;
col.Filled = true;
col.Size = v2new(16, 8)
col.Position = v2new((side==2 and 175 or 0)+247, 4+label.Position.Y)
col.Visible = true;
local col2 = draw("Square")
col2.Color = defaultColor;
col2.Filled = true;
col2.Size = v2new(20, 12)
col2.Position = v2new((side==2 and 175 or 0)+245, 2+label.Position.Y)
col2.Transparency = 0.8;
col2.Visible = true;
local s = draw("Square")
local s2 = draw("Square")
local a = draw("Image")
local b = draw("Image")
local v = draw("Square")
local c = draw("Image")
local _r, _g, _b = draw("Slider"), draw("Slider"), draw("Slider")
a.Data = aData
b.Data = bData
c.Data = cData
s2.Thickness = 1;
a.Size = Vector2.new(150, 150)
c.Size = a.Size;
s.Size = Vector2.new(170, 250)
s2.Size = Vector2.new(172, 252)
b.Size = Vector2.new(150, 10)
_r.Text = "R";
_g.Text = "G";
_b.Text = "B";
_r.Min = 0;
_g.Min = 0;
_b.Min = 0;
_r.Max = 255;
_g.Max = 255;
_b.Max = 255;
_r.Default = math.round(defaultColor.R*255)
_g.Default = math.round(defaultColor.G*255)
_b.Default = math.round(defaultColor.B*255)
_r.Size = v2new(150, 15)
_g.Size = _r.Size;
_b.Size = _r.Size;
v.Size = b.Size;
s.Color = Color3.new(0.1,0.1,0.1)
s2.Color = library.mainColor;
v.Color = defaultColor;
c.Transparency = 0;
s.Filled = true;
v.Filled = true;
s2.ZIndex = 2999999;
s.ZIndex = 3000000;
a.ZIndex = 3000000;
b.ZIndex = 3000001;
v.ZIndex = 3000000;
c.ZIndex = 3000000;
_r.ZIndex = 3000000;
_g.ZIndex = 3000000;
_b.ZIndex = 3000000;
local circlePicker = draw("Circle")
circlePicker.Thickness = 1;
circlePicker.Color = Color3.new(0,0,0)
circlePicker.Radius = 4;
circlePicker.ZIndex = 3000004;
local circlePicker2 = draw("Circle")
circlePicker2.Thickness = 2;
circlePicker2.Color = Color3.new(1,1,1)
circlePicker2.Radius = 4;
circlePicker2.ZIndex = 3000003;
local valueSlider = draw("Line")
valueSlider.Thickness = 5;
valueSlider.Color = Color3.new(1,1,1)
valueSlider.ZIndex = 3000003;
local radius, middle = a.Size.X/2;
local col2pos = col2.Position;
a.Position = col2pos;
c.Position = a.Position;
s.Position = v2new(col2pos.X - 10, col2pos.Y - 10)
s2.Position = v2new(col2pos.X - 11, col2pos.Y - 11)
b.Position = v2new(col2pos.X, col2pos.Y + 165)
v.Position = b.Position;
_r.Position = v2new(col2pos.X, col2pos.Y + 185)
_g.Position = v2new(col2pos.X, col2pos.Y + 203)
_b.Position = v2new(col2pos.X, col2pos.Y + 221)
_r:setdefault(_r.Default)
_g:setdefault(_g.Default)
_b:setdefault(_b.Default)
middle = v2new(a.Position.X+radius, a.Position.Y+radius)
set = function(newColor, t)
local h, s, vv = Color3.toHSV(newColor)
_hue, _sat, _v = h, s, vv;
v.Color = newColor;
col.Color = newColor;
col2.Color = newColor;
local pos_x = b.Position.X + (vv*b.Size.X)-2;
valueSlider.From = v2new(pos_x, b.Position.Y - 4)
valueSlider.To = v2new(pos_x, b.Position.Y + 14)
local val = (1-vv)
circlePicker.Color = Color3.new(val,val,val)
circlePicker2.Color = Color3.new(vv,vv,vv)
c.Transparency = val;
local angle = ((1-h)*pi2) - piby2;
if angle < 0 then
angle = pi2 + angle;
end
circlePicker.Position = v2new(middle.X + cos(angle)*(s*radius), middle.Y + sin(angle)*(s*radius))
circlePicker2.Position = circlePicker.Position;
local rgb = HSVtoRGB(newColor)
if not t then callback2(rgb) end
_r:setdefault(rgb.R)
_g:setdefault(rgb.G)
_b:setdefault(rgb.B)
end
_r.OnClick = function(value)
set(Color3.fromRGB(value, _g:getvalue(), _b:getvalue()))
end
_g.OnClick = function(value)
set(Color3.fromRGB(_r:getvalue(), value, _b:getvalue()))
end
_b.OnClick = function(value)
set(Color3.fromRGB(_r:getvalue(), _g:getvalue(), value))
end
set(defaultColor, true)
coroutine.wrap(function()
local t = false;
while wait() do
if t and mouseDown(1) then
repeat wait() until not mouseDown(1)
if mouseOnDrawing(col2) then
colorPickerOpen = true;
col.ZIndex = 3000001;
col2.ZIndex = 3000001;
a.Visible = true;
c.Visible = true;
s.Visible = true;
s2.Visible = true;
b.Visible = true;
v.Visible = true;
circlePicker.Visible = true;
circlePicker2.Visible = true;
valueSlider.Visible = true;
_r.Visible = true;
_g.Visible = true;
_b.Visible = true;
end
elseif (mouseOnDrawing(col2) or mouseOnDrawing(s)) and not mouseDown(1) then
t = true;
elseif not (mouseOnDrawing(col2) or mouseOnDrawing(s)) then
t = false;
colorPickerOpen = false;
col.ZIndex = 0;
col2.ZIndex = 0;
a.Visible = false;
c.Visible = false;
s.Visible = false;
s2.Visible = false;
b.Visible = false;
v.Visible = false;
circlePicker.Visible = false;
circlePicker2.Visible = false;
valueSlider.Visible = false;
_r.Visible = false;
_g.Visible = false;
_b.Visible = false;
end
end
end)()
coroutine.wrap(function()
local t = false;
while wait() do
if t then
local mouse = uis:GetMouseLocation()
local delta = v2new(mouse.X - middle.X, mouse.Y - middle.Y)
local rad = math.atan2(delta.Y, delta.X) + piby2;
if rad < 0 then rad = pi2 + rad; end
local dist = math.clamp(delta.magnitude,0,radius);
local d_u = delta.Unit;
circlePicker.Position = v2new(middle.X + (d_u.X*dist), middle.Y + (d_u.Y*dist))
circlePicker2.Position = circlePicker.Position;
local hue = 1-(rad/pi2)
local sat = dist/radius;
_hue = hue;
_sat = sat;
local color = Color3.fromHSV(hue, sat, (_v or 1))
v.Color = color;
col.Color = color;
col2.Color = color;
local rgb = HSVtoRGB(color)
callback2(rgb)
_r:setdefault(rgb.R)
_g:setdefault(rgb.G)
_b:setdefault(rgb.B)
if not mouseDown(1) then t = false; end
elseif mouseOnDrawing(a) and mouseDown(1) then
local mouse = uis:GetMouseLocation()
local delta = v2new(mouse.X - middle.X, mouse.Y - middle.Y)
if not (delta.magnitude > radius) then
t = true;
end
end
end
end)()
coroutine.wrap(function()
while wait() do
if mouseOnDrawing(b) and mouseDown(1) then
local mouse = uis:GetMouseLocation()
valueSlider.From = v2new(mouse.X - 2, b.Position.Y - 4)
valueSlider.To = v2new(mouse.X - 2, b.Position.Y + 14)
local size_x = math.clamp(mouse.X-b.Position.X,0,b.Size.X)
local v = size_x/b.Size.X;
local val = (1-v)+0.2;
circlePicker.Color = Color3.new(val,val,val)
c.Transparency = val-0.2;
_v = v;
local color = Color3.fromHSV(_hue, _sat, v)
col.Color = color;
col2.Color = color;
local rgb = HSVtoRGB(color)
callback2(rgb)
_r:setdefault(rgb.R)
_g:setdefault(rgb.G)
_b:setdefault(rgb.B)
end
end
end)()
insert(tabs[t], col)
insert(tabs[t], col2)
if defaultColor2 then
callback3 = callback3 or function()end;
local _hue, _sat;
local _v = 1;
local col = draw("Square")
col.Color = defaultColor2;
col.Filled = true;
col.Size = v2new(16, 8)
col.Position = v2new((side==2 and 175 or 0)+223, 4+label.Position.Y)
col.Visible = true;
local col2 = draw("Square")
col2.Color = defaultColor2;
col2.Filled = true;
col2.Size = v2new(20, 12)
col2.Position = v2new((side==2 and 175 or 0)+221, 2+label.Position.Y)
col2.Transparency = 0.8;
col2.Visible = true;
local s = draw("Square")
local s2 = draw("Square")
local a = draw("Image")
local b = draw("Image")
local v = draw("Square")
local c = draw("Image")
local _r, _g, _b = draw("Slider"), draw("Slider"), draw("Slider")
a.Data = aData
b.Data = bData
c.Data = cData
s2.Thickness = 1;
a.Size = Vector2.new(150, 150)
c.Size = a.Size;
s.Size = Vector2.new(170, 250)
s2.Size = Vector2.new(172, 252)
b.Size = Vector2.new(150, 10)
_r.Text = "R";
_g.Text = "G";
_b.Text = "B";
_r.Min = 0;
_g.Min = 0;
_b.Min = 0;
_r.Max = 255;
_g.Max = 255;
_b.Max = 255;
_r.Default = math.round(defaultColor2.R*255)
_g.Default = math.round(defaultColor2.G*255)
_b.Default = math.round(defaultColor2.B*255)
_r.Size = v2new(150, 15)
_g.Size = _r.Size;
_b.Size = _r.Size;
v.Size = b.Size;
s.Color = Color3.new(0.1,0.1,0.1)
s2.Color = library.mainColor;
v.Color = defaultColor2;
c.Transparency = 0;
s.Filled = true;
v.Filled = true;
s2.ZIndex = 2999999;
s.ZIndex = 3000000;
a.ZIndex = 3000000;
b.ZIndex = 3000001;
v.ZIndex = 3000000;
c.ZIndex = 3000000;
_r.ZIndex = 3000000;
_g.ZIndex = 3000000;
_b.ZIndex = 3000000;
local circlePicker = draw("Circle")
circlePicker.Thickness = 1;
circlePicker.Color = Color3.new(0,0,0)
circlePicker.Radius = 4;
circlePicker.ZIndex = 3000004;
local circlePicker2 = draw("Circle")
circlePicker2.Thickness = 2;
circlePicker2.Color = Color3.new(1,1,1)
circlePicker2.Radius = 4;
circlePicker2.ZIndex = 3000003;
local valueSlider = draw("Line")
valueSlider.Thickness = 5;
valueSlider.Color = Color3.new(1,1,1)
valueSlider.ZIndex = 3000003;
local radius, middle = a.Size.X/2;
local col2pos = col2.Position;
a.Position = col2pos;
c.Position = a.Position;
s.Position = v2new(col2pos.X - 10, col2pos.Y - 10)
s2.Position = v2new(col2pos.X - 11, col2pos.Y - 11)
b.Position = v2new(col2pos.X, col2pos.Y + 165)
v.Position = b.Position;
_r.Position = v2new(col2pos.X, col2pos.Y + 185)
_g.Position = v2new(col2pos.X, col2pos.Y + 203)
_b.Position = v2new(col2pos.X, col2pos.Y + 221)
_r:setdefault(_r.Default)
_g:setdefault(_g.Default)
_b:setdefault(_b.Default)
middle = v2new(a.Position.X+radius, a.Position.Y+radius)
set2 = function(newColor, t)
local h, s, vv = Color3.toHSV(newColor)
_hue, _sat, _v = h, s, vv;
v.Color = newColor;
col.Color = newColor;
col2.Color = newColor;
local pos_x = b.Position.X + (vv*b.Size.X)-2;
valueSlider.From = v2new(pos_x, b.Position.Y - 4)
valueSlider.To = v2new(pos_x, b.Position.Y + 14)
local val = (1-vv)
circlePicker.Color = Color3.new(val,val,val)
circlePicker2.Color = Color3.new(vv,vv,vv)
c.Transparency = val;
local angle = ((1-h)*pi2) - piby2;
if angle < 0 then
angle = pi2 + angle;
end
circlePicker.Position = v2new(middle.X + cos(angle)*(s*radius), middle.Y + sin(angle)*(s*radius))
circlePicker2.Position = circlePicker.Position;
local rgb = HSVtoRGB(newColor)
if not t then callback3(rgb) end
_r:setdefault(rgb.R)
_g:setdefault(rgb.G)
_b:setdefault(rgb.B)
end
_r.OnClick = function(value)
set2(Color3.fromRGB(value, _g:getvalue(), _b:getvalue()))
end
_g.OnClick = function(value)
set2(Color3.fromRGB(_r:getvalue(), value, _b:getvalue()))
end
_b.OnClick = function(value)
set2(Color3.fromRGB(_r:getvalue(), _g:getvalue(), value))
end
set2(defaultColor2, true)
coroutine.wrap(function()
local t = false;
while wait() do
if t and mouseDown(1) then
repeat wait() until not mouseDown(1)
if mouseOnDrawing(col2) then
colorPickerOpen = true;
col.ZIndex = 3000001;
col2.ZIndex = 3000001;
a.Visible = true;
c.Visible = true;
s.Visible = true;
s2.Visible = true;
b.Visible = true;
v.Visible = true;
circlePicker.Visible = true;
circlePicker2.Visible = true;
valueSlider.Visible = true;
_r.Visible = true;
_g.Visible = true;
_b.Visible = true;
end
elseif (mouseOnDrawing(col2) or mouseOnDrawing(s)) and not mouseDown(1) then
t = true;
elseif not (mouseOnDrawing(col2) or mouseOnDrawing(s)) then
t = false;
colorPickerOpen = false;
col.ZIndex = 0;
col2.ZIndex = 0;
a.Visible = false;
c.Visible = false;
s.Visible = false;
s2.Visible = false;
b.Visible = false;
v.Visible = false;
circlePicker.Visible = false;
circlePicker2.Visible = false;
valueSlider.Visible = false;
_r.Visible = false;
_g.Visible = false;
_b.Visible = false;
end
end
end)()
coroutine.wrap(function()
local t = false;
while wait() do
if t then
local mouse = uis:GetMouseLocation()
local delta = v2new(mouse.X - middle.X, mouse.Y - middle.Y)
local rad = math.atan2(delta.Y, delta.X) + piby2;
if rad < 0 then rad = pi2 + rad; end
local dist = math.clamp(delta.magnitude,0,radius);
local d_u = delta.Unit;
circlePicker.Position = v2new(middle.X + (d_u.X*dist), middle.Y + (d_u.Y*dist))
circlePicker2.Position = circlePicker.Position;
local hue = 1-(rad/pi2)
local sat = dist/radius;
_hue = hue;
_sat = sat;
local color = Color3.fromHSV(hue, sat, (_v or 1))
v.Color = color;
col.Color = color;
col2.Color = color;
local rgb = HSVtoRGB(color)
callback3(rgb)
_r:setdefault(rgb.R)
_g:setdefault(rgb.G)
_b:setdefault(rgb.B)
if not mouseDown(1) then t = false; end
elseif mouseOnDrawing(a) and mouseDown(1) then
local mouse = uis:GetMouseLocation()
local delta = v2new(mouse.X - middle.X, mouse.Y - middle.Y)
if not (delta.magnitude > radius) then
t = true;
end
end
end
end)()
coroutine.wrap(function()
while wait() do
if mouseOnDrawing(b) and mouseDown(1) then
local mouse = uis:GetMouseLocation()
valueSlider.From = v2new(mouse.X - 2, b.Position.Y - 4)
valueSlider.To = v2new(mouse.X - 2, b.Position.Y + 14)
local size_x = math.clamp(mouse.X-b.Position.X,0,b.Size.X)
local v = size_x/b.Size.X;
local val = (1-v)+0.2;
circlePicker.Color = Color3.new(val,val,val)
c.Transparency = val-0.2;
_v = v;
local color = Color3.fromHSV(_hue, _sat, v)
col.Color = color;
col2.Color = color;
local rgb = HSVtoRGB(color)
callback3(rgb)
_r:setdefault(rgb.R)
_g:setdefault(rgb.G)
_b:setdefault(rgb.B)
end
end
end)()
insert(tabs[t], col)
insert(tabs[t], col2)
end
end
insert(tabs[t], sq1)
insert(tabs[t], sq2)
insert(tabs[t], label)
local f = function(self, f)
flag = f;
sq2.Color = f and library.mainColor or Color3.new(0.3, 0.3, 0.3)
callback(f)
end
local f2 = function(self, ...)
set(...)
end
local f3 = function(self, ...)
set2(...)
end
return { set = f, Set = f, setcolorpicker = f2, setcolorpicker2 = f3 }
end
function Functions:addButton(text, callback)
local this = tabs[t].stuffs;
text = text or "";
callback = callback or function()end;
local button = draw("Button")
button.Text = text;
button.ButtonColor = Color3.new(0.2, 0.2, 0.2)
button.ButtonHoverColor = Color3.new(0.25, 0.25, 0.25)
button.ButtonPressedColor = Color3.new(0.3, 0.3, 0.3)
button.Position = v2new((side==2 and 175 or 0)+110, 250+(side == 2 and this.yaxis2 or this.yaxis))
button.Size = v2new(155, 20)
button.Visible = true;
button.OnClick = callback;
if side == 2 then
this.yaxis2 = this.yaxis2 + button.Size.Y + 7;
else
this.yaxis = this.yaxis + button.Size.Y + 7;
end
sq.Size = v2new(sq.Size.X, 250+(side == 2 and this.yaxis2 or this.yaxis)-sq.Position.Y)
insert(tabs[t], button)
end
function Functions:addSlider(text, min, max, default, callback)
local this = tabs[t].stuffs;
text = text or "";
callback = callback or function()end;
local slider = draw("Slider")
slider.Text = text;
slider.Position = v2new((side==2 and 175 or 0)+110, 250+(side == 2 and this.yaxis2 or this.yaxis))
slider.Size = v2new(155, 15)
slider.Visible = true;
slider.OnClick = callback;
slider.Min = min;
slider.Max = max;
slider.Default = default;
if side == 2 then
this.yaxis2 = this.yaxis2 + slider.Size.Y;
else
this.yaxis = this.yaxis + slider.Size.Y;
end
sq.Size = v2new(sq.Size.X, 255+(side == 2 and this.yaxis2 or this.yaxis)-sq.Position.Y)
insert(tabs[t], slider)
slider:setdefault(default)
return slider;
end
function Functions:addDropDown(text, default, list, callback)
local this, flag = tabs[t].stuffs, false;
text = text or "";
callback = callback or function()end;
local mainSquare = draw("Square")
mainSquare.Filled = true;
mainSquare.Color = Color3.new(0.2, 0.2, 0.2)
mainSquare.Position = v2new((side==2 and 175 or 0)+110, 250+(side == 2 and this.yaxis2 or this.yaxis))
mainSquare.Size = v2new(155, 20)
mainSquare.ZIndex = 2000000;
local outerSquare = draw("Square")
outerSquare.Thickness = 1;
outerSquare.Color = library.mainColor;
outerSquare.Position = v2new((side==2 and 175 or 0)+110, 250+(side == 2 and this.yaxis2 or this.yaxis))
outerSquare.Size = v2new(155, 20)
outerSquare.ZIndex = 2000000;
local sign = draw("Text")
sign.Center = true;
sign.Size = 13;
sign.Font = Drawing.Fonts.Plex;
sign.Color = Color3.new(1, 1, 1)
sign.Position = v2new(mainSquare.Position.X + mainSquare.Size.X - 9, mainSquare.Position.Y + (mainSquare.Size.Y / 2) - 7)
sign.Outline = true;
sign.Text = "+";
sign.ZIndex = 2000001;
local selected = draw("Text")
selected.Size = 13;
selected.Font = Drawing.Fonts.Plex;
selected.Color = Color3.new(1, 1, 1)
selected.Position = v2new(mainSquare.Position.X + 5, mainSquare.Position.Y + (mainSquare.Size.Y / 2) - 8)
selected.Outline = true;
selected.Text = text .. " [" .. default .. "]";
selected.ZIndex = 2000001;
if side == 2 then
this.yaxis2 = this.yaxis2 + mainSquare.Size.Y + 5;
else
this.yaxis = this.yaxis + mainSquare.Size.Y + 5;
end
sq.Size = v2new(sq.Size.X, 250+(side == 2 and this.yaxis2 or this.yaxis)-sq.Position.Y)
local options, axis = { }, 20;
for i,v in next, list do
local bg = draw("Square")
bg.Filled = true;
bg.Color = Color3.new(0.2, 0.2, 0.2)
bg.ZIndex = 2000000;
local option = draw("Text")
option.Size = 13;
option.Font = Drawing.Fonts.Plex;
option.Color = Color3.new(1, 1, 1)
option.Position = v2new(mainSquare.Position.X + 5, mainSquare.Position.Y + (mainSquare.Size.Y / 2) - 8 + axis)
option.Outline = true;
option.Text = v;
option.ZIndex = 2000000;
bg.Position = v2new(option.Position.X, option.Position.Y - 2)
bg.Size = v2new(145, option.TextBounds.Y + 4)
if i ~= #list then
axis = axis + option.TextBounds.Y + 5;
end
coroutine.wrap(function()
local t = false;
while rs.RenderStepped:wait() do
if not bg.Position then break end
if t and mouseDown(1) then
repeat wait() until not mouseDown(1)
if mouseOnDrawing(bg) then
selected.Text = text .. " [" .. v .. "]";
callback(v)
for i,v in next, options do
v.Visible = false;
end
flag = false;
dropDownOpen = false;
sign.Text = "+";
mainSquare.Size = v2new(mainSquare.Size.X, mainSquare.Size.Y - axis)
outerSquare.Size = v2new(outerSquare.Size.X, outerSquare.Size.Y - axis)
end
elseif mouseOnDrawing(bg) and not mouseDown(1) then
t = true;
elseif not mouseOnDrawing(bg) then
t = false;
end
end
end)()
insert(options, bg)
insert(options, option)
end
coroutine.wrap(function()
local t = false;
while rs.RenderStepped:wait() do
if not mainSquare.Position then break end
if t and mouseDown(1) then
repeat wait() until not mouseDown(1)
if mouseOnDrawing(mainSquare) then
if not flag then
flag = true;
dropDownOpen = true;
sign.Text = "-";
mainSquare.Size = v2new(mainSquare.Size.X, mainSquare.Size.Y + axis)
outerSquare.Size = v2new(outerSquare.Size.X, outerSquare.Size.Y + axis)
for i,v in next, options do
v.Visible = true;
end
end
end
elseif not dropDownOpen and not colorPickerOpen and mouseOnDrawing(mainSquare) and not mouseDown(1) then
t = true;
elseif not mouseOnDrawing(mainSquare) then
t = false;
if flag then
flag = false;
dropDownOpen = false;
sign.Text = "+";
mainSquare.Size = v2new(mainSquare.Size.X, mainSquare.Size.Y - axis)
outerSquare.Size = v2new(outerSquare.Size.X, outerSquare.Size.Y - axis)
for i,v in next, options do
v.Visible = false;
end
end
end
end
end)()
insert(tabs[t], mainSquare)
insert(tabs[t], outerSquare)
insert(tabs[t], sign)
insert(tabs[t], selected)
local f = function(self, val)
selected.Text = text .. " [" .. val .. "]";
callback(val)
end
return {set = f, Set = f}
end
function Functions:addKeybind(text, default, callback)
local this, keycode = tabs[t].stuffs, default;
local label = draw("Text")
label.Text = text;
label.Font = Drawing.Fonts.Plex;
label.Size = 13;
label.Position = v2new((side==2 and 175 or 0)+110, 250+(side == 2 and this.yaxis2 or this.yaxis))
label.Visible = true;
label.Color = Color3.new(1,1,1)
label.Outline = true;
label.ZIndex = 5;
local label2 = draw("Text")
label2.Text = "[" .. keycode.Name .. "]";
label2.Font = Drawing.Fonts.Plex;
label2.Size = 13;
label2.Position = v2new(label.Position.X + (155 - label2.TextBounds.X), 250+(side == 2 and this.yaxis2 or this.yaxis))
label2.Visible = true;
label2.Color = Color3.new(1,1,1)
label2.Transparency = 0.7;
label2.Outline = true;
label2.ZIndex = 5;
coroutine.wrap(function()
local t = false;
while wait() do
if t and mouseDown(1) then
repeat wait() until not mouseDown(1)
if mouseOnText(label2) then
label2.Text = "[...]";
label2.Position = v2new(label.Position.X + (155 - label2.TextBounds.X), label2.Position.Y)
keycode = uis.InputBegan:wait().KeyCode;
label2.Text = "[" .. keycode.Name .. "]";
label2.Position = v2new(label.Position.X + (155 - label2.TextBounds.X), label2.Position.Y)
end
elseif not dropDownOpen and not colorPickerOpen and mouseOnText(label2) and not mouseDown(1) then
t = true;
elseif not mouseOnText(label2) then
t = false;
end
end
end)()
uis.InputEnded:Connect(function(key)
if key.KeyCode == keycode then
callback()
end
end)
if side == 2 then
this.yaxis2 = this.yaxis2 + label.TextBounds.Y + 5;
else
this.yaxis = this.yaxis +