Advertisement
Eproq012

Pc and mobi

Sep 14th, 2024
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.05 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local UserInputService = game:GetService("UserInputService")
  4. local LocalPlayer = Players.LocalPlayer
  5. local Mouse = LocalPlayer:GetMouse()
  6. local CamlockState = false
  7. local Prediction = 0.1299222231
  8.  
  9. -- Function to find the nearest enemy
  10. function FindNearestEnemy()
  11. local ClosestDistance, ClosestPlayer = math.huge, nil
  12. local CenterPosition = Vector2.new(game:GetService("GuiService"):GetScreenResolution().X / 2, game:GetService("GuiService"):GetScreenResolution().Y / 2)
  13.  
  14. for _, Player in ipairs(game:GetService("Players"):GetPlayers()) do
  15. if Player ~= LocalPlayer then
  16. local Character = Player.Character
  17. if Character and Character:FindFirstChild("HumanoidRootPart") and Character.Humanoid.Health > 0 then
  18. local Position, IsVisibleOnViewport = game:GetService("Workspace").CurrentCamera:WorldToViewportPoint(Character.HumanoidRootPart.Position)
  19. if IsVisibleOnViewport then
  20. local Distance = (CenterPosition - Vector2.new(Position.X, Position.Y)).Magnitude
  21. if Distance < ClosestDistance then
  22. ClosestPlayer = Character.HumanoidRootPart
  23. ClosestDistance = Distance
  24. end
  25. end
  26. end
  27. end
  28. end
  29.  
  30. return ClosestPlayer
  31. end
  32.  
  33. local enemy = nil
  34.  
  35. -- Function to aim the camera at the nearest enemy's HumanoidRootPart
  36. RunService.Heartbeat:Connect(function()
  37. if CamlockState == true then
  38. if enemy then
  39. local camera = workspace.CurrentCamera
  40. -- Use a single prediction value to anticipate enemy movement
  41. camera.CFrame = CFrame.new(camera.CFrame.p, enemy.Position + enemy.Velocity * Prediction)
  42. end
  43. end
  44. end)
  45.  
  46. -- PURIFY UI Setup
  47. local PURIFY = Instance.new("ScreenGui")
  48. local Frame = Instance.new("Frame")
  49. local UICorner = Instance.new("UICorner")
  50. local TextButton = Instance.new("TextButton")
  51. local UICorner_2 = Instance.new("UICorner")
  52. local UIStroke = Instance.new("UIStroke")
  53.  
  54. -- Properties
  55. PURIFY.Name = "PURIFY"
  56. PURIFY.Parent = game.CoreGui
  57. PURIFY.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  58.  
  59. Frame.Parent = PURIFY
  60. Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) -- Pure black for a sleek look
  61. Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  62. Frame.BorderSizePixel = 0
  63. Frame.Position = UDim2.new(0.133798108, 0, 0.20107238, 0)
  64. Frame.Size = UDim2.new(0, 202, 0, 70)
  65. Frame.Active = true
  66. Frame.Draggable = true
  67.  
  68. -- Ensure the frame stays centered on the screen
  69. local function TopContainer()
  70. Frame.Position = UDim2.new(0.5, -Frame.AbsoluteSize.X / 2, 0, -Frame.AbsoluteSize.Y / 2)
  71. end
  72.  
  73. TopContainer()
  74. Frame:GetPropertyChangedSignal("AbsoluteSize"):Connect(TopContainer)
  75.  
  76. UICorner.Parent = Frame
  77.  
  78. TextButton.Parent = Frame
  79. TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  80. TextButton.BackgroundTransparency = 5.000
  81. TextButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
  82. TextButton.BorderSizePixel = 0
  83. TextButton.Position = UDim2.new(0.0792079195, 0, 0.18571429, 0)
  84. TextButton.Size = UDim2.new(0, 170, 0, 44)
  85. TextButton.Font = Enum.Font.SourceSansSemibold
  86. TextButton.Text = "PURIFY OFF" -- Changed text to match PURIFY mode
  87. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  88. TextButton.TextScaled = true
  89. TextButton.TextSize = 11.000
  90. TextButton.TextWrapped = true
  91.  
  92. -- Add UIStroke for sea-blue gradient effect
  93. UIStroke.Parent = Frame
  94. UIStroke.Thickness = 2
  95. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  96. UIStroke.Color = Color3.fromRGB(0, 255, 255) -- Initial sea blue color
  97.  
  98. -- Function to create a gradient sea-blue effect
  99. local function SeaBlueGradientEffect()
  100. local hue = 180 -- Start at a sea-blue hue
  101. while true do
  102. -- Transition between light blue and deep sea blue colors
  103. local color = Color3.fromHSV(hue / 360, 0.8, 1) -- Saturation and brightness set to give a more sea-like look
  104. UIStroke.Color = color
  105. TextButton.TextColor3 = color
  106. -- Slow the transition down for a smoother effect
  107. hue = (hue - 1) % 360
  108. if hue < 180 then hue = 240 end -- Cycle between 180 (light blue) and 240 (deeper blue)
  109. wait(0.05)
  110. end
  111. end
  112.  
  113. -- Start the sea-blue gradient effect
  114. spawn(SeaBlueGradientEffect)
  115.  
  116. -- Toggle the camlock and PURIFY mode on button click
  117. TextButton.MouseButton1Click:Connect(function()
  118. CamlockState = not CamlockState
  119. TextButton.Text = CamlockState and "PURIFY ON" or "PURIFY OFF" -- Toggle between ON and OFF
  120. enemy = CamlockState and FindNearestEnemy() or nil
  121. end)
  122.  
  123. UICorner_2.Parent = TextButton
  124.  
  125. -- Listen for the "Q" key press to toggle camlock
  126. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  127. if gameProcessed then return end -- Ignore input if it's being used by something else
  128.  
  129. if input.KeyCode == Enum.KeyCode.Q then
  130. CamlockState = not CamlockState
  131. TextButton.Text = CamlockState and "PURIFY ON" or "PURIFY OFF" -- Toggle between ON and OFF
  132. enemy = CamlockState and FindNearestEnemy() or nil
  133. end
  134. end)
  135.  
  136. -- Create references to the UI elements
  137. local screenGui = Instance.new("ScreenGui")
  138. local textLabel = Instance.new("TextLabel")
  139. local copyButton = Instance.new("TextButton")
  140.  
  141. -- Parent the ScreenGui to the PlayerGui
  142. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  143.  
  144. -- Set up the TextLabel (Credit)
  145. textLabel.Parent = screenGui
  146. textLabel.Text = "Credits: Developed by: black pumpkin"
  147. textLabel.Size = UDim2.new(0.3, 0, 0.1, 0) -- Size of the label
  148. textLabel.Position = UDim2.new(0.35, 0, 0.4, 0) -- Center position
  149. textLabel.TextScaled = true -- Make text scale with label size
  150. textLabel.BackgroundTransparency = 0.3 -- Slight transparency for the background
  151. textLabel.BackgroundColor3 = Color3.fromRGB(25, 25, 25) -- Dark background color
  152. textLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  153. textLabel.ZIndex = 2 -- Ensure it appears on top of everything else
  154.  
  155. -- Add UICorner to round the corners of the TextLabel
  156. local labelCorner = Instance.new("UICorner")
  157. labelCorner.CornerRadius = UDim.new(0.2, 0) -- Smooth, rounded corners
  158. labelCorner.Parent = textLabel
  159.  
  160. -- Add UIStroke to create a soft border for the TextLabel
  161. local labelStroke = Instance.new("UIStroke")
  162. labelStroke.Parent = textLabel
  163. labelStroke.Thickness = 2 -- Stroke thickness
  164. labelStroke.Transparency = 0.7 -- Slightly transparent
  165. labelStroke.Color = Color3.fromRGB(0, 255, 255) -- Soft sea blue stroke
  166.  
  167. -- Create a beautiful gradient effect for the TextLabel
  168. local labelGradient = Instance.new("UIGradient")
  169. labelGradient.Color = ColorSequence.new{
  170. ColorSequenceKeypoint.new(0.00, Color3.fromRGB(0, 255, 255)), -- Light Blue
  171. ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 128, 255)), -- Deeper Blue
  172. ColorSequenceKeypoint.new(1.00, Color3.fromRGB(0, 255, 255)) -- Back to Light Blue
  173. }
  174. labelGradient.Rotation = 45 -- Diagonal gradient
  175. labelGradient.Parent = textLabel
  176.  
  177. -- Set up the TextButton (Copy Discord)
  178. copyButton.Parent = screenGui
  179. copyButton.Text = "Copy Discord"
  180. copyButton.Size = UDim2.new(0.2, 0, 0.1, 0) -- Size of the button
  181. copyButton.Position = UDim2.new(0.4, 0, 0.55, 0) -- Below the credit text
  182. copyButton.TextScaled = true
  183. copyButton.BackgroundTransparency = 0.3 -- Slight transparency for the button
  184. copyButton.BackgroundColor3 = Color3.fromRGB(25, 25, 25) -- Dark background color
  185. copyButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  186. copyButton.ZIndex = 2 -- Ensure it appears on top of everything else
  187.  
  188. -- Add UICorner to round the corners of the CopyButton
  189. local buttonCorner = Instance.new("UICorner")
  190. buttonCorner.CornerRadius = UDim.new(0.2, 0)
  191. buttonCorner.Parent = copyButton
  192.  
  193. -- Add UIStroke to create a soft border for the CopyButton
  194. local buttonStroke = Instance.new("UIStroke")
  195. buttonStroke.Parent = copyButton
  196. buttonStroke.Thickness = 2
  197. buttonStroke.Transparency = 0.7 -- Slight transparency
  198. buttonStroke.Color = Color3.fromRGB(0, 255, 255) -- Soft sea blue stroke
  199.  
  200. -- Create a beautiful gradient effect for the CopyButton
  201. local buttonGradient = Instance.new("UIGradient")
  202. buttonGradient.Color = ColorSequence.new{
  203. ColorSequenceKeypoint.new(0.00, Color3.fromRGB(0, 255, 255)), -- Light Blue
  204. ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 128, 255)), -- Deeper Blue
  205. ColorSequenceKeypoint.new(1.00, Color3.fromRGB(0, 255, 255)) -- Back to Light Blue
  206. }
  207. buttonGradient.Rotation = 45 -- Diagonal gradient
  208. buttonGradient.Parent = copyButton
  209.  
  210. -- Function to handle the button click
  211. copyButton.MouseButton1Click:Connect(function()
  212. -- Copy the Discord link to the clipboard
  213. if setclipboard then
  214. setclipboard("https://discord.gg/nC8yt43R") -- Your Discord link
  215. print("Discord link copied to clipboard!")
  216. else
  217. warn("Clipboard functionality is not supported on this device.")
  218. end
  219.  
  220. -- Hide the credit and the button after clicking
  221. textLabel.Visible = false
  222. copyButton.Visible = false
  223. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement