Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variables
- local MyCustomGUI = Instance.new("ScreenGui")
- local FGUI = Instance.new("Frame")
- local btnAction = Instance.new("TextButton")
- local tbxVictim = Instance.new("TextBox")
- local lblTitle = Instance.new("TextLabel")
- local ImageLabel = Instance.new("ImageLabel")
- -- Properties
- MyCustomGUI.Name = "MyCustomGUI"
- MyCustomGUI.Parent = game.CoreGui
- FGUI.Name = "FGUI"
- FGUI.Parent = MyCustomGUI
- FGUI.BackgroundColor3 = Color3.new(1, 1, 1) -- White color
- FGUI.BorderSizePixel = 1
- FGUI.Position = UDim2.new(0, 0, 0.667, 0)
- FGUI.Size = UDim2.new(0, 317, 0, 271)
- FGUI.Draggable = true
- lblTitle.Name = "Title"
- lblTitle.Parent = FGUI
- lblTitle.BackgroundColor3 = Color3.new(1, 1, 1)
- lblTitle.BorderSizePixel = 1
- lblTitle.Position = UDim2.new(0, 0, -0.122, 0)
- lblTitle.Size = UDim2.new(0, 317, 0, 33)
- lblTitle.Visible = true
- lblTitle.Active = true
- lblTitle.Font = Enum.Font.SourceSansBold
- lblTitle.Text = "My Custom GUI"
- lblTitle.TextColor3 = Color3.new(0, 0, 0)
- lblTitle.TextSize = 20
- btnAction.Name = "Action"
- btnAction.Parent = FGUI
- btnAction.BackgroundColor3 = Color3.new(1, 1, 1)
- btnAction.BorderSizePixel = 1
- btnAction.Position = UDim2.new(0.044, 0, 0.229, 0)
- btnAction.Size = UDim2.new(0, 99, 0, 31)
- btnAction.Visible = true
- btnAction.Font = Enum.Font.SourceSansBold
- btnAction.Text = "Action"
- btnAction.TextColor3 = Color3.new(0, 0, 0)
- btnAction.TextSize = 20
- tbxVictim.Name = "Victim"
- tbxVictim.Parent = FGUI
- tbxVictim.BackgroundColor3 = Color3.new(1, 1, 1)
- tbxVictim.BorderSizePixel = 1
- tbxVictim.Position = UDim2.new(0.533, 0, 0.229, 0)
- tbxVictim.Size = UDim2.new(0, 133, 0, 27)
- tbxVictim.Visible = true
- tbxVictim.Font = Enum.Font.SourceSansBold
- tbxVictim.Text = "[NAME]"
- tbxVictim.TextColor3 = Color3.new(0, 0, 0)
- tbxVictim.TextSize = 20
- ImageLabel.Name = "ImageLabel"
- ImageLabel.Parent = FGUI
- ImageLabel.Image = "http://www.roblox.com/asset/?id=42837..."
- ImageLabel.BorderSizePixel = 1
- ImageLabel.Position = UDim2.new(0.274, 0, 0.358, 0)
- ImageLabel.Size = UDim2.new(0, 106, 0, 121)
- -- Scripts
- btnAction.MouseButton1Click:Connect(function()
- local player = tbxVictim.Text
- print("Button clicked. Victim: "..player)
- local targetPlayer = game.Players:FindFirstChild(player)
- if targetPlayer then
- print("Target player found: "..targetPlayer.Name)
- local humanoid = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")
- if humanoid then
- print("Humanoid found in local player")
- local animation = Instance.new('Animation')
- animation.AnimationId = 'rbxassetid://148840371'
- local playAnim = humanoid:LoadAnimation(animation)
- if playAnim then
- print("Animation loaded successfully")
- playAnim:Play()
- playAnim:AdjustSpeed(1) -- Ajuste a velocidade se necessário
- print("Animation playing")
- while humanoid.Parent and humanoid.Parent.Parent do
- wait()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = targetPlayer.Character.HumanoidRootPart.CFrame
- end
- else
- print("Failed to load animation")
- end
- else
- print("Humanoid not found in local player")
- end
- else
- print("Target player not found")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment