forked from RectangularObject/LinoriaLib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDMT1.lua
2 lines (2 loc) · 5.51 KB
/
DMT1.lua
1
2
-- pls dont tell me this is obfuscated nga
local Library={Open=true,Accent=Color3.fromRGB(85,134,214),Pages={},Sections={},Flags={},UnNamedFlags=0,ThemeObjects={},Holder=nil,Keys={[Enum.KeyCode.LeftShift]="LShift",[Enum.KeyCode.RightShift]="RShift",[Enum.KeyCode.LeftControl]="LCtrl",[Enum.KeyCode.RightControl]="RCtrl",[Enum.KeyCode.LeftAlt]="LAlt",[Enum.KeyCode.RightAlt]="RAlt",[Enum.KeyCode.CapsLock]="Caps",[Enum.KeyCode.One]="1",[Enum.KeyCode.Two]="2",[Enum.KeyCode.Three]="3",[Enum.KeyCode.Four]="4",[Enum.KeyCode.Five]="5",[Enum.KeyCode.Six]="6",[Enum.KeyCode.Seven]="7",[Enum.KeyCode.Eight]="8",[Enum.KeyCode.Nine]="9",[Enum.KeyCode.Zero]="0",[Enum.KeyCode.KeypadOne]="Num1",[Enum.KeyCode.KeypadTwo]="Num2",[Enum.KeyCode.KeypadThree]="Num3",[Enum.KeyCode.KeypadFour]="Num4",[Enum.KeyCode.KeypadFive]="Num5",[Enum.KeyCode.KeypadSix]="Num6",[Enum.KeyCode.KeypadSeven]="Num7",[Enum.KeyCode.KeypadEight]="Num8",[Enum.KeyCode.KeypadNine]="Num9",[Enum.KeyCode.KeypadZero]="Num0",[Enum.KeyCode.Minus]="-",[Enum.KeyCode.Equals]="=",[Enum.KeyCode.Tilde]="~",[Enum.KeyCode.LeftBracket]="[",[Enum.KeyCode.RightBracket]="]",[Enum.KeyCode.RightParenthesis]=")",[Enum.KeyCode.LeftParenthesis]="(",[Enum.KeyCode.Semicolon]=",",[Enum.KeyCode.Quote]="'",[Enum.KeyCode.BackSlash]="\\",[Enum.KeyCode.Comma]=",",[Enum.KeyCode.Period]=".",[Enum.KeyCode.Slash]="/",[Enum.KeyCode.Asterisk]="*",[Enum.KeyCode.Plus]="+",[Enum.KeyCode.Period]=".",[Enum.KeyCode.Backquote]="`",[Enum.UserInputType.MouseButton1]="MB1",[Enum.UserInputType.MouseButton2]="MB2",[Enum.UserInputType.MouseButton3]="MB3"},Connections={},UIKey=Enum.KeyCode.End,ScreenGUI=nil,FSize=13,UIFont=Font.new("rbxasset://fonts/families/Ubuntu.json"),SettingsPage=nil,VisValues={},Cooldown=false}local Flags,Dropdowns,Pickers,VisValues={},{},{},{}Library.__index=Library;Library.Pages.__index=Library.Pages;Library.Sections.__index=Library.Sections;local LocalPlayer=game:GetService('Players').LocalPlayer;local Mouse=LocalPlayer:GetMouse();local TweenService=game:GetService("TweenService");function Library:Connection(Signal,Callback)local Con=Signal:Connect(Callback)return Con end;function Library:Disconnect(Connection)Connection:Disconnect()end;function Library:Round(Number,Float)return Float*math.floor(Number/Float)end;function Library.NextFlag()Library.UnNamedFlags=Library.UnNamedFlags+1;return string.format("%.14g",Library.UnNamedFlags)end;function Library:RGBA(r,g,b,alpha)local rgb=Color3.fromRGB(r,g,b)local mt=table.clone(getrawmetatable(rgb))setreadonly(mt,false)local old=mt.__index;mt.__index=newcclosure(function(self,key)if key:lower()=="transparency"then return alpha end;return old(self,key)end)setrawmetatable(rgb,mt)return rgb end;function Library:GetConfig()local Config=""for Index,Value in pairs(self.Flags)do if Index~="ConfigConfig_List"and Index~="ConfigConfig_Load"and Index~="ConfigConfig_Save"then local Value2=Value;local Final=""if typeof(Value2)=="Color3"then local hue,sat,val=Value2:ToHSV()Final=("rgb(%s,%s,%s,%s)"):format(hue,sat,val,1)elseif typeof(Value2)=="table"and Value2.Color and Value2.Transparency then local hue,sat,val=Value2.Color:ToHSV()Final=("rgb(%s,%s,%s,%s)"):format(hue,sat,val,Value2.Transparency)elseif typeof(Value2)=="table"and Value.Mode then local Values=Value.current;Final=("key(%s,%s,%s)"):format(Values[1]or"nil",Values[2]or"nil",Value.Mode)elseif Value2~=nil then if typeof(Value2)=="boolean"then Value2=("bool(%s)"):format(tostring(Value2))elseif typeof(Value2)=="table"then local New="table("for Index2,Value3 in pairs(Value2)do New=New..Value3..","end;if New:sub(#New)==","then New=New:sub(0,#New-1)end;Value2=New..")"elseif typeof(Value2)=="string"then Value2=("string(%s)"):format(Value2)elseif typeof(Value2)=="number"then Value2=("number(%s)"):format(Value2)end;Final=Value2 end;Config=Config..Index..": "..tostring(Final).."\n"end end;return Config end;function Library:LoadConfig(Config)local Table=string.split(Config,"\n")local Table2={}for Index,Value in pairs(Table)do local Table3=string.split(Value,":")if Table3[1]~="ConfigConfig_List"and#Table3>=2 then local Value=Table3[2]:sub(2,#Table3[2])if Value:sub(1,3)=="rgb"then local Table4=string.split(Value:sub(5,#Value-1),",")Value=Table4 elseif Value:sub(1,3)=="key"then local Table4=string.split(Value:sub(5,#Value-1),",")if Table4[1]=="nil"and Table4[2]=="nil"then Table4[1]=nil;Table4[2]=nil end;Value=Table4 elseif Value:sub(1,4)=="bool"then local Bool=Value:sub(6,#Value-1)Value=Bool=="true"elseif Value:sub(1,5)=="table"then local Table4=string.split(Value:sub(7,#Value-1),",")Value=Table4 elseif Value:sub(1,6)=="string"then local String=Value:sub(8,#Value-1)Value=String elseif Value:sub(1,6)=="number"then local Number=tonumber(Value:sub(8,#Value-1))Value=Number end;Table2[Table3[1]]=Value end end;for i,v in pairs(Table2)do if Flags[i]then if typeof(Flags[i])=="table"then Flags[i]:Set(v)else Flags[i](v)end end end end;function Library:SetOpen(bool)if typeof(bool)=='boolean'then Library.Open=bool;Library.ScreenGUI.Enabled=bool;Library.Holder.Visible=bool end end;function Library:IsMouseOverFrame(Frame)local AbsPos,AbsSize=Frame.AbsolutePosition,Frame.AbsoluteSize;if Mouse.X>=AbsPos.X and Mouse.X<=AbsPos.X+AbsSize.X and Mouse.Y>=AbsPos.Y and Mouse.Y<=AbsPos.Y+AbsSize.Y then return true end end;function Library:ChangeAccent(Color)Library.Accent=Color;for obj,theme in next,Library.ThemeObjects do if theme:IsA("Frame")or theme:IsA("TextButton")or theme:IsA("ScrollingFrame")then theme.BackgroundColor3=Color elseif theme:IsA("TextLabel")or theme:IsA("TextBox")then theme.TextColor3=Color elseif theme:IsA("ImageLabel")or theme:IsA("Image