Advertisement
coastsss

Get Coordinates UI

May 18th, 2020
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.63 KB | None | 0 0
  1. local QueueOnTeleport = queue_on_teleport or queue_for_teleport or syn.queue_on_teleport
  2.  
  3. QueueOnTeleport([[
  4.     loadstring(game:HttpGet("https://coasts.cool/scripts/getcoordinates.lua"))()
  5. ]])
  6.  
  7. local CoordinatesGrabber = Instance.new("ScreenGui")
  8. local Main = Instance.new("ImageLabel")
  9. local GrabCoordinatesButton = Instance.new("TextButton")
  10. local GrabCoordinatesButtonRounded = Instance.new("ImageLabel")
  11.  
  12. local UserInputService = game:GetService("UserInputService")
  13. local TweenService = game:GetService("TweenService")
  14. local HttpService = game:GetService("HttpService")
  15. local LocalPlayer = game:GetService("Players").LocalPlayer
  16.  
  17. CoordinatesGrabber.Name = HttpService:GenerateGUID(false)
  18. CoordinatesGrabber.Parent = game:GetService("CoreGui")
  19.  
  20. Main.Name = "Main"
  21. Main.Parent = CoordinatesGrabber
  22. Main.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  23. Main.BackgroundTransparency = 1.000
  24. Main.Position = UDim2.new(0.5, -104, 0.5, -29)
  25. Main.Size = UDim2.new(0, 209, 0, 59)
  26. Main.Image = "rbxassetid://3570695787"
  27. Main.ImageColor3 = Color3.fromRGB(35, 35, 35)
  28. Main.ScaleType = Enum.ScaleType.Slice
  29. Main.SliceCenter = Rect.new(100, 100, 100, 100)
  30. Main.SliceScale = 0.070
  31.  
  32. GrabCoordinatesButton.Name = "GrabCoordinatesButton"
  33. GrabCoordinatesButton.Parent = Main
  34. GrabCoordinatesButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  35. GrabCoordinatesButton.BackgroundTransparency = 1.000
  36. GrabCoordinatesButton.BorderSizePixel = 0
  37. GrabCoordinatesButton.Position = UDim2.new(0.497607946, -88, 0.5, -13)
  38. GrabCoordinatesButton.Size = UDim2.new(0, 176, 0, 27)
  39. GrabCoordinatesButton.ZIndex = 2
  40. GrabCoordinatesButton.Font = Enum.Font.SourceSansBold
  41. GrabCoordinatesButton.Text = "Copy Coordinates"
  42. GrabCoordinatesButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. GrabCoordinatesButton.TextSize = 15.000
  44. GrabCoordinatesButton.TextWrapped = true
  45. GrabCoordinatesButton.Modal = true
  46.  
  47. GrabCoordinatesButtonRounded.Name = "GrabCoordinatesButtonRounded"
  48. GrabCoordinatesButtonRounded.Parent = GrabCoordinatesButton
  49. GrabCoordinatesButtonRounded.Active = true
  50. GrabCoordinatesButtonRounded.AnchorPoint = Vector2.new(0.5, 0.5)
  51. GrabCoordinatesButtonRounded.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  52. GrabCoordinatesButtonRounded.BackgroundTransparency = 1.000
  53. GrabCoordinatesButtonRounded.Position = UDim2.new(0.502840936, 0, 0.5, 0)
  54. GrabCoordinatesButtonRounded.Selectable = true
  55. GrabCoordinatesButtonRounded.Size = UDim2.new(1.00568151, 0, 1, 0)
  56. GrabCoordinatesButtonRounded.Image = "rbxassetid://3570695787"
  57. GrabCoordinatesButtonRounded.ImageColor3 = Color3.fromRGB(55, 55, 55)
  58. GrabCoordinatesButtonRounded.ScaleType = Enum.ScaleType.Slice
  59. GrabCoordinatesButtonRounded.SliceCenter = Rect.new(100, 100, 100, 100)
  60. GrabCoordinatesButtonRounded.SliceScale = 0.060
  61.  
  62. function Dragging(instancename, instancename2)
  63.     local Dragging = nil
  64.     local DragInput = nil
  65.     local DragStart = nil
  66.     local StartPosition = nil
  67.  
  68.     local function update(input)
  69.         local Delta = input.Position - DragStart
  70.         instancename2.Position = UDim2.new(StartPosition.X.Scale, StartPosition.X.Offset + Delta.X, StartPosition.Y.Scale, StartPosition.Y.Offset + Delta.Y)
  71.     end
  72.  
  73.     instancename.InputBegan:Connect(function(input)
  74.         if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  75.             Dragging = true
  76.             DragStart = input.Position
  77.             StartPosition = instancename2.Position
  78.            
  79.             input.Changed:Connect(function()
  80.                 if input.UserInputState == Enum.UserInputState.End then
  81.                     Dragging = false
  82.                 end
  83.             end)
  84.         end
  85.     end)
  86.  
  87.     instancename.InputChanged:Connect(function(input)
  88.         if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  89.             DragInput = input
  90.         end
  91.     end)
  92.  
  93.     UserInputService.InputChanged:Connect(function(input)
  94.         if input == DragInput and Dragging then
  95.             update(input)
  96.         end
  97.     end)
  98. end
  99.  
  100. Dragging(Main, Main)
  101.  
  102. GrabCoordinatesButton.MouseButton1Down:Connect(function()
  103.     setclipboard(tostring(LocalPlayer.Character.HumanoidRootPart.CFrame))
  104. end)
  105.  
  106. GrabCoordinatesButton.MouseEnter:Connect(function()
  107.     TweenService:Create(GrabCoordinatesButtonRounded, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {ImageTransparency = 0.25}):Play()
  108. end)
  109.  
  110. GrabCoordinatesButton.MouseLeave:Connect(function()
  111.     TweenService:Create(GrabCoordinatesButtonRounded, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play()
  112. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement