Advertisement
Eproq012

Sikelock

Sep 24th, 2024 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.25 KB | None | 0 0
  1. local screenGui = Instance.new("ScreenGui")
  2. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  3.  
  4. local frame = Instance.new("Frame")
  5. frame.Size = UDim2.new(0, 400, 0, 200)
  6. frame.Position = UDim2.new(0.5, -200, 0.5, -100)
  7. frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  8. frame.BorderSizePixel = 0
  9. frame.AnchorPoint = Vector2.new(0.5, 0.5)
  10. frame.Parent = screenGui
  11.  
  12. local UICorner = Instance.new("UICorner")
  13. UICorner.CornerRadius = UDim.new(0, 12)
  14. UICorner.Parent = frame
  15.  
  16. local title = Instance.new("TextLabel")
  17. title.Size = UDim2.new(1, 0, 0, 50)
  18. title.Position = UDim2.new(0, 0, 0, 0)
  19. title.Text = "Credits"
  20. title.TextColor3 = Color3.new(1, 1, 1)
  21. title.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  22. title.Font = Enum.Font.GothamBold
  23. title.TextSize = 22
  24. title.Parent = frame
  25.  
  26. local titleCorner = Instance.new("UICorner")
  27. titleCorner.CornerRadius = UDim.new(0, 12)
  28. titleCorner.Parent = title
  29.  
  30. local creditsLabel = Instance.new("TextLabel")
  31. creditsLabel.Size = UDim2.new(0.9, 0, 0, 40)
  32. creditsLabel.Position = UDim2.new(0.05, 0, 0.35, 0)
  33. creditsLabel.Text = "Made by: sikebladi, develop by: feelalt"
  34. creditsLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  35. creditsLabel.Font = Enum.Font.Gotham
  36. creditsLabel.TextSize = 18
  37. creditsLabel.BackgroundTransparency = 1
  38. creditsLabel.TextWrapped = true
  39. creditsLabel.Parent = frame
  40.  
  41. local SubmitButton = Instance.new("TextButton")
  42. SubmitButton.Size = UDim2.new(0.9, 0, 0, 40)
  43. SubmitButton.Position = UDim2.new(0.05, 0, 0.7, 0)
  44. SubmitButton.Text = "Submit"
  45. SubmitButton.Font = Enum.Font.GothamBold
  46. SubmitButton.TextSize = 18
  47. SubmitButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  48. SubmitButton.BackgroundColor3 = Color3.fromRGB(85, 170, 255)
  49. SubmitButton.Parent = frame
  50.  
  51. local submitCorner = Instance.new("UICorner")
  52. submitCorner.CornerRadius = UDim.new(0, 8)
  53. submitCorner.Parent = SubmitButton
  54.  
  55. local CloseButton = Instance.new("TextButton")
  56. CloseButton.Size = UDim2.new(0, 30, 0, 30)
  57. CloseButton.Position = UDim2.new(1, -35, 0, 10)
  58. CloseButton.Text = "X"
  59. CloseButton.Font = Enum.Font.GothamBold
  60. CloseButton.TextSize = 18
  61. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  62. CloseButton.BackgroundColor3 = Color3.fromRGB(255, 80, 80)
  63. CloseButton.Parent = frame
  64.  
  65. local closeCorner = Instance.new("UICorner")
  66. closeCorner.CornerRadius = UDim.new(0, 8)
  67. closeCorner.Parent = CloseButton
  68.  
  69. local dragging
  70. local dragInput
  71. local dragStart
  72. local startPos
  73.  
  74. local function update(input)
  75. local delta = input.Position - dragStart
  76. frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  77. end
  78.  
  79. title.InputBegan:Connect(function(input)
  80. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  81. dragging = true
  82. dragStart = input.Position
  83. startPos = frame.Position
  84.  
  85. input.Changed:Connect(function()
  86. if input.UserInputState == Enum.UserInputState.End then
  87. dragging = false
  88. end
  89. end)
  90. end
  91. end)
  92.  
  93. title.InputChanged:Connect(function(input)
  94. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  95. dragInput = input
  96. end
  97. end)
  98.  
  99. game:GetService("UserInputService").InputChanged:Connect(function(input)
  100. if input == dragInput and dragging then
  101. update(input)
  102. end
  103. end)
  104.  
  105. CloseButton.MouseButton1Click:Connect(function()
  106. screenGui:Destroy()
  107. end)
  108.  
  109. SubmitButton.MouseButton1Click:Connect(function()
  110. print("Submit button clicked!")
  111.  
  112. local Players = game:GetService("Players")
  113. local RunService = game:GetService("RunService")
  114. local LocalPlayer = Players.LocalPlayer
  115. local Mouse = LocalPlayer:GetMouse()
  116.  
  117. local CamlockState = false
  118. local Prediction = 0.11407
  119. local HorizontalPrediction = 0.15
  120. local VerticalPrediction = 0.15
  121. local Locked = true
  122.  
  123. getgenv().Key = "q"
  124.  
  125. function FindNearestEnemy()
  126. local ClosestDistance, ClosestPlayer = math.huge, nil
  127. local CenterPosition = Vector2.new(
  128. game:GetService("GuiService"):GetScreenResolution().X / 2,
  129. game:GetService("GuiService"):GetScreenResolution().Y / 2
  130. )
  131.  
  132. for _, Player in ipairs(Players:GetPlayers()) do
  133. if Player ~= LocalPlayer then
  134. local Character = Player.Character
  135. if Character and Character:FindFirstChild("HumanoidRootPart") and Character.Humanoid.Health > 0 then
  136. local Position, IsVisibleOnViewport = workspace.CurrentCamera:WorldToViewportPoint(Character.HumanoidRootPart.Position)
  137.  
  138. if IsVisibleOnViewport then
  139. local Distance = (CenterPosition - Vector2.new(Position.X, Position.Y)).Magnitude
  140. if Distance < ClosestDistance then
  141. ClosestPlayer = Character.HumanoidRootPart
  142. ClosestDistance = Distance
  143. end
  144. end
  145. end
  146. end
  147. end
  148.  
  149. return ClosestPlayer
  150. end
  151.  
  152. local enemy = nil
  153.  
  154. RunService.Heartbeat:Connect(function()
  155. if CamlockState == true and enemy then
  156. local camera = workspace.CurrentCamera
  157. local predictedPosition = enemy.Position + Vector3.new(
  158. enemy.Velocity.X * HorizontalPrediction,
  159. enemy.Velocity.Y * VerticalPrediction,
  160. enemy.Velocity.Z * Prediction
  161. )
  162. camera.CFrame = CFrame.new(camera.CFrame.p, predictedPosition)
  163. end
  164. end)
  165.  
  166. Mouse.KeyDown:Connect(function(k)
  167. if k == getgenv().Key then
  168. Locked = not Locked
  169. if Locked then
  170. enemy = FindNearestEnemy()
  171. CamlockState = true
  172. else
  173. enemy = nil
  174. CamlockState = false
  175. end
  176. end
  177. end)
  178.  
  179. local Sike = Instance.new("ScreenGui")
  180. local Frame = Instance.new("Frame")
  181. local UICorner = Instance.new("UICorner")
  182. local TextButton = Instance.new("TextButton")
  183. local UICorner_2 = Instance.new("UICorner")
  184. local DropShadow = Instance.new("ImageLabel")
  185. local TitleLabel = Instance.new("TextLabel")
  186. local UIStroke = Instance.new("UIStroke")
  187.  
  188. Sike.Name = "Sike"
  189. Sike.Parent = game.CoreGui
  190. Sike.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  191.  
  192. Frame.Parent = Sike
  193. Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  194. Frame.BorderSizePixel = 0
  195. Frame.Position = UDim2.new(1, -220, 0, 10)
  196. Frame.Size = UDim2.new(0, 202, 0, 100)
  197. Frame.Active = true
  198. Frame.Draggable = true
  199.  
  200. UICorner.CornerRadius = UDim.new(0, 10)
  201. UICorner.Parent = Frame
  202.  
  203. UIStroke.Parent = Frame
  204. UIStroke.Thickness = 2
  205. UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  206. UIStroke.Color = Color3.fromRGB(255, 0, 0)
  207.  
  208. DropShadow.Name = "DropShadow"
  209. DropShadow.Parent = Frame
  210. DropShadow.BackgroundTransparency = 1
  211. DropShadow.Position = UDim2.new(0, -15, 0, -15)
  212. DropShadow.Size = UDim2.new(1, 30, 1, 30)
  213. DropShadow.ZIndex = 0
  214. DropShadow.Image = "rbxassetid://1316045217"
  215. DropShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
  216. DropShadow.ImageTransparency = 0.7
  217. DropShadow.ScaleType = Enum.ScaleType.Slice
  218. DropShadow.SliceCenter = Rect.new(10, 10, 118, 118)
  219.  
  220. TitleLabel.Parent = Frame
  221. TitleLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  222. TitleLabel.BackgroundTransparency = 1
  223. TitleLabel.Position = UDim2.new(0, 0, 0, -5)
  224. TitleLabel.Size = UDim2.new(1, 0, 0, 30)
  225. TitleLabel.Font = Enum.Font.GothamBold
  226. TitleLabel.Text = "SikeLock"
  227. TitleLabel.TextColor3 = Color3.fromRGB(255, 85, 85)
  228. TitleLabel.TextSize = 24
  229. TitleLabel.TextStrokeTransparency = 0.9
  230. TitleLabel.TextScaled = true
  231.  
  232. TextButton.Parent = Frame
  233. TextButton.BackgroundColor3 = Color3.fromRGB(255, 85, 85)
  234. TextButton.BorderSizePixel = 0
  235. TextButton.Position = UDim2.new(0.1, 0, 0.4, 0)
  236. TextButton.Size = UDim2.new(0, 170, 0, 44)
  237. TextButton.Font = Enum.Font.GothamBold
  238. TextButton.Text = "Toggle CamLock"
  239. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  240. TextButton.TextScaled = true
  241. TextButton.TextSize = 14
  242. TextButton.TextWrapped = true
  243.  
  244. UICorner_2.CornerRadius = UDim.new(0, 8)
  245. UICorner_2.Parent = TextButton
  246.  
  247. local function RedGradientEffect()
  248. local hue = 0
  249. while true do
  250. local color = Color3.fromHSV(hue / 360, 0.8, 1)
  251. UIStroke.Color = color
  252. TextButton.TextColor3 = color
  253. hue = (hue + 1) % 360
  254. if hue > 0 and hue < 60 then hue = 0 end
  255. wait(0.05)
  256. end
  257. end
  258.  
  259. spawn(function()
  260. RedGradientEffect()
  261. end)
  262.  
  263. local state = true
  264. TextButton.MouseButton1Click:Connect(function()
  265. state = not state
  266. if state then
  267. TextButton.Text = "CamLock OFF"
  268. CamlockState = false
  269. enemy = nil
  270. else
  271. TextButton.Text = "CamLock ON"
  272. CamlockState = true
  273. enemy = FindNearestEnemy()
  274. end
  275. end)
  276. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement