local screenGui = Instance.new("ScreenGui")
screenGui.Parent = game:GetService("CoreGui")
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0.5, -100, 0.5, -50)
frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
frame.Parent = screenGui
local dragging = false
local dragInput, mousePos, framePos
frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
mousePos = input.Position
framePos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
frame.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
dragInput = input
end
end)
game:GetService("UserInputService").InputChanged:Connect(function(input)
if input == dragInput and dragging then
local delta = input.Position - mousePos
frame.Position = UDim2.new(
framePos.X.Scale, framePos.X.Offset + delta.X,
framePos.Y.Scale, framePos.Y.Offset + delta.Y
)
end
end)
local closeButton = Instance.new("TextButton")
closeButton.Size = UDim2.new(0, 50, 0, 20)
closeButton.Position = UDim2.new(1, -55, 0, 5)
closeButton.Text = "X"
closeButton.Parent = frame
closeButton.MouseButton1Click:Connect(function()
screenGui:Destroy()
end)
local button = Instance.new("TextButton")
button.Size = UDim2.new(0, 150, 0, 50)
button.Position = UDim2.new(0.5, -75, 0.5, -25)
button.Text = "GET FREE WATER"
button.Parent = frame
button.MouseButton1Click:Connect(function()
fireclickdetector(workspace.Shop.freeitem:GetChildren()[5].Model.click.ClickDetector)
end)
top of page
bottom of page
Comentários