Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
13 views11 pages

Message

Uploaded by

glpezg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views11 pages

Message

Uploaded by

glpezg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 11

local Players = game:GetService("Players")

local RunService = game:GetService("RunService")


local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local Lighting = game:GetService("Lighting")
local localPlayer = Players.LocalPlayer
local camera = workspace.CurrentCamera
local playerGui = localPlayer:WaitForChild("PlayerGui")

-- Skybox setup function


local function setupSkybox()
local existingSky = Lighting:FindFirstChildOfClass("Sky")
if existingSky then existingSky:Destroy() end

local sky = Instance.new("Sky")


sky.Name = "CoolOrbitSky"
-- Example skybox images (replace with your favorite skybox asset IDs)
sky.SkyboxBk = "rbxassetid://7854418837"
sky.SkyboxDn = "rbxassetid://7854418844"
sky.SkyboxFt = "rbxassetid://7854418851"
sky.SkyboxLf = "rbxassetid://7854418856"
sky.SkyboxRt = "rbxassetid://7854418861"
sky.SkyboxUp = "rbxassetid://7854418866"
sky.StarCount = 3000
sky.MoonTextureId = ""
sky.SunTextureId = ""
sky.CelestialBodiesShown = true
sky.Parent = Lighting

local atmosphere = Lighting:FindFirstChildOfClass("Atmosphere") or


Instance.new("Atmosphere", Lighting)
atmosphere.Density = 0.35
atmosphere.Offset = 0.2
atmosphere.Color = Color3.fromRGB(128, 128, 128)
atmosphere.Decay = Color3.new(0.1, 0.1, 0.1)
end

local function resetSkybox()


local existingSky = Lighting:FindFirstChildOfClass("Sky")
if existingSky then existingSky:Destroy() end
-- Optional: you can reset to default skybox here if you want
local defaultSky = Instance.new("Sky")
defaultSky.Name = "DefaultSky"
defaultSky.Parent = Lighting
local atmosphere = Lighting:FindFirstChildOfClass("Atmosphere") or
Instance.new("Atmosphere", Lighting)
atmosphere.Parent = Lighting
atmosphere.Density = 0.01
atmosphere.Offset = 0
atmosphere.Color = Color3.fromRGB(135, 206, 235)
atmosphere.Decay = Color3.new(0, 0, 0)
end

-- Settings
local CAMLOCK_TOGGLE_KEY = Enum.KeyCode.Q
local ALT_CAMLOCK_TOGGLE_KEY = Enum.KeyCode.LeftAlt
local SPEED_TOGGLE_KEY = Enum.KeyCode.LeftControl
local ESP_TOGGLE_KEY = Enum.KeyCode.T
local ORBIT_RADIUS = 15
local ORBIT_HEIGHT = 5
local BASE_ORBIT_SPEED = math.rad(720) -- base orbit speed radians per frame
(adjusted to realistic speed)
local FOV_RADIUS = 150
local WALK_SPEED = 150

-- State
local camlockEnabled = false
local altCamlockEnabled = false
local speedEnabled = false
local espEnabled = false
local target = nil
local angle = 0

-- UI
local starGui
local starFrame
local fovCircle

-- ESP tables
local espHighlights = {}
local espNameTags = {}

-- Rainbow Color helper


local function getRainbowColor(t)
t = t % 1
local segment = t * 6
if segment < 1 then return Color3.new(1, segment, 0)
elseif segment < 2 then return Color3.new(1 - (segment - 1), 1, 0)
elseif segment < 3 then return Color3.new(0, 1, segment - 2)
elseif segment < 4 then return Color3.new(0, 1 - (segment - 3), 1)
elseif segment < 5 then return Color3.new(segment - 4, 0, 1)
else return Color3.new(1, 0, 1 - (segment - 5)) end
end

-- Find the closest player within radius of the player's mouse cursor on screen
local function getTargetInRadius(radius)
local mouse = localPlayer:GetMouse()
local mousePos = Vector2.new(mouse.X, mouse.Y)
local closestTarget = nil
local closestDist = radius + 1

for _, player in pairs(Players:GetPlayers()) do


if player ~= localPlayer and player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
local hrp = player.Character.HumanoidRootPart
local screenPos, onScreen =
camera:WorldToViewportPoint(hrp.Position)
if onScreen then
local screenPos2D = Vector2.new(screenPos.X, screenPos.Y)
local dist = (screenPos2D - mousePos).Magnitude
if dist < closestDist then
closestDist = dist
closestTarget = hrp
end
end
end
end
return closestTarget
end

-- ESP
local function createESP(character, fillTransparency, outlineTransparency)
local highlight = Instance.new("Highlight")
highlight.Adornee = character
highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
highlight.FillTransparency = fillTransparency or 0.5
highlight.OutlineTransparency = outlineTransparency or 0
highlight.Parent = character
return highlight
end

-- Name tag creation


local function createNameTag(player)
if not player.Character then return nil end
local hrp = player.Character:FindFirstChild("HumanoidRootPart") or
player.Character:FindFirstChild("Head")
if not hrp then return nil end

local billboard = Instance.new("BillboardGui")


billboard.Name = "NameESP"
billboard.Adornee = hrp
billboard.Size = UDim2.new(0, 100, 0, 30)
billboard.StudsOffset = Vector3.new(0, 2.5, 0)
billboard.AlwaysOnTop = true
billboard.Parent = player.Character

local textLabel = Instance.new("TextLabel")


textLabel.Size = UDim2.new(1, 0, 1, 0)
textLabel.BackgroundTransparency = 1
textLabel.Text = player.Name
textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
textLabel.TextStrokeTransparency = 0
textLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
textLabel.Font = Enum.Font.SourceSansBold
textLabel.TextScaled = true
textLabel.Parent = billboard

return billboard
end

local function toggleAllPlayersESP(enable)


if enable then
for _, player in pairs(Players:GetPlayers()) do
if player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
if not espHighlights[player] then
local highlight = createESP(player.Character, 0.7, 0)
espHighlights[player] = highlight
end
if not espNameTags[player] then
local nameTag = createNameTag(player)
espNameTags[player] = nameTag
end
end
end
else
for _, highlight in pairs(espHighlights) do
if highlight then
highlight:Destroy()
end
end
espHighlights = {}

for _, nameTag in pairs(espNameTags) do


if nameTag then
nameTag:Destroy()
end
end
espNameTags = {}
end
end

-- UI - Star overlay
local function createStarOverlay()
if starGui then starGui:Destroy() end

starGui = Instance.new("ScreenGui")
starGui.Name = "CamlockStars"
starGui.ResetOnSpawn = false
starGui.IgnoreGuiInset = true
starGui.Parent = playerGui

starFrame = Instance.new("Frame")
starFrame.Size = UDim2.new(1, 0, 1, 0)
starFrame.BackgroundColor3 = Color3.new(0, 0, 0)
starFrame.BackgroundTransparency = 0.7 -- semi-transparent black
starFrame.BorderSizePixel = 0
starFrame.Parent = starGui

for i = 1, 100 do
local star = Instance.new("ImageLabel")
star.Image = "rbxassetid://7072718362"
local size = math.random(5, 10)
star.Size = UDim2.new(0, size, 0, size)
star.Position = UDim2.new(math.random(), 0, math.random(), 0)
star.BackgroundTransparency = 1
star.ImageTransparency = 0.15 + math.random() * 0.15
star.Parent = starFrame

local goalPos = UDim2.new(math.random(), 0, math.random(), 0)


local goalTrans = 0.3 + math.random() * 0.3
local tweenInfo = TweenInfo.new(4 + math.random() * 3,
Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true)
TweenService:Create(star, tweenInfo, {Position = goalPos,
ImageTransparency = goalTrans}):Play()
end

fovCircle = Instance.new("ImageLabel")
fovCircle.Name = "SilentAimFOV"
fovCircle.Size = UDim2.new(0, FOV_RADIUS * 2, 0, FOV_RADIUS * 2)
fovCircle.Position = UDim2.new(0.5, 0, 0.5, 0)
fovCircle.AnchorPoint = Vector2.new(0.5, 0.5)
fovCircle.BackgroundTransparency = 1
fovCircle.Image = "rbxassetid://3570695787"
fovCircle.ImageColor3 = Color3.new(0, 0, 0)
fovCircle.ImageTransparency = 0.55
fovCircle.Parent = starGui
end

local function removeStarOverlay()


if starGui then starGui:Destroy(); starGui = nil end
end

local function isInFOV(screenPos, circleCenter, radius)


return (screenPos - circleCenter).Magnitude <= radius
end

local function movePlayerNearTarget(targetPos, angle, targetVelocity)


local hrp = localPlayer.Character and
localPlayer.Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end

local backwardOffset = Vector3.new(-math.cos(angle), 0, -math.sin(angle)) *


(ORBIT_RADIUS * 0.6)
local verticalOffset = Vector3.new(0, -5, 0)
local desiredPos = targetPos + backwardOffset + verticalOffset

local tween = TweenService:Create(hrp, TweenInfo.new(0.15,


Enum.EasingStyle.Sine), {CFrame = CFrame.new(desiredPos)})
tween:Play()
end

-- Main render loop


RunService.RenderStepped:Connect(function(dt)
if camlockEnabled and target and target.Parent then
local targetPos = target.Position
local velocity = (target.Parent:FindFirstChild("HumanoidRootPart") and
target.Parent.HumanoidRootPart.Velocity) or Vector3.new(0,0,0)
local speed = velocity.Magnitude

-- Dynamically adjust orbit speed proportional to target speed (with a


minimum base speed)
local dynamicOrbitSpeed = BASE_ORBIT_SPEED + (speed * 0.30) -- tweak
multiplier as needed

angle = (angle + dynamicOrbitSpeed * dt) % (2 * math.pi)


movePlayerNearTarget(targetPos, angle, velocity)

local targetHead = targetPos + Vector3.new(0, 2, 0)


local orbitOffset = Vector3.new(math.cos(angle), 0, math.sin(angle)) *
ORBIT_RADIUS
local camPos = targetHead + orbitOffset + Vector3.new(0, ORBIT_HEIGHT,
0)
camera.CFrame = CFrame.new(camPos, targetHead)

elseif altCamlockEnabled and target and target.Parent then


local localHead = localPlayer.Character and
localPlayer.Character:FindFirstChild("Head")
if localHead then
local targetHead = target.Position + Vector3.new(0, 1.5, 0)
camera.CFrame = CFrame.new(localHead.Position, targetHead)
end
end
local t = tick() * 0.5
for _, highlight in pairs(espHighlights) do
if highlight then
local c = getRainbowColor(t)
highlight.FillColor = c
highlight.OutlineColor = c
end
end
for _, highlight in pairs(espHighlights) do
if highlight and highlight.Adornee == localPlayer.Character then
local c = getRainbowColor(t + 0.4)
highlight.FillColor = c
highlight.OutlineColor = c
end
end
end)

-- Silent Aim
RunService.RenderStepped:Connect(function()
if (camlockEnabled or altCamlockEnabled) and target and target.Parent and
fovCircle then
local screenPos, onScreen =
camera:WorldToViewportPoint(target.Position)
local viewportCenter = Vector2.new(camera.ViewportSize.X / 2,
camera.ViewportSize.Y / 2)

if onScreen then
local target2D = Vector2.new(screenPos.X, screenPos.Y)
if isInFOV(target2D, viewportCenter, FOV_RADIUS) then
local mouse = localPlayer:GetMouse()
mouse.Hit = CFrame.new(target.Position)
end
end
end
end)

-- CFrame Speed
RunService.Heartbeat:Connect(function(dt)
if speedEnabled and localPlayer.Character and
localPlayer.Character:FindFirstChild("HumanoidRootPart") then
local hrp = localPlayer.Character.HumanoidRootPart
local direction = Vector3.new(0, 0, 0)

if UserInputService:IsKeyDown(Enum.KeyCode.W) then direction =


direction + hrp.CFrame.LookVector end
if UserInputService:IsKeyDown(Enum.KeyCode.S) then direction =
direction - hrp.CFrame.LookVector end
if UserInputService:IsKeyDown(Enum.KeyCode.A) then direction =
direction - hrp.CFrame.RightVector end
if UserInputService:IsKeyDown(Enum.KeyCode.D) then direction =
direction + hrp.CFrame.RightVector end

if direction.Magnitude > 0 then


hrp.CFrame = hrp.CFrame + direction.Unit * WALK_SPEED * dt
end
end
end)

-- Input handler
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end

if input.KeyCode == CAMLOCK_TOGGLE_KEY then


camlockEnabled = not camlockEnabled
altCamlockEnabled = false
if camlockEnabled then
target = getTargetInRadius(FOV_RADIUS)
if target then
camera.CameraType = Enum.CameraType.Scriptable
toggleAllPlayersESP(false) -- disable all esp while camlock
on (optional)
createStarOverlay()
setupSkybox()
angle = 0
else
camlockEnabled = false
end
else
camera.CameraType = Enum.CameraType.Custom
target = nil
removeStarOverlay()
resetSkybox()
end

elseif input.KeyCode == ALT_CAMLOCK_TOGGLE_KEY then


altCamlockEnabled = not altCamlockEnabled
camlockEnabled = false
if altCamlockEnabled then
target = getTargetInRadius(FOV_RADIUS)
if target then
camera.CameraType = Enum.CameraType.Scriptable
toggleAllPlayersESP(false)
createStarOverlay()
setupSkybox()
else
altCamlockEnabled = false
end
else
camera.CameraType = Enum.CameraType.Custom
target = nil
removeStarOverlay()
resetSkybox()
end

elseif input.KeyCode == SPEED_TOGGLE_KEY then


speedEnabled = not speedEnabled

elseif input.KeyCode == ESP_TOGGLE_KEY then


espEnabled = not espEnabled
toggleAllPlayersESP(espEnabled)
end
end)

-- Cleanup ESP when players leave or join


Players.PlayerRemoving:Connect(function(player)
if espHighlights[player] then
espHighlights[player]:Destroy()
espHighlights[player] = nil
end
if espNameTags[player] then
espNameTags[player]:Destroy()
espNameTags[player] = nil
end
end)

Players.PlayerAdded:Connect(function(player)
-- Optionally add ESP when players join if espEnabled
if espEnabled and player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
if not espHighlights[player] then
espHighlights[player] = createESP(player.Character, 0.7, 0)
end
if not espNameTags[player] then
espNameTags[player] = createNameTag(player)
end
end
end)

-- Initial setup

-- zombie animation pack:


function Animation(Character)
Character:WaitForChild'Animate'
game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
for i, player in ipairs(game.Players:GetChildren()) do
local Animate = game.Players.LocalPlayer.Character.Animate
Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?
id=782841498"
Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?
id=782841498"
Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?
id=616168032"
Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?
id=616163682"
Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?
id=1083218792"
Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?
id=1083439238"
Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?
id=707829716"
Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=616165109"
Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?
id=616166655"
game.Players.LocalPlayer.Character.Humanoid.Jump = false
end
wait(1)
game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
end
Animation(game.Players.LocalPlayer.Character)
game.Players.LocalPlayer.CharacterAdded:Connect(Animation)

getgenv().Desync = false -- leave this on false


getgenv().KeyBind = Enum.KeyCode.M

getgenv().DirectionToShoot = "Behind"

--[[
OPTIONS

Behind
Down -- can easily be resolved with underground resolver
ForWard
Left
One
Right
Up -- can easily be resolved with underground resolver
Zero
--]]

local uis = game:service'UserInputService'


uis.InputBegan:Connect(
function(a, t)
if not t then
if a.KeyCode == getgenv().KeyBind and getgenv().Desync == false then
getgenv().Desync = true
game.StarterGui:SetCore("SendNotification", {
Title = "antilock";
Text = "ON";
Icon = "rbxassetid://57254792";
Duration = 5;
})
elseif a.KeyCode == getgenv().KeyBind and getgenv().Desync == true
then
getgenv().Desync = false
game.StarterGui:SetCore("SendNotification", {
Title = "antilock";
Text = "TURNED OFF";
Icon = "rbxassetid://57254792";
Duration = 5;
})
end
end
end)

getgenv().Direction = nil

if getgenv().DirectionToShoot == "Behind" then


getgenv().Direction = Vector3.new(0, 0, -1)
elseif getgenv().DirectionToShoot == "Down" then
getgenv().Direction = Vector3.new(0, -1, 0)
elseif getgenv().DirectionToShoot == "ForWard" then
getgenv().Direction = Vector3.new(0, 0, 1)
elseif getgenv().DirectionToShoot == "Left" then
getgenv().Direction = Vector3.new(-1, 0, 0)
elseif getgenv().DirectionToShoot == "One" then
getgenv().Direction = Vector3.new(1, 1, 1)
elseif getgenv().DirectionToShoot == "Right" then
getgenv().Direction = Vector3.new(1, 0, 0)
elseif getgenv().DirectionToShoot == "Up" then
getgenv().Direction = Vector3.new(0, 1, 0)
elseif getgenv().DirectionToShoot == "Zero" then
getgenv().Direction = Vector3.new(0, 0, 0)
end

game:GetService("RunService").heartbeat:Connect(function()
if getgenv().Desync == true then
local abc = game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity
game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity =
getgenv().Direction * (2^16)
game:GetService("RunService").RenderStepped:Wait()
game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = abc
end
end)

local size = 30

local Players = cloneref(game:GetService("Players")) -- hitbox expander


local RS = cloneref(game:GetService("RunService"))
local Client = Players.LocalPlayer
RS.RenderStepped:Connect(function ()
for _, Player in pairs(Players:GetPlayers()) do
if Player == Client then continue end
local HRP = Player.Character:WaitForChild("HumanoidRootPart")
HRP.Size = Vector3.new(size, size, size)
HRP.Transparency = 0.5
end
end)

local utility = {}
getgenv().config = { enable = true, delay = 0.000001 }
utility.get_gun = function()
for _, tool in next, game.Players.LocalPlayer.Character:GetChildren() do
if tool:IsA("Tool") and tool:FindFirstChild("Ammo") then return tool end
end
end

utility.rapid = function(tool)
tool:Activate()
end

getgenv().is_firing = false

game:GetService("UserInputService").InputBegan:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 then
local gun = utility.get_gun()
if config.enable and gun and not is_firing then
is_firing = true
while is_firing do
utility.rapid(gun) -- rapid fire!
task.wait(config.delay)
end
end
end
end)
game:GetService("UserInputService").InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
is_firing = false
end
end)

-- Notify user
local StarterGui = game:GetService("StarterGui")

StarterGui:SetCore("SendNotification", {
Title = "Script Loaded",
Text = "Q=Orbit Camlock | LAlt=Normal Camlock | LeftCtrl=Speed | T=Toggle ESP",
Duration = 5,
Button1 = "Ok :3",
Callback = function()
print("Notification button clicked!")
end
})

You might also like