Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local LocalPlayer = Players.LocalPlayer
- local Mouse = LocalPlayer:GetMouse()
- local CamlockState = false
- local Prediction = 0.16289706
- -- Function to find the nearest enemy
- function FindNearestEnemy()
- local ClosestDistance, ClosestPlayer = math.huge, nil
- local CenterPosition = Vector2.new(game:GetService("GuiService"):GetScreenResolution().X / 2, game:GetService("GuiService"):GetScreenResolution().Y / 2)
- for _, Player in ipairs(game:GetService("Players"):GetPlayers()) do
- if Player ~= LocalPlayer then
- local Character = Player.Character
- if Character and Character:FindFirstChild("HumanoidRootPart") and Character.Humanoid.Health > 0 then
- local Position, IsVisibleOnViewport = game:GetService("Workspace").CurrentCamera:WorldToViewportPoint(Character.HumanoidRootPart.Position)
- if IsVisibleOnViewport then
- local Distance = (CenterPosition - Vector2.new(Position.X, Position.Y)).Magnitude
- if Distance < ClosestDistance then
- ClosestPlayer = Character.HumanoidRootPart
- ClosestDistance = Distance
- end
- end
- end
- end
- end
- return ClosestPlayer
- end
- local enemy = nil
- -- Function to aim the camera at the nearest enemy's HumanoidRootPart
- RunService.Heartbeat:Connect(function()
- if CamlockState == true then
- if enemy then
- local camera = workspace.CurrentCamera
- -- Use a single prediction value to anticipate enemy movement
- camera.CFrame = CFrame.new(camera.CFrame.p, enemy.Position + enemy.Velocity * Prediction)
- end
- end
- end)
- -- PURIFY UI Setup
- local PURIFY = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local TextButton = Instance.new("TextButton")
- local UICorner_2 = Instance.new("UICorner")
- local UIStroke = Instance.new("UIStroke")
- -- Properties
- PURIFY.Name = "PURIFY"
- PURIFY.Parent = game.CoreGui
- PURIFY.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = PURIFY
- Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) -- Pure black for a sleek look
- Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(0.133798108, 0, 0.20107238, 0)
- Frame.Size = UDim2.new(0, 202, 0, 70)
- Frame.Active = true
- Frame.Draggable = true
- -- Ensure the frame stays centered on the screen
- local function TopContainer()
- Frame.Position = UDim2.new(0.5, -Frame.AbsoluteSize.X / 2, 0, -Frame.AbsoluteSize.Y / 2)
- end
- TopContainer()
- Frame:GetPropertyChangedSignal("AbsoluteSize"):Connect(TopContainer)
- UICorner.Parent = Frame
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.BackgroundTransparency = 5.000
- TextButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
- TextButton.BorderSizePixel = 0
- TextButton.Position = UDim2.new(0.0792079195, 0, 0.18571429, 0)
- TextButton.Size = UDim2.new(0, 170, 0, 44)
- TextButton.Font = Enum.Font.SourceSansSemibold
- TextButton.Text = "PURIFY OFF" -- Changed text to match PURIFY mode
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextScaled = true
- TextButton.TextSize = 11.000
- TextButton.TextWrapped = true
- -- Add UIStroke for sea-blue gradient effect
- UIStroke.Parent = Frame
- UIStroke.Thickness = 2
- UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
- UIStroke.Color = Color3.fromRGB(0, 255, 255) -- Initial sea blue color
- -- Function to create a gradient sea-blue effect
- local function SeaBlueGradientEffect()
- local hue = 180 -- Start at a sea-blue hue
- while true do
- -- Transition between light blue and deep sea blue colors
- local color = Color3.fromHSV(hue / 360, 0.8, 1) -- Saturation and brightness set to give a more sea-like look
- UIStroke.Color = color
- TextButton.TextColor3 = color
- -- Slow the transition down for a smoother effect
- hue = (hue - 1) % 360
- if hue < 180 then hue = 240 end -- Cycle between 180 (light blue) and 240 (deeper blue)
- wait(0.05)
- end
- end
- -- Start the sea-blue gradient effect
- spawn(SeaBlueGradientEffect)
- -- Toggle the camlock and PURIFY mode on button click
- TextButton.MouseButton1Click:Connect(function()
- CamlockState = not CamlockState
- TextButton.Text = CamlockState and "PURIFY ON" or "PURIFY OFF" -- Toggle between ON and OFF
- enemy = CamlockState and FindNearestEnemy() or nil
- end)
- UICorner_2.Parent = TextButton
- -- Listen for the "Q" key press to toggle camlock
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed then return end -- Ignore input if it's being used by something else
- if input.KeyCode == Enum.KeyCode.Q then
- CamlockState = not CamlockState
- TextButton.Text = CamlockState and "PURIFY ON" or "PURIFY OFF" -- Toggle between ON and OFF
- enemy = CamlockState and FindNearestEnemy() or nil
- end
- end)
- -- Create references to the UI elements
- local screenGui = Instance.new("ScreenGui")
- local textLabel = Instance.new("TextLabel")
- local copyButton = Instance.new("TextButton")
- -- Parent the ScreenGui to the PlayerGui
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Set up the TextLabel (Credit)
- textLabel.Parent = screenGui
- textLabel.Text = "Credits: Developed by: black pumpkin"
- textLabel.Size = UDim2.new(0.3, 0, 0.1, 0) -- Size of the label
- textLabel.Position = UDim2.new(0.35, 0, 0.4, 0) -- Center position
- textLabel.TextScaled = true -- Make text scale with label size
- textLabel.BackgroundTransparency = 0.3 -- Slight transparency for the background
- textLabel.BackgroundColor3 = Color3.fromRGB(25, 25, 25) -- Dark background color
- textLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
- textLabel.ZIndex = 2 -- Ensure it appears on top of everything else
- -- Add UICorner to round the corners of the TextLabel
- local labelCorner = Instance.new("UICorner")
- labelCorner.CornerRadius = UDim.new(0.2, 0) -- Smooth, rounded corners
- labelCorner.Parent = textLabel
- -- Add UIStroke to create a soft border for the TextLabel
- local labelStroke = Instance.new("UIStroke")
- labelStroke.Parent = textLabel
- labelStroke.Thickness = 2 -- Stroke thickness
- labelStroke.Transparency = 0.7 -- Slightly transparent
- labelStroke.Color = Color3.fromRGB(0, 255, 255) -- Soft sea blue stroke
- -- Create a beautiful gradient effect for the TextLabel
- local labelGradient = Instance.new("UIGradient")
- labelGradient.Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0.00, Color3.fromRGB(0, 255, 255)), -- Light Blue
- ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 128, 255)), -- Deeper Blue
- ColorSequenceKeypoint.new(1.00, Color3.fromRGB(0, 255, 255)) -- Back to Light Blue
- }
- labelGradient.Rotation = 45 -- Diagonal gradient
- labelGradient.Parent = textLabel
- -- Set up the TextButton (Copy Discord)
- copyButton.Parent = screenGui
- copyButton.Text = "Copy Discord"
- copyButton.Size = UDim2.new(0.2, 0, 0.1, 0) -- Size of the button
- copyButton.Position = UDim2.new(0.4, 0, 0.55, 0) -- Below the credit text
- copyButton.TextScaled = true
- copyButton.BackgroundTransparency = 0.3 -- Slight transparency for the button
- copyButton.BackgroundColor3 = Color3.fromRGB(25, 25, 25) -- Dark background color
- copyButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
- copyButton.ZIndex = 2 -- Ensure it appears on top of everything else
- -- Add UICorner to round the corners of the CopyButton
- local buttonCorner = Instance.new("UICorner")
- buttonCorner.CornerRadius = UDim.new(0.2, 0)
- buttonCorner.Parent = copyButton
- -- Add UIStroke to create a soft border for the CopyButton
- local buttonStroke = Instance.new("UIStroke")
- buttonStroke.Parent = copyButton
- buttonStroke.Thickness = 2
- buttonStroke.Transparency = 0.7 -- Slight transparency
- buttonStroke.Color = Color3.fromRGB(0, 255, 255) -- Soft sea blue stroke
- -- Create a beautiful gradient effect for the CopyButton
- local buttonGradient = Instance.new("UIGradient")
- buttonGradient.Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0.00, Color3.fromRGB(0, 255, 255)), -- Light Blue
- ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 128, 255)), -- Deeper Blue
- ColorSequenceKeypoint.new(1.00, Color3.fromRGB(0, 255, 255)) -- Back to Light Blue
- }
- buttonGradient.Rotation = 45 -- Diagonal gradient
- buttonGradient.Parent = copyButton
- -- Function to handle the button click
- copyButton.MouseButton1Click:Connect(function()
- -- Copy the Discord link to the clipboard
- if setclipboard then
- setclipboard("https://discord.gg/nC8yt43R") -- Your Discord link
- print("Discord link copied to clipboard!")
- else
- warn("Clipboard functionality is not supported on this device.")
- end
- -- Hide the credit and the button after clicking
- textLabel.Visible = false
- copyButton.Visible = false
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement