What's new
Heapleak - Scripthub

Get the most out of HeapLeak by creating a free account! Once signed in, you’ll gain full access to restricted content, be able to share your own scripts, and participate in our member-only discussions.

Universal Check Position Script

Version / Update: v1.0.0
Download / Script Link
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "CoordCopier"
screenGui.ResetOnSpawn = false
screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
screenGui.Parent = game:GetService("CoreGui")

local dragging = false
local dragInput
local dragStart
local startPos

local button = Instance.new("ImageButton")
button.Name = "DragButton"
button.Parent = screenGui
button.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
button.BackgroundTransparency = 1
button.BorderColor3 = Color3.fromRGB(0, 0, 0)
button.BorderSizePixel = 0
button.Position = UDim2.new(0, 100, 0, 100)
button.Size = UDim2.new(0, 80, 0, 80)
button.Image = "rbxassetid://80021789718730"
button.ImageColor3 = Color3.fromRGB(255, 255, 255)

local uiCorner = Instance.new("UICorner")
uiCorner.CornerRadius = UDim.new(0, 40)
uiCorner.Parent = button

local textLabel = Instance.new("TextLabel")
textLabel.Name = "ButtonText"
textLabel.Parent = button
textLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
textLabel.BackgroundTransparency = 1
textLabel.Position = UDim2.new(0, 0, 0.7, 0)
textLabel.Size = UDim2.new(1, 0, 0.3, 0)
textLabel.Font = Enum.Font.GothamBold
textLabel.Text = "check position"
textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
textLabel.TextSize = 12
textLabel.TextScaled = false
textLabel.TextWrapped = true
textLabel.TextStrokeTransparency = 0.5
textLabel.ZIndex = 2

local function copyToClipboard(text)
if syn and syn.set_clipboard then
syn.set_clipboard(text)
elseif setclipboard then
setclipboard(text)
elseif clipboard and clipboard.set then
clipboard.set(text)
elseif toclipboard then
toclipboard(text)
else
local clipboardGui = Instance.new("ScreenGui")
clipboardGui.Parent = game:GetService("CoreGui")

local textBox = Instance.new("TextBox")
textBox.Parent = clipboardGui
textBox.Size = UDim2.new(0, 0, 0, 0)
textBox.Position = UDim2.new(0, -1000, 0, -1000)
textBox.Text = text
textBox.TextEditable = true
textBox.Visible = true
textBox.Active = true

textBox:CaptureFocus()
task.wait(0.1)
textBox:SelectAll()
textBox:Copy()

textBox:Destroy()
clipboardGui:Destroy()
end
end

local function getCoordinates()
local char = player.Character
if char and char:FindFirstChild("HumanoidRootPart") then
local pos = char.HumanoidRootPart.Position
return string.format("Vector3.new(%.2f, %.2f, %.2f)", pos.X, pos.Y, pos.Z)
else
return "Vector3.new(0, 0, 0)"
end
end

button.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or
input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = button.Position
end
end)

button.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or
input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)

game:GetService("UserInputService").InputChanged:Connect(function(input)
if input == dragInput and dragging then
local delta = input.Position - dragStart
local newPos = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)

local viewportSize = game:GetService("Workspace").CurrentCamera.ViewportSize
local maxX = viewportSize.X - button.AbsoluteSize.X
local maxY = viewportSize.Y - button.AbsoluteSize.Y

if newPos.X.Offset < 0 then newPos = UDim2.new(0, 0, newPos.Y.Scale, newPos.Y.Offset) end
if newPos.Y.Offset < 0 then newPos = UDim2.new(newPos.X.Scale, newPos.X.Offset, 0, 0) end
if newPos.X.Offset > maxX then newPos = UDim2.new(0, maxX, newPos.Y.Scale, newPos.Y.Offset) end
if newPos.Y.Offset > maxY then newPos = UDim2.new(newPos.X.Scale, newPos.X.Offset, 0, maxY) end

button.Position = newPos
end
end)

button.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or
input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)

button.MouseButton1Click:Connect(function()
local coords = getCoordinates()
copyToClipboard(coords)
end)

print("script loaded")
[ View More ]
bcde8879-a4b3-4931-a265-9263ac586a8a.webp


just a check position scripts for features on your script, you need to click on button and you will get coordinates, you can use it as tp feature
 
Works on mobile
  1. Yes
Back
Top