Run it
Copy the script and paste it into your executor.
activated = false
local ScreenGui = Instance.new()
TextButton = .()
UICorner = .()
ScreenGui.Parent = .CoreGui
TextButton.Parent = ScreenGui
TextButton.BackgroundColor3 = .(, , )
TextButton.BorderColor3 = .(, , )
TextButton.BorderSizePixel =
TextButton.Position = .(, , , )
TextButton.Size = .(, , , )
TextButton.Font = .Font.FredokaOne
TextButton.Text =
TextButton.TextColor3 = .(, , )
TextButton.TextScaled =
UICorner.CornerRadius = .(, )
UICorner.Parent = TextButton
UserInputService = :()
runService = (:());
gui = TextButton
dragging
dragInput
dragStart
startPos
(a, b, m)
a + (b - a) * m
;
lastMousePos
lastGoalPos
DRAG_SPEED = ();
(dt)
(startPos) ;
(dragging) (lastGoalPos)
gui.Position = .(startPos.X.Scale, (gui.Position.X.Offset, lastGoalPos.X.Offset, dt * DRAG_SPEED), startPos.Y.Scale, (gui.Position.Y.Offset, lastGoalPos.Y.Offset, dt * DRAG_SPEED))
;
delta = (lastMousePos - UserInputService:())
xGoal = (startPos.X.Offset - delta.X);
yGoal = (startPos.Y.Offset - delta.Y);
lastGoalPos = .(startPos.X.Scale, xGoal, startPos.Y.Scale, yGoal)
gui.Position = .(startPos.X.Scale, (gui.Position.X.Offset, xGoal, dt * DRAG_SPEED), startPos.Y.Scale, (gui.Position.Y.Offset, yGoal, dt * DRAG_SPEED))
;
gui.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
dragging =
dragStart = input.Position
startPos = gui.Position
lastMousePos = UserInputService:()
input.Changed:(()
input.UserInputState == .UserInputState.End
dragging =
)
)
gui.InputChanged:((input)
input.UserInputType == .UserInputType.MouseMovement input.UserInputType == .UserInputType.Touch
dragInput = input
)
runService.Heartbeat:(Update)
TextButton.MouseButton1Click:(()
activated
i,v (.Players.LocalPlayer.Character:())
v:()
v.Parent = .Players.LocalPlayer.Backpack
activated =
TextButton.Text =
i,v (.Players.LocalPlayer.Backpack:())
v:()
v.Parent = .Players.LocalPlayer.Character
activated =
TextButton.Text =
)got bored again useful for sword games

Universal