Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 400, 0, 200)
- frame.Position = UDim2.new(0.5, -200, 0.5, -100)
- frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- frame.BorderSizePixel = 0
- frame.AnchorPoint = Vector2.new(0.5, 0.5)
- frame.Parent = screenGui
- local UICorner = Instance.new("UICorner")
- UICorner.CornerRadius = UDim.new(0, 12)
- UICorner.Parent = frame
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(1, 0, 0, 50)
- title.Position = UDim2.new(0, 0, 0, 0)
- title.Text = "Credits"
- title.TextColor3 = Color3.new(1, 1, 1)
- title.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- title.Font = Enum.Font.GothamBold
- title.TextSize = 22
- title.Parent = frame
- local titleCorner = Instance.new("UICorner")
- titleCorner.CornerRadius = UDim.new(0, 12)
- titleCorner.Parent = title
- local creditsLabel = Instance.new("TextLabel")
- creditsLabel.Size = UDim2.new(0.9, 0, 0, 40)
- creditsLabel.Position = UDim2.new(0.05, 0, 0.35, 0)
- creditsLabel.Text = "Made by: sikebladi, develop by: feelalt"
- creditsLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- creditsLabel.Font = Enum.Font.Gotham
- creditsLabel.TextSize = 18
- creditsLabel.BackgroundTransparency = 1
- creditsLabel.TextWrapped = true
- creditsLabel.Parent = frame
- local SubmitButton = Instance.new("TextButton")
- SubmitButton.Size = UDim2.new(0.9, 0, 0, 40)
- SubmitButton.Position = UDim2.new(0.05, 0, 0.7, 0)
- SubmitButton.Text = "Submit"
- SubmitButton.Font = Enum.Font.GothamBold
- SubmitButton.TextSize = 18
- SubmitButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- SubmitButton.BackgroundColor3 = Color3.fromRGB(85, 170, 255)
- SubmitButton.Parent = frame
- local submitCorner = Instance.new("UICorner")
- submitCorner.CornerRadius = UDim.new(0, 8)
- submitCorner.Parent = SubmitButton
- local CloseButton = Instance.new("TextButton")
- CloseButton.Size = UDim2.new(0, 30, 0, 30)
- CloseButton.Position = UDim2.new(1, -35, 0, 10)
- CloseButton.Text = "X"
- CloseButton.Font = Enum.Font.GothamBold
- CloseButton.TextSize = 18
- CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CloseButton.BackgroundColor3 = Color3.fromRGB(255, 80, 80)
- CloseButton.Parent = frame
- local closeCorner = Instance.new("UICorner")
- closeCorner.CornerRadius = UDim.new(0, 8)
- closeCorner.Parent = CloseButton
- local dragging
- local dragInput
- local dragStart
- local startPos
- local function update(input)
- local delta = input.Position - dragStart
- frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- title.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- title.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- game:GetService("UserInputService").InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- CloseButton.MouseButton1Click:Connect(function()
- screenGui:Destroy()
- end)
- SubmitButton.MouseButton1Click:Connect(function()
- print("Submit button clicked!")
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local LocalPlayer = Players.LocalPlayer
- local Mouse = LocalPlayer:GetMouse()
- local CamlockState = false
- local Prediction = 0.11407
- local HorizontalPrediction = 0.15
- local VerticalPrediction = 0.15
- local Locked = true
- getgenv().Key = "q"
- 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(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 = 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
- RunService.Heartbeat:Connect(function()
- if CamlockState == true and enemy then
- local camera = workspace.CurrentCamera
- local predictedPosition = enemy.Position + Vector3.new(
- enemy.Velocity.X * HorizontalPrediction,
- enemy.Velocity.Y * VerticalPrediction,
- enemy.Velocity.Z * Prediction
- )
- camera.CFrame = CFrame.new(camera.CFrame.p, predictedPosition)
- end
- end)
- Mouse.KeyDown:Connect(function(k)
- if k == getgenv().Key then
- Locked = not Locked
- if Locked then
- enemy = FindNearestEnemy()
- CamlockState = true
- else
- enemy = nil
- CamlockState = false
- end
- end
- end)
- local Sike = 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 DropShadow = Instance.new("ImageLabel")
- local TitleLabel = Instance.new("TextLabel")
- local UIStroke = Instance.new("UIStroke")
- Sike.Name = "Sike"
- Sike.Parent = game.CoreGui
- Sike.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = Sike
- Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(1, -220, 0, 10)
- Frame.Size = UDim2.new(0, 202, 0, 100)
- Frame.Active = true
- Frame.Draggable = true
- UICorner.CornerRadius = UDim.new(0, 10)
- UICorner.Parent = Frame
- UIStroke.Parent = Frame
- UIStroke.Thickness = 2
- UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
- UIStroke.Color = Color3.fromRGB(255, 0, 0)
- DropShadow.Name = "DropShadow"
- DropShadow.Parent = Frame
- DropShadow.BackgroundTransparency = 1
- DropShadow.Position = UDim2.new(0, -15, 0, -15)
- DropShadow.Size = UDim2.new(1, 30, 1, 30)
- DropShadow.ZIndex = 0
- DropShadow.Image = "rbxassetid://1316045217"
- DropShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
- DropShadow.ImageTransparency = 0.7
- DropShadow.ScaleType = Enum.ScaleType.Slice
- DropShadow.SliceCenter = Rect.new(10, 10, 118, 118)
- TitleLabel.Parent = Frame
- TitleLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TitleLabel.BackgroundTransparency = 1
- TitleLabel.Position = UDim2.new(0, 0, 0, -5)
- TitleLabel.Size = UDim2.new(1, 0, 0, 30)
- TitleLabel.Font = Enum.Font.GothamBold
- TitleLabel.Text = "SikeLock"
- TitleLabel.TextColor3 = Color3.fromRGB(255, 85, 85)
- TitleLabel.TextSize = 24
- TitleLabel.TextStrokeTransparency = 0.9
- TitleLabel.TextScaled = true
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.fromRGB(255, 85, 85)
- TextButton.BorderSizePixel = 0
- TextButton.Position = UDim2.new(0.1, 0, 0.4, 0)
- TextButton.Size = UDim2.new(0, 170, 0, 44)
- TextButton.Font = Enum.Font.GothamBold
- TextButton.Text = "Toggle CamLock"
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextScaled = true
- TextButton.TextSize = 14
- TextButton.TextWrapped = true
- UICorner_2.CornerRadius = UDim.new(0, 8)
- UICorner_2.Parent = TextButton
- local function RedGradientEffect()
- local hue = 0
- while true do
- local color = Color3.fromHSV(hue / 360, 0.8, 1)
- UIStroke.Color = color
- TextButton.TextColor3 = color
- hue = (hue + 1) % 360
- if hue > 0 and hue < 60 then hue = 0 end
- wait(0.05)
- end
- end
- spawn(function()
- RedGradientEffect()
- end)
- local state = true
- TextButton.MouseButton1Click:Connect(function()
- state = not state
- if state then
- TextButton.Text = "CamLock OFF"
- CamlockState = false
- enemy = nil
- else
- TextButton.Text = "CamLock ON"
- CamlockState = true
- enemy = FindNearestEnemy()
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement