-- Gui to Lua -- Version: 3.4 -- Instances: local MegaSuperPuperScript = Instance.new("ScreenGui") local Frame = Instance.new("Frame") local SizeX = Instance.new("TextBox") local SizeZ = Instance.new("TextBox") local SizeY = Instance.new("TextBox") local Create = Instance.new("TextButton") local Target = Instance.new("TextBox") local TextLabel = Instance.new("TextLabel") local close = Instance.new("ImageButton") local Open = Instance.new("TextButton") --Properties: MegaSuperPuperScript.Name = "MegaSuperPuperScript" MegaSuperPuperScript.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") MegaSuperPuperScript.ZIndexBehavior = Enum.ZIndexBehavior.Sibling Frame.Parent = MegaSuperPuperScript Frame.BackgroundColor3 = Color3.fromRGB(143, 143, 143) Frame.BackgroundTransparency = 0.750 Frame.BorderColor3 = Color3.fromRGB(27, 42, 53) Frame.BorderSizePixel = 3 Frame.Position = UDim2.new(0.35727191, -50, 0.355769217, -50) Frame.Size = UDim2.new(0, 416, 0, 250) SizeX.Name = "SizeX" SizeX.Parent = Frame SizeX.BackgroundColor3 = Color3.fromRGB(145, 145, 145) SizeX.BackgroundTransparency = 0.350 SizeX.BorderSizePixel = 2 SizeX.Position = UDim2.new(0.040865384, 0, 0.131999999, 0) SizeX.Size = UDim2.new(0, 192, 0, 50) SizeX.Font = Enum.Font.Gotham SizeX.PlaceholderText = "Введите размер по оси X" SizeX.Text = "" SizeX.TextColor3 = Color3.fromRGB(0, 0, 0) SizeX.TextSize = 15.000 SizeZ.Name = "SizeZ" SizeZ.Parent = Frame SizeZ.BackgroundColor3 = Color3.fromRGB(145, 145, 145) SizeZ.BackgroundTransparency = 0.350 SizeZ.BorderColor3 = Color3.fromRGB(27, 42, 53) SizeZ.BorderSizePixel = 2 SizeZ.Position = UDim2.new(0.040865384, 0, 0.667999983, 0) SizeZ.Size = UDim2.new(0, 192, 0, 50) SizeZ.Font = Enum.Font.Gotham SizeZ.PlaceholderText = "Введите размер по оси Z" SizeZ.Text = "" SizeZ.TextColor3 = Color3.fromRGB(0, 0, 0) SizeZ.TextSize = 15.000 SizeY.Name = "SizeY" SizeY.Parent = Frame SizeY.BackgroundColor3 = Color3.fromRGB(145, 145, 145) SizeY.BackgroundTransparency = 0.350 SizeY.BorderSizePixel = 2 SizeY.Position = UDim2.new(0.040865384, 0, 0.400000006, 0) SizeY.Size = UDim2.new(0, 192, 0, 50) SizeY.Font = Enum.Font.Gotham SizeY.PlaceholderText = "Введите размер по оси Y" SizeY.Text = "" SizeY.TextColor3 = Color3.fromRGB(0, 0, 0) SizeY.TextSize = 15.000 Create.Name = "Create" Create.Parent = Frame Create.BackgroundColor3 = Color3.fromRGB(145, 145, 145) Create.BackgroundTransparency = 0.350 Create.BorderSizePixel = 2 Create.Position = UDim2.new(0.538461566, 0, 0.667999983, 0) Create.Size = UDim2.new(0, 179, 0, 50) Create.Font = Enum.Font.Gotham Create.Text = "Создать парт" Create.TextColor3 = Color3.fromRGB(0, 0, 0) Create.TextSize = 23.000 Target.Name = "Target" Target.Parent = Frame Target.BackgroundColor3 = Color3.fromRGB(145, 145, 145) Target.BackgroundTransparency = 0.350 Target.BorderSizePixel = 2 Target.Position = UDim2.new(0.538461566, 0, 0.400000006, 0) Target.Size = UDim2.new(0, 179, 0, 50) Target.Font = Enum.Font.Gotham Target.PlaceholderText = "Ник цели" Target.Text = "" Target.TextColor3 = Color3.fromRGB(0, 0, 0) Target.TextSize = 15.000 TextLabel.Parent = Frame TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255) TextLabel.BackgroundTransparency = 1.000 TextLabel.BorderSizePixel = 0 TextLabel.Position = UDim2.new(0.259615391, 0, 0.895999968, 0) TextLabel.Size = UDim2.new(0, 200, 0, 20) TextLabel.Font = Enum.Font.Gotham TextLabel.Text = "Сделал eel1kor" TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0) TextLabel.TextSize = 17.000 close.Name = "close" close.Parent = Frame close.BackgroundColor3 = Color3.fromRGB(143, 143, 143) close.BackgroundTransparency = 0.350 close.BorderColor3 = Color3.fromRGB(27, 42, 53) close.BorderSizePixel = 2 close.Position = UDim2.new(0.925480783, 0, 0.0319999978, 0) close.Size = UDim2.new(0, 25, 0, 25) close.ZIndex = 2 close.Image = "rbxassetid://3926305904" close.ImageRectOffset = Vector2.new(284, 4) close.ImageRectSize = Vector2.new(24, 24) Open.Name = "Open" Open.Parent = MegaSuperPuperScript Open.BackgroundColor3 = Color3.fromRGB(145, 145, 145) Open.BackgroundTransparency = 0.350 Open.BorderSizePixel = 2 Open.Position = UDim2.new(1, -150, 0.5, -17) Open.Size = UDim2.new(0, 150, 0, 35) Open.Visible = false Open.Font = Enum.Font.Gotham Open.Text = "Открыть гуи" Open.TextColor3 = Color3.fromRGB(0, 0, 0) Open.TextSize = 20.000 -- Module Scripts: local fake_module_scripts = {} do -- nil.DraggableUI local script = Instance.new('ModuleScript', nil) script.Name = "DraggableUI" local function module_script() local Signal = require(script.Signal) local TweenService = game:GetService("TweenService") local PlayerObject = game:GetService("Players").LocalPlayer local UserInputService = game:GetService("UserInputService") local Mouse = PlayerObject:GetMouse() local Camera = workspace.CurrentCamera local PlayerGui = PlayerObject:WaitForChild("PlayerGui") local listOfDraggable = {} local function ValidateParametersValue(UI: GuiObject, byScale: boolean?) if not UI then error("First argument must not be empty!") end if not (typeof(UI) == "Instance") then error("First argument must be a type of instance!") end if not (typeof(byScale) == "boolean") then error("Second argument must be a type of boolean!") end end local function IsMouseOrTouch(input: InputObject, isMouseMovement: boolean?): boolean return input.UserInputType == (if isMouseMovement then Enum.UserInputType.MouseMovement else Enum.UserInputType.MouseButton1) or input.UserInputType == Enum.UserInputType.Touch end local function GetDominantObject(list: { Instance }): GuiObject local dominant = math.huge local guiObject: GuiObject for _, value in ipairs(listOfDraggable) do local index = table.find(list, value._UI) if index and index < dominant then dominant = index guiObject = value._UI end end return guiObject end local DraggableUI = {} DraggableUI.__index = DraggableUI DraggableUI.__tostring = function() return "Draggable" end function DraggableUI.new(UI: GuiObject, byScale: true?) byScale = byScale or true ValidateParametersValue(UI, byScale) local self = setmetatable({ _Released = Signal.new(), _Started = Signal.new(), _Moved = Signal.new(), _Connections = {}, _Overlapping = { Disabled = false, }, _LimitBoundingBox = { Enabled = false, Type = 0, }, _TweenInfo = false, _UI = UI, }, DraggableUI) self.Released = self._Released.Event self.Started = self._Started.Event self.Moved = self._Moved.Event local success, result = pcall(self._Initialize, self, UI, byScale) if not success then error(("Something went wrong: %s"):format(result)) end table.insert(listOfDraggable, self) return self end function DraggableUI:_Initialize(UI: GuiObject, byScale: boolean) local startPosition = UI.AbsolutePosition local dragStartPosition = UserInputService:GetMouseLocation() local mouseOnUI = false local button1Down = false table.insert( self._Connections, UI.MouseEnter:Connect(function() mouseOnUI = true end) ) table.insert( self._Connections, UI.MouseLeave:Connect(function() mouseOnUI = false end) ) table.insert( self._Connections, UserInputService.InputBegan:Connect(function(input) if IsMouseOrTouch(input) and mouseOnUI then local list = PlayerGui:GetGuiObjectsAtPosition(Mouse.X, Mouse.Y) if #list >= 2 then if not (GetDominantObject(list) == UI) then return end end for _, value in pairs(self._Overlapping) do if value then return end end startPosition = UI.AbsolutePosition + (UI.AbsoluteSize * UI.AnchorPoint) - UI.Parent.AbsolutePosition dragStartPosition = UserInputService:GetMouseLocation() button1Down = true self._Started:Fire() end end) ) table.insert( self._Connections, UserInputService.InputEnded:Connect(function(input) if IsMouseOrTouch(input) and button1Down then button1Down = false self._Released:Fire(UserInputService:GetMouseLocation()) end end) ) table.insert( self._Connections, UserInputService.InputChanged:Connect(function(input) if IsMouseOrTouch(input, true) and button1Down then local mousePosition = UserInputService:GetMouseLocation() local delta = mousePosition - dragStartPosition local parentSize = UI.Parent.AbsoluteSize local position = startPosition + delta position = self:_LimitPosition(UI, position, parentSize) if not byScale then position = UDim2.fromOffset(position.X, position.Y) else position /= parentSize position = UDim2.fromScale(position.X, position.Y) end if self._TweenInfo then TweenService:Create(UI, self._TweenInfo, { Position = position }):Play() else UI.Position = position end self._Moved:Fire(mousePosition) end end) ) end function DraggableUI:_LimitPosition(UI: GuiObject, position: Vector2, parentSize: Vector2) if self._LimitBoundingBox.Enabled then local offset = (UI.AbsoluteSize * UI.AnchorPoint) local uiSize = UI.AbsoluteSize if self._LimitBoundingBox.Type == 0 then local screenSize = Camera.ViewportSize local max = (screenSize - uiSize) + offset return Vector2.new(math.clamp(position.X, offset.X, max.X), math.clamp(position.Y, offset.Y, max.Y)) else local max = (parentSize - uiSize) + offset return Vector2.new(math.clamp(position.X, offset.X, max.X), math.clamp(position.Y, offset.Y, max.Y)) end end return position end function DraggableUI:_Ignore(UI: GuiObject) table.insert( self._Connections, UI.MouseEnter:Connect(function() self._Overlapping[UI] = true end) ) table.insert( self._Connections, UI.MouseLeave:Connect(function() self._Overlapping[UI] = nil end) ) end function DraggableUI:LimitScreenBoundingBox(byParent: false?, value: boolean?): boolean local limitBoundingBox = self._LimitBoundingBox byParent = byParent or false limitBoundingBox.Type = if byParent then 1 else 0 limitBoundingBox.Enabled = if typeof(value) == "boolean" then value else not limitBoundingBox.Enabled return limitBoundingBox.Enabled end function DraggableUI:Toggle(value: boolean?): boolean local overlapping = self._Overlapping overlapping.Disabled = if typeof(value) == "boolean" then value else not overlapping.Disabled return overlapping.Disabled end function DraggableUI:SetTweenInfo(tweenInfo: TweenInfo) if not (typeof(tweenInfo) == "TweenInfo") then error("Argument must be a type of TweenInfo!") end self._TweenInfo = tweenInfo end function DraggableUI:Ignore(list: { Instance }, instanceCheck: false?) instanceCheck = instanceCheck or false if not (typeof(list) == "table") then error("First argument must be a type of table!") end if not (typeof(instanceCheck) == "boolean") then error("Second argument must be a type of boolean!") end local success = pcall(function() if instanceCheck then for _, object in ipairs(list) do pcall(function() self:_Ignore(object) end) end else for _, object in ipairs(list) do self:_Ignore(object) end end end) if not success then error("It seems that the array contained a none type of GuiObject") end end function DraggableUI:IgnoreChildren() self:Ignore(self._UI:GetChildren(), true) end function DraggableUI:IgnoreDescendants() self:Ignore(self._UI:GetDescendants(), true) end function DraggableUI:Destroy() for _, connection: RBXScriptSignal in ipairs(self._Connections) do if typeof(connection) == "RBXScriptSignal" then connection:Disconnect() end end for key, _ in pairs(self._IgnoreList) do self._IgnoreList[key] = nil end self._Released:Destroy() self._Started:Destroy() self._Moved:Destroy() table.remove(listOfDraggable, table.find(listOfDraggable, self)) table.clear(self) end setmetatable(DraggableUI, { __index = function(_, key) error(("Attempt to get Connection::%s (not a valid member)"):format(tostring(key)), 2) end, __newindex = function(_, key) error(("Attempt to set Connection::%s (not a valid member)"):format(tostring(key)), 2) end, }) export type Draggable = { LimitScreenBoundingBox: (self: { Draggable }, byParent: false?, value: boolean?) -> boolean, Ignore: (self: { Draggable }, list: { Frame | Instance }, instanceCheck: false?) -> (), SetTweenInfo: (self: { Draggable }, tweenInfo: TweenInfo) -> (), Toggle: (self: { Draggable }, value: boolean?) -> boolean, IgnoreDescendants: (self: { Draggable }) -> (), IgnoreChildren: (self: { Draggable }) -> (), Destroy: (self: { Draggable }) -> (), Released: Signal.Event, Started: Signal.Event, Moved: Signal.Event, } return DraggableUI :: { new: (UI: Instance, byScale: true?) -> Draggable, } end fake_module_scripts[script] = module_script end do -- nil.Signal local script = Instance.new('ModuleScript', nil) script.Name = "Signal" local function module_script() local Signal = {} Signal.__index = Signal Signal.__tostring = function() return "Signal" end Signal.Event = {} :: { Connect: (self: { RBXScriptSignal }) -> RBXScriptConnection, Once: (self: { RBXScriptSignal }) -> RBXScriptConnection, Wait: (self: { RBXScriptSignal }) -> ...any, } Signal.Event.__index = Signal.Event Signal.Event.__tostring = function() return "Event" end local Connection = {} Connection.__index = Connection Connection.__tostring = function() return "Connection" end local function DisableTableIndex(Table: {}) setmetatable(Table, { __index = function(_, key) error(("Attempt to get Connection::%s (not a valid member)"):format(tostring(key)), 2) end, __newindex = function(_, key) error(("Attempt to set Connection::%s (not a valid member)"):format(tostring(key)), 2) end, }) end Connection.__eq = function(self, other) return self._Handler == other._Handler end function Connection.new(Parent: {}, Handler: any): RBXScriptConnection return setmetatable({ _Handler = Handler, _Parent = Parent, }, Connection) end function Connection:Disconnect() local Position = table.find(self._Parent, self) if Position then table.remove(self._Parent, Position) end end function Connection:_Fire(...) self._Handler(...) end function Signal.new() return setmetatable({}, Signal) end function Signal.Event:Connect(Handler: any): RBXScriptConnection local self: RBXScriptConnection = self local _Connection = Connection.new(self, Handler) table.insert(self, _Connection) return _Connection end function Signal.Event:Once(Handler: any): RBXScriptConnection local self: RBXScriptConnection = self local Fired = false local Connection Connection = self:Connect(function(...) if Fired then return end Fired = true Connection:Disconnect() Handler(...) end) return Connection end function Signal.Event:Wait(): ...any local self: RBXScriptConnection = self local Result = coroutine.running() local Fired = false local Connection Connection = self:Connect(function(...) if Fired then return end Fired = true Connection:Disconnect() task.spawn(Result, ...) end) return coroutine.yield() end function Signal:DisconnectAll() local self: RBXScriptConnection = self for _, Handler in ipairs(self.Event) do coroutine.wrap(Handler.Disconnect)(Handler) end end function Signal:Fire(...: any) local self: RBXScriptConnection = self local args = { ... } for _, Handler in ipairs(self.Event) do coroutine.wrap(Handler._Fire)(Handler, unpack(args)) end end function Signal:Destroy() local self: RBXScriptConnection = self self:DisconnectAll() table.clear(self) end DisableTableIndex(Signal) DisableTableIndex(Connection) DisableTableIndex(Signal.Event) export type Event = { Connect: (self: { Event }, func: (...any) -> ()) -> RBXScriptConnection, Once: (self: { Event }, func: (...any) -> ()) -> RBXScriptConnection, Wait: (self: { Event }) -> ...any, } export type Signal = { new: ( ) -> { Event: Event, Destroy: (self: { Signal }) -> (), Fire: (self: { Signal }, ...any) -> (), DisconnectAll: (self: { Signal }) -> (), }, } return Signal :: Signal end fake_module_scripts[script] = module_script end -- Scripts: local function VUBBZO_fake_script() -- Frame.LocalScript local script = Instance.new('LocalScript', Frame) local req = require local require = function(obj) local fake = fake_module_scripts[obj] if fake then return fake() end return req(obj) end local DraggableUI = require(script.DraggableUI) local Frame = script.Parent DraggableUI.new(Frame) local sx = Frame.SizeX local sy = Frame.SizeY local sz = Frame.SizeZ -- local vpart = Frame.ViewportFrame.Part local button = Frame.Create local target = Frame.Target local cFrame = CFrame.new(0,0,0) target.Text = game.Players.LocalPlayer.Name button.MouseButton1Click:Connect(function() local Size = { X = tonumber(sx.Text), Y = tonumber(sy.Text), Z = tonumber(sz.Text) } for _,v in next, game.ReplicatedStorage:GetDescendants() do if v.Name == 'Breach' and v:IsA('RemoteFunction') then v:InvokeServer(3,{Fortified={},Destroyable=workspace},CFrame.new(),CFrame.new(),{CFrame=target.Character.HumanoidRootPart.CFrame*cFrame,Size=Size}) end end end) Frame.close.MouseButton1Click:Connect(function() Frame.Visible = false Frame.Parent.Open.Visible = true end) Frame.Parent.Open.MouseButton1Click:Connect(function() Frame.Visible = true Frame.Parent.Open.Visible = false end) end coroutine.wrap(VUBBZO_fake_script)()