Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- workspace.Characters.DescendantAdded:Connect(function(v)
- if v.Name == "Config" then
- if v.Parent.Parent.Parent.Parent.Name ~= game.Players.LocalPlayer.Name then return end
- local s = require(v).Stats
- s.Recoil = Vector3.new()
- s.CameraRecoil = 0
- end
- end)
- function run()
- -----------------------------------// aimbot script
- local cam = workspace.Camera
- local camera = workspace.Camera
- local plr = game:service'Players'.LocalPlayer
- local t
- local mouse = plr:GetMouse()
- local aimbot = true
- local whitelisted = {
- plr.Name;
- }
- local ray = Ray.new
- local ray_start
- local checkifwhitelisted = function(nam)
- local asd = false
- for _, a in pairs(whitelisted) do
- if nam == a then
- asd = true
- end
- end
- return asd
- end
- _G.gofor = "Head"
- local lPlayerTeam = nil
- function checkteam(name)
- local teams = game.Teams
- local plr_team = nil
- for i,v in pairs(teams:GetDescendants()) do
- if plr_team == nil then
- if v.Name == name then
- plr_team = v.Parent
- return plr_team
- end
- end
- end
- end
- lPlayerTeam = checkteam(plr.Name)
- function CheckIf(name)
- for i,v in pairs(workspace.Characters:children()) do
- if checkteam(name) ~= lPlayerTeam then
- return true
- end
- end
- return false
- end
- local function getcloseplayer()
- --pcall(function()
- local ignorelist = workspace.Characters[plr.Name].Hitbox:children''
- for i,v in pairs(workspace:children'') do
- if v:IsA("Model") then
- table.insert(ignorelist,v)
- end
- end
- local closestDist = 2e9
- local player
- for _, a in pairs(workspace.Characters:children()) do
- if a:IsA'Model' and game:service'Players':FindFirstChild(a.Name) and a.Name ~= plr.Name and checkifwhitelisted(a.Name) == false and CheckIf(a.Name) and a ~= nil then
- local dist = (workspace.Characters[plr.Name].Root.Position - a.Root.Position).magnitude
- if dist < closestDist then
- if a ~= nil and a:FindFirstChild'Hitbox' then
- if a.Hitbox:FindFirstChild'Head' then
- pcall(function()
- ray_start = workspace.Characters[plr.Name].Hitbox.Head.Position
- local vector = ( a.Hitbox.Head.Position - ray_start)
- local new_ray = ray(ray_start, vector.unit * 1000)
- local hit, position = workspace:FindPartOnRayWithIgnoreList(new_ray, ignorelist)
- if (hit and hit:isDescendantOf(a.Hitbox)) then
- closestDist = dist
- player = a.Hitbox
- end
- end)
- end
- end
- end
- end
- end
- return player
- --end)
- end
- mouse.KeyDown:connect(function(key)
- if key == "[" then
- if aimbot then
- aimbot = false
- else
- aimbot = true
- end
- end
- end)
- local closesthead = nil
- --------------------------------------------------------------------------////////////////////////// Cam Scripto
- local UserInputService = game:GetService("UserInputService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Workspace = game:GetService("Workspace")
- local Players = game:GetService("Players")
- local TS = require(ReplicatedStorage:WaitForChild("Tortoiseshell"))
- TS.Timer:UnbindFromRenderStep('Camera')
- local PLAYER = Players.LocalPlayer
- local CAMERA = Workspace.CurrentCamera
- local OFFSET = Vector3.new(0, 1.6, 0)
- local SPRINT_FOV_SCALE = 0.9
- local LEAN_DISTANCE = 2
- local LEAN_TILT = 0.15
- local MIN_Y, MAX_Y = -1.5, 1.5
- local SENSITIVITY = Vector2.new(0.004, 0.004)
- local recoilSpring = TS.Math.Spring:Create(1, 200, 30, 1)
- TS.Camera.FirstPerson.RecoilSpring = recoilSpring
- local character, root, state, sprinting, lean, vaulting, grounded, climbing, aiming, look, sliding, backpack, items, equipped, item, config
- local x, y = 0, 0
- local leanOffset = CFrame.new()
- local lastUpdate = 0
- local actionSpring = TS.Math.Spring:Create(1, 100, 10, 1)
- local slideFOV = 0
- local spectateChar
- local function Equipped(newItem)
- pcall(function()
- config = nil
- item = nil
- if newItem then
- config = TS.Items:GetConfig(newItem)
- item = newItem
- end
- end)
- end
- local function HandleCharacter(newCharacter)
- if newCharacter then
- character = nil
- spectateChar = nil
- root = newCharacter:WaitForChild("Root")
- state = newCharacter:WaitForChild("State")
- sprinting = state:WaitForChild("Sprinting")
- lean = state:WaitForChild("Lean")
- vaulting = state:WaitForChild("Vaulting")
- grounded = state:WaitForChild("Grounded")
- climbing = state:WaitForChild("Climbing")
- aiming = state:WaitForChild("Aiming")
- look = state:WaitForChild("Look")
- sliding = state:WaitForChild("Sliding")
- backpack = newCharacter:WaitForChild("Backpack")
- equipped = backpack:WaitForChild("Equipped")
- items = backpack:WaitForChild("Items")
- equipped.Changed:Connect(function()
- Equipped(equipped.Value)
- end)
- vaulting.Changed:Connect(function()
- if vaulting.Value then
- actionSpring:Shove(Vector3.new(sprinting.Value and -3 or -2, 0, 0))
- end
- end)
- climbing.Changed:Connect(function()
- if climbing.Value then
- actionSpring:Shove(Vector3.new(-10, 0, 0))
- end
- end)
- grounded.Changed:Connect(function()
- if not vaulting.Value and root.Velocity.Y < -60 then
- actionSpring:Shove(Vector3.new(root.Velocity.Y / 20, 0, 0))
- end
- end)
- newCharacter.DescendantAdded:Connect(function(obj)
- if obj:IsA("BasePart") then
- obj.LocalTransparencyModifier = 1
- end
- end)
- for _, v in pairs(newCharacter:GetDescendants()) do
- if v:IsA("BasePart") then
- v.LocalTransparencyModifier = 1
- end
- end
- Equipped(equipped.Value)
- character = newCharacter
- end
- end
- TS.Damage.CharacterKilled:Connect(function(char, _, player)
- if char == character and player then
- spectateChar = TS.Characters:GetCharacter(player)
- end
- end)
- TS.Characters.CharacterAdded:Connect(function(player, character)
- if player == PLAYER then
- HandleCharacter(character)
- end
- end)
- UserInputService.InputChanged:connect(function(inputObject, processed)
- if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
- local fovSens = math.clamp((CAMERA.FieldOfView / TS.Camera.FieldOfView) ^ 1.5, 0, 1)
- x = (x - inputObject.Delta.X * SENSITIVITY.X * fovSens * TS.Camera.Sensitivity) % (math.pi * 2)
- y = math.clamp(y - inputObject.Delta.Y * SENSITIVITY.Y * fovSens * TS.Camera.Sensitivity, MIN_Y, MAX_Y)
- end
- end)
- CAMERA.FieldOfView = 1
- CAMERA.CameraType = Enum.CameraType.Scriptable
- HandleCharacter(TS.Characters:GetCharacter(PLAYER))
- TS.Timer:BindToRenderStep("Camera", 1, function(deltaTime)
- if workspace.Characters:FindFirstChild(plr.Name) == nil then
- TS.Timer:UnbindFromRenderStep('Camera')
- end
- if spectateChar then
- local center = spectateChar.PrimaryPart.Position + Vector3.new(0, 0.5, 0)
- CAMERA.FieldOfView = 50
- CAMERA.CFrame = CFrame.new(center) * CFrame.Angles(0, x, 0) * CFrame.Angles(y, 0, 0) * CFrame.new(0, 0, 15)
- CAMERA.Focus = CAMERA.CFrame * CFrame.new(0, 0, -20)
- elseif character and character.Parent then
- look.Value = y
- if sliding.Value then
- local speed = Vector2.new(root.Velocity.X, root.Velocity.Z).Magnitude
- slideFOV = TS.Math:Lerp(slideFOV, speed / 3 * (TS.Camera.FieldOfView / 90), math.min(deltaTime * 10, 1))
- else
- slideFOV = TS.Math:Lerp(slideFOV, 0, math.min(deltaTime * 10, 1))
- end
- local newFOV = TS.Camera.FieldOfView
- local center = root.CFrame:PointToWorldSpace(OFFSET)
- local player = getcloseplayer()
- if sprinting.Value then
- newFOV = newFOV * SPRINT_FOV_SCALE
- elseif aiming.Value then
- if aimbot then
- if player ~= nil then
- CAMERA.CoordinateFrame = CFrame.new(center, player.Head.Position)
- end
- end
- if item then
- newFOV = newFOV * config.Stats.AimFOV
- else
- newFOV = newFOV * 0.9
- end
- end
- CAMERA.FieldOfView = TS.Math:Lerp(CAMERA.FieldOfView, math.min(newFOV + slideFOV, 120), math.min(deltaTime * 10, 1))
- local leanAmount = lean.Value
- if math.abs(leanAmount) > 0.1 then
- local hit, position = TS.Raycast:CastGeometry(center + Vector3.new(0, -1, 0), root.CFrame:VectorToWorldSpace(Vector3.new(leanAmount * LEAN_DISTANCE * 2, 0, 0)))
- if hit then
- local distance = (position - center).Magnitude
- leanAmount = math.sin(lean.Value) * distance / (LEAN_DISTANCE * 2)
- end
- end
- local heightOffset = math.cos(leanAmount * math.pi / 2) - 1
- leanOffset = leanOffset:Lerp(CFrame.new(leanAmount * LEAN_DISTANCE, heightOffset * LEAN_DISTANCE / 4, 0) * CFrame.Angles(0, 0, -leanAmount * LEAN_TILT), math.min(deltaTime * 10, 1))
- actionSpring:Update(deltaTime)
- local actionOffset = CFrame.Angles(actionSpring.Position.X, actionSpring.Position.Y, actionSpring.Position.Z)
- local recoilOffset = CFrame.Angles(recoilSpring.Position.Y * 0, recoilSpring.Position.X * 0, 0)
- if aiming.Value == false or player == nil then
- CAMERA.CFrame = CFrame.new(center) * CFrame.Angles(0, x, 0) * CFrame.Angles(y, 0, 0) * leanOffset * actionOffset * recoilOffset
- end
- CAMERA.Focus = CAMERA.CFrame * CFrame.new(0, 0, -20)
- if 0.1 <= tick() - lastUpdate then
- lastUpdate = tick()
- TS.Network:Fire("Character", "State", "Look", y)
- end
- end
- end)
- end
- run()
- workspace.Characters.ChildAdded:Connect(function(v)
- if v.Name == game.Players.LocalPlayer.Name then
- wait(.2)
- run()
- end
- end)
- -- patcher
- local getrawmetatable = getrawmetatable or debug.getmetatable
- local make_writeable = make_writeable or setreadonly or changereadonly or change_writeable
- make_writeable(getrawmetatable(game), false)
- getrawmetatable(game).__namecall = function(u, ...)
- local m = ({...})[select('#', ...)]
- local packed = {...}
- local a = {}
- for i = 1, #packed - 1 do
- a[i] = packed[i]
- end
- if m == 'FireServer' then
- if u.Name == "Admin" then
- return true
- end
- end
- return u[m](u, unpack(a))
- end
- -- my version
- local mt = getrawmetatable(game)
- do setreadonly(mt, false) end
- local mt_namecall = mt.__namecall
- mt.__namecall = newcclosure(function(self, ...)
- local args = {...}
- local method = table.remove(args)
- if method == "FireServer" then
- if self.Name == "Admin" then
- return true
- end
- end
- return mt_namecall(self, ...)
- end)
Add Comment
Please, Sign In to add comment