Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NLS([[ -- thank rufus for head look and stuf
- owner = game:GetService("Players").LocalPlayer
- owner.Character:WaitForChild("Head")
- mouse = owner:GetMouse()
- local remote = owner.Character:WaitForChild("lookremote")
- local remote2 = owner.Character:WaitForChild("crouch remote")
- local part = Instance.new("Part", owner.Character.Head)
- part.Size = Vector3.new(0.1,0.1,0.1)
- part.Transparency = 1
- part.CanCollide = false
- part.Name = "camera"
- part:BreakJoints()
- local weld = Instance.new("Weld", part)
- weld.Part0 = owner.Character.Head
- weld.Part1 = part
- weld.C0 = CFrame.new(0,0,-1)
- count = 0
- function crouchinglol(key)
- key = key:lower()
- if key:byte() == 48 then
- count = count + 1
- if count == 1 then
- owner.Character:findFirstChildOfClass("Humanoid").WalkSpeed = 8
- remote2:FireServer("Crouching")
- elseif count == 2 then
- owner.Character:findFirstChildOfClass("Humanoid").WalkSpeed = 16
- remote2:FireServer("NotCrouching")
- wait()
- count = 0
- end
- end
- end
- mouse.KeyDown:connect(crouchinglol)
- local E = owner.Character:WaitForChild("The")
- mouse.Button1Down:Connect(function()
- E:FireServer("s")
- end)
- while game:GetService("RunService").RenderStepped:wait() do
- remote:FireServer(mouse.Hit.p, mouse.Origin.p, workspace.CurrentCamera.CFrame)
- if (workspace.CurrentCamera.CFrame.p - part.Position).magnitude <= 1.7 then
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.p.x,game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.y,mouse.Hit.p.z))
- workspace.CurrentCamera.FieldOfView = 100
- for i,v in pairs(owner.Character:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "MeshPart" and v.Name ~= "Head" then
- v.LocalTransparencyModifier = 0
- end
- if v.ClassName == "Accessory" then
- v.Handle.Transparency = 1
- end
- end
- if owner.Character.Head:findFirstChildOfClass("Decal") then
- owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 1
- end
- owner.Character.Head.Transparency = 1
- workspace.CurrentCamera.CameraSubject = part
- else
- for i,v in pairs(owner.Character:GetChildren()) do
- if v.ClassName == "Accessory" then
- v.Handle.Transparency = 0
- end
- end
- workspace.CurrentCamera.FieldOfView = 70
- owner.Character.Head.Transparency = 0
- if owner.Character.Head:findFirstChildOfClass("Decal") then
- owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 0
- end
- workspace.CurrentCamera.CameraSubject = owner.Character
- end
- end
- ]], owner.Character)
- function isplatformstand(PC)
- coroutine.wrap(function()
- PC.Character.Humanoid.PlatformStand = true
- wait(3)
- for i,v in pairs(PC.Character:GetDescendants()) do
- if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
- v.Enabled = true
- end
- end
- PC.Character.Humanoid.PlatformStand = false
- end)()
- end
- local debris = game:GetService("Debris")
- function killfunction(part)
- local Model = part:FindFirstAncestorOfClass("Model")
- if Model then
- local PC = game:GetService("Players"):GetPlayerFromCharacter(Model)
- if PC then
- if PC ~= owner then
- local limbcollider = Instance.new("Part", PC.Character:findFirstChild("Right Arm"))
- limbcollider.Size = Vector3.new(1.4,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider.Name = "LimbCollider"
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = PC.Character:findFirstChild("Right Arm")
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider2 = Instance.new("Part", PC.Character:findFirstChild("Left Arm"))
- limbcollider2.Size = Vector3.new(1.4,1,1)
- limbcollider2.Shape = "Cylinder"
- limbcollider2.Transparency = 1
- limbcollider2.Name = "LimbCollider"
- local limbcolliderweld2 = Instance.new("Weld", limbcollider)
- limbcolliderweld2.Part0 = PC.Character:findFirstChild("Left Arm")
- limbcolliderweld2.Part1 = limbcollider2
- limbcolliderweld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider3 = Instance.new("Part", PC.Character:findFirstChild("Right Leg"))
- limbcollider3.Size = Vector3.new(1.3,1,1)
- limbcollider3.Shape = "Cylinder"
- limbcollider3.Transparency = 1
- limbcollider3.Name = "LimbCollider"
- local limbcolliderweld3 = Instance.new("Weld", limbcollider)
- limbcolliderweld3.Part0 = PC.Character:findFirstChild("Right Leg")
- limbcolliderweld3.Part1 = limbcollider3
- limbcolliderweld3.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- local limbcollider4 = Instance.new("Part", PC.Character:findFirstChild("Left Leg"))
- limbcollider4.Size = Vector3.new(1.3,1,1)
- limbcollider4.Shape = "Cylinder"
- limbcollider4.Transparency = 1
- limbcollider4.Name = "LimbCollider"
- local limbcolliderweld4 = Instance.new("Weld", limbcollider)
- limbcolliderweld4.Part0 = PC.Character:findFirstChild("Left Leg")
- limbcolliderweld4.Part1 = limbcollider4
- limbcolliderweld4.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- debris:AddItem(limbcollider, 3)
- debris:AddItem(limbcollider2, 3)
- debris:AddItem(limbcollider3, 3)
- debris:AddItem(limbcollider4, 3)
- isplatformstand(PC)
- for i,v in pairs(PC.Character:GetDescendants()) do
- if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
- local Socket = Instance.new("BallSocketConstraint")
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- a1.Parent = v.Part0
- a2.Parent = v.Part1
- Socket.Parent = v.Parent
- Socket.Attachment0 = a1
- Socket.Attachment1 = a2
- a1.CFrame = v.C0
- a2.CFrame = v.C1
- Socket.LimitsEnabled = true
- Socket.TwistLimitsEnabled = true
- v.Enabled = false
- debris:AddItem(a1, 3)
- debris:AddItem(a2, 3)
- debris:AddItem(Socket, 3)
- end
- end
- end
- end
- end
- end
- Bullet = Instance.new("Part", owner.Character)
- Bullet.Position = Vector3.new(1000000,1000000,1000000)
- Bullet.Anchored = true
- Bullet.CanCollide = false
- Part = Instance.new("Part")
- Part.Name = "Gun"
- Part.Parent = owner.Character
- Part.Size = Vector3.new(0.47466666666,1.67733333333,3.77766666667)
- Part.CanCollide = false
- Weld4 = Instance.new("Weld", owner.Character)
- Weld4.Part0 = Part
- Weld4.Part1 = owner.Character["Right Arm"]
- Weld4.C0 = CFrame.new(0,0,2.63883333334) * CFrame.Angles(math.rad(90),0,0)
- local E = Instance.new("RemoteEvent", owner.Character)
- E.Name = "The"
- Bullet.BrickColor = BrickColor.new("Bright yellow")
- Mesh = Instance.new("SpecialMesh")
- Mesh.Parent = Part
- Mesh.MeshId = "http://www.roblox.com/asset/?id=553398821"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=553398915"
- Mesh.Scale = Vector3.new(0.333333333333, 0.333333333333, 0.333333333333)
- local Pow = Instance.new("Sound", owner.Character.Head)
- Pow.SoundId = "rbxassetid://3810328903"
- Pow.Volume = 2
- E.OnServerEvent:Connect(function()
- Pow:Play()
- local origin = Part.Position
- local position = Part.CFrame.lookVector * 300
- local direction = (position - origin).Unit*300
- local result = game.Workspace:Raycast(origin, direction)
- local intersection = result and result.Position or origin + direction
- local distance = (origin - intersection).Magnitude + 2.5
- local bullet_clone = Bullet:Clone()
- bullet_clone.Size = Vector3.new(0.1, 0.1, distance)
- bullet_clone.CFrame = CFrame.new(origin, intersection)*CFrame.new(0, 0, -distance/2)
- bullet_clone.Parent = game.Workspace
- if result then
- local part = result.Instance
- wait(0.1)
- killfunction(part)
- local humanoid = part.Parent:FindFirstChild("Humanoid") or part.Parent.Parent:FindFirstChild("Humanoid")
- if humanoid then
- if humanoid ~= owner.Character.Humanoid then
- wait(0.1)
- humanoid.Health = humanoid.Health - 45
- local velocity = Instance.new("BodyVelocity", part)
- velocity.Velocity = bullet_clone.CFrame.lookVector * 20
- velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- wait(0.125)
- velocity:Destroy()
- velocity = nil
- end
- end
- end
- wait(0.25)
- bullet_clone:Destroy()
- end)
- local remote = Instance.new("RemoteEvent", owner.Character)
- remote.Name = "lookremote"
- local remote2 = Instance.new("RemoteEvent", owner.Character)
- remote2.Name = "crouch remote"
- local headd = Instance.new("Weld", owner.Character.Torso)
- headd.Part0 = owner.Character.Torso
- headd.Part1 = owner.Character.Head
- headd.C0 = CFrame.new(0,1,0)
- headd.Name = "HeaddWeld"
- local armm = Instance.new("Weld", owner.Character.Torso)
- armm.Part0 = owner.Character.Torso
- armm.Part1 = owner.Character["Right Arm"]
- armm.C0 = CFrame.new(2,2,-1)
- armm.Name = "armmWeld"
- local armm2 = Instance.new("Weld", owner.Character.Torso)
- armm2.Part0 = Part
- armm2.Part1 = owner.Character["Left Arm"]
- armm2.C0 = CFrame.new(-1.25,0,2) * CFrame.Angles(0,math.rad(45),math.rad(90))
- armm2.Name = "armmWeld"
- local rightleg = Instance.new("Weld", owner.Character.Torso)
- rightleg.Part0 = owner.Character.Torso
- rightleg.Part1 = owner.Character["Right Leg"]
- rightleg.C0 = CFrame.new(0.5,-0.5,-0.5)
- rightleg.C1 = CFrame.new(0,1,0)
- rightleg.Name = "RightLegWeld"
- local leftleg = Instance.new("Weld", owner.Character.Torso)
- leftleg.Part0 = owner.Character.Torso
- leftleg.Part1 = owner.Character["Left Leg"]
- leftleg.C0 = CFrame.new(-0.5,-0.5,-0.5) * CFrame.Angles(math.rad(-25),0,0)
- leftleg.C1 = CFrame.new(0,1,0)
- leftleg.Name = "LeftLegWeld"
- local humanoidrootpart = Instance.new("Weld", owner.Character.HumanoidRootPart)
- humanoidrootpart.Part0 = owner.Character.HumanoidRootPart
- humanoidrootpart.Part1 = owner.Character.Torso
- humanoidrootpart.Name = "HumanoidRootPartWeld"
- humanoidrootpart.C0 = CFrame.new(0,-0.75,0)
- leftleg.Enabled = false
- rightleg.Enabled = false
- humanoidrootpart.Enabled = false
- function look(plr, where, origin, cameracf)
- if plr == owner then
- local lookvector = owner.Character.Torso.CFrame:toObjectSpace(cameracf).lookVector.unit
- headd.C0 = CFrame.new(0,1,0) * CFrame.Angles(lookvector.y,0,0)
- headd.C0 = headd.C0 * CFrame.Angles(0,-lookvector.x,0)
- headd.C0 = headd.C0 * CFrame.new(0,0.5,0)
- armm.C0 = CFrame.new(1.75,1,-1) * CFrame.Angles(lookvector.y,0,0) * CFrame.Angles(math.rad(90),0,0)
- armm.C0 = armm.C0 * CFrame.Angles(0,0,lookvector.x)
- armm.C0 = armm.C0 * CFrame.new(-0.5,-0.25,0.5)
- end
- end
- remote.OnServerEvent:connect(look)
- walkin = false
- function crouchlol(plr, Action)
- if Action == "Crouching" then
- leftleg.Enabled = true
- rightleg.Enabled = true
- humanoidrootpart.Enabled = true
- walkin = true
- elseif Action == "NotCrouching" then
- leftleg.Enabled = false
- rightleg.Enabled = false
- humanoidrootpart.Enabled = false
- walkin = false
- end
- end
- remote2.OnServerEvent:connect(crouchlol)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = leftleg
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.C0 = CFrame.new(-0.5,-0.15,-0.5) * CFrame.Angles(math.rad(0.1),0,0)
- local tween = tweenService:Create(object, tweenInfo, goal)
- local timeToFade2 = 0.25
- local object2 = rightleg
- local tweenInfo2 = TweenInfo.new(timeToFade2)
- local goal2 = {}
- goal2.C0 = CFrame.new(0.5,-0.5,-0.5) * CFrame.Angles(math.rad(-25),0,0)
- local tween2 = tweenService:Create(object2, tweenInfo2, goal2)
- local timeToFade3 = 0.25
- local object3 = leftleg
- local tweenInfo3 = TweenInfo.new(timeToFade3)
- local goal3 = {}
- goal3.C0 = CFrame.new(-0.5,-0.5,-0.5) * CFrame.Angles(math.rad(-25),0,0)
- local tween3 = tweenService:Create(object3, tweenInfo3, goal3)
- local timeToFade4 = 0.25
- local object4 = rightleg
- local tweenInfo4 = TweenInfo.new(timeToFade4)
- local goal4 = {}
- goal4.C0 = CFrame.new(0.5,-0.15,-0.5) * CFrame.Angles(math.rad(0.1),0,0)
- local tween4 = tweenService:Create(object4, tweenInfo4, goal4)
- while true do
- task.wait()
- while walkin do
- task.wait()
- if owner.Character.HumanoidRootPart.Velocity.x <= -4 or owner.Character.HumanoidRootPart.Velocity.x >= 4 or owner.Character.HumanoidRootPart.Velocity.z <= -4 or owner.Character.HumanoidRootPart.Velocity.z >= 4 and owner.Character.Humanoid.FloorMaterial ~= Enum.Material.Air then
- tween:Play()
- tween2:Play()
- wait(0.25)
- tween3:Play()
- tween4:Play()
- wait(0.25)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement