local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local Camera = workspace.CurrentCamera local LocalPlayer = Players.LocalPlayer -- UI를 CoreGui에 생성하여 플레이어가 죽어도 유지되게 처리 local screenGui = Instance.new("ScreenGui") screenGui.Name = "FollowPlayerUI" screenGui.Parent = game:GetService("CoreGui") -- CoreGui에 UI 생성 -- "Made by 랑이" 텍스트 생성 local madeByLabel = Instance.new("TextLabel") madeByLabel.Name = "MadeByLabel" madeByLabel.Size = UDim2.new(0.4, 0, 0.1, 0) madeByLabel.Position = UDim2.new(0.3, 0, 0.45, 0) madeByLabel.Text = "Made by 랑이" madeByLabel.TextColor3 = Color3.fromRGB(255, 255, 255) madeByLabel.Font = Enum.Font.GothamBold madeByLabel.TextSize = 48 madeByLabel.TextScaled = true madeByLabel.BackgroundTransparency = 0.4 madeByLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0) madeByLabel.TextStrokeTransparency = 0.8 madeByLabel.TextStrokeColor3 = Color3.fromRGB(255, 255, 255) madeByLabel.Parent = screenGui -- 텍스트 배경 그라데이션 효과 local gradient = Instance.new("UIGradient") gradient.Parent = madeByLabel gradient.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 255)), ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 255)) }) gradient.Rotation = 45 local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0.4, 0) corner.Parent = madeByLabel local shadow = Instance.new("Frame") shadow.Name = "Shadow" shadow.Size = madeByLabel.Size + UDim2.new(0, 15, 0, 15) shadow.Position = madeByLabel.Position + UDim2.new(0, 7, 0, 7) shadow.BackgroundColor3 = Color3.fromRGB(0, 0, 0) shadow.BackgroundTransparency = 0.5 shadow.ZIndex = madeByLabel.ZIndex - 1 shadow.Parent = screenGui local shadowCorner = Instance.new("UICorner") shadowCorner.CornerRadius = UDim.new(0.4, 0) shadowCorner.Parent = shadow -- 텍스트 등장 애니메이션 local tweenService = game:GetService("TweenService") local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 0, false, 0) local goal = {Size = UDim2.new(0.4, 0, 0.1, 0), TextTransparency = 0} local tween = tweenService:Create(madeByLabel, tweenInfo, goal) tween:Play() -- 텍스트와 배경 서서히 사라짐 local fadeOutTweenInfo = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0) local fadeOutGoal = {TextTransparency = 1} local fadeOutTween = tweenService:Create(madeByLabel, fadeOutTweenInfo, fadeOutGoal) local fadeOutGoalBackground = {BackgroundTransparency = 1} local fadeOutTweenBackground = tweenService:Create(madeByLabel, fadeOutTweenInfo, fadeOutGoalBackground) wait(1) fadeOutTween:Play() fadeOutTweenBackground:Play() fadeOutTween.Completed:Connect(function() madeByLabel:Destroy() end) fadeOutTweenBackground.Completed:Connect(function() shadow:Destroy() end) -- 버튼 생성 local followButton = Instance.new("TextButton") followButton.Name = "FollowButton" followButton.Size = UDim2.new(0.2, 0, 0.1, 0) followButton.Position = UDim2.new(0.01, 0, 0.85, 0) followButton.Text = "Enable Follow" followButton.TextColor3 = Color3.fromRGB(255, 255, 255) followButton.Font = Enum.Font.GothamBold followButton.TextScaled = true followButton.TextStrokeTransparency = 0.5 followButton.TextStrokeColor3 = Color3.fromRGB(0, 0, 0) followButton.Parent = screenGui -- 버튼 그라데이션 배경 local gradientButton = Instance.new("UIGradient") gradientButton.Parent = followButton gradientButton.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 150, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 75, 135)) }) gradientButton.Rotation = 45 local cornerButton = Instance.new("UICorner") cornerButton.CornerRadius = UDim.new(0.3, 0) cornerButton.Parent = followButton local shadowButton = Instance.new("Frame") shadowButton.Name = "Shadow" shadowButton.Size = followButton.Size + UDim2.new(0, 10, 0, 10) shadowButton.Position = followButton.Position + UDim2.new(0, 5, 0, 5) shadowButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) shadowButton.BackgroundTransparency = 0.5 shadowButton.ZIndex = followButton.ZIndex - 1 shadowButton.Parent = screenGui local shadowButtonCorner = Instance.new("UICorner") shadowButtonCorner.CornerRadius = UDim.new(0.3, 0) shadowButtonCorner.Parent = shadowButton -- 기능 활성화/비활성화 local isFollowingEnabled = false followButton.MouseButton1Click:Connect(function() isFollowingEnabled = not isFollowingEnabled if isFollowingEnabled then followButton.Text = "Disable Follow" followButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- 빨간색 else followButton.Text = "Enable Follow" followButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255) -- 파란색 end end) -- 마우스 우클릭 관련 local isRightMouseHeld = false local targetPlayer = nil -- 마우스 우클릭 시작 UserInputService.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton2 and isFollowingEnabled then isRightMouseHeld = true -- 가장 가까운 플레이어 탐색 local closestPlayer = nil local closestDistance = math.huge for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Head") then local head = player.Character.Head local headScreenPosition, onScreen = Camera:WorldToScreenPoint(head.Position) if onScreen then local mousePosition = UserInputService:GetMouseLocation() local distance = (Vector2.new(headScreenPosition.X, headScreenPosition.Y) - mousePosition).Magnitude if distance < closestDistance then closestDistance = distance closestPlayer = player end end end end targetPlayer = closestPlayer end end) -- 마우스 우클릭 종료 UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton2 then isRightMouseHeld = false targetPlayer = nil end end) -- RenderStepped로 추적 처리 game:GetService("RunService").RenderStepped:Connect(function() if isRightMouseHeld and targetPlayer and targetPlayer.Character then local head = targetPlayer.Character:FindFirstChild("Head") if head then Camera.CFrame = CFrame.new(Camera.CFrame.Position, head.Position) else targetPlayer = nil end end end)