Run it
Copy the script and paste it into your executor.
disableImageLoading =
oldWatermark =
().vaderhaxxpaste
().vaderhaxxpaste = {}
().vaderhaxxpaste.loaded =
_Instancenew = (.new)
_TweenInfonew = (TweenInfo.new)
_GetService = (.GetService)
_IsLoaded = (.IsLoaded)
_Clone = (.Clone)
_Destroy = (.Destroy)
_GetChildren = (.GetChildren)
_GetDescendants = (.GetDescendants)
_IsDescendantOf = (.IsDescendantOf)
_IsA = (.IsA)
_FindFirstChild = (.FindFirstChild)
_FindFirstChildOfClass = (.FindFirstChildOfClass)
_HttpGet = (.HttpGet)
_GetPropertyChangedSignal = (.GetPropertyChangedSignal)
_GetAttribute = (.GetAttribute)
_GetPlayers = ((, ).GetPlayers)
_GetPlayerFromCharacter = ((, ).GetPlayerFromCharacter)
_GetValue = ((, ).Network.ServerStatsItem[].GetValue)
_GetMouseLocation = ((, ).GetMouseLocation)
_IsKeyDown = ((, ).IsKeyDown)
_GetMouse = ((, ).LocalPlayer.GetMouse)
_Kick = ((, ).LocalPlayer.Kick)
_CFrameNew = (.new)
_CFrameAngles = (.Angles)
_CFrameLookAt = (.lookAt)
_CFrameLerp = (().Lerp)
_CFramePointToObjectSpace = (().PointToObjectSpace)
_CFrameToEulerAnglesXYZ = (().ToEulerAnglesXYZ)
_CFrameToOrientation = (().ToOrientation)
_Vector3New = (.new)
_Vector3Lerp = (().Lerp)
_Vector2New = (.new)
_UDim2New = (.new)
_UDim2fromOffset = (.fromOffset)
_UDimNew = (.new)
_Color3New = (.new)
_Color3FromRGB = (.fromRGB)
_Color3FromHSV = (.fromHSV)
_Color3ToHSV = (.toHSV)
_ToHex = (().ToHex)
_FromHex = (.fromHex)
_ColorSequenceNew = (ColorSequence.new)
_ColorSequenceKeypointNew = (ColorSequenceKeypoint.new)
_NumberSequenceNew = (NumberSequence.new)
_NumberSequenceKeypointNew = (NumberSequenceKeypoint.new)
_RayNew = (Ray.new)
_RaycastParamsNew = (RaycastParams.new)
_Raycast = (.Raycast)
_StringFormat = (.format)
_StringUpper = (.upper)
_StringLower = (.lower)
_StringFind = (.find)
_StringLen = (.len)
_StringGsub = (.gsub)
_StringSub = (.sub)
_StringSplit = (.split)
_tostring = ()
_TableInsert = (.insert)
_TableRemove = (.remove)
_TableFind = (.find)
_TableConcat = (.concat)
_TableSort = (.sort)
_TableUnpack = (.unpack)
_Select = ()
_MathClamp = (.clamp)
_MathAbs = (.abs)
_MathRandom = (.random)
_MathRad = (.rad)
_MathFloor = (.floor)
_MathMax = (.max)
_MathMin = (.min)
_MathSin = (.sin)
_MathCos = (.cos)
_MathDeg = (.deg)
_MathAtan2 = (.atan2)
_Materials = .Material
_MathLerp = (a, b, t)
a + (b - a) * t
_tonumber = ()
_DebugTraceback = (debug.traceback)
_Tick = ()
_OsDate = (.date)
_OsTime = (.time)
_WorldToViewportPoint = (().WorldToViewportPoint)
_WorldToScreenPoint = (().WorldToScreenPoint)
_ChangeState = (().ChangeState)
_Require = ()
_Type = ()
_Typeof = ()
_CoroutineWrap = (.wrap)
_TaskWait = (.wait)
_Pcall = ()
_Wait = ()
_TaskSpawn = (.spawn)
Debris = ((,))
HttpService = ((,))
InputService = ((,))
replicatedStorage = ((,))
Stats = ((, ))
TextService = ((,))
Teams = ((,))
Players = ((,))
RunService = ((,))
TweenService = ((,))
Lighting = ((,))
RenderStepped = RunService.RenderStepped
LocalPlayer = Players.LocalPlayer
camera = (.CurrentCamera)
viewportSize = camera.ViewportSize
Mouse = (LocalPlayer)
SoundService = ((,))
CoreGui = ((,))
spring = ((, ))()
Signaling = ((, ))()
Events = replicatedStorage:(, /)
HitPart = Events:(, /)
playerSpawned = Signaling.()
playerDied = Signaling.()
Crosshairs = LocalPlayer.PlayerGui.GUI.Crosshairs
utilities = {}
Drawings = {}
uilibrary = {}
encryption = {}
base64 = {}
json = {}
( v, from, width )
w =
flag = ^from
i = , width-
flag2 = flag + flag
v % flag2 >= flag
w = w + ^i
flag = flag2
w
base64.( s62, s63, spad )
encoder = {}
b64code, char {[]=,,,,,,,,,,
,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,
,,,,,,,s62 ,s63 ,spad }
encoder[b64code] = char:()
encoder
base64.( s62, s63, spad )
decoder = {}
b64code, charcode ( base64.( s62, s63, spad ))
decoder[charcode] = b64code
decoder
DEFAULT_ENCODER = base64.()
DEFAULT_DECODER = base64.()
char, concat = schar, tconcat
base64.( str, encoder, usecaching )
encoder = encoder DEFAULT_ENCODER
t, k, n = {}, , #str
lastn = n %
cache = {}
i = , n-lastn,
a, b, c = str:( i, i+ )
v = a* + b* + c
s
usecaching
s = cache[v]
s
s = .(encoder[(v,,)], encoder[(v,,)], encoder[(v,,)], encoder[(v,,)])
cache[v] = s
s = .(encoder[(v,,)], encoder[(v,,)], encoder[(v,,)], encoder[(v,,)])
t[k] = s
k = k +
lastn ==
a, b = str:( n-, n )
v = a* + b*
t[k] = .(encoder[(v,,)], encoder[(v,,)], encoder[(v,,)], encoder[])
lastn ==
v = str:( n )*
t[k] = .(encoder[(v,,)], encoder[(v,,)], encoder[], encoder[])
( t )
base64.( b64, decoder, usecaching )
decoder = decoder DEFAULT_DECODER
pattern =
decoder
s62, s63
charcode, b64code ( decoder )
b64code == s62 = charcode
b64code == s63 = charcode
pattern = ():( .(s62), .(s63) )
b64 = b64:( pattern, )
cache = usecaching {}
t, k = {},
n = #b64
padding = b64:(-) == b64:(-) ==
i = , padding > n- n,
a, b, c, d = b64:( i, i+ )
s
usecaching
v0 = a* + b* + c* + d
s = cache[v0]
s
v = decoder[a]* + decoder[b]* + decoder[c]* + decoder[d]
s = .( (v,,), (v,,), (v,,))
cache[v0] = s
v = decoder[a]* + decoder[b]* + decoder[c]* + decoder[d]
s = .( (v,,), (v,,), (v,,))
t[k] = s
k = k +
padding ==
a, b, c = b64:( n-, n- )
v = decoder[a]* + decoder[b]* + decoder[c]*
t[k] = .( (v,,), (v,,))
padding ==
a, b = b64:( n-, n- )
v = decoder[a]* + decoder[b]*
t[k] = .( (v,,))
( t )
encode
escape_char_map = {
[ ] = ,
[ ] = ,
[ ] = ,
[ ] = ,
[ ] = ,
[ ] = ,
[ ] = ,
}
escape_char_map_inv = { [ ] = }
k, v (escape_char_map)
escape_char_map_inv[v] = k
(c)
.. (escape_char_map[c] (, c:()))
(val)
(val, stack)
res = {}
stack = stack {}
stack[val] ()
stack[val] =
(val, ) ~= (val) ==
n =
k (val)
(k) ~=
()
n = n +
n ~= #val
()
i, v (val)
(res, (v, stack))
stack[val] =
.. (res, ) ..
k, v (val)
(k) ~=
()
(res, (k, stack) .. .. (v, stack))
stack[val] =
.. (res, ) ..
(val)
.. val:(, escape_char) ..
(val)
val ~= val val <= -.huge val >= .huge
( .. (val) .. )
(, val)
type_func_map = {
[ ] = encode_nil,
[ ] = encode_table,
[ ] = encode_string,
[ ] = encode_number,
[ ] = _tostring,
}
encode = (val, stack)
t = (val)
f = type_func_map[t]
f
(val, stack)
( .. t .. )
json.(val)
( (val) )
parse
(...)
res = {}
i = , (, ...)
res[ (i, ...) ] =
res
space_chars = (, , , )
delim_chars = (, , , , , , )
escape_chars = (, , , , , , , , )
literals = (, , )
literal_map = {
[ ] = ,
[ ] = ,
[ ] = ,
}
(str, idx, set, negate)
i = idx, #str
set[str:(i, i)] ~= negate
i
#str +
(str, idx, msg)
line_count =
col_count =
i = , idx -
col_count = col_count +
str:(i, i) ==
line_count = line_count +
col_count =
( (, msg, line_count, col_count) )
(n)
f = mfloor
n <=
.(n)
n <=
.((n / ) + , n % + )
n <=
.((n / ) + , (n % / ) + , n % + )
n <=
.((n / ) + , (n % / ) + ,
(n % / ) + , n % + )
( (, n) )
(s)
n1 = ( s:(, ), )
n2 = ( s:(, ), )
n2
((n1 - ) * + (n2 - ) + )
(n1)
(str, i)
res =
j = i +
k = j
j <= #str
x = str:(j)
x <
(str, j, )
x ==
res = res .. str:(k, j - )
j = j +
c = str:(j, j)
c ==
hex = str:(, j + )
str:(, j + )
(str, j - , )
res = res .. (hex)
j = j + #hex
escape_chars[c]
(str, j - , .. c .. )
res = res .. escape_char_map_inv[c]
k = j +
x ==
res = res .. str:(k, j - )
res, j +
j = j +
(str, i, )
(str, i)
x = (str, i, delim_chars)
s = str:(i, x - )
n = (s)
n
(str, i, .. s .. )
n, x
(str, i)
x = (str, i, delim_chars)
word = str:(i, x - )
literals[word]
(str, i, .. word .. )
literal_map[word], x
(str, i)
res = {}
n =
i = i +
x
i = (str, i, space_chars, )
str:(i, i) ==
i = i +
x, i = (str, i)
res[n] = x
n = n +
i = (str, i, space_chars, )
chr = str:(i, i)
i = i +
chr ==
chr ~= (str, i, )
res, i
(str, i)
res = {}
i = i +
key, val
i = (str, i, space_chars, )
str:(i, i) ==
i = i +
str:(i, i) ~=
(str, i, )
key, i = (str, i)
i = (str, i, space_chars, )
str:(i, i) ~=
(str, i, )
i = (str, i + , space_chars, )
val, i = (str, i)
res[key] = val
i = (str, i, space_chars, )
chr = str:(i, i)
i = i +
chr ==
chr ~= (str, i, )
res, i
char_func_map = {
[ ] = parse_string,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_number,
[ ] = parse_literal,
[ ] = parse_literal,
[ ] = parse_literal,
[ ] = parse_array,
[ ] = parse_object,
}
parse = (str, idx)
chr = str:(idx, idx)
f = char_func_map[chr]
f
(str, idx)
(str, idx, .. chr .. )
json.(str)
(str) ~=
( .. (str))
res, idx = (str, (str, , space_chars, ))
idx = (str, idx, space_chars, )
idx <= #str
(str, idx, )
res
s_box = { , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , }
inv_s_box = { , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , }
rcon = { , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , }
(x)
i = bit32.(x, )
bit32.(x, ) == i bit32.(i, ) %
(s, inv)
inv = inv inv_s_box s_box
i = ,
j = ,
s[i][j] = inv[s[i][j] + ]
(s, inv)
s[][], s[][], s[][], s[][] = s[][], s[][], s[][], s[][]
inv
s[][], s[][], s[][], s[][] = s[][], s[][], s[][], s[][]
s[][], s[][], s[][], s[][] = s[][], s[][], s[][], s[][]
s[][], s[][], s[][], s[][] = s[][], s[][], s[][], s[][]
s[][], s[][], s[][], s[][] = s[][], s[][], s[][], s[][]
(s, k)
i = ,
j = ,
s[i][j] = bit32.(s[i][j], k[i][j])
(s, inv)
t, u
inv
i = ,
t = ((bit32.(s[i][], s[i][])))
u = ((bit32.(s[i][], s[i][])))
s[i][], s[i][] = bit32.(s[i][], t), bit32.(s[i][], u)
s[i][], s[i][] = bit32.(s[i][], t), bit32.(s[i][], u)
i
j = ,
i = s[j]
t, u = bit32. (i[], i[], i[], i[]), i[]
k = ,
i[k] = bit32. (i[k], t, (bit32.(i[k], i[k + ] u)))
(t, c, inv)
inv
. (c[], , , , t)
. (c[], , , , t)
. (c[], , , , t)
. (c[], , , , t)
i = , #c /
. (t[i])
. (c, i * - , i * , , t[i])
t
(t, a, b)
. (t)
i = , (#a, #b)
(t, bit32.(a[i], b[i]))
t
(a, inv)
o =
i = inv #a, inv #a , inv -
a[i] ==
a[i] =
a[i] +=
o =
o, a
(key)
kc = ( #key == {{}, {}, {}, {}} #key == {{}, {}, {}, {}
, {}, {}} {{}, {}, {}, {}, {}, {}, {}, {}}, key)
is = #key /
i, t, w = , {},
#kc < (#key / + ) *
w = . (kc[#kc])
#kc % is ==
(w, (w, ))
j = ,
w[j] = s_box[w[j] + ]
w[] = bit32.(w[], rcon[i])
i +=
#key == #kc % is ==
j = ,
w[j] = s_box[w[j] + ]
. (t)
(w, .(w, , , , t), kc[#kc - is + ])
(kc, w)
. (t)
i = , #kc /
(t, {})
. (kc, i * - , i * , , t[#t])
t
(key, km, pt, ps, r)
(ps, pt)
(ps, km[])
i = , #key / +
(ps)
(ps)
(ps)
(ps, km[i])
(ps)
(ps)
(ps, km[#km])
(r, ps, )
(key, km, ct, cs, r)
(cs, ct)
(cs, km[#km])
(cs, )
(cs, )
i = #key / + , , -
(cs, km[i])
(cs, )
(cs, )
(cs, )
(cs, km[])
(r, cs, )
(a)
(a) ==
r = {}
i = , (a),
.({.(a, i, i + )}, , , i, r)
r
(a) ==
_, i (a)
((i) == (i) == i <= i i < ,
)
a
()
init (key, txt, m, iv, s)
key = (key)
(#key == #key == #key == , )
txt = (txt)
(#txt % (s ) == , .. ( s .. s
) .. )
m
(iv) ==
iv = .(iv)
l, e = iv.Length, iv.LittleEndian
((l) == < l l <= ,
)
iv.Prefix = (iv.Prefix {})
iv.Suffix = (iv.Suffix {})
(#iv.Prefix + #iv.Suffix + l == , )
iv.InitValue = iv.InitValue == {} .((iv.InitValue
))
(#iv.InitValue <= l, )
iv.InitOverflow = iv.InitOverflow == .(l, ) .(
(iv.InitOverflow))
(#iv.InitOverflow <= l,
)
_ = , l - #iv.InitValue
(iv.InitValue, + e #iv.InitValue , )
_ = , l - #iv.InitOverflow
(iv.InitOverflow, + e #iv.InitOverflow , )
(iv) ~=
i, t = iv (iv) .(, ), {}
(#i == , )
iv = {Length = , Prefix = t, Suffix = t, InitValue = i,
InitOverflow = .(, )}
m ==
iv = iv == .(, ) (iv)
(#iv == , )
s
s = ((s) )
((s) == < s s <= ,
)
key, txt, (key), iv, s
bytes = {number}
encryption = {
encrypt_ECB = (key : bytes, plainText : bytes) : bytes
km
key, plainText, km = (key, plainText)
b, k, s, t = {}, {}, {{}, {}, {}, {}}, {}
i = , #plainText,
.(plainText, i, i + , , k)
.((key, km, k, s, t), , , i, b)
b
,
decrypt_ECB = (key : bytes, cipherText : bytes) : bytes
km
key, cipherText, km = (key, cipherText)
b, k, s, t = {}, {}, {{}, {}, {}, {}}, {}
i = , #cipherText,
.(cipherText, i, i + , , k)
.((key, km, k, s, t), , , i, b)
b
,
encrypt_CBC = (key : bytes, plainText : bytes, initVector : bytes?) : bytes
km
key, plainText, km, initVector = (key, plainText, , initVector)
b, k, p, s, t = {}, {}, initVector, {{}, {}, {}, {}}, {}
i = , #plainText,
.(plainText, i, i + , , k)
.((key, km, (t, k, p), s, p), , , i, b)
b
,
decrypt_CBC = (key : bytes, cipherText : bytes, initVector : bytes?) : bytes
km
key, cipherText, km, initVector = (key, cipherText, , initVector)
b, k, p, s, t = {}, {}, initVector, {{}, {}, {}, {}}, {}
i = , #cipherText,
.(cipherText, i, i + , , k)
.((k, (key, km, k, s, t), p), , , i, b)
.(cipherText, i, i + , , p)
b
,
encrypt_PCBC = (key : bytes, plainText : bytes, initVector : bytes?) : bytes
km
key, plainText, km, initVector = (key, plainText, , initVector)
b, k, c, p, s, t = {}, {}, initVector, .(, ), {{}, {}, {}, {}}, {}
i = , #plainText,
.(plainText, i, i + , , k)
.((key, km, (k, (t, c, k), p), s, c), , , i, b)
.(plainText, i, i + , , p)
b
,
decrypt_PCBC = (key : bytes, cipherText : bytes, initVector : bytes?) : bytes
km
key, cipherText, km, initVector = (key, cipherText, , initVector)
b, k, c, p, s, t = {}, {}, initVector, .(, ), {{}, {}, {}, {}}, {}
i = , #cipherText,
.(cipherText, i, i + , , k)
.((p, (key, km, k, s, t), (k, c, p)), , , i, b)
.(cipherText, i, i + , , c)
b
,
encrypt_CFB = (key : bytes, plainText : bytes, initVector : bytes?, segmentSize : number?)
: bytes
km
key, plainText, km, initVector, segmentSize = (key, plainText, , initVector,
segmentSize == segmentSize)
b, k, p, q, s, t = {}, {}, initVector, {}, {{}, {}, {}, {}}, {}
i = , #plainText, segmentSize
.(plainText, i, i + segmentSize - , , k)
.((q, (key, km, p, s, t), k), , segmentSize, i, b)
j = , segmentSize + , -
(q, , p[j])
.(q, , , , p)
b
,
decrypt_CFB = (key : bytes, cipherText : bytes, initVector : bytes, segmentSize : number?)
: bytes
km
key, cipherText, km, initVector, segmentSize = (key, cipherText, , initVector,
segmentSize == segmentSize)
b, k, p, q, s, t = {}, {}, initVector, {}, {{}, {}, {}, {}}, {}
i = , #cipherText, segmentSize
.(cipherText, i, i + segmentSize - , , k)
.((q, (key, km, p, s, t), k), , segmentSize, i, b)
j = , segmentSize + , -
(k, , p[j])
.(k, , , , p)
b
,
encrypt_OFB = (key : bytes, plainText : bytes, initVector : bytes?) : bytes
km
key, plainText, km, initVector = (key, plainText, , initVector)
b, k, p, s, t = {}, {}, initVector, {{}, {}, {}, {}}, {}
i = , #plainText,
.(plainText, i, i + , , k)
.((key, km, p, s, t), , , , p)
.((t, k, p), , , i, b)
b
,
encrypt_CTR = (key : bytes, plainText : bytes, counter : ((bytes) -> bytes) | bytes | { [
]: any }?) : bytes
km
key, plainText, km, counter = (key, plainText, , counter)
b, k, c, s, t, r, n = {}, {}, {}, {{}, {}, {}, {}}, {}, (counter) == ,
i = , #plainText,
r
i > (counter.InitValue, counter.LittleEndian)
.(counter.InitOverflow, , , , counter.InitValue)
. (c)
. (counter.Prefix, , #counter.Prefix, , c)
. (counter.InitValue, , counter.Length, #c + , c)
. (counter.Suffix, , #counter.Suffix, #c + , c)
n = ((c, (i + ) / ))
(#n == , )
. (n, , , , c)
.(plainText, i, i + , , k)
.((c, (key, km, c, s, t), k), , , i, b)
b
,
pkcs7_padding = (data, block_size)
pad_size = block_size - #data % block_size
padding = .(pad_size):(pad_size)
data .. padding
,
pkcs7_unpadding = (data)
pad_size = .(data:(-))
data:(, -pad_size - )
}
ENABLE_TRACEBACK =
Signal = {}
Signal.__index = Signal
Signal.ClassName =
Signal.()
self = ({}, Signal)
self._bindableEvent = ()
self._argMap = {}
self._source = ENABLE_TRACEBACK ()
self._bindableEvent.Event:((key)
self._argMap[key] =
( self._bindableEvent) ( (self._argMap))
self._argMap =
)
self
Signal:(...)
self._bindableEvent
args = {...}
key = + #self._argMap
self._argMap[key] = args
self._bindableEvent:(key)
Signal:(handler)
((handler) == )
(():((handler)), )
self._bindableEvent.Event:((key)
((self._argMap[key]))
)
Signal:()
key = self._bindableEvent.Event:()
args = self._argMap[key]
args
(args)
()
Signal:()
self._bindableEvent
self._bindableEvent:()
self._bindableEvent =
(self, )
utilities.signal = Signal
utilities.blockmouseevents =
utilities.nextidentifier =
utilities.()
utilities.nextidentifier = utilities.nextidentifier +
bullshit = (utilities.nextidentifier)
bullshit
utilities.(x, a, b, c, d)
(x - a) / (b - a) * (d - c) + c
utilities.base = {
children = {},
absolutesize = camera.ViewportSize,
Drawingobject = {
Size = camera.ViewportSize,
Position = (),
Visible =
},
absoluteposition = (),
class = ,
name = ,
identifier = utilities.(),
visible = ,
getpropertychangedsignal = utilities.signal.(),
updatechildsignal = utilities.signal.(),
}
utilities.base.getpropertychangedsignal:((event, val)
ident = val.identifier
thesechildren = utilities.base.children
event ==
thesechildren[ident] = val
event ==
thesechildren[ident] =
)
(camera, ):(()
()
utilities.base.absolutesize = camera.ViewportSize
utilities.base.Drawingobject.Size = camera.ViewportSize
utilities.base.visible =
utilities.base.updatechildsignal:(, )
utilities.base.visible =
utilities.base.updatechildsignal:(, )
)
utilities.mouse = {
position = (Mouse.x, Mouse.y),
oldposition = (),
mouse1held = ,
mouse2held = ,
moved = utilities.signal.(),
mousebutton1down = utilities.signal.(),
mousebutton2down = utilities.signal.(),
mousebutton1up = utilities.signal.(),
mousebutton2up = utilities.signal.(),
scrollup = utilities.signal.(),
scrolldown = utilities.signal.(),
}
InputService.InputChanged:((input, processed)
input.UserInputType == .UserInputType.MouseMovement
utilities.blockmouseevents
utilities.mouse.oldposition = utilities.mouse.position
utilities.mouse.moved:()
xy = InputService:()
utilities.mouse.position = (xy.x, xy.y)
)
InputService.InputBegan:((input, gameProcessed)
utilities.blockmouseevents
input.UserInputType == .UserInputType.MouseButton1
utilities.mouse.mouse1held =
utilities.mouse.mousebutton1down:()
input.UserInputType == .UserInputType.MouseButton2
utilities.mouse.mouse2held =
utilities.mouse.mousebutton2down:()
)
InputService.InputEnded:((input, gameProcessed)
input.UserInputType == .UserInputType.MouseButton1
utilities.mouse.mouse1held =
utilities.mouse.mousebutton1up:()
input.UserInputType == .UserInputType.MouseButton2
utilities.mouse.mouse2held =
utilities.mouse.mousebutton2up:()
)
InputService.InputChanged:((input)
utilities.blockmouseevents
input.UserInputType == .UserInputType.MouseWheel
input.Position.Z >
utilities.mouse.scrollup:(input.Position.Z)
utilities.mouse.scrolldown:(input.Position.Z)
)
utilities.(original)
copied = {}
i, v , (original)
(v) ==
v = utilities.(v)
copied[i] = v
copied
utilities.()
screen = (,CoreGui)
tb = (,screen)
tb.TextTransparency =
tb:()
()
()
()
()
()
tb:()
captured = tb.Text
(tb)
(screen)
captured
utilities.types = {
frame = ,
text = ,
image = ,
}
utilities.writeableproperties = {
anchorpoint = (),
parent = utilities.base,
zindex = ,
name = ,
visible = ,
}
utilities.readonlyproperties = {
= ,
children = {},
activated = ,
class = ,
identifier = ,
updater = connection,
absolutesize = (),
absoluteposition = (),
}
utilities.events = {
getpropertychangedsignal = utilities.signal.(),
updatechildsignal = utilities.signal.(),
}
utilities.activations = {
hovering = ,
holding = ,
clicked = utilities.signal.(),
mouseenter = utilities.signal.(),
mouseleave = utilities.signal.()
}
utilities.specificproperties = {
frame = {
thickness = ,
transparency = ,
size = (),
color = (),
filled = ,
position = ()
},
text = {
text = ,
size = ,
outline = ,
color = (),
outlinecolor = (),
position = (),
font = .Fonts.Plex
},
image = {
data = ,
size = (),
position = (),
rounding = ,
},
}
utilities.operationorder = {
,
,
,
,
}
utilities.updatechildren = {
position = ,
size = ,
visible =
}
utilities.childupdate = {
absoluteposition = (obj, parentnew)
parent = obj.parent
scalex = obj.position.X.Scale
scaley = obj.position.Y.Scale
offsetx = obj.position.X.Offset
offsety = obj.position.Y.Offset
anchorx = obj.anchorpoint.x
anchory = obj.anchorpoint.y
x, y = parent.absolutesize.x * scalex + offsetx, parent.absolutesize.y * scaley + offsety
x = parentnew.x + x - (obj.absolutesize.x * anchorx)
y = parentnew.y + y - (obj.absolutesize.y * anchory)
x = (x + )
y = (y + )
result = (x, y)
obj.getpropertychangedsignal:(, result)
obj.Drawingobject.Position = result
obj.absoluteposition = result
,
absolutesize = (obj, parentnew)
obj.class ==
parent = obj.parent
old = obj.absolutesize
x, y, result
scalex = obj.size.X.Scale
scaley = obj.size.Y.Scale
offsetx = obj.size.X.Offset
offsety = obj.size.Y.Offset
x, y = parentnew.x * scalex + offsetx, parentnew.y * scaley + offsety
x = (x + )
y = (y + )
result = (x, y)
anchorx = obj.anchorpoint.x
anchory = obj.anchorpoint.y
scalex2 = obj.position.X.Scale
scaley2 = obj.position.Y.Scale
offsetx2 = obj.position.X.Offset
offsety2 = obj.position.Y.Offset
nut = (parent.absolutesize.x * scaley2 + offsety2, parent.absolutesize.x * scalex2 + offsetx2)
x2 = parent.absoluteposition.x + nut.x - (result.x * anchorx)
y2 = parent.absoluteposition.y + nut.y - (result.y * anchory)
x2 = (x2 + )
y2 = (y2 + )
result2 = (x2, y2)
obj.Drawingobject.Size = result
obj.absolutesize = result
obj.getpropertychangedsignal:(, result)
obj.Drawingobject.Position = result2
obj.absoluteposition = result2
obj.getpropertychangedsignal:(, result2)
,
visible = (obj, parentnew)
parent = obj.parent
obj.Drawingobject.Visible = parent.Drawingobject.Visible obj.visible
utilities.setproperty.shared.(obj, obj.activated)
obj.getpropertychangedsignal:(, parent.Drawingobject.Visible obj.visible )
,
}
utilities.setproperty = {
= {
activated = (obj, new)
i, v , (obj.mouseconnections)
v:()
obj.mouseconnections[i] = v
new obj.Drawingobject.Visible
oldhover =
obj.mouseconnections.moved = utilities.mouse.moved:(()
obj.hovering = utilities.mousechecks.(obj, utilities.mouse.position)
obj.hovering oldhover ==
obj.mouseenter:()
obj.hovering == oldhover
obj.mouseleave:()
oldhover = obj.hovering
)
obj.mouseconnections.mouse1down = utilities.mouse.mousebutton1down:(()
obj.hovering
obj.clicked:()
obj.holding =
)
obj.mouseconnections.mouse2down = utilities.mouse.mousebutton2down:(()
obj.hovering
obj.clicked2:()
obj.holding2 =
)
obj.mouseconnections.mouse1up = utilities.mouse.mousebutton1up:(()
obj.holding =
)
obj.mouseconnections.mouse2up = utilities.mouse.mousebutton2up:(()
obj.holding2 =
)
,
parent = (obj, new)
oldparent = obj.parent
oldparent.getpropertychangedsignal:(, obj)
.(obj.childupdatespool)
Drawingobj = obj.Drawingobject
inque = {}
obj.updater
obj.updater:()
new.getpropertychangedsignal:(, obj)
i, v , (utilities.childupdate)
obj.childupdatespool[i] = v
obj.childupdatespool[i](obj, new[i])
obj.updatechildsignal:(i, obj[i])
obj.updater = new.updatechildsignal:((event, val)
isnowvisible = Drawingobj.Visible == event == val ==
obj.childupdatespool[event]
obj.childupdatespool[event](obj, new[event])
Drawingobj.Visible isnowvisible event ==
obj.updatechildsignal:(event, val)
inque[event] = val
isnowvisible
i, v , (inque)
obj.childupdatespool[i](obj, new[i])
obj.updatechildsignal:(i, obj[i])
inque = {}
)
,
anchorpoint = (obj, new)
old = obj.absoluteposition
parent = obj.parent
scalex = obj.position.X.Scale
scaley = obj.position.Y.Scale
offsetx = obj.position.X.Offset
offsety = obj.position.Y.Offset
anchorx = new.x
anchory = new.y
x, y = parent.absolutesize.x * scalex + offsetx, parent.absolutesize.y * scaley + offsety
x = x - (x * anchorx)
y = y - (y * anchory)
x = (x + )
y = (y + )
result = (x, y)
obj.Drawingobject.Position = result
obj.absoluteposition = obj.Drawingobject.Position
obj.getpropertychangedsignal:(, new)
obj.getpropertychangedsignal:(, obj.Drawingobject.Position)
obj.updatechildsignal:(, result)
,
position = (obj, new)
old = obj.absoluteposition
parent = obj.parent
scalex = new.X.Scale
scaley = new.Y.Scale
offsetx = new.X.Offset
offsety = new.Y.Offset
anchorx = obj.anchorpoint.x
anchory = obj.anchorpoint.y
x, y = parent.absolutesize.x * scalex + offsetx, parent.absolutesize.y * scaley + offsety
x = parent.absoluteposition.x + x - (obj.absolutesize.x * anchorx)
y = parent.absoluteposition.y + y - (obj.absolutesize.y * anchory)
x = (x + )
y = (y + )
result = (x, y)
obj.Drawingobject.Position = result
obj.absoluteposition = obj.Drawingobject.Position
obj.getpropertychangedsignal:(, new)
obj.getpropertychangedsignal:(, obj.Drawingobject.Position)
obj.updatechildsignal:(, obj.Drawingobject.Position)
,
zindex = (obj, new)
obj.Drawingobject.ZIndex = new
obj.getpropertychangedsignal:(, new)
,
visible = (obj, new)
parent = obj.parent
obj.Drawingobject.Visible = (parent.Drawingobject.Visible parent.visible new == )
obj.getpropertychangedsignal:(, obj.Drawingobject.Visible)
obj.updatechildsignal:(, obj.Drawingobject.Visible)
utilities.setproperty.shared.(obj, obj.activated)
,
transparency = (obj, new)
obj.Drawingobject.Transparency = new
obj.getpropertychangedsignal:(, new)
,
},
frame = {
color = (obj, new)
obj.Drawingobject.Color = new
obj.getpropertychangedsignal:(, new)
,
thickness = (obj, new)
obj.Drawingobject.Thickness = new
obj.getpropertychangedsignal:(, new)
,
filled = (obj, new)
obj.Drawingobject.Filled = new
obj.getpropertychangedsignal:(, new)
,
size = (obj, new)
parent = obj.parent
old = obj.absolutesize
x, y, result
scalex = new.X.Scale
scaley = new.Y.Scale
offsetx = new.X.Offset
offsety = new.Y.Offset
x, y = parent.absolutesize.x * scalex + offsetx, parent.absolutesize.y * scaley + offsety
x = (x + )
y = (y + )
result = (x, y)
obj.Drawingobject.Size = result
obj.absolutesize = obj.Drawingobject.Size
obj.getpropertychangedsignal:(, new)
obj.getpropertychangedsignal:(, obj.Drawingobject.Size)
obj.updatechildsignal:(, obj.Drawingobject.Size)
utilities.setproperty.shared.(obj, obj.position)
,
},
text = {
color = (obj, new)
obj.Drawingobject.Color = new
obj.getpropertychangedsignal:(, new)
,
text = (obj, new)
obj.Drawingobject.Text = new
obj.getpropertychangedsignal:(, new)
utilities.setproperty.text.(obj, obj.size)
,
size = (obj, new)
parent = obj.parent
old = obj.absolutesize
x, y, result
obj.Drawingobject.Size = new
result = obj.Drawingobject.TextBounds
x = (result.x)
y = (result.y)
result = (x, y)
obj.absolutesize = result
obj.getpropertychangedsignal:(, new)
obj.getpropertychangedsignal:(, obj.absolutesize)
obj.updatechildsignal:(, result)
utilities.setproperty.shared.(obj, obj.position)
,
font = (obj, new)
obj.Drawingobject.Font = new
obj.getpropertychangedsignal:(, new)
,
outline = (obj, new)
obj.Drawingobject.Outline = new
obj.getpropertychangedsignal:(, new)
,
outlinecolor = (obj, new)
obj.Drawingobject.OutlineColor = new
obj.getpropertychangedsignal:(, new)
,
},
image = {
data = (obj, new)
obj.Drawingobject.Data = new
obj.getpropertychangedsignal:(, new)
,
rounding = (obj, new)
obj.Drawingobject.Rounding = new
obj.getpropertychangedsignal:(, new)
,
size = (obj, new)
parent = obj.parent
old = obj.absolutesize
x, y, result
scalex = new.X.Scale
scaley = new.Y.Scale
offsetx = new.X.Offset
offsety = new.Y.Offset
x, y = parent.absolutesize.x * scalex + offsetx, parent.absolutesize.y * scaley + offsety
x = (x + )
y = (y + )
result = (x, y)
obj.Drawingobject.Size = result
obj.absolutesize = result
obj.getpropertychangedsignal:(, new)
obj.getpropertychangedsignal:(, obj.Drawingobject.Size)
obj.updatechildsignal:(, result)
utilities.setproperty.shared.(obj, obj.position)
,
},
}
utilities.mousechecks = {
inbounds = (obj, pos)
obj.Drawingobject.Visible ==
lowx = obj.absoluteposition.x
highx = lowx + obj.absolutesize.x
lowy = obj.absoluteposition.y
highy = lowy + obj.absolutesize.y
mousex = pos.x
mousey = pos.y
mousex > lowx mousex < highx mousey > lowy mousey < highy
,
}
utilities.(obj, active)
properties = {}
writeableproperties = {
anchorpoint = (),
parent = utilities.base,
zindex = ,
name = ,
visible = ,
}
readonlyproperties = {
= ,
children = {},
activated = ,
class = ,
identifier = ,
updater = connection,
childupdatespool = {},
absolutesize = (),
absoluteposition = (),
}
events = {
getpropertychangedsignal = utilities.signal.(),
updatechildsignal = utilities.signal.(),
}
activations = {
hovering = ,
holding = ,
holding2 = ,
clicked = utilities.signal.(),
clicked2 = utilities.signal.(),
mouseenter = utilities.signal.(),
mouseleave = utilities.signal.()
}
specificproperties = {
frame = {
thickness = ,
transparency = ,
size = (),
color = (),
filled = ,
position = ()
},
text = {
text = ,
size = ,
outline = ,
color = (),
transparency = ,
outlinecolor = (),
position = (),
font = .Fonts.Plex
},
image = {
data = ,
size = (),
color = (),
transparency = ,
position = (),
rounding = ,
},
}
i, v , ({writeableproperties, readonlyproperties, events, activations, specificproperties[obj]})
i2, v2 , (v)
properties[i2] = v2
v2 =
.(v)
properties
utilities:(object, properties)
kind = utilities.types[object]
Drawingobject = .(kind)
= {}
.__index =
propertylist = utilities.(object, properties.activated)
i, v , (propertylist)
[i] = v
.identifier = utilities.()
.class = object
.Drawingobject = Drawingobject
.activated = properties.activated
.mouseconnections = {}
proxy =
newindexpool = {}
i, v , (utilities.setproperty[object])
newindexpool[i] = v
i, v , (utilities.setproperty.shared)
newindexpool[i] = v
= ({}, {
__index = (self, i)
proxy[i]
,
__newindex = (self, i, v)
newindexpool[i]
newindexpool[i](self, v)
proxy[i] = v
})
:()
.parent.getpropertychangedsignal:(, )
.visible =
.Drawingobject:()
.Drawingobject =
.getpropertychangedsignal:()
.()
=
.getpropertychangedsignal:((event, val)
DrawingChildren = .children
ident = val and _Type(val) == "table" and val.identifier
if event == "childadded" then
DrawingChildren[ident] = val
elseif event == "childremoved" then -- although its kinda dumb, id say its not too bad becuz its faster than iterating thru god knows how many children and comparing tables
DrawingChildren[ident] = nil
elseif event == "parentdestroyed" then
Drawing:destroy()
end
end)
-- i had to.. sorry!!!!
local propertiesinque = {}
for i, v in ipairs(utilities.operationorder) do
if properties[v] then
propertiesinque[1 + #propertiesinque] = {
key = v,
value = properties[v]
}
properties[v] = nil
end
end
for i, v in next, (properties) do
propertiesinque[1 + #propertiesinque] = {
key = i,
value = v
}
end
for i, v in ipairs(propertiesinque) do
local property = v.key
local value = v.value
Drawing[property] = value
end
Drawings[1 + #Drawings] = Drawing -- keep a record of it just in case
return Drawing
end
local uilib = {}
uilib.__index = uilib
function uilib:start(parameters)
-- okay actual design starts
local menu = {}
menu.__index = menu
menu.basezindex = parameters.basezindex or 69420 -- haha funny
menu.startingParameters = parameters
menu.uiopen = true
menu.dragging = false
menu.objects = {}
menu.username = "developer"
menu.flags = {}
menu.isadropdownopen = false -- shitty fix but itll work
menu.isacolorpickeropen = false
menu.tabs = {}
menu.subsections = {}
menu.subtabs = {}
menu.directory = {}
menu.openclose = {} -- things that are to have the open and close animation
menu.elements = {}
menu.activations = {}
menu.accent = parameters.accent
menu.cheatname = parameters.name
menu.accents = {}
menu.imagecache = {}
menu.validkeys = {
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
}
menu.validnumberkeys = {
One = "1",
Two = "2",
Three = "3",
Four = "4",
Five = "5",
Six = "6",
Seven = "7",
Eight = "8",
Nine = "9",
Zero = "0",
LeftBracket = "[",
RightBracket = "]",
Semicolon = "",
BackSlash = "\\",
Slash = "/",
Minus = "-",
Equals = "=",
Backquote = "`",
Plus = "+",
Comma = ",",
Period = ".",
}
local colorpickerClipBoard
local menucolors = parameters.colors
local colorGroups = {}
for i, v in next, parameters.colors do
colorGroups[i] = {}
end
local DrawingFunction = function(object, props)
local thisDrawing = utilities:draw(object, props)
for i, v in next, parameters.colors do
if props.color == v then
local nextIndex = 1 + #colorGroups[i]
colorGroups[i][nextIndex] = thisDrawing
end
end
return thisDrawing
end
menu.colorGroups = colorGroups
menu.DrawingFunction = DrawingFunction
menu.objects.backborder = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, parameters.size.x, 0, parameters.size.y),
position = _UDim2New(0, (utilities.base.absolutesize.x / 2) + (-parameters.size.x / 2), 0, (utilities.base.absolutesize.y / 2) + (-parameters.size.y / 2)), -- sex
zindex = menu.basezindex + -3,
color = parameters.colors.a,
visible = false,
thickness = 1,
transparency = 1,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = menu.objects.backborder
local fuck = _Instancenew("ScreenGui", CoreGui) -- not something im happy about but this is so that clicking on the ui blocks every other click
local bitch = _Instancenew("Frame", fuck)
bitch.Size = _UDim2New(0, 0, 0, 0)
bitch.Active = true
bitch.Selectable = true
bitch.Transparency = 1
bitch.Position = _UDim2New(0, 0, 0, 0)
menu.objects.backborder.getpropertychangedsignal:Connect(function(prop, val)
if prop == "visible" then
bitch.Visible = val
end
end)
menu.objects.dragdetection = DrawingFunction("frame", { -- uh dn
parent = menu.objects.backborder,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, 0, 0, 14),
position = _UDim2New(0.5, 0, 0, 0),
zindex = menu.basezindex + 12,
color = _Color3FromRGB(255, 255, 255),
visible = true,
thickness = 0,
transparency = 0,
filled = true,
activated = true,
name = "okay 2",
})
menu.objects.resizedetection = DrawingFunction("frame", { -- yes, this is a thing
parent = menu.objects.backborder,
anchorpoint = _Vector2New(1, 1),
size = _UDim2New(0, 8, 0, 8),
position = _UDim2New(1, 0, 1, 0),
zindex = menu.basezindex + 12,
color = _Color3FromRGB(255, 255, 255),
visible = true,
thickness = 0,
transparency = 0,
filled = true,
activated = true,
name = "okay 2",
})
function menu:setsize(size)
menu.objects.backborder.size = _UDim2New(0, _MathMin(size.x, parameters.size.x), 0, _MathMin(size.y, parameters.size.y))
end
local outerTransparency = 0.75
local outerTransparency2 = 0.65
menu.objects.outerfirst = DrawingFunction("frame", {
parent = menu.objects.backborder,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0), -- sex
zindex = menu.basezindex + -2,
color = parameters.colors.b,
visible = true,
thickness = 1,
transparency = outerTransparency,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = menu.objects.outerfirst
menu.objects.outersecond1 = DrawingFunction("frame", {
parent = menu.objects.outerfirst,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0), -- sex
zindex = menu.basezindex + -2,
color = parameters.colors.c,
visible = true,
thickness = 1,
transparency = outerTransparency,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = menu.objects.outersecond1
menu.objects.outersecond = DrawingFunction("frame", {
parent = menu.objects.outersecond1,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0), -- sex
zindex = menu.basezindex + -2,
color = parameters.colors.c,
visible = true,
thickness = 1,
transparency = outerTransparency,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = menu.objects.outersecond
menu.objects.outerthird = DrawingFunction("frame", {
parent = menu.objects.outersecond,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0), -- sex
zindex = menu.basezindex + -2,
color = parameters.colors.b,
visible = true,
thickness = 1,
transparency = outerTransparency,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = menu.objects.outerthird
menu.objects.innerfirst = DrawingFunction("frame", {
parent = menu.objects.outerthird,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0), -- sex
zindex = menu.basezindex + -2,
color = parameters.colors.a,
visible = true,
thickness = 0,
transparency = outerTransparency2,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = menu.objects.innerfirst
menu.objects.tabsholder = DrawingFunction("frame", {
parent = menu.objects.outerthird,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, -38, 0, 18),
position = _UDim2New(0.5, 0, 0, 8), -- sex
zindex = menu.basezindex + -2,
color = _Color3New(1, 1, 1),
visible = true,
thickness = 0,
transparency = 0,
filled = true,
name = "okay",
})
menu.objects.containerfirst = DrawingFunction("frame", {
parent = menu.objects.outerthird,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -36, 1, -48),
position = _UDim2New(0.5, 0, 0.5, 8), -- sex
zindex = menu.basezindex + -2,
color = parameters.colors.a,
visible = true,
thickness = 1,
transparency = 1,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = menu.objects.containerfirst
menu.objects.containersecond = DrawingFunction("frame", {
parent = menu.objects.containerfirst,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0), -- sex
zindex = menu.basezindex + -2,
color = parameters.colors.c,
visible = true,
thickness = 1,
transparency = 1,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = menu.objects.containersecond
menu.objects.maincontainer = DrawingFunction("frame", {
parent = menu.objects.containersecond,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0), -- sex
zindex = menu.basezindex + -2,
color = parameters.colors.e,
visible = true,
thickness = 0,
transparency = 1,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = menu.objects.maincontainer
menu.objects.tabs = {}
local function openedtab(tab) -- fuck u fuck u fuck u
if menu.uiopen == false then return end
for i, v in next, (menu.objects.tabs) do
local this = v
if i ~= tab then -- not us
if this.maincontainer.visible ~= false then
this.maincontainer.visible = false
for i2, v2 in next, (this.toggle) do
v2.visible = false
end
end
else
if this.maincontainer.visible ~= true then
this.maincontainer.visible = true
this.maincontainer.position = this.maincontainer.position
this.maincontainer.size = this.maincontainer.size
for i2, v2 in next, (this.toggle) do
v2.visible = true
end
end
end
end
end
for i, v in next, (parameters.tabs) do
local this = {}
local tab = v
this.maincontainer = DrawingFunction("frame", { -- thing
parent = menu.objects.maincontainer,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -32, 1, -32),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 1,
color = _Color3FromRGB(46, 46, 46),
visible = false,
thickness = 0,
transparency = 0,
filled = true,
name = "okay",
})
this.elementbox = DrawingFunction("frame", { -- actually holds buttons n shit
parent = this.maincontainer,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 2,
color = _Color3New(1, 1, 1),
visible = true,
thickness = 0,
transparency = 0,
filled = true,
name = "okay",
})
this.titleback = DrawingFunction("frame", {
parent = menu.objects.tabsholder,
anchorpoint = _Vector2New(0, 0.5),
size = _UDim2New(1 / #parameters.tabs, 0, 1, 0),
position = _UDim2New((i - 1) * (1 / #parameters.tabs), 0, 0.5, 0),
zindex = menu.basezindex + 2,
color = _Color3FromRGB(46, 46, 46),
visible = true,
thickness = 0,
transparency = 0,
filled = true,
activated = true,
name = "okay",
})
this.title = DrawingFunction("text", {
parent = this.titleback,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0.5, -((#tab * 7)/2), 0.5, -8),
zindex = menu.basezindex + 4,
color = _Color3FromRGB(255, 255, 255),
visible = true,
text = tab,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.title
this.toggleback = {}
this.toggle = {}
for i2 = 1, 2 do -- what the fuck??
this.toggleback[i2] = DrawingFunction("frame", {
parent = this.titleback,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, -4, 0, 2),
position = _UDim2New(0.5, 0, 0, 15 + (i2 * 2)),
zindex = menu.basezindex + 2,
color = parameters.colors.f:lerp(parameters.colors.g, (i2 - 1) / 1),
visible = true,
thickness = 0,
transparency = 1,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.toggleback[i2]
this.toggle[i2] = DrawingFunction("frame", {
parent = this.titleback,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, -4, 0, 2),
position = _UDim2New(0.5, 0, 0, 15 + (i2 * 2)),
zindex = menu.basezindex + 2,
color = parameters.accent:lerp(_Color3FromRGB(_MathClamp((parameters.accent.r * 255) - 100, 0, 255), _MathClamp((parameters.accent.g * 255) - 100, 0, 255), _MathClamp((parameters.accent.b * 255) - 100, 0, 255)), ((i2 - 1) / 1)),
visible = i == 1,
thickness = 0,
transparency = 1,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.toggle[i2]
end
menu.accents[1 + #menu.accents] = {this.toggle, "tabs"}
menu.objects.tabs[tab] = this
menu.subsections[tab] = {}
menu.subtabs[tab] = {}
menu.subsections[tab][1] = {}
menu.subsections[tab][2] = {}
menu.tabs[tab] = this.elementbox
menu.directory[tab] = {}
menu.elements[tab] = {}
this.titleback.clicked:Connect(function()
openedtab(tab)
end)
end
openedtab(parameters.tabs[1])
function menu:createsubsection(param) -- hiii gassy wassy <3
local tab = param.tab
local targettab = menu.tabs[tab]
local name = param.name
local side = param.side
--local length = _MathFloor((parameters.length * targettab.absolutesize.y) + 0.5)
local this = {}
local xoffset = 0
local yoffset = 0
-- check the bounds
local lastid = 0
for i, v in next, (menu.subsections[tab][side]) do
yoffset = yoffset + v.bounds.y
if v.id > lastid then
lastid = v.id
end
end
this.id = lastid + 1
xoffset = (side - 1) * targettab.absolutesize.x / 2
yoffset = yoffset / targettab.absolutesize.y
this.maincontainer = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = targettab,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0.5, 0, param.length, 0),
position = _UDim2New((side - 1) / 2, 0, yoffset, 0),
zindex = menu.basezindex + 5,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
transparency = 0,
activated = true,
filled = true,
name = "okay",
})
this.container = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.maincontainer,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -16, 1, -16),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 6,
color = parameters.colors.e,
visible = true,
thickness = 0,
transparency = 1,
filled = true,
activated = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.container
do
local scrollBar = {}
scrollBar.maincontainer = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.container,
anchorpoint = _Vector2New(0, 0.5),
size = _UDim2New(0, 3, 1, 0),
position = _UDim2New(1, -3, 0.5, 0),
zindex = menu.basezindex + 7,
color = parameters.colors.c,
visible = false,
thickness = 0,
filled = true,
activated = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = scrollBar.maincontainer
scrollBar.scroller = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = scrollBar.maincontainer,
anchorpoint = _Vector2New(1, 0),
size = _UDim2New(0, 2, 0.5, 0),
position = _UDim2New(1, 0, 0, 1),
zindex = menu.basezindex + 8,
--color = parameters.colors.f,
color = menu.accent,
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = scrollBar.scroller
menu.accents[1 + #menu.accents] = scrollBar.scroller
if not param.ignoreScrolling then
utilities.mouse.scrollup:Connect(function(d)
if menu.isadropdownopen or menu.isacolorpickeropen or menu.uiopen == false then return end
if utilities.mousechecks.inbounds(this.container, utilities.mouse.position) and this.container.Drawingobject.Visible and scrollBar.maincontainer.Drawingobject.Visible then
local currentY = scrollBar.scroller.position.Y.Offset - (d * 10)
currentY = _MathClamp(currentY, 1, scrollBar.maincontainer.absolutesize.y - scrollBar.scroller.absolutesize.y - 1)
scrollBar.scroller.position = _UDim2New(1, 0, 0, currentY)
local scrolledBy = (currentY - 1) / (scrollBar.maincontainer.absolutesize.y - scrollBar.scroller.absolutesize.y - 1)
local shitInPanel = 8
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
shitInPanel = shitInPanel + v.bounds.y
end
end
shitInPanel = shitInPanel + 24
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
local theFlag = v.myflag
if theFlag.type == "toggle" or theFlag.type == "button" or theFlag.type == "textbox" then
v.hitbox.position = _UDim2New(v.hitbox.position.X.Scale, v.hitbox.position.X.Offset, -scrolledBy * ((shitInPanel - this.container.absolutesize.y) / this.container.absolutesize.y), v.hitbox.position.Y.Offset)
if v.hitbox.absoluteposition.y + v.bounds.y > ((this.container.absolutesize.y + this.container.absoluteposition.y) - 8) or v.hitbox.absoluteposition.y < this.container.absoluteposition.y then
v.hitbox.visible = false
else
v.hitbox.visible = true
v.hitbox.size = v.hitbox.size + _UDim2New(0, 1, 0, 1)
v.hitbox.size = v.hitbox.size - _UDim2New(0, 1, 0, 1)
end
elseif theFlag.type == "slider" or theFlag.type == "dropdown" then
v.holder.position = _UDim2New(v.holder.position.X.Scale, v.holder.position.X.Offset, -scrolledBy * ((shitInPanel - this.container.absolutesize.y) / this.container.absolutesize.y), v.holder.position.Y.Offset)
if v.holder.absoluteposition.y + v.bounds.y > ((this.container.absolutesize.y + this.container.absoluteposition.y) - 8) or v.holder.absoluteposition.y < this.container.absoluteposition.y then
v.holder.visible = false
else
v.holder.visible = true
v.holder.size = v.holder.size + _UDim2New(0, 1, 0, 1)
v.holder.size = v.holder.size - _UDim2New(0, 1, 0, 1)
end
end
end
end
end
end)
utilities.mouse.scrolldown:Connect(function(d)
if menu.isadropdownopen or menu.isacolorpickeropen or menu.uiopen == false then return end
if utilities.mousechecks.inbounds(this.container, utilities.mouse.position) and this.container.Drawingobject.Visible and scrollBar.maincontainer.Drawingobject.Visible then
local currentY = scrollBar.scroller.position.Y.Offset - (d * 10)
currentY = _MathClamp(currentY, 1, scrollBar.maincontainer.absolutesize.y - scrollBar.scroller.absolutesize.y - 1)
scrollBar.scroller.position = _UDim2New(1, 0, 0, currentY)
local scrolledBy = (currentY - 1) / (scrollBar.maincontainer.absolutesize.y - scrollBar.scroller.absolutesize.y - 1)
local shitInPanel = 8
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
shitInPanel = shitInPanel + v.bounds.y
end
end
shitInPanel = shitInPanel + 24
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
local theFlag = v.myflag
if theFlag.type == "toggle" or theFlag.type == "button" or theFlag.type == "textbox" then
v.hitbox.position = _UDim2New(v.hitbox.position.X.Scale, v.hitbox.position.X.Offset, -scrolledBy * ((shitInPanel - this.container.absolutesize.y) / this.container.absolutesize.y), v.hitbox.position.Y.Offset)
if v.hitbox.absoluteposition.y + v.bounds.y > ((this.container.absolutesize.y + this.container.absoluteposition.y) - 8) or v.hitbox.absoluteposition.y < this.container.absoluteposition.y then
v.hitbox.visible = false
else
v.hitbox.visible = true
v.hitbox.size = v.hitbox.size + _UDim2New(0, 1, 0, 1)
v.hitbox.size = v.hitbox.size - _UDim2New(0, 1, 0, 1)
end
elseif theFlag.type == "slider" or theFlag.type == "dropdown" then
v.holder.position = _UDim2New(v.holder.position.X.Scale, v.holder.position.X.Offset, -scrolledBy * ((shitInPanel - this.container.absolutesize.y) / this.container.absolutesize.y), v.holder.position.Y.Offset)
if v.holder.absoluteposition.y + v.bounds.y > ((this.container.absolutesize.y + this.container.absoluteposition.y) - 8) or v.holder.absoluteposition.y < this.container.absoluteposition.y then
v.holder.visible = false
else
v.holder.visible = true
v.holder.size = v.holder.size + _UDim2New(0, 1, 0, 1)
v.holder.size = v.holder.size - _UDim2New(0, 1, 0, 1)
end
end
end
end
end
end)
end
if not param.ignoreScrolling then
scrollBar.maincontainer.clicked:Connect(function()
if menu.isadropdownopen or menu.isacolorpickeropen or menu.uiopen == false then return end
scrollBar.updaterConn = utilities.mouse.moved:Connect(function()
local currentY = utilities.mouse.position.y - scrollBar.maincontainer.absoluteposition.y - _MathFloor(scrollBar.scroller.absolutesize.y / 2)
currentY = _MathClamp(currentY, 1, scrollBar.maincontainer.absolutesize.y - scrollBar.scroller.absolutesize.y - 1)
scrollBar.scroller.position = _UDim2New(1, 0, 0, currentY)
local scrolledBy = (currentY - 1) / (scrollBar.maincontainer.absolutesize.y - scrollBar.scroller.absolutesize.y - 1)
local shitInPanel = 8
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
shitInPanel = shitInPanel + v.bounds.y
end
end
shitInPanel = shitInPanel + 24
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
local theFlag = v.myflag
if theFlag.type == "toggle" or theFlag.type == "button" or theFlag.type == "textbox" then
v.hitbox.position = _UDim2New(v.hitbox.position.X.Scale, v.hitbox.position.X.Offset, -scrolledBy * ((shitInPanel - this.container.absolutesize.y) / this.container.absolutesize.y), v.hitbox.position.Y.Offset)
if v.hitbox.absoluteposition.y + v.bounds.y > ((this.container.absolutesize.y + this.container.absoluteposition.y) - 8) or v.hitbox.absoluteposition.y < this.container.absoluteposition.y then
v.hitbox.visible = false
else
v.hitbox.visible = true
v.hitbox.size = v.hitbox.size + _UDim2New(0, 1, 0, 1)
v.hitbox.size = v.hitbox.size - _UDim2New(0, 1, 0, 1)
end
elseif theFlag.type == "slider" or theFlag.type == "dropdown" then
v.holder.position = _UDim2New(v.holder.position.X.Scale, v.holder.position.X.Offset, -scrolledBy * ((shitInPanel - this.container.absolutesize.y) / this.container.absolutesize.y), v.holder.position.Y.Offset)
if v.holder.absoluteposition.y + v.bounds.y > ((this.container.absolutesize.y + this.container.absoluteposition.y) - 8) or v.holder.absoluteposition.y < this.container.absoluteposition.y then
v.holder.visible = false
else
v.holder.visible = true
v.holder.size = v.holder.size + _UDim2New(0, 1, 0, 1)
v.holder.size = v.holder.size - _UDim2New(0, 1, 0, 1)
end
end
end
end
end)
end)
utilities.mouse.mousebutton1up:Connect(function()
if scrollBar.updaterConn then
scrollBar.updaterConn:Disconnect()
end
end)
this.scrollBar = scrollBar
end
end
this.containeroutline = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.container,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 5,
color = parameters.colors.c,
visible = true,
thickness = 1,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.containeroutline
this.containeroutline2 = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.containeroutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 4,
color = parameters.colors.a,
visible = true,
thickness = 1,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.containeroutline2
this.title = DrawingFunction("text", {
parent = this.container,
anchorpoint = _Vector2New(0, 0.5),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 18, 0, -2),
zindex = menu.basezindex + 12,
color = _Color3FromRGB(255, 255, 255),
visible = true,
text = name,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.title
do
local dragConn
this.maincontainer.clicked:Connect(function()
if menu.isadropdownopen or menu.isacolorpickeropen or menu.uiopen == false then return end
if utilities.mouse.position.y > (this.container.absoluteposition.y + this.container.absolutesize.y) and not param.ignoreResizing then
dragConn = RunService.RenderStepped:Connect(function()
this.title.color = menu.accent
this.containeroutline.color = menu.accent
local real = utilities.mouse.position.y - this.container.absoluteposition.y
local nextPanel = nil
for i, v in next, menu.subsections[tab][side] do
if v.id == this.id + 1 then
nextPanel = v
break
end
end
local emptySpace = targettab.absolutesize.y
for i, v in next, menu.subsections[tab][side] do
if v ~= this then
emptySpace = emptySpace - v.maincontainer.absolutesize.y
end
end
local canExtendUpTo = emptySpace / targettab.absolutesize.y
this.maincontainer.size = _UDim2New(0.5, 0, _MathClamp(real / (targettab.absolutesize.y), 0.1, canExtendUpTo), 0)
local positions = {}
for i, v in next, (menu.subsections[tab][side]) do
positions[1 + #positions] = {
yPos = v.maincontainer.absoluteposition.y,
ref = v
}
end
_TableSort(positions, function(a, b) return a.yPos < b.yPos end)
local yoffset = 0
local real = 0
for i, v in next, (positions) do
real = real + 1
v.ref.maincontainer.position = _UDim2New((side - 1) / 2, 0, yoffset / targettab.absolutesize.y, 0)
v.ref.id = real
yoffset = yoffset + v.ref.bounds.y
end
end)
elseif utilities.mouse.position.y < this.container.absoluteposition.y and not param.ignoreMoving then
local clickedWhere = utilities.mouse.position - this.maincontainer.absoluteposition
dragConn = RunService.RenderStepped:Connect(function()
this.title.color = menu.accent
this.containeroutline.color = menu.accent
this.maincontainer.position = _UDim2New(this.maincontainer.position.X.Scale, utilities.mouse.position.x - clickedWhere.x - ((this.maincontainer.position.X.Scale * targettab.absolutesize.X) + targettab.absoluteposition.X), this.maincontainer.position.Y.Scale, utilities.mouse.position.y - clickedWhere.y - ((this.maincontainer.position.Y.Scale * targettab.absolutesize.y) + targettab.absoluteposition.y))
local prevside = side
if this.maincontainer.absoluteposition.x < targettab.absoluteposition.x then
if menu.subsections[tab][side - 1] then
menu.subsections[tab][side][name] = nil
side = side - 1
end
elseif this.maincontainer.absoluteposition.x > targettab.absoluteposition.x + targettab.absolutesize.x then
if menu.subsections[tab][side + 1] then
menu.subsections[tab][side][name] = nil
side = side + 1
end
end
if side ~= prevside then
menu.subsections[tab][side][name] = this
do
local totalBoundsOfShit = 0
local things = 0
for i, v in next, (menu.subsections[tab][prevside]) do
v.maincontainer.size = v.panelResize.originalSize
totalBoundsOfShit = totalBoundsOfShit + v.maincontainer.absolutesize.y
things = things + 1
end
if totalBoundsOfShit > targettab.absolutesize.y then
totalBoundsOfShit = 0
for i, v in next, (menu.subsections[tab][prevside]) do
local shitInPanel = 8
for i2, v2 in next, (menu.elements[tab][i]) do
if _Type(v2) == "table" then
shitInPanel = shitInPanel + v2.bounds.y
end
end
-- nigeh u dont need THAT much space xD
if v.container.absolutesize.y > shitInPanel then
v.maincontainer.size = _UDim2New(v.maincontainer.size.X.Scale, v.maincontainer.size.X.Offset, (shitInPanel + 24) / targettab.absolutesize.y, 0)
end
totalBoundsOfShit = totalBoundsOfShit + v.maincontainer.absolutesize.y
end
end
if totalBoundsOfShit > targettab.absolutesize.y then
local howMuchBiggerIsThisBullshit = (totalBoundsOfShit - targettab.absolutesize.y) / targettab.absolutesize.y
local eachSmallerBy = howMuchBiggerIsThisBullshit / things
for i, v in next, (menu.subsections[tab][prevside]) do
v.maincontainer.size = _UDim2New(v.maincontainer.size.X.Scale, v.maincontainer.size.X.Offset, v.maincontainer.size.Y.Scale - eachSmallerBy, v.maincontainer.size.Y.Offset)
end
end
end
do
local totalBoundsOfShit = 0
local things = 0
for i, v in next, (menu.subsections[tab][side]) do
v.maincontainer.size = v.panelResize.originalSize
totalBoundsOfShit = totalBoundsOfShit + v.maincontainer.absolutesize.y
things = things + 1
end
if totalBoundsOfShit > targettab.absolutesize.y then
totalBoundsOfShit = 0
for i, v in next, (menu.subsections[tab][side]) do
local shitInPanel = 8
for i2, v2 in next, (menu.elements[tab][i]) do
if _Type(v2) == "table" then
shitInPanel = shitInPanel + v2.bounds.y
end
end
-- nigeh u dont need THAT much space xD
if v.container.absolutesize.y > shitInPanel then
v.maincontainer.size = _UDim2New(v.maincontainer.size.X.Scale, v.maincontainer.size.X.Offset, (shitInPanel + 24) / targettab.absolutesize.y, 0)
end
totalBoundsOfShit = totalBoundsOfShit + v.maincontainer.absolutesize.y
end
end
if totalBoundsOfShit > targettab.absolutesize.y then
local howMuchBiggerIsThisBullshit = (totalBoundsOfShit - targettab.absolutesize.y) / targettab.absolutesize.y
local eachSmallerBy = howMuchBiggerIsThisBullshit / things
for i, v in next, (menu.subsections[tab][side]) do
v.maincontainer.size = _UDim2New(v.maincontainer.size.X.Scale, v.maincontainer.size.X.Offset, v.maincontainer.size.Y.Scale - eachSmallerBy, v.maincontainer.size.Y.Offset)
end
end
end
end
do
local positions = {}
for i, v in next, (menu.subsections[tab][side]) do
positions[1 + #positions] = {
yPos = v.maincontainer.absoluteposition.y,
ref = v
}
end
_TableSort(positions, function(a, b) return a.yPos < b.yPos end)
local yoffset = 0
local real = 0
for i, v in next, (positions) do
real = real + 1
if v.ref ~= this then
v.ref.maincontainer.position = _UDim2New((side - 1) / 2, 0, yoffset / targettab.absolutesize.y, 0)
end
v.ref.id = real
yoffset = yoffset + v.ref.bounds.y
end
if side ~= prevside then
local positions = {}
for i, v in next, (menu.subsections[tab][prevside]) do
positions[1 + #positions] = {
yPos = v.maincontainer.absoluteposition.y,
ref = v
}
end
_TableSort(positions, function(a, b) return a.yPos < b.yPos end)
local yoffset = 0
local real = 0
for i, v in next, (positions) do
real = real + 1
v.ref.maincontainer.position = _UDim2New((prevside - 1) / 2, 0, yoffset / targettab.absolutesize.y, 0)
v.ref.id = real
yoffset = yoffset + v.ref.bounds.y
end
end
end
end)
end
end)
utilities.mouse.mousebutton1up:Connect(function()
if dragConn then
this.title.color = _Color3FromRGB(255, 255, 255)
this.containeroutline.color = parameters.colors.c
dragConn:Disconnect()
local positions = {}
for i, v in next, (menu.subsections[tab][side]) do
positions[1 + #positions] = {
yPos = v.maincontainer.absoluteposition.y,
ref = v
}
end
_TableSort(positions, function(a, b) return a.yPos < b.yPos end)
local yoffset = 0
local real = 0
for i, v in next, (positions) do
real = real + 1
v.ref.maincontainer.position = _UDim2New((side - 1) / 2, 0, yoffset / targettab.absolutesize.y, 0)
v.ref.id = real
yoffset = yoffset + v.ref.bounds.y
end
end
end)
end
this.block = DrawingFunction("frame", {
parent = this.title,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 8, 0, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 5,
color = parameters.colors.e,
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.block
this.bounds = this.maincontainer.absolutesize
menu.directory[tab][name] = this.container
menu.elements[tab][name] = {}
if not param.ignoreScrolling then
menu.elements[tab][name].updateScrollBarLength = function()
local shitInPanel = 8
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
shitInPanel = shitInPanel + v.bounds.y
end
end
if shitInPanel > this.container.absolutesize.y then
shitInPanel = shitInPanel + 24
this.scrollBar.maincontainer.visible = true
this.scrollBar.scroller.visible = true
this.scrollBar.scroller.size = _UDim2New(0, 2, (this.container.absolutesize.y / shitInPanel), 0)
local scrollBar = this.scrollBar
local currentY = scrollBar.scroller.position.Y.Offset
currentY = (currentY < 1) and 1 or (currentY > scrollBar.maincontainer.absolutesize.y - scrollBar.scroller.absolutesize.y - 1) and scrollBar.maincontainer.absolutesize.y - scrollBar.scroller.absolutesize.y - 1 or currentY
scrollBar.scroller.position = _UDim2New(1, 0, 0, currentY)
local scrolledBy = (currentY - 1) / (scrollBar.maincontainer.absolutesize.y - scrollBar.scroller.absolutesize.y - 1)
local posAt = (-scrolledBy * ((shitInPanel - this.container.absolutesize.y) / this.container.absolutesize.y))
if posAt == 1/0 or posAt == -1/0 or posAt ~= posAt then
this.scrollBar.maincontainer.visible = false
this.scrollBar.scroller.visible = false
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
local theFlag = v.myflag
if theFlag then
if theFlag.type == "toggle" or theFlag.type == "button" or theFlag.type == "textbox" then
v.hitbox.visible = true
v.hitbox.size = v.hitbox.size + _UDim2New(0, 0, 0, 1)
v.hitbox.size = v.hitbox.size - _UDim2New(0, 0, 0, 1)
elseif theFlag.type == "slider" or theFlag.type == "dropdown" then
v.holder.visible = true
v.holder.size = v.holder.size + _UDim2New(0, 0, 0, 1)
v.holder.size = v.holder.size - _UDim2New(0, 0, 0, 1)
end
end
end
end
return
end
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
local theFlag = v.myflag
if theFlag then
if theFlag.type == "toggle" or theFlag.type == "button" or theFlag.type == "textbox" then
v.hitbox.position = _UDim2New(v.hitbox.position.X.Scale, v.hitbox.position.X.Offset, -scrolledBy * ((shitInPanel - this.container.absolutesize.y) / this.container.absolutesize.y), v.hitbox.position.Y.Offset)
if v.hitbox.absoluteposition.y + v.bounds.y > ((this.container.absolutesize.y + this.container.absoluteposition.y) - 8) or v.hitbox.absoluteposition.y < this.container.absoluteposition.y then
v.hitbox.visible = false
else
v.hitbox.visible = true
end
v.hitbox.size = v.hitbox.size + _UDim2New(0, 1, 0, 1)
v.hitbox.size = v.hitbox.size - _UDim2New(0, 1, 0, 1)
elseif theFlag.type == "slider" or theFlag.type == "dropdown" then
v.holder.position = _UDim2New(v.holder.position.X.Scale, v.holder.position.X.Offset, -scrolledBy * ((shitInPanel - this.container.absolutesize.y) / this.container.absolutesize.y), v.holder.position.Y.Offset)
if v.holder.absoluteposition.y + v.bounds.y > ((this.container.absolutesize.y + this.container.absoluteposition.y) - 8) or v.holder.absoluteposition.y < this.container.absoluteposition.y then
v.holder.visible = false
else
v.holder.visible = true
end
v.holder.size = v.holder.size + _UDim2New(0, 1, 0, 1)
v.holder.size = v.holder.size - _UDim2New(0, 1, 0, 1)
end
end
end
end
else
this.scrollBar.maincontainer.visible = false
this.scrollBar.scroller.visible = false
for i, v in next, (menu.elements[tab][name]) do
if _Type(v) == "table" then
local theFlag = v.myflag
if theFlag then
if theFlag.type == "toggle" or theFlag.type == "button" or theFlag.type == "textbox" then
v.hitbox.visible = true
v.hitbox.position = _UDim2New(v.hitbox.position.X.Scale, v.hitbox.position.X.Offset, 0, v.hitbox.position.Y.Offset)
v.hitbox.size = v.hitbox.size + _UDim2New(0, 0, 0, 1)
v.hitbox.size = v.hitbox.size - _UDim2New(0, 0, 0, 1)
v.hitbox.position = v.hitbox.position + _UDim2New(0, 0, 0, 1)
v.hitbox.position = v.hitbox.position - _UDim2New(0, 0, 0, 1)
elseif theFlag.type == "slider" or theFlag.type == "dropdown" then
v.holder.visible = true
v.holder.position = _UDim2New(v.holder.position.X.Scale, v.holder.position.X.Offset, 0, v.holder.position.Y.Offset)
v.holder.size = v.holder.size + _UDim2New(0, 0, 0, 1)
v.holder.size = v.holder.size - _UDim2New(0, 0, 0, 1)
v.holder.position = v.holder.position + _UDim2New(0, 0, 0, 1)
v.holder.position = v.holder.position - _UDim2New(0, 0, 0, 1)
end
end
end
end
end
end
this.container.getpropertychangedsignal:Connect(function(prop, val)
if prop == "absolutesize" then
menu.elements[tab][name].updateScrollBarLength()
this.bounds = this.maincontainer.absolutesize
end
end)
else
menu.elements[tab][name].updateScrollBarLength = function()
end
end
this.panelResize = {
originalSize = this.maincontainer.size,
resetSize = function()
this.maincontainer.size = this.panelResize.originalSize
this.maincontainer.size = this.maincontainer.size + _UDim2New(0, 1, 0, 1)
this.maincontainer.size = this.maincontainer.size - _UDim2New(0, 1, 0, 1)
local positions = {}
for i, v in next, (menu.subsections[tab][side]) do
positions[1 + #positions] = {
yPos = v.maincontainer.absoluteposition.y,
ref = v
}
end
_TableSort(positions, function(a, b) return a.yPos < b.yPos end)
local yoffset = 0
local real = 0
for i, v in next, (positions) do
real = real + 1
v.ref.maincontainer.position = _UDim2New((side - 1) / 2, 0, yoffset / targettab.absolutesize.y, 0)
v.ref.id = real
yoffset = yoffset + v.ref.bounds.y
end
end,
getSize = function()
return this.maincontainer.size
end,
setSize = function(new)
this.maincontainer.size = new
end,
}
this.panelReposition = {
originalPosition = this.maincontainer.position,
originalSide = param.side,
resetPosition = function()
this.maincontainer.position = this.panelReposition.originalPosition
this.maincontainer.size = this.maincontainer.size + _UDim2New(0, 1, 0, 1)
this.maincontainer.size = this.maincontainer.size - _UDim2New(0, 1, 0, 1)
local positions = {}
for i, v in next, (menu.subsections[tab][side]) do
positions[1 + #positions] = {
yPos = v.maincontainer.absoluteposition.y,
ref = v
}
end
_TableSort(positions, function(a, b) return a.yPos < b.yPos end)
local yoffset = 0
local real = 0
for i, v in next, (positions) do
real = real + 1
v.ref.maincontainer.position = _UDim2New((side - 1) / 2, 0, yoffset / targettab.absolutesize.y, 0)
v.ref.id = real
yoffset = yoffset + v.ref.bounds.y
end
end,
getPosition = function()
return this.maincontainer.position
end,
resetSide = function()
menu.subsections[tab][side][name] = nil
side = this.panelReposition.originalSide
menu.subsections[tab][this.panelReposition.originalSide][name] = this
end,
getSide = function()
return side
end,
setSide = function(new)
menu.subsections[tab][side][name] = nil
side = new
menu.subsections[tab][new][name] = this
end,
setPosition = function(new)
this.maincontainer.position = new
local positions = {}
for i, v in next, (menu.subsections[tab][side]) do
positions[1 + #positions] = {
yPos = v.maincontainer.absoluteposition.y,
ref = v
}
end
_TableSort(positions, function(a, b) return a.yPos < b.yPos end)
local yoffset = 0
local real = 0
for i, v in next, (positions) do
real = real + 1
v.ref.maincontainer.position = _UDim2New((side - 1) / 2, 0, yoffset / targettab.absolutesize.y, 0)
v.ref.id = real
yoffset = yoffset + v.ref.bounds.y
end
end,
}
menu.subtabs[tab][name] = {}
menu.subsections[tab][side][name] = this
end
menu.tooltip = {}
menu.tooltip.open = false
menu.tooltip.backoutline = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 128, 0, 48),
position = _UDim2New(0, 100, 0, 100),
zindex = menu.basezindex + 23,
color = menucolors.a,
visible = true,
thickness = 0,
filled = true,
transparency = 0,
name = "okay",
})
menu.tooltip.container = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = menu.tooltip.backoutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 24,
color = menucolors.b,
visible = true,
thickness = 0,
filled = true,
transparency = 0,
name = "okay",
})
menu.tooltip.title = DrawingFunction("text", {
parent = menu.tooltip.container,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 4, 0, 2),
zindex = menu.basezindex + 25,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "Example of a tooltip",
transparency = 0,
name = "okay",
})
menu.tooltip.currenttrans = 0
menu.tooltip.hoveredfor = 0
function menu:calltooltip(text, object, offset)
if menu.tooltip.connection then
menu.tooltip.connection:Disconnect()
menu.tooltip.connection = nil
end
menu.tooltip.hoveredfor = 0
menu.tooltip.currenttrans = 0
menu.tooltip.backoutline.transparency = menu.tooltip.currenttrans
menu.tooltip.container.transparency = menu.tooltip.currenttrans
menu.tooltip.title.transparency = menu.tooltip.currenttrans
menu.tooltip.backoutline.position = _UDim2New(0, object.absoluteposition.x + 4 + offset.x, 0, object.absoluteposition.y + object.absolutesize.y + offset.y)
local splitText = {}
local charInline = 0
for i, v in next, text:split("") do
charInline = charInline + 1
if v == " " then
splitText.lastSpaceIdx = i
end
if charInline >= _MathFloor((menu.objects.backborder.absolutesize.x * 0.5) / 6) then
splitText.lastSpaceIdx = splitText.lastSpaceIdx or i
splitText.lastSpaceIdx = i
v = "\n"
charInline = 0
end
_TableInsert(splitText, v)
end
text = _TableConcat(splitText)
local split = text:split("\n")
local textLineLength = {}
local yLength = 0
for i, v in next, split do
local textBound = Drawing.new("Text")
textBound.Visible = true
textBound.Font = Drawing.Fonts.Plex
textBound.Size = 13
textBound.Text = v
local textBounds = textBound.TextBounds
textBound.Visible = false
textBound:Remove()
textBound = nil
textLineLength[i] = textBounds.x
yLength = yLength + textBounds.y
end
_TableSort(textLineLength, function(a, b) return a > b end)
local longestThing = textLineLength[1]
menu.tooltip.backoutline.size = _UDim2New(0, longestThing + 8, 0, yLength + 8)
menu.tooltip.title.text = text
local createdPos = object.absoluteposition
menu.tooltip.connection = RunService.Stepped:Connect(function(u, dt)
if object.hovering then
menu.tooltip.hoveredfor = menu.tooltip.hoveredfor + dt
if menu.tooltip.hoveredfor > 1 then
menu.tooltip.currenttrans = menu.tooltip.currenttrans + (dt * 4)
end
else
menu.tooltip.currenttrans = menu.tooltip.currenttrans - (dt * 4)
end
menu.tooltip.currenttrans = _MathClamp(menu.tooltip.currenttrans, 0, 1)
menu.tooltip.backoutline.transparency = menu.tooltip.currenttrans
menu.tooltip.container.transparency = menu.tooltip.currenttrans
menu.tooltip.title.transparency = menu.tooltip.currenttrans
if menu.uiopen == false or createdPos ~= object.absoluteposition then
menu.tooltip.connection:Disconnect()
menu.tooltip.connection = nil
menu.tooltip.currenttrans = 0
menu.tooltip.hoveredfor = 0
menu.tooltip.backoutline.transparency = menu.tooltip.currenttrans
menu.tooltip.container.transparency = menu.tooltip.currenttrans
menu.tooltip.title.transparency = menu.tooltip.currenttrans
end
end)
end
local baseoffset = 0
local boundoffset = 0
function menu:createtoggle(parameters)
local tab = parameters.tab
local subsection = parameters.subsection
local targetsection = menu.directory[tab][subsection]
local name = parameters.name
local flag = parameters.flag
local tooltip = parameters.tooltip
local this = {}
menu.flags[flag] = {}
local myflag = menu.flags[flag]
this.myflag = myflag -- mypenis
myflag.__index = menu.flags[flag]
myflag.type = "toggle"
myflag.name = name
myflag.value = parameters.value
myflag.changed = utilities.signal.new()
myflag.element = this
local offset = baseoffset + 8
for i, v in next, (menu.elements[tab][subsection]) do
if _Type(v) == "table" then
offset = offset + v.bounds.y
end
end
this.hitbox = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = targetsection,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, 0, 0, 14),
position = _UDim2New(0.5, 0, 0, offset),
zindex = menu.basezindex + 6,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
transparency = 0,
name = "okay",
})
this.toggle = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.hitbox,
anchorpoint = _Vector2New(0, 0.5),
size = _UDim2New(0, 8, 0, 8),
position = _UDim2New(0, 8, 0.5, 0),
zindex = menu.basezindex + 7,
color = menu.startingParameters.colors.f,
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.toggle
this.toggleoutline = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.toggle,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 6,
color = _Color3FromRGB(12, 12, 12),
visible = true,
thickness = 1,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.toggleoutline
this.toggled = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.toggle,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0, 0, 0, 0),
zindex = menu.basezindex + 7,
color = menu.accent,
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
this.toggled.visible = myflag.value
menu.openclose[1 + #menu.openclose] = this.toggled
menu.accents[1 + #menu.accents] = this.toggled
this.title = DrawingFunction("text", {
parent = this.hitbox,
anchorpoint = _Vector2New(0, 0.5),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 24, 0.5, -1),
zindex = menu.basezindex + 6,
color = parameters.detected and _Color3FromRGB(255, 106, 79) or _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = name,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.title
this.realhitbox = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.hitbox,
anchorpoint = _Vector2New(0, 0.5),
size = _UDim2New(0, 32 + this.title.absolutesize.x, 1, 0),
position = _UDim2New(0, 0, 0.5, 0),
zindex = menu.basezindex + 8,
color = _Color3FromRGB(255, 255, 255),
visible = true,
thickness = 0,
filled = true,
transparency = 0,
activated = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = this.realhitbox
function myflag:setvalue(new) -- how 2 config in 5 seconds
myflag.value = new
this.toggled.visible = new
myflag.changed:Fire()
end
this.realhitbox.clicked:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen then return end
myflag:setvalue(not myflag.value)
end)
if tooltip then
this.realhitbox.mouseenter:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen then return end
menu:calltooltip(tooltip, this.realhitbox, _Vector2New(0, 0))
end)
end
this.bounds = _Vector2New(0, 14 + boundoffset)
this.accessories = {} -- color pickers and what not
menu.elements[tab][subsection][name] = this -- keep a record of this fuck
menu.elements[tab][subsection].updateScrollBarLength()
end
function menu:createcolorpicker(parameters)
local targetobj = menu.elements[parameters.tab][parameters.subsection][parameters.object]
if not targetobj.accessories then
return
end
local name = parameters.name
local flag = parameters.flag
local this = {}
menu.flags[flag] = {}
local myflag = menu.flags[flag]
this.myflag = myflag
myflag.__index = menu.flags[flag]
myflag.type = "color"
myflag.name = name
myflag.color = parameters.color
myflag.animation = {
none = true,
rainbow = false,
linear = false,
oscillating = false,
sawtooth = false,
strobe = false
}
myflag.animationKeyFrames = {
linear = {
["keyframe 1"] = {
color = parameters.color,
transparency = parameters.transparency
},
["keyframe 2"] = {
color = parameters.color,
transparency = parameters.transparency
}
},
oscillating = {
["keyframe 1"] = {
color = parameters.color,
transparency = parameters.transparency
},
["keyframe 2"] = {
color = parameters.color,
transparency = parameters.transparency
}
},
sawtooth = {
["keyframe 1"] = {
color = parameters.color,
transparency = parameters.transparency
},
["keyframe 2"] = {
color = parameters.color,
transparency = parameters.transparency
}
},
strobe = {
["keyframe 1"] = {
color = parameters.color,
transparency = parameters.transparency
},
["keyframe 2"] = {
color = parameters.color,
transparency = parameters.transparency
}
},
} -- color and transparency
myflag.animationSpeed = {
rainbow = 100,
linear = 100,
oscillating = 100,
sawtooth = 100,
strobe = 100
}
myflag.transparency = parameters.transparency
myflag.changed = utilities.signal.new()
local offset = baseoffset + 12
for i, v in next, (targetobj.accessories) do
offset = offset + v.bounds.x -- get the bounds of the current accessories in the thing
end
this.outline = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = targetobj.hitbox,
anchorpoint = _Vector2New(1, 0.5),
size = _UDim2New(0, 24, 0, 12),
position = _UDim2New(1, -offset, 0.5, 0),
zindex = menu.basezindex + 8,
color = _Color3FromRGB(12, 12, 12),
visible = true,
thickness = 0,
activated = true,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.outline
this.color = {}
for i = 1, 5 do
this.color[i] = utilities:draw("frame", { -- for getting the bounds of the thing, also not using DrawingFunction because the gradient isnt part of the ui accents
parent = this.outline,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, -2, 0, 2),
position = _UDim2New(0.5, 0, 0, ((i - 1) * 2) + 1),
zindex = menu.basezindex + 10,
color = parameters.color:lerp(_Color3FromRGB(_MathClamp(parameters.color.r * 255 - 33, 0, 255), _MathClamp(parameters.color.g * 255 - 33, 0, 255), _MathClamp(parameters.color.b * 255 - 33, 0, 255)), i / 5),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.color[i]
end
function myflag:setcolor(new)
myflag.color = new
for i = 1, 5 do
local segment = this.color[i]
segment.color = new:lerp(_Color3FromRGB(_MathClamp(new.r * 255 - 20, 0, 255), _MathClamp(new.g * 255 - 20, 0, 255), _MathClamp(new.b * 255 - 20, 0, 255)), (i - 1) / 5)
end
myflag.changed:Fire()
end
function myflag:settransparency(new)
myflag.transparency = new
myflag.changed:Fire()
end
function myflag:setAnimation(new)
myflag.animation = new
if this.animationLoop then
this.animationLoop:Disconnect()
this.animationLoop = nil
end
-- hard coded cuz FUCK you
-- funny how evie legit did animations like this better than me x3
if myflag.animation.rainbow then
this.animationLoop = RunService.Stepped:Connect(function()
local oldhue, oldsat, oldval = _Color3ToHSV(myflag.color)
myflag:setcolor(_Color3FromHSV((_Tick() * (myflag.animationSpeed.rainbow / 100) - _MathFloor(_Tick() * (myflag.animationSpeed.rainbow / 100))), oldsat, oldval))
end)
elseif myflag.animation.linear then
this.animationLoop = RunService.Stepped:Connect(function()
local percentage = (_Tick() * (myflag.animationSpeed.linear / 100) - _MathFloor(_Tick() * (myflag.animationSpeed.linear / 100)))
if percentage > 0.5 then
percentage = percentage - 0.5
percentage = percentage * 2
myflag:setcolor(myflag.animationKeyFrames.linear["keyframe 2"].color:Lerp(myflag.animationKeyFrames.linear["keyframe 1"].color, percentage))
if myflag.transparency then
local a = myflag.animationKeyFrames.linear["keyframe 2"].transparency
local b = myflag.animationKeyFrames.linear["keyframe 1"].transparency
local c = percentage
myflag:settransparency(a + (b - a)*c)
end
else
percentage = percentage * 2
myflag:setcolor(myflag.animationKeyFrames.linear["keyframe 1"].color:Lerp(myflag.animationKeyFrames.linear["keyframe 2"].color, percentage))
if myflag.transparency then
local a = myflag.animationKeyFrames.linear["keyframe 1"].transparency
local b = myflag.animationKeyFrames.linear["keyframe 2"].transparency
local c = percentage
myflag:settransparency(a + (b - a)*c)
end
end
end)
elseif myflag.animation.oscillating then
this.animationLoop = RunService.Stepped:Connect(function()
local percentage = (_Tick() * (myflag.animationSpeed.oscillating / 100) - _MathFloor(_Tick() * (myflag.animationSpeed.oscillating / 100)))
if percentage > 0.5 then
percentage = percentage - 0.5
myflag:setcolor(myflag.animationKeyFrames.oscillating["keyframe 2"].color:Lerp(myflag.animationKeyFrames.oscillating["keyframe 1"].color, _MathSin(percentage * math.pi)))
if myflag.transparency then
local a = myflag.animationKeyFrames.oscillating["keyframe 2"].transparency
local b = myflag.animationKeyFrames.oscillating["keyframe 1"].transparency
local c = _MathSin(percentage * math.pi)
myflag:settransparency(a + (b - a)*c)
end
else
myflag:setcolor(myflag.animationKeyFrames.oscillating["keyframe 1"].color:Lerp(myflag.animationKeyFrames.oscillating["keyframe 2"].color, _MathSin(percentage * math.pi)))
if myflag.transparency then
local a = myflag.animationKeyFrames.oscillating["keyframe 1"].transparency
local b = myflag.animationKeyFrames.oscillating["keyframe 2"].transparency
local c = _MathSin(percentage * math.pi)
myflag:settransparency(a + (b - a)*c)
end
end
end)
elseif myflag.animation.strobe then
this.animationLoop = RunService.Stepped:Connect(function()
local percentage = (_Tick() * (myflag.animationSpeed.strobe / 100) - _MathFloor(_Tick() * (myflag.animationSpeed.strobe / 100)))
if percentage > 0.5 then
myflag:setcolor(myflag.animationKeyFrames.strobe["keyframe 2"].color)
if myflag.transparency then
myflag:settransparency(myflag.animationKeyFrames.strobe["keyframe 2"].transparency)
end
else
myflag:setcolor(myflag.animationKeyFrames.strobe["keyframe 1"].color)
if myflag.transparency then
myflag:settransparency(myflag.animationKeyFrames.strobe["keyframe 1"].transparency)
end
end
end)
elseif myflag.animation.sawtooth then
this.animationLoop = RunService.Stepped:Connect(function()
local percentage = (_Tick() * (myflag.animationSpeed.sawtooth / 100) - _MathFloor(_Tick() * (myflag.animationSpeed.sawtooth / 100)))
myflag:setcolor(myflag.animationKeyFrames.sawtooth["keyframe 1"].color:Lerp(myflag.animationKeyFrames.sawtooth["keyframe 2"].color, percentage))
if myflag.transparency then
local a = myflag.animationKeyFrames.sawtooth["keyframe 1"].transparency
local b = myflag.animationKeyFrames.sawtooth["keyframe 2"].transparency
local c = percentage
myflag:settransparency(a + (b - a)*c)
end
end)
end
end
function myflag:setAnimationKeyFrames(new)
for t, kf in next, new do
myflag.animationKeyFrames[t] = kf
end
end
function myflag:setAnimationSpeed(new)
for t, s in next, new do
myflag.animationSpeed[t] = s
end
end
myflag:setcolor(parameters.color)
if myflag.transparency then
myflag:settransparency(parameters.transparency)
end
this.outline.clicked:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen then return end
menu:callcolorpicker(name, myflag, utilities.mouse.position, myflag.transparency)
end)
this.outline.clicked2:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen then return end
menu:callcolorcopypaste(myflag, utilities.mouse.position)
end)
this.bounds = _Vector2New(28, 0)
targetobj.accessories[name] = this
end
function menu:createkeybind(parameters)
local targetobj = menu.elements[parameters.tab][parameters.subsection][parameters.object]
if not targetobj.accessories then
return
end
local name = parameters.name
local flag = parameters.flag
local this = {}
this.dropdown = {}
this.dropdownopened = false
menu.flags[flag] = {}
local myflag = menu.flags[flag]
this.myflag = myflag
myflag.__index = menu.flags[flag]
myflag.type = "keybind"
myflag.value = parameters.value
myflag.tab = parameters.tab
myflag.name = name
myflag.section = parameters.subsection
myflag.object = parameters.object
myflag.parentflag = parameters.parentflag
myflag.activation = "always"
myflag.key = nil
myflag.changed = utilities.signal.new()
local offset = baseoffset + 16
for i, v in next, (targetobj.accessories) do
offset = offset + v.bounds.x -- get the bounds of the current accessories in the thing
end
this.outline = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = targetobj.hitbox,
anchorpoint = _Vector2New(1, 0.5),
size = _UDim2New(0, 40, 0, 16),
position = _UDim2New(1, -offset, 0.5, 0),
zindex = menu.basezindex + 7,
color = menucolors.a,
visible = true,
thickness = 1,
activated = true,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.outline
menu.activations[1 + #menu.activations] = this.outline
this.updating = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.outline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 8,
color = menu.accent,
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
menu.accents[1 + #menu.accents] = this.updating
this.container = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.outline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 9,
color = menucolors.c,
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.container
this.title = DrawingFunction("text", {
parent = this.outline,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0.5, -((7)/2), 0.5, -7),
zindex = menu.basezindex + 10,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "E",
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.title
for i, v in next, ({"hold", "toggle", "hold off", "always"}) do
this.dropdown[v] = {}
this.dropdown[v].outline = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.outline,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 64, 0, 22),
position = _UDim2New(-1, 16, 1, ((i - 1) * 20) + 2),
zindex = menu.basezindex + 11,
color = menucolors.a,
visible = false,
thickness = 0,
filled = true,
activated = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = this.dropdown[v].outline
this.dropdown[v].container = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.dropdown[v].outline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 12,
color = menucolors.c,
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
this.dropdown[v].title = DrawingFunction("text", {
parent = this.dropdown[v].outline,
anchorpoint = _Vector2New(0, 0.5),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 4, 0.5, 0),
zindex = menu.basezindex + 13,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = v,
name = "okay",
})
this.dropdown[v].outline.clicked:Connect(function()
myflag:setactivation(v)
for i, v in next, (this.dropdown) do
v.outline.visible = false
end
menu.isadropdownopen = false
end)
end
this.singleupdate = function()
if not myflag.key then
myflag.value = false
end -- we dont even have a key.....
if myflag.activation == "always" then
myflag.value = true
else
myflag.value = false
end
end
function myflag:setkey(new)
if not new or new == "NONE" then -- no key !
myflag.key = nil
this.title.text = "NONE"
this.title.position = _UDim2New(0.5, -((4*7)/2), 0.5, -7)
else
local key = _tostring(new)
myflag.key = key
this.title.text = _StringSub(_StringUpper(key:sub(14)), 1, 5)
end
this.singleupdate()
end
function myflag:setactivation(new)
myflag.activation = new
for i, v in next, (this.dropdown) do
v.title.color = (myflag.activation == v.title.text) and menu.accent or _Color3FromRGB(255, 255, 255)
end
this.singleupdate()
end
myflag:setactivation("always")
function myflag:setvalue(new)
myflag.value = new
this.singleupdate()
end
this.outline.clicked2:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen then return end
this.dropdownopened = not this.dropdownopened
menu.isadropdownopen = this.dropdownopened
for i, v in next, (this.dropdown) do
v.outline.visible = this.dropdownopened
v.title.color = (myflag.activation == v.title.text) and menu.accent or _Color3FromRGB(255, 255, 255)
v.outline.position = v.outline.position
end
end)
local keyupdater
this.outline.clicked:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen then return end
this.updating.visible = true
keyupdater = InputService.InputBegan:Connect(function(Input, gameProcessed)
if InputService:GetFocusedTextBox() then return end
if Input.UserInputType == Enum.UserInputType.Keyboard then
if Input.KeyCode.Value == 27 or Input.KeyCode.Value == 8 then
myflag:setkey(nil)
else
myflag:setkey(Input.KeyCode)
end
this.updating.visible = false
if keyupdater then
keyupdater:Disconnect()
keyupdater = nil
end
end
end)
end)
myflag:setkey(parameters.value)
InputService.InputBegan:Connect(function(Input, gameProcessed)
if InputService:GetFocusedTextBox() then return end
if not myflag.key then
myflag.value = false
end -- we dont even have a key.....
if myflag.activation == "always" then
myflag.value = true
end
if myflag.activation == "always" or not myflag.key then
return
end
if Input.UserInputType == Enum.UserInputType.Keyboard then
if _tostring(Input.KeyCode) == myflag.key then
if myflag.activation == "toggle" then
myflag.value = not myflag.value
myflag.changed:Fire()
end
if myflag.activation == "hold" then
myflag.value = true
myflag.changed:Fire()
end
if myflag.activation == "hold off" then
myflag.value = false
myflag.changed:Fire()
end
end
end
end)
InputService.InputEnded:Connect(function(Input, gameProcessed)
if InputService:GetFocusedTextBox() then return end
if not myflag.key then
myflag.value = false
end -- we dont even have a key.....
if myflag.activation == "always" then
myflag.value = true
end
if myflag.activation == "always" or not myflag.key then
return
end
if myflag.activation == "always" then
myflag.value = true
end
if Input.UserInputType == Enum.UserInputType.Keyboard then
if _tostring(Input.KeyCode) == myflag.key then
if myflag.activation == "hold" then
myflag.value = false
myflag.changed:Fire()
end
if myflag.activation == "hold off" then
myflag.value = true
myflag.changed:Fire()
end
end
end
end)
this.bounds = _Vector2New(44, 0)
targetobj.accessories[name] = this
end
function menu:createslider(parameters)
local tab = parameters.tab
local subsection = parameters.subsection
local targetsection = menu.directory[tab][subsection]
local name = parameters.name
local flag = parameters.flag
local minimum = parameters.minimum
local tooltip = parameters.tooltip
local maximum = parameters.maximum
local suffix = parameters.suffix ~= nil and parameters.suffix or ""
local customtext = parameters.custom ~= nil and parameters.custom or {}
local this = {}
local offset = baseoffset + 0
menu.flags[flag] = {}
local myflag = menu.flags[flag]
this.myflag = myflag -- mypenis
myflag.__index = menu.flags[flag]
myflag.type = "slider"
myflag.name = name
myflag.value = parameters.value
myflag.element = this
myflag.changed = utilities.signal.new()
for i, v in next, (menu.elements[tab][subsection]) do
if _Type(v) == "table" then
offset = offset + v.bounds.y
end
end
this.holder = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = targetsection,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, 0, 0, 24),
position = _UDim2New(0.5, 0, 0, offset),
zindex = menu.basezindex + 6,
color = _Color3FromRGB(255, 255, 255),
visible = true,
thickness = 0,
filled = true,
transparency = 0,
name = "okay",
})
this.title = DrawingFunction("text", {
parent = this.holder,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 16, 0, 8),
zindex = menu.basezindex + 7,
color = parameters.detected and _Color3FromRGB(255, 106, 79) or _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = name,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.title
this.sliderback = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.holder,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(1, -32, 0, 6),
position = _UDim2New(0, 16, 0, 24),
zindex = menu.basezindex + 7,
color = menucolors.b,
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.sliderback
this.sliderbackoutline = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.sliderback,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 6,
color = menucolors.d,
visible = true,
thickness = 1,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.sliderbackoutline
this.slider = {}
for i = 1, 6 do
this.slider[i] = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.sliderback,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 6, 0, 1),
position = _UDim2New(0, 0, 0, i),
zindex = menu.basezindex + 9,
color = menu.accent:lerp(_Color3FromRGB(_MathClamp((menu.accent.r * 255) - 5, 0, 255), _MathClamp((menu.accent.g * 255) - 5, 0, 255), _MathClamp((menu.accent.b * 255) - 5, 0, 255)), (i - 1) / 5),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.slider[i]
end
menu.accents[1 + #menu.accents] = this.slider
this.hitbox = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.sliderback,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 10),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 7,
color = _Color3FromRGB(255, 255, 255),
visible = true,
thickness = 0,
transparency = 0,
activated = true,
filled = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = this.hitbox
this.valuetitle = DrawingFunction("text", {
parent = this.sliderback,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(1, -((2 * 7)/2), 0, 0),
zindex = menu.basezindex + 9,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "0°",
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.valuetitle
this.addtext = DrawingFunction("text", {
parent = this.sliderback,
anchorpoint = _Vector2New(1, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(1, 3, 0.5, -7),
zindex = menu.basezindex + 9,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
activated = true,
text = "+",
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.addtext
this.subtext = DrawingFunction("text", {
parent = this.sliderback,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, -10, 0.5, -7),
zindex = menu.basezindex + 9,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "-",
activated = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.subtext
local textupdateconnection -- so u can click on the value text and manually enter a number
function myflag:setvalue(new)
if new == nil then
new = 0
end
local newtext = _tostring(new)
if textupdateconnection then -- we r typing
newtext = newtext .. "|"
else
new = _MathClamp(new, minimum, maximum)
end
newtext = _tostring(new)
if customtext[newtext] then
this.valuetitle.text = customtext[newtext]
else
this.valuetitle.text = newtext .. suffix
end
for i, v in next, this.slider do
v.position = _UDim2New((((_MathClamp(new, minimum, maximum) - minimum)) / (maximum - minimum)), 0, 0, i - 1) -- s3x
local tostart = v.absoluteposition.x - this.sliderback.absoluteposition.x
local scalederrr = -tostart / this.sliderback.absolutesize.x
v.size = _UDim2New(scalederrr, 0, 0, 1)
end
this.valuetitle.position = this.slider[#this.slider].position + _UDim2New(0, -((#this.valuetitle.text * 7)/2), 0, 0)
myflag.value = new
myflag.changed:Fire()
end
function myflag:setMax(new)
maximum = new
end
function myflag:setMin(new)
minimum = new
end
local connection
this.hitbox.clicked:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen then return end
connection = RunService.Stepped:Connect(function()
local relative = utilities.mouse.position.x
local mousebound = utilities.mouse.position.x - this.hitbox.absoluteposition.x - 1
mousebound = _MathClamp(mousebound, 0, this.hitbox.absolutesize.x)
local result = mousebound
result = _MathClamp(result, 0, this.hitbox.absolutesize.x)
result = _MathFloor(0.5 + (((maximum - minimum) / this.hitbox.absolutesize.x) * mousebound) + minimum)
myflag:setvalue(result)
if this.hitbox.holding == false or menu.uiopen == false then
connection:Disconnect()
connection = nil
return
end
end)
end)
this.addtext.mouseenter:Connect(function()
this.addtext.color = menu.accent
end)
this.addtext.mouseleave:Connect(function()
this.addtext.color = _Color3FromRGB(255, 255, 255)
end)
this.subtext.mouseenter:Connect(function()
this.subtext.color = menu.accent
end)
this.subtext.mouseleave:Connect(function()
this.subtext.color = _Color3FromRGB(255, 255, 255)
end)
this.addtext.clicked:Connect(function()
myflag:setvalue(myflag.value + 1)
end)
this.subtext.clicked:Connect(function()
myflag:setvalue(myflag.value - 1)
end)
myflag:setvalue(parameters.value)
if tooltip then
this.hitbox.mouseenter:Connect(function()
menu:calltooltip(tooltip, this.hitbox, _Vector2New(-4, 2))
end)
end
this.bounds = _Vector2New(0, 36 + boundoffset)
menu.elements[tab][subsection][name] = this
menu.elements[tab][subsection].updateScrollBarLength()
end
function menu:createdropdown(parameters)
local tab = parameters.tab
local subsection = parameters.subsection
local targetsection = menu.directory[tab][subsection]
local name = parameters.name
local flag = parameters.flag
local tooltip = parameters.tooltip
local multichoice = parameters.multichoice
local this = {}
this.dropdownopened = false
this.valuecontainer = {}
local offset = baseoffset + 0
menu.flags[flag] = {}
local myflag = menu.flags[flag]
this.myflag = myflag -- mypenis
myflag.__index = menu.flags[flag]
myflag.type = "dropdown"
myflag.value = {}
myflag.name = name
myflag.changed = utilities.signal.new()
for i, v in next, (menu.elements[tab][subsection]) do
if _Type(v) == "table" then
offset = offset + v.bounds.y
end
end
for i, v in next, (parameters.values) do
local name = v[1]
local state = v[2]
myflag.value[name] = state
end
this.holder = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = targetsection,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, 0, 0, 24),
position = _UDim2New(0.5, 0, 0, offset),
zindex = menu.basezindex + 6,
color = _Color3FromRGB(255, 255, 255),
visible = true,
thickness = 0,
filled = true,
transparency = 0,
name = "okay",
})
this.title = DrawingFunction("text", {
parent = this.holder,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 16, 0, 8),
zindex = menu.basezindex + 7,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = name,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.title
this.selection = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.holder,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, -30, 0, 16),
position = _UDim2New(0.5, 0, 0, 24),
zindex = menu.basezindex + 7,
color = menucolors.c,
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.selection
this.selectiontext = DrawingFunction("text", {
parent = this.selection,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 2, 0.5, -7),
zindex = menu.basezindex + 8,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "",
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.selectiontext
this.icon = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.selection,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 7,
color = menucolors.c,
visible = true,
thickness = 0,
filled = true,
transparency = 0,
activated = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.icon
menu.activations[1 + #menu.activations] = this.icon
this.icontext = DrawingFunction("text", {
parent = this.icon,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(1, -10, 0.5, -7),
zindex = menu.basezindex + 8,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "+",
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.icontext
this.selectionoutline = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.selection,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 6,
color = menucolors.d,
visible = true,
thickness = 1,
filled = false,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.selectionoutline
this.scrollerBar = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.selection,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 3, 8 / #parameters.values, 0),
position = _UDim2New(1, -3, 0, 20),
zindex = menu.basezindex + 18,
color = menu.accent,
visible = false,
filled = true,
name = "okay",
})
menu.accents[1 + #menu.accents] = this.scrollerBar
function myflag:setvalue(new)
myflag.value = new
local maximumchars = _MathFloor(this.selection.absolutesize.x / 6.5) - 4 - 2 -- suck
local selected = ""
local selections = 0
for i, v in next, (myflag.value) do
if v then
if selections > 0 then
selected = selected .. ", "
end
selected = selected .. i
selections = selections + 1
end
end
for i, v in next, this.valuecontainer do
v.selectiontext.color = myflag.value[v.selectiontext.text] and menu.accent or _Color3New(1, 1, 1)
end
local needsdotdotdot = false
if _StringLen(selected) > maximumchars then
needsdotdotdot = true
end
selected = _StringSub(selected, 0, maximumchars) .. (needsdotdotdot and "..." or "" )
if selections == 0 then
this.selectiontext.text = "none"
else
this.selectiontext.text = selected
end
myflag.changed:Fire()
end
this.selection.getpropertychangedsignal:Connect(function(prop, val)
if prop == "absolutesize" then
myflag:setvalue(myflag.value)
end
end)
local numCreated = 0
for val, v in next, (parameters.values) do
if numCreated >= 8 then
break
end
local temporary = {}
local val = v[1] -- so that its in order
temporary.value = val
temporary.selectionoutline = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.selection,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, 2, 0, 22),
position = _UDim2New(0.5, 0, 0, ((1 + #this.valuecontainer) * 20) -2),
zindex = menu.basezindex + 14,
color = menucolors.d,
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
temporary.selection = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = temporary.selectionoutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 15,
color = menucolors.c,
visible = true,
thickness = 0,
filled = true,
activated = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = temporary.selection
temporary.selectiontext = DrawingFunction("text", {
parent = temporary.selection,
anchorpoint = _Vector2New(0, 0.5),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 2, 0.5, 0),
zindex = menu.basezindex + 16,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = val,
name = "okay",
})
temporary.selection.clicked:Connect(function()
local thisVal = temporary.selectiontext.text
if parameters.multichoice == false then
for i, v in next, (myflag.value) do
myflag.value[i] = (thisVal == i) -- suck my nutz
end
else
if not myflag.value then
myflag.value[thisVal] = false
end
myflag.value[thisVal] = not myflag.value[thisVal] -- suck my nutz
end
myflag:setvalue(myflag.value)
end)
this.valuecontainer[1 + #this.valuecontainer] = temporary
numCreated = numCreated + 1
end
local currentScrollLevel = 0
if #parameters.values > 8 then
local scrollUpConnection
local scrollDownConnection
local function updateScroll()
this.scrollerBar.size = _UDim2New(0, 3, 8 / #parameters.values, 0)
local currentY = _MathFloor(currentScrollLevel / #parameters.values * 170)
currentY = _MathClamp(currentY, 1, (170) - this.scrollerBar.absolutesize.y - 1)
this.scrollerBar.position = _UDim2New(1, -3, 0, currentY + 20)
for i = 1, 8 do
local pointStartVis = currentScrollLevel + i
local ref = this.valuecontainer[i]
local flagRef = parameters.values[pointStartVis]
ref.selectiontext.text = flagRef[1]
ref.selectiontext.color = myflag.value[flagRef[1]] and menu.accent or _Color3New(1, 1, 1)
end
end
scrollUpConnection = utilities.mouse.scrollup:Connect(function(d)
if (menu.isadropdownopen and this.dropdownopened == false) or menu.isacolorpickeropen or menu.uiopen == false then return end
currentScrollLevel = _MathClamp(currentScrollLevel - d, 0, #parameters.values - 8)
updateScroll()
end)
scrollDownConnection = utilities.mouse.scrolldown:Connect(function(d)
if (menu.isadropdownopen and this.dropdownopened == false) or menu.isacolorpickeropen or menu.uiopen == false then return end
currentScrollLevel = _MathClamp(currentScrollLevel - d, 0, #parameters.values - 8)
updateScroll()
end)
end
this.icon.clicked:Connect(function()
if (menu.isadropdownopen and this.dropdownopened == false) or menu.isacolorpickeropen or menu.uiopen == false then return end
this.dropdownopened = not this.dropdownopened
this.icontext.text = (this.dropdownopened == true) and "-" or "+"
menu.isadropdownopen = this.dropdownopened
for i, v in next, (this.valuecontainer) do
v.selectionoutline.visible = this.dropdownopened
v.selectionoutline.position = v.selectionoutline.position
v.selectionoutline.size = v.selectionoutline.size
end
for i = 1, 8 do
local pointStartVis = currentScrollLevel + i
local ref = this.valuecontainer[i]
local flagRef = parameters.values[pointStartVis]
if not (ref and ref.selectiontext) then continue end
ref.selectiontext.text = flagRef[1]
ref.selectiontext.color = myflag.value[flagRef[1]] and menu.accent or _Color3New(1, 1, 1)
end
if #parameters.values > 8 then
this.scrollerBar.visible = this.dropdownopened
end
end)
if tooltip then
this.icon.mouseenter:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen or menu.uiopen == false then return end
menu:calltooltip(tooltip, this.icon, _Vector2New(-4, 2))
end)
end
local vals = {}
for i, v in next, (parameters.values) do
local name = v[1]
local state = v[2]
vals[name] = state
end
myflag:setvalue(vals)
this.bounds = _Vector2New(0, 38 + boundoffset)
menu.elements[tab][subsection][name] = this
menu.elements[tab][subsection].updateScrollBarLength()
end
function menu:createbutton(parameters)
local tab = parameters.tab
local subsection = parameters.subsection
local targetsection = menu.directory[tab][subsection]
local confirmation = parameters.confirmation ~= nil and parameters.confirmation or nil
local name = parameters.name
local flag = parameters.flag
local this = {}
menu.flags[flag] = {}
local myflag = menu.flags[flag]
this.myflag = myflag -- mypenis
myflag.__index = menu.flags[flag]
myflag.type = "button"
myflag.name = name
myflag.pressed = utilities.signal.new()
local offset = baseoffset + 10
for i, v in next, (menu.elements[tab][subsection]) do
if _Type(v) == "table" then
offset = offset + v.bounds.y
end
end
this.hitbox = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = targetsection,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, -28, 0, 20),
position = _UDim2New(0.5, 0, 0, offset),
zindex = menu.basezindex + 7,
color = menucolors.d,
visible = true,
thickness = 1,
filled = false,
activated = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.hitbox
menu.activations[1 + #menu.activations] = this.hitbox
this.container = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.hitbox,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 8,
color = menucolors.c,
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.container
this.title = DrawingFunction("text", {
parent = this.container,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0.5, -((#name * 7)/2), 0.5, -7),
zindex = menu.basezindex + 9,
color = parameters.detected and _Color3FromRGB(255, 106, 79) or _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
text = name,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.title
local lastactivation
local connection
local old = this.title.position
this.hitbox.clicked:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen then return end
if confirmation then
if this.title.text ~= "confirm?" then
this.title.text = "confirm?"
this.title.position = _UDim2New(0.5, -((#this.title.text * 7)/2), 0.5, -7)
this.title.color = menu.accent
lastactivation = _Tick()
connection = RunService.Stepped:Connect(function()
if _Tick() - lastactivation > 2 then
this.title.text = name
this.title.color = _Color3New(1, 1, 1)
this.title.position = old
lastactivation = _Tick()
connection:Disconnect()
connection = nil
end
end)
else
myflag.pressed:Fire()
this.title.text = name
this.title.color = _Color3New(1, 1, 1)
lastactivation = _Tick()
this.title.position = old
connection:Disconnect()
connection = nil
lastactivation = _Tick()
end
else
myflag.pressed:Fire()
end
this.container.color = menucolors.a
_TaskWait(0.05)
this.container.color = menucolors.c
end)
this.bounds = _Vector2New(0, 24 + boundoffset)
menu.elements[tab][subsection][name] = this -- keep a record of this fuck
menu.elements[tab][subsection].updateScrollBarLength()
end
function menu:createtextbox(parameters)
local tab = parameters.tab
local subsection = parameters.subsection
local targetsection = menu.directory[tab][subsection]
local name = parameters.text
local flag = parameters.flag
local this = {}
menu.flags[flag] = {}
local myflag = menu.flags[flag]
this.myflag = myflag -- mypenis
myflag.__index = menu.flags[flag]
myflag.type = "textbox"
myflag.value = name
myflag.name = name
myflag.changed = utilities.signal.new()
local offset = baseoffset + 10
for i, v in next, (menu.elements[tab][subsection]) do
if _Type(v) == "table" then
offset = offset + v.bounds.y
end
end
this.hitbox = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = targetsection,
anchorpoint = _Vector2New(0.5, 0),
size = _UDim2New(1, -28, 0, 20),
position = _UDim2New(0.5, 0, 0, offset),
zindex = menu.basezindex + 7,
color = menucolors.d,
visible = true,
thickness = 0,
filled = true,
activated = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.hitbox
menu.activations[1 + #menu.activations] = this.hitbox
this.container = DrawingFunction("frame", { -- for getting the bounds of the thing
parent = this.hitbox,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 8,
color = menucolors.b,
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.container
this.title = DrawingFunction("text", {
parent = this.container,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 4, 0.5, -7),
zindex = menu.basezindex + 9,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = menucolors.d,
text = name,
name = "okay",
})
menu.openclose[1 + #menu.openclose] = this.title
local textupdateconnection
function myflag:setvalue(new)
myflag.value = new
this.title.text = myflag.value
if textupdateconnection then -- currently typing...
this.title.color = menu.accent
this.title.text = this.title.text .. "|"
end
myflag.changed:Fire()
end
this.hitbox.clicked:Connect(function()
if menu.uiopen == false or menu.isadropdownopen or menu.isacolorpickeropen then return end
if textupdateconnection then
textupdateconnection:Disconnect()
textupdateconnection = nil
this.title.text = this.title.text:gsub("|", "")
this.title.color = _Color3New(1, 1, 1)
end
this.title.color = menu.accent
this.title.text = this.title.text .. "|"
textupdateconnection = InputService.InputBegan:Connect(function(Input, gameProcessed)
if Input.UserInputType == Enum.UserInputType.Keyboard then
if Input.KeyCode.Value == 27 or Input.KeyCode.Value == 13 then -- escape or enter pressed -> close the thing
textupdateconnection:Disconnect()
textupdateconnection = nil
this.title.text = this.title.text:gsub("|", "")
this.title.color = _Color3New(1, 1, 1)
elseif Input.KeyCode.Value == 8 then -- backspace -> subtract the text by 1
if InputService:IsKeyDown(Enum.KeyCode.LeftControl) or InputService:IsKeyDown(Enum.KeyCode.RightControl) then
myflag:setvalue("")
else
myflag:setvalue(myflag.value:sub(0, -2)) -- remove the last char
end
elseif Input.KeyCode.Value == 32 then -- spacebar
myflag:setvalue(myflag.value .. " ") -- remove the last char
elseif Input.KeyCode.Value == 118 and (InputService:IsKeyDown(Enum.KeyCode.LeftControl) or InputService:IsKeyDown(Enum.KeyCode.RightControl)) then -- the v key
this.title.text = this.title.text:gsub("|", "")
this.title.color = _Color3New(1, 1, 1)
textupdateconnection:Disconnect()
textupdateconnection = nil
myflag:setvalue(utilities.getclipboard())
else
local key = _tostring(Input.KeyCode):sub(14)
if _TableFind(menu.validkeys, key) or menu.validnumberkeys[key] then
if menu.validnumberkeys[key] then
key = menu.validnumberkeys[key]
end
if InputService:IsKeyDown(Enum.KeyCode.LeftShift) or InputService:IsKeyDown(Enum.KeyCode.RightShift) then
key = _StringUpper(key)
else
key = _StringLower(key)
end
myflag:setvalue(myflag.value .. key)
end
end
end
end)
end)
this.bounds = _Vector2New(0, 24 + boundoffset)
menu.elements[tab][subsection][name] = this -- keep a record of this fuck
menu.elements[tab][subsection].updateScrollBarLength()
end
local baseOffsetX = 16
local baseOffsetY = 16
menu.currentnotifications = {}
menu.notificationmanagement = RunService.RenderStepped:Connect(function(dt)
local sorted = {}
local prioritiesgroups = {}
-- sort the fucker
_TableSort(menu.currentnotifications, function(a, b) return a.priority > b.priority end)
for i, v in next, menu.currentnotifications do
if v.ignoreanimations then
else
if not prioritiesgroups[v.priority] then
prioritiesgroups[v.priority] = {}
end
local thisGroup = prioritiesgroups[v.priority]
thisGroup[1 + #thisGroup] = v
end
end
for priority, notifs in next, prioritiesgroups do
_TableSort(notifs, function(a, b) return a.created < b.created end)
end
for priority, notifs in next, prioritiesgroups do
for lifepriority, notif in next, notifs do
sorted[1 + #sorted] = notif
end
end
-- this positions it accordingly
local currentLevel = 0
for i = 1, #sorted do
local notification = sorted[i]
if notification.alivetime > notification.lifetime then -- manage removing the notif once its lifetime has expired
notification.container.visible = false
notification.container.Drawingobject:Remove()
notification.outline1.Drawingobject:Remove()
notification.outline2.Drawingobject:Remove()
notification.container.Drawingobject = nil
notification.outline1.Drawingobject = nil
notification.outline2.Drawingobject = nil
table.clear(notification.container)
table.clear(notification.outline1)
table.clear(notification.outline2)
notification.container.Drawingobject = {}
notification.outline1.Drawingobject = {}
notification.outline2.Drawingobject = {}
for k, n in next, menu.currentnotifications do
if notification == n then
table.clear(notification)
_TableRemove(menu.currentnotifications, k)
end
end
else
notification.container.visible = true
-- manage x position
if notification.alivetime < 1 then -- manage x position coming out of the closet
local percentageMoved = notification.alivetime / 1
local projectedMovePercentage = (1 / (-2.71828 ^ (percentageMoved * 8))) + 1
notification.container.position = _UDim2New(0, -240 + (projectedMovePercentage * 240) + baseOffsetX, 0, 0)
elseif notification.alivetime > notification.lifetime - 0.5 then -- manage x position going back into the closet
local percentageMoved = 2 * (notification.alivetime - (notification.lifetime - 0.5))
local projectedMovePercentage = (1 / (-2.71828 ^ (percentageMoved * 1))) + 1
notification.container.position = _UDim2New(0, baseOffsetX - (projectedMovePercentage * 120), 0, 0)
else
notification.container.position = _UDim2New(0, baseOffsetX, 0, 0)
end
-- manage y position
notification.container.position = notification.container.position + _UDim2New(0, 0, 0, baseOffsetY + currentLevel)
currentLevel = currentLevel + 8 + notification.container.absolutesize.y
-- manage fade
if notification.alivetime < 1 then -- manage fade coming out of the closet
local fade = notification.alivetime / 1
notification.container.transparency = fade
notification.outline1.transparency = fade
notification.outline2.transparency = fade
notification.title.transparency = fade
elseif notification.alivetime > notification.lifetime - 0.5 then -- manage fade going back into the closet
local fade = 1 - (2 * (notification.alivetime - (notification.lifetime - 0.5)))
notification.container.transparency = fade
notification.outline1.transparency = fade
notification.outline2.transparency = fade
notification.title.transparency = fade
else
notification.container.transparency = 1
notification.outline1.transparency = 1
notification.outline2.transparency = 1
notification.title.transparency = 1
end
notification.alivetime = notification.alivetime + dt
end
end
end)
function menu:createnotification(param)
local this = {}
this.container = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 100, 0, 100),
position = _UDim2New(32, 0, 32, 0),
zindex = menu.basezindex + -4,
color = parameters.colors.a,
visible = false,
thickness = 1,
transparency = 1,
filled = true,
name = "okay",
})
this.outline1 = DrawingFunction("frame", {
parent = this.container,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 5,
color = parameters.colors.c,
visible = true,
thickness = 1,
filled = false,
name = "okay",
})
this.outline2 = DrawingFunction("frame", {
parent = this.containeroutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 4,
color = parameters.colors.a,
visible = true,
thickness = 1,
filled = false,
name = "okay",
})
this.title = DrawingFunction("text", {
parent = this.container,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 8, 0, 4),
zindex = menu.basezindex + 20,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "example notif",
name = "okay",
})
-- text editing stuffs (copied from tooltip)
local maxWidth = 36
local text = param.text
do -- WARNING !! ALAN CODE AHEAD!!
local split = text:split("")
local lastspaceidx = 0 -- the text idx that the last space is
local charinline = 0
for i, v in next, (split) do
charinline = charinline + 1
if v == " " then
lastspaceidx = i
end
if charinline >= maxWidth then
split[lastspaceidx] = "\n" -- insert a thing
charinline = 0
end
end
text = ""
for i, v in next, (split) do
text = text .. v
end
end
local split = text:split("\n")
local textlinelength = {}
local yLeng = 0
for i, v in next, (split) do
local textBound = _Vector2New()
do -- FATAL !
local getTextBoundsOfBullshit = Drawing.new("Text")
getTextBoundsOfBullshit.Visible = true
getTextBoundsOfBullshit.Font = Drawing.Fonts.Plex
getTextBoundsOfBullshit.Size = 13
getTextBoundsOfBullshit.Text = v
textBound = getTextBoundsOfBullshit.TextBounds
getTextBoundsOfBullshit.Visible = false
getTextBoundsOfBullshit:Remove()
getTextBoundsOfBullshit = nil
end
textlinelength[i] = textBound.x -- getting the number of characters each line and getting the biggest one to properly size the thing
yLeng = yLeng + textBound.y
end
_TableSort(textlinelength, function(a, b) return a > b end)
local longestthing = textlinelength[1]
this.container.size = _UDim2New(0, longestthing + 16, 0, yLeng + 8)
this.title.text = text
this.alivetime = 0
this.lifetime = param.lifetime
this.priority = param.priority
this.ignoreanimations = param.ignoreanimations
this.created = _Tick()
menu.currentnotifications[1 + #menu.currentnotifications] = this
return this
end
local colorPickerType = 2
do
do
local copyPasteMenu = {}
copyPasteMenu.outline = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 42, 0, 32),
position = _UDim2New(0, 100, 0, 100),
zindex = menu.basezindex + 18,
color = _Color3FromRGB(0, 0, 0),
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
copyPasteMenu.container = DrawingFunction("frame", {
parent = copyPasteMenu.outline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 18,
color = _Color3FromRGB(46, 46, 46),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
copyPasteMenu.copyTitle = DrawingFunction("text", {
parent = copyPasteMenu.container,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 2, 0, 0),
zindex = menu.basezindex + 19,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "copy",
name = "okay",
})
copyPasteMenu.pasteTitle = DrawingFunction("text", {
parent = copyPasteMenu.container,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 2, 0, copyPasteMenu.copyTitle.absolutesize.y + 2),
zindex = menu.basezindex + 19,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "paste",
name = "okay",
})
copyPasteMenu.copyDetection = DrawingFunction("frame", {
parent = copyPasteMenu.container,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(1, 0, 0.5, 0),
position = _UDim2New(0, 0, 0, 0),
zindex = menu.basezindex + 18,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
activated = true,
transparency = 0,
filled = true,
name = "okay",
})
copyPasteMenu.pasteDetection = DrawingFunction("frame", {
parent = copyPasteMenu.container,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(1, 0, 0.5, 0),
position = _UDim2New(0, 0, 0.5, 0),
zindex = menu.basezindex + 18,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
activated = true,
transparency = 0,
filled = true,
name = "okay",
})
copyPasteMenu.copyDetection.clicked:Connect(function()
if copyPasteMenu.focusedon then
local v = copyPasteMenu.focusedon
local val = {v.color.r, v.color.g, v.color.b, v.transparency}
local keyFrameFix = {}
for n, kfs in next, v.animationKeyFrames do
keyFrameFix[n] = {}
for idx, d in next, kfs do
keyFrameFix[n][idx] = {d.color.r, d.color.g, d.color.b, d.transparency}
end
end
local animations = {
animation = v.animation,
animationKeyFrames = keyFrameFix,
speeds = v.animationSpeed
}
local comp = {val, animations}
local result = json.encode(comp)
colorpickerClipBoard = result
end
copyPasteMenu.outline.visible = false
if copyPasteMenu.outofboundscloseconnection then
copyPasteMenu.outofboundscloseconnection:Disconnect()
copyPasteMenu.outofboundscloseconnection = nil
end
menu.isacolorpickeropen = false
end)
copyPasteMenu.pasteDetection.clicked:Connect(function()
local clipboard = colorpickerClipBoard
if copyPasteMenu.focusedon and colorpickerClipBoard then
local ff = copyPasteMenu.focusedon
local value = json.decode(clipboard)
ff:setcolor(_Color3New(value[1][1], value[1][2], value[1][3]))
if value[1][4] then
ff:settransparency(value[1][4])
end
local keyFrameFix = {}
for n, kfs in next, value[2].animationKeyFrames do
keyFrameFix[n] = {}
for idx, d in next, kfs do
keyFrameFix[n][idx] = {
color = _Color3New(d[1], d[2], d[3]),
transparency = d[4],
}
end
end
ff:setAnimation(value[2].animation)
ff:setAnimationSpeed(value[2].speeds)
ff:setAnimationKeyFrames(keyFrameFix)
end
copyPasteMenu.outline.visible = false
if copyPasteMenu.outofboundscloseconnection then
copyPasteMenu.outofboundscloseconnection:Disconnect()
copyPasteMenu.outofboundscloseconnection = nil
end
menu.isacolorpickeropen = false
end)
function menu:callcolorcopypaste(flag, position)
if not flag then return end
copyPasteMenu.outline.visible = true
copyPasteMenu.outline.position = _UDim2New(0, position.x - 1, 0, position.y - 1)
copyPasteMenu.outline.position = _UDim2New(0, position.x, 0, position.y)
copyPasteMenu.focusedon = flag
menu.isacolorpickeropen = true
copyPasteMenu.outofboundscloseconnection = utilities.mouse.mousebutton1down:Connect(function()
if utilities.mousechecks.inbounds(copyPasteMenu.outline, utilities.mouse.position) == false then -- uh oh..
copyPasteMenu.outline.visible = false
menu.isacolorpickeropen = false
if copyPasteMenu.outofboundscloseconnection then
copyPasteMenu.outofboundscloseconnection:Disconnect()
copyPasteMenu.outofboundscloseconnection = nil
end
end
end)
end
end
if colorPickerType == 1 then
menu.colorpicker = {} -- would rather make 1 that moves around instead of do this for EVERY color picker, probably shouldve done this with dropdowns and what not but i got lazy
menu.colorpicker.outline = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 194, 0, 208),
position = _UDim2New(0, 100, 0, 100),
zindex = menu.basezindex + 18,
color = _Color3FromRGB(0, 0, 0),
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.container = DrawingFunction("frame", {
parent = menu.colorpicker.outline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 18,
color = _Color3FromRGB(46, 46, 46),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.title = DrawingFunction("text", {
parent = menu.colorpicker.container,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 4, 0, 2),
zindex = menu.basezindex + 19,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "Color Picker",
name = "okay",
})
menu.colorpicker.pickeroutline = DrawingFunction("frame", {
parent = menu.colorpicker.outline,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 172, 0, 172),
position = _UDim2New(0, 4, 0, 18),
zindex = menu.basezindex + 18,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.pickercontainer = DrawingFunction("frame", {
parent = menu.colorpicker.pickeroutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 19,
color = _Color3New(1, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.picker = DrawingFunction("frame", {
parent = menu.colorpicker.pickercontainer,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 20,
transparency = 0,
color = _Color3New(1, 1, 1),
visible = true,
activated = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = menu.colorpicker.picker
do
local parentedTo = menu.colorpicker.picker
local smoothGradient = {}
local xRes = 6
local yRes = 6
for xDim = 1, parentedTo.absolutesize.x / xRes do
smoothGradient[xDim] = {}
for yDim = 1, parentedTo.absolutesize.y / yRes do
smoothGradient[xDim][yDim] = utilities:draw("frame", {
parent = parentedTo,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, xRes, 0, yRes),
position = _UDim2New(0, (xDim - 1) * xRes, 0, (yDim - 1) * yRes),
zindex = parentedTo.zindex + 1,
color = _Color3FromHSV(0, 0, 1 - ((yDim - 1) * yRes) / parentedTo.absolutesize.y),
transparency = 1 - ((xDim - 1) * xRes) / parentedTo.absolutesize.x,
visible = true,
name = "okay",
})
end
end
end
menu.colorpicker.pickerselection = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 1, 0, 1),
position = _UDim2New(0, 0, 0, 0),
zindex = menu.basezindex + 22,
color = _Color3New(1, 1, 1),
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.pickerselectionoutline = DrawingFunction("frame", {
parent = menu.colorpicker.pickerselection,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 21,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.hueoutline = DrawingFunction("frame", {
parent = menu.colorpicker.outline,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 12, 0, 172),
position = _UDim2New(0, 178, 0, 18),
zindex = menu.basezindex + 18,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.huecontainer = DrawingFunction("frame", {
parent = menu.colorpicker.hueoutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 19,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.hue = DrawingFunction("frame", {
parent = menu.colorpicker.huecontainer,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 20,
transparency = 0,
visible = true,
activated = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = menu.colorpicker.hue
do
local parentedTo = colorReference.hue
local smoothGradient = {}
local yRes = 6
for yDim = 1, parentedTo.absolutesize.y / yRes do
smoothGradient[yDim] = utilities:draw("frame", {
parent = parentedTo,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(1, 0, 0, yRes),
position = _UDim2New(0, 0, 0, (yDim - 1) * yRes),
zindex = parentedTo.zindex + 1,
color = _Color3FromHSV(1 - ((yDim - 1) * yRes) / parentedTo.absolutesize.y, 1, 1),
visible = true,
name = "okay",
})
end
end
menu.colorpicker.hueselection = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 14, 0, 2),
position = _UDim2New(0, 0, 0, 0),
zindex = menu.basezindex + 22,
color = _Color3New(1, 1, 1),
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.hueselectionoutline = DrawingFunction("frame", {
parent = menu.colorpicker.hueselection,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 21,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.transparencyoutline = DrawingFunction("frame", {
parent = menu.colorpicker.outline,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 172, 0, 12),
position = _UDim2New(0, 4, 0, 192),
zindex = menu.basezindex + 18,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.transparencycontainer = DrawingFunction("frame", {
parent = menu.colorpicker.transparencyoutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 19,
color = _Color3New(1, 1, 1),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.transparencypicker = DrawingFunction("frame", {
parent = menu.colorpicker.transparencycontainer,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 20,
transparency = 0,
visible = true,
activated = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = menu.colorpicker.transparencypicker
do
local parentedTo = menu.colorpicker.transparencypicker
local smoothGradient = {}
local xRes = 6
for xDim = 1, parentedTo.absolutesize.x / xRes do
smoothGradient[xDim] = utilities:draw("frame", {
parent = parentedTo,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, xRes, 1, 0),
position = _UDim2New(0, (xDim - 1) * xRes, 0, 0),
zindex = parentedTo.zindex + 1,
color = _Color3FromHSV(0, 0, ((xDim - 1) * xRes) / parentedTo.absolutesize.x),
visible = true,
name = "okay",
})
end
end
menu.colorpicker.transparencyselection = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 2, 0, 14),
position = _UDim2New(0, 0, 0, 0),
zindex = menu.basezindex + 22,
color = _Color3New(1, 1, 1),
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.transparencyselectionoutline = DrawingFunction("frame", {
parent = menu.colorpicker.transparencyselection,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 21,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
menu.colorpicker.outline.visible = false
menu.colorpicker.focusedon = nil
-- how 2 pick color
menu.colorpicker.picker.clicked:Connect(function()
local oldhue = _MathAbs(1 - (_MathClamp(menu.colorpicker.hueselection.absoluteposition.y, menu.colorpicker.hue.absoluteposition.y, menu.colorpicker.hue.absoluteposition.y + menu.colorpicker.hue.absolutesize.y) - menu.colorpicker.picker.absoluteposition.y) / menu.colorpicker.picker.absolutesize.y)
local xpos = _MathClamp(utilities.mouse.position.x, menu.colorpicker.picker.absoluteposition.x, menu.colorpicker.picker.absoluteposition.x + menu.colorpicker.picker.absolutesize.x)
local ypos = _MathClamp(utilities.mouse.position.y, menu.colorpicker.picker.absoluteposition.y, menu.colorpicker.picker.absoluteposition.y + menu.colorpicker.picker.absolutesize.y)
menu.colorpicker.pickerselection.position = _UDim2New(0, xpos, 0, ypos)
-- quick maths
local sat = _MathClamp((xpos - menu.colorpicker.picker.absoluteposition.x) / menu.colorpicker.picker.absolutesize.x, 0, 1)
local val = _MathClamp(_MathAbs(1 - (ypos - menu.colorpicker.picker.absoluteposition.y) / menu.colorpicker.picker.absolutesize.y), 0, 1)
menu.colorpicker.focusedon:setcolor(_Color3FromHSV(oldhue, sat, val))
menu.colorpicker.updater = utilities.mouse.moved:Connect(function()
local xpos = _MathClamp(utilities.mouse.position.x, menu.colorpicker.picker.absoluteposition.x, menu.colorpicker.picker.absoluteposition.x + menu.colorpicker.picker.absolutesize.x)
local ypos = _MathClamp(utilities.mouse.position.y, menu.colorpicker.picker.absoluteposition.y, menu.colorpicker.picker.absoluteposition.y + menu.colorpicker.picker.absolutesize.y)
menu.colorpicker.pickerselection.position = _UDim2New(0, xpos, 0, ypos)
-- quick maths
local sat = _MathClamp((xpos - menu.colorpicker.picker.absoluteposition.x) / menu.colorpicker.picker.absolutesize.x, 0, 1)
local val = _MathClamp(_MathAbs(1 - (ypos - menu.colorpicker.picker.absoluteposition.y) / menu.colorpicker.picker.absolutesize.y), 0, 1)
menu.colorpicker.focusedon:setcolor(_Color3FromHSV(oldhue, sat, val))
end)
end)
menu.colorpicker.hue.clicked:Connect(function()
local old = menu.colorpicker.focusedon.color
local oldhue, oldsat, oldval = _Color3ToHSV(old)
local xpos = _MathClamp(utilities.mouse.position.x, menu.colorpicker.hue.absoluteposition.x, menu.colorpicker.hue.absoluteposition.x + menu.colorpicker.hue.absolutesize.x)
local ypos = _MathClamp(utilities.mouse.position.y, menu.colorpicker.hue.absoluteposition.y, menu.colorpicker.hue.absoluteposition.y + menu.colorpicker.hue.absolutesize.y)
menu.colorpicker.hueselection.position = _UDim2New(0, menu.colorpicker.hue.absoluteposition.x - 2, 0, ypos)
local hue = _MathAbs(1 - (ypos - menu.colorpicker.picker.absoluteposition.y) / menu.colorpicker.picker.absolutesize.y)
menu.colorpicker.focusedon:setcolor(_Color3FromHSV(hue, oldsat, oldval))
menu.colorpicker.pickercontainer.color = _Color3FromHSV(hue, 1, 1)
menu.colorpicker.updater = utilities.mouse.moved:Connect(function()
local xpos = _MathClamp(utilities.mouse.position.x, menu.colorpicker.hue.absoluteposition.x, menu.colorpicker.hue.absoluteposition.x + menu.colorpicker.hue.absolutesize.x)
local ypos = _MathClamp(utilities.mouse.position.y, menu.colorpicker.hue.absoluteposition.y, menu.colorpicker.hue.absoluteposition.y + menu.colorpicker.hue.absolutesize.y)
menu.colorpicker.hueselection.position = _UDim2New(0, menu.colorpicker.hue.absoluteposition.x - 2, 0, ypos)
local hue = _MathAbs(1 - (ypos - menu.colorpicker.picker.absoluteposition.y) / menu.colorpicker.picker.absolutesize.y)
menu.colorpicker.focusedon:setcolor(_Color3FromHSV(hue, oldsat, oldval))
menu.colorpicker.pickercontainer.color = _Color3FromHSV(hue, 1, 1)
end)
end)
menu.colorpicker.transparencypicker.clicked:Connect(function()
local xpos = _MathClamp(utilities.mouse.position.x, menu.colorpicker.transparencypicker.absoluteposition.x, menu.colorpicker.transparencypicker.absoluteposition.x + menu.colorpicker.transparencypicker.absolutesize.x)
local ypos = _MathClamp(utilities.mouse.position.y, menu.colorpicker.transparencypicker.absoluteposition.y, menu.colorpicker.transparencypicker.absoluteposition.y + menu.colorpicker.transparencypicker.absolutesize.y)
menu.colorpicker.transparencyselection.position = _UDim2New(0, xpos, 0, menu.colorpicker.transparencypicker.absoluteposition.y - 1)
local transparency = (xpos - menu.colorpicker.transparencypicker.absoluteposition.x) / menu.colorpicker.transparencypicker.absolutesize.x
menu.colorpicker.focusedon:settransparency(transparency)
menu.colorpicker.updater = utilities.mouse.moved:Connect(function()
local xpos = _MathClamp(utilities.mouse.position.x, menu.colorpicker.transparencypicker.absoluteposition.x, menu.colorpicker.transparencypicker.absoluteposition.x + menu.colorpicker.transparencypicker.absolutesize.x)
local ypos = _MathClamp(utilities.mouse.position.y, menu.colorpicker.transparencypicker.absoluteposition.y, menu.colorpicker.transparencypicker.absoluteposition.y + menu.colorpicker.transparencypicker.absolutesize.y)
menu.colorpicker.transparencyselection.position = _UDim2New(0, xpos, 0, menu.colorpicker.transparencypicker.absoluteposition.y - 1)
local transparency = (xpos - menu.colorpicker.transparencypicker.absoluteposition.x) / menu.colorpicker.transparencypicker.absolutesize.x
menu.colorpicker.focusedon:settransparency(transparency)
end)
end)
utilities.mouse.mousebutton1up:Connect(function()
if menu.colorpicker.updater then
menu.colorpicker.updater:Disconnect()
end
end)
function menu:callcolorpicker(name, flag, position, transparency)
if not flag then return end
local old = flag.color
local oldhue, oldsat, oldval = _Color3ToHSV(old)
menu.colorpicker.outline.visible = true
menu.isacolorpickeropen = true
menu.colorpicker.outline.position = _UDim2New(0, position.x, 0, position.y)
menu.colorpicker.title.text = name
menu.colorpicker.pickercontainer.color = _Color3FromHSV(oldhue, 1, 1)
if transparency then
menu.colorpicker.outline.size = _UDim2New(0, 194, 0, 208)
else
menu.colorpicker.outline.size = _UDim2New(0, 194, 0, 196)
end
menu.colorpicker.hueselection.visible = true
menu.colorpicker.pickerselection.visible = true
menu.colorpicker.transparencyoutline.visible = transparency ~= nil and true or false
menu.colorpicker.transparencyselection.visible = transparency ~= nil and true or false
menu.colorpicker.hueselection.position = _UDim2New(0, -2, 0, _MathAbs(1 - oldhue) * menu.colorpicker.hue.absolutesize.y) + _UDim2New(0, menu.colorpicker.hue.absoluteposition.x, 0, menu.colorpicker.hue.absoluteposition.y)
menu.colorpicker.pickerselection.position = _UDim2New(0, oldsat * menu.colorpicker.picker.absolutesize.x, 0, _MathAbs(oldval - 1) * menu.colorpicker.picker.absolutesize.y) + _UDim2New(0, menu.colorpicker.picker.absoluteposition.x, 0, menu.colorpicker.picker.absoluteposition.y)
menu.colorpicker.transparencypicker.position = menu.colorpicker.transparencypicker.position
menu.colorpicker.transparencycontainer.position = menu.colorpicker.transparencycontainer.position
if transparency then
menu.colorpicker.transparencyselection.position = _UDim2New(0, transparency * menu.colorpicker.transparencypicker.absolutesize.x, 0, -1) + _UDim2New(0, menu.colorpicker.transparencypicker.absoluteposition.x, 0, menu.colorpicker.transparencypicker.absoluteposition.y)
end
menu.colorpicker.focusedon = flag
if transparency then
menu.colorpicker.transparencyselection.position = _UDim2New(0, transparency * menu.colorpicker.transparencypicker.absolutesize.x, 0, -1) + _UDim2New(0, menu.colorpicker.transparencypicker.absoluteposition.x, 0, menu.colorpicker.transparencypicker.absoluteposition.y)
end
-- thing
menu.colorpicker.outofboundscloseconnection = utilities.mouse.mousebutton1down:Connect(function()
if utilities.mousechecks.inbounds(menu.colorpicker.outline, utilities.mouse.position) == false then -- uh oh..
if menu.colorpicker.updater then
menu.colorpicker.updater:Disconnect()
end
menu.colorpicker.outline.visible = false
menu.colorpicker.transparencyselection.visible = false
menu.colorpicker.hueselection.visible = false
menu.colorpicker.pickerselection.visible = false
menu.isacolorpickeropen = false
if menu.colorpicker.outofboundscloseconnection then
menu.colorpicker.outofboundscloseconnection:Disconnect()
menu.colorpicker.outofboundscloseconnection = nil
end
end
end)
end
else
do
local colorReference = {} -- would rather make 1 that moves around instead of do this for EVERY color picker, probably shouldve done this with dropdowns and what not but i got lazy
colorReference.outline = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 194, 0, 208),
position = _UDim2New(0, 100, 0, 100),
zindex = menu.basezindex + 18 + 13,
color = _Color3FromRGB(0, 0, 0),
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.container = DrawingFunction("frame", {
parent = colorReference.outline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 18 + 13,
color = _Color3FromRGB(46, 46, 46),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.title = DrawingFunction("text", {
parent = colorReference.container,
anchorpoint = _Vector2New(0, 0),
size = 13, -- x3
font = Drawing.Fonts.Plex,
position = _UDim2New(0, 4, 0, 2),
zindex = menu.basezindex + 19 + 13,
color = _Color3FromRGB(255, 255, 255),
visible = true,
outline = false,
outlinecolor = _Color3FromRGB(12, 12, 12),
text = "Color Picker",
name = "okay",
})
colorReference.pickeroutline = DrawingFunction("frame", {
parent = colorReference.outline,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 172, 0, 172),
position = _UDim2New(0, 4, 0, 18),
zindex = menu.basezindex + 18 + 13,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.pickercontainer = DrawingFunction("frame", {
parent = colorReference.pickeroutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 19 + 13,
color = _Color3New(1, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.picker = DrawingFunction("frame", {
parent = colorReference.pickercontainer,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 20 + 13,
transparency = 0,
color = _Color3New(1, 1, 1),
visible = true,
activated = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = colorReference.picker
do
local parentedTo = colorReference.picker
local smoothGradient = {}
local xRes = 6
local yRes = 6
for xDim = 1, parentedTo.absolutesize.x / xRes do
smoothGradient[xDim] = {}
for yDim = 1, parentedTo.absolutesize.y / yRes do
smoothGradient[xDim][yDim] = utilities:draw("frame", {
parent = parentedTo,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, xRes, 0, yRes),
position = _UDim2New(0, (xDim - 1) * xRes, 0, (yDim - 1) * yRes),
zindex = parentedTo.zindex + 1,
color = _Color3FromHSV(0, 0, 1 - ((yDim - 1) * yRes) / parentedTo.absolutesize.y),
transparency = 1 - ((xDim - 1) * xRes) / parentedTo.absolutesize.x,
visible = true,
name = "okay",
})
end
end
end
colorReference.pickerselection = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 1, 0, 1),
position = _UDim2New(0, 0, 0, 0),
zindex = menu.basezindex + 22 + 13,
color = _Color3New(1, 1, 1),
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.pickerselectionoutline = DrawingFunction("frame", {
parent = colorReference.pickerselection,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 21 + 13,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.hueoutline = DrawingFunction("frame", {
parent = colorReference.outline,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 12, 0, 172),
position = _UDim2New(0, 178, 0, 18),
zindex = menu.basezindex + 18 + 13,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.huecontainer = DrawingFunction("frame", {
parent = colorReference.hueoutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, -2, 1, -2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 19 + 13,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.hue = DrawingFunction("frame", {
parent = colorReference.huecontainer,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 20 + 13,
transparency = 0,
visible = true,
activated = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = colorReference.hue
do
local parentedTo = colorReference.hue
local smoothGradient = {}
local yRes = 6
for yDim = 1, parentedTo.absolutesize.y / yRes do
smoothGradient[yDim] = utilities:draw("frame", {
parent = parentedTo,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(1, 0, 0, yRes),
position = _UDim2New(0, 0, 0, (yDim - 1) * yRes),
zindex = parentedTo.zindex + 1,
color = _Color3FromHSV(1 - ((yDim - 1) * yRes) / parentedTo.absolutesize.y, 1, 1),
visible = true,
name = "okay",
})
end
end
colorReference.hueselection = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 14, 0, 2),
position = _UDim2New(0, 0, 0, 0),
zindex = menu.basezindex + 22 + 13,
color = _Color3New(1, 1, 1),
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.hueselectionoutline = DrawingFunction("frame", {
parent = colorReference.hueselection,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 21 + 13,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.transparencyoutline = DrawingFunction("frame", {
parent = colorReference.outline,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 172, 0, 12),
position = _UDim2New(0, 4, 0, 192),
zindex = menu.basezindex + 18 + 13,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.transparencycontainer = DrawingFunction("frame", {
parent = colorReference.transparencyoutline,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 19 + 13,
color = _Color3New(1, 1, 1),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.transparencypicker = DrawingFunction("frame", {
parent = colorReference.transparencycontainer,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 0, 1, 0),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 20 + 13,
transparency = 0,
visible = true,
activated = true,
name = "okay",
})
menu.activations[1 + #menu.activations] = colorReference.transparencypicker
do
local parentedTo = colorReference.transparencypicker
local smoothGradient = {}
local xRes = 6
for xDim = 1, parentedTo.absolutesize.x / xRes do
smoothGradient[xDim] = utilities:draw("frame", {
parent = parentedTo,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, xRes, 1, 0),
position = _UDim2New(0, (xDim - 1) * xRes, 0, 0),
zindex = parentedTo.zindex + 1,
color = _Color3FromHSV(0, 0, ((xDim - 1) * xRes) / parentedTo.absolutesize.x),
visible = true,
name = "okay",
})
end
end
colorReference.transparencyselection = DrawingFunction("frame", {
parent = utilities.base,
anchorpoint = _Vector2New(0, 0),
size = _UDim2New(0, 2, 0, 14),
position = _UDim2New(0, 0, 0, 0),
zindex = menu.basezindex + 22 + 13,
color = _Color3New(1, 1, 1),
visible = false,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.transparencyselectionoutline = DrawingFunction("frame", {
parent = colorReference.transparencyselection,
anchorpoint = _Vector2New(0.5, 0.5),
size = _UDim2New(1, 2, 1, 2),
position = _UDim2New(0.5, 0, 0.5, 0),
zindex = menu.basezindex + 21 + 13,
color = _Color3FromRGB(0, 0, 0),
visible = true,
thickness = 0,
filled = true,
name = "okay",
})
colorReference.outline.visible = false
colorReference.focusedon = nil
-- how 2 pick color
colorReference.picker.clicked:Connect(function()
local oldhue = _MathAbs(1 - (_MathClamp(colorReference.hueselection.absoluteposition.y, colorReference.hue.absoluteposition.y, colorReference.hue.absoluteposition.y + colorReference.hue.absolutesize.y) - colorReference.picker.absoluteposition.y) / colorReference.picker.absolutesize.y)
local xpos = _MathClamp(utilities.mouse.position.x, colorReference.picker.absoluteposition.x, colorReference.picker.absoluteposition.x + colorReference.picker.absolutesize.x)
local ypos = _MathClamp(utilities.mouse.position.y, colorReference.picker.absoluteposition.y, colorReference.picker.absoluteposition.y + colorReference.picker.absolutesize.y)
colorReference.pickerselection.position = _UDim2New(0, xpos, 0, ypos)
-- quick maths
local sat = _MathClamp((xpos - colorReference.picker.absoluteposition.x) / colorReference.picker.absolutesize.x, 0, 1)
local val = _MathClamp(_MathAbs(1 - (ypos - colorReference.picker.absoluteposition.y) / colorReference.picker.absolutesize.y), 0, 1)
colorReference.focusedon:setcolor(_Color3FromHSV(oldhue, sat, val))
colorReference.updater = utilities.mouse.moved:Connect(function()
local xpos = _MathClamp(utilities.mouse.position.x, colorReference.picker.absoluteposition.x, colorReference.picker.absoluteposition.x + colorReference.picker.absolutesize.x)
local ypos = _MathClamp(utilities.mouse.position.y, colorReference.picker.absoluteposition.y, colorReference.picker.absoluteposition.y + colorReference.picker.absolutesize.y)
colorReference.pickerselection.position = _UDim2New(0, xpos, 0, ypos)
-- quick maths
local sat = _MathClamp((xpos - colorRefeworking only in 7 lvl executor so hello skids so again mega leak and again raven.cc? here for free vaderhaxx ui paste 😂 thanks flohaxx🙏 luv you bro naix ❤ no hating ❤

[UPDATE!] Counter Blox