Run it
Copy the script and paste it into your executor.
uis = :()
localplr = .Players.LocalPlayer
mouse = localplr:()
dragging = {}
(fpos,spos,pos,frame,bounds,ar)
finalpos = .(
frame.Position.X.Scale,
spos.X.Offset-(fpos.X.Offset-pos.X),
frame.Position.Y.Scale,
spos.Y.Offset-(fpos.Y.Offset-pos.Y)
)
bounds ~=
UI = .()
UI.ScreenInsets = .ScreenInsets.None
UI.Parent = .CoreGui
screensize = UI.AbsoluteSize
UI.Enabled =
replframe = frame:()
replframe.Parent = UI
replframe.Position = finalpos
absp = replframe.AbsolutePosition
abss = replframe.AbsoluteSize
finalpos = .(
finalpos.X.Scale,
.(
finalpos.X.Offset,
-finalpos.X.Scale*screensize.X,
-finalpos.X.Scale*screensize.X+(screensize.X-abss.X)
),
finalpos.Y.Scale,
.(
finalpos.Y.Offset,
-finalpos.Y.Scale*screensize.Y,
(-finalpos.Y.Scale*screensize.Y)+(screensize.Y-abss.Y)
)
)
UI:()
frame.Position = finalpos
drag = (frame,bounds,chf)
frames = {}
frame:()
i,v (frame:())
chf ~= (v:() v:())
.(frames,v)
chf
.(frames,v)
.(frames,frame)
i,frame (frames)
frame.Active =
w,h = frame.AbsoluteSize.X,frame.AbsoluteSize.Y
ar = w/h
frame.InputBegan:((input)
(input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch) dragging[input]
dragging[input] = frame
firstpos = .(,mouse.X,,mouse.Y)
startpos = frame.Position
move1 = uis.TouchMoved:((input2)
input == input2
(firstpos,startpos,input2.Position,frame,bounds ,ar)
)
move2 = uis.InputChanged:((input2)
input2.UserInputType == .UserInputType.MouseMovement
(firstpos,startpos,input2.Position,frame,bounds ,ar)
)
.() dragging[input] ==
move1:()
move2:()
)
uis.InputEnded:((input)
dragging[input] =
)
uis.InputBegan:((input)
dragging[input] =
)
dragallows GUI's to be easily dragged. TO USE: simply call the loadstring as a variable like this (the script returns the drag function) local drag = loadstring(game:HttpGet("https://rawscripts.net/raw/Universal-Script-Drag-UI-SUPPORTS-MOBILE-22790"))() The drag function has 1 required argument and 2 other optional ones. drag(FrameOrScreenGUI,Bounds,CheckForFrame) FrameOrScreenGUI is the frame/screengui that you want to drag Bounds makes it so your frame cant get out of the screen (cant go out of it) CheckForFrame is for checking if the frame is a frame before dragging it (for screengui's) If you want to support me, go through this linkvertise https://link-target.net/1262127/support-me

Universal