Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Notes:
- Please excuse the horrible code and lack of indentation.
- This script is over about 3 years old now and I didn't use indentation back then,
- in fact, I didn't even use a fancy text editor, I just used notepad. (sublime text master race)
- You have permission to change and use this in your game,
- I'd like to see some kind of credit towards me if you do so however.
- Created by DoogleFox - 2011/2012
- --]]
- local player = game:service("Players").LocalPlayer
- repeat wait() until player.Character;
- local mouse = player:GetMouse()
- local cam = workspace.CurrentCamera
- local char = player.Character
- local Torsoz = char:findFirstChild("Torso")
- local RA = char:findFirstChild("Right Arm")
- local LA = char:findFirstChild("Left Arm")
- local RL = char:findFirstChild("Right Leg")
- local LL = char:findFirstChild("Left Leg")
- local H = char:findFirstChild("Head")
- local Hu = char:findFirstChild("Humanoid")
- local RS = Torsoz:findFirstChild("Right Shoulder")
- local LS = Torsoz:findFirstChild("Left Shoulder")
- local RH = Torsoz:findFirstChild("Right Hip")
- local LH = Torsoz:findFirstChild("Left Hip")
- local N = Torsoz:findFirstChild("Neck")
- local NV = Vector3.new(0,0,0)
- local RightDagger
- local LeftDagger
- local RightHolder
- local LeftHolder
- local KnifeCuts = {}
- local Ctrl = false
- local Animating = false
- local Joint1 = Instance.new("Weld")
- Joint1.Name = "RightTop"
- local Joint2 = Instance.new("Weld")
- Joint2.Name = "LeftTop"
- local Joint3 = Instance.new("Weld")
- Joint3.Name = "RightBottom"
- local Joint4 = Instance.new("Weld")
- Joint4.Name = "LeftBottom"
- local Joint5 = Instance.new("Weld")
- Joint5.Name = "Top"
- script.Name = "DaggerSkrip"
- local colors = {"Navy blue", "Deep blue", "Earth green", "Dusty Rose", "Bright yellow", "Bright violet", "Bright orange"}
- local handlecolor = colors[math.random(1, #colors)]
- local P = Instance.new("Part")
- P.Anchored = false
- P.CanCollide = false
- P.Name = "Part"
- P.formFactor = "Custom"
- P.Size = Vector3.new(0.2,0.2,0.2)
- P.Locked = true
- P.TopSurface = 0
- P.BottomSurface = 0
- function GetWeld(weld)
- if weld:findFirstChild("XAngle") == nil then
- local a = Instance.new("NumberValue", weld)
- a.Name = "XAngle"
- end
- if weld:findFirstChild("YAngle") == nil then
- local a = Instance.new("NumberValue", weld)
- a.Name = "YAngle"
- end
- if weld:findFirstChild("ZAngle") == nil then
- local a = Instance.new("NumberValue", weld)
- a.Name = "ZAngle"
- end
- return weld.C0.p, Vector3.new(weld.XAngle.Value, weld.YAngle.Value, weld.ZAngle.Value)
- end
- function SetWeld(weld, i, loops, origpos,origangle, nextpos,nextangle)
- if weld:findFirstChild("XAngle") == nil then
- local a = Instance.new("NumberValue", weld)
- a.Name = "XAngle"
- end
- if weld:findFirstChild("YAngle") == nil then
- local a = Instance.new("NumberValue", weld)
- a.Name = "YAngle"
- end
- if weld:findFirstChild("ZAngle") == nil then
- local a = Instance.new("NumberValue", weld)
- a.Name = "ZAngle"
- end
- local tox,toy,toz = 0,0,0
- if origangle.x > nextangle.x then
- tox = -math.abs(origangle.x - nextangle.x) /loops*i
- else
- tox = math.abs(origangle.x - nextangle.x) /loops*i
- end
- if origangle.y > nextangle.y then
- toy = -math.abs(origangle.y - nextangle.y) /loops*i
- else
- toy = math.abs(origangle.y - nextangle.y) /loops*i
- end
- if origangle.z > nextangle.z then
- toz = -math.abs(origangle.z - nextangle.z) /loops*i
- else
- toz = math.abs(origangle.z - nextangle.z) /loops*i
- end
- local tox2,toy2,toz2 = 0,0,0
- if origpos.x > nextpos.x then
- tox2 = -math.abs(origpos.x - nextpos.x) /loops*i
- else
- tox2 = math.abs(origpos.x - nextpos.x) /loops*i
- end
- if origpos.y > nextpos.y then
- toy2 = -math.abs(origpos.y - nextpos.y) /loops*i
- else
- toy2 = math.abs(origpos.y - nextpos.y) /loops*i
- end
- if origpos.z > nextpos.z then
- toz2 = -math.abs(origpos.z - nextpos.z) /loops*i
- else
- toz2 = math.abs(origpos.z - nextpos.z) /loops*i
- end
- weld.XAngle.Value = origangle.x + tox
- weld.YAngle.Value = origangle.y + toy
- weld.ZAngle.Value = origangle.z + toz
- weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
- end
- function FindSurface(part, position)
- local obj = part.CFrame:pointToObjectSpace(position)
- local siz = part.Size/2
- for i,v in pairs(Enum.NormalId:GetEnumItems()) do
- local vec = Vector3.FromNormalId(v)
- local wvec = part.CFrame:vectorToWorldSpace(vec)
- local vz = (obj)/(siz*vec)
- if (math.abs(vz.X-1) < 0.01 or math.abs(vz.Y-1) < 0.01 or math.abs(vz.Z-1) < 0.01) then
- return wvec,vec
- end
- end
- if part.className == "WedgePart" then
- return part.CFrame:vectorToWorldSpace(Vector3.new(0,0.707,-0.707)), Vector3.new(0,0.707,-0.707)
- end
- end
- function RAY(pos, dir, startpos, endpos, distleft, collidedlist)
- collidedlist = collidedlist or {char}
- startpos = startpos or pos
- distleft = distleft or dir.unit * dir.magnitude
- endpos = endpos or pos + distleft
- local ray = Ray.new(pos, distleft)
- local hitz,enz = workspace:FindPartOnRayWithIgnoreList(ray, collidedlist)
- if hitz ~= nil then
- if hitz.CanCollide == false then
- table.insert(collidedlist, hitz)
- local newpos = enz
- local newdistleft = distleft - (dir.unit * (pos - newpos).magnitude)
- if newdistleft ~= NV then
- return RAY(newpos-(dir*0.01), dir, startpos, endpos, newdistleft+(dir*0.01), collidedlist)
- end
- end
- end
- return hitz, enz, ray
- end
- function Build()
- for i, v in pairs(char:children()) do
- if v.className == "Model" and v.Name == "ClimbingDaggers" then
- v:remove()
- end
- end
- local mdl = Instance.new("Model", char)
- mdl.Name = "ClimbingDaggers"
- local b = P:Clone()
- b.Parent = mdl
- b.Name = "Belt"
- b.BrickColor = BrickColor.new("Brown")
- local mesh = Instance.new("BlockMesh", b)
- mesh.Scale = Vector3.new(2.05,0.2,1.05) *5
- local w = Instance.new("Weld", b)
- w.Part0 = Torsoz
- w.Part1 = b
- w.C0 = CFrame.new(0,-0.95,0)
- local p = P:Clone()
- p.Parent = mdl
- p.Name = "Knot"
- p.BrickColor = BrickColor.new("Brown")
- local mesh = Instance.new("SpecialMesh", p)
- mesh.MeshType = "Sphere"
- mesh.Scale = Vector3.new(0.08,0.08,0.08) *5
- local w = Instance.new("Weld", p)
- w.Part0 = b
- w.Part1 = p
- w.C0 = CFrame.new(0,0.02,-0.525)
- for i = 1, 2 do
- local p = P:Clone()
- p.Parent = mdl
- p.Name = "KnotLoop"..i
- p.BrickColor = BrickColor.new("Brown")
- local mesh = Instance.new("SpecialMesh", p)
- mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
- mesh.Scale = Vector3.new(0.4,0.16,0.16)
- local w = Instance.new("Weld", p)
- w.Part0 = b
- w.Part1 = p
- w.C0 = CFrame.new(0,0.02,-0.525)
- local p2 = P:Clone()
- p2.Parent = mdl
- p2.Name = "String"
- p2.BrickColor = BrickColor.new("Brown")
- local mesh = Instance.new("CylinderMesh", p2)
- mesh.Scale = Vector3.new(0.05,0.4,0.05) *5
- local w2 = Instance.new("Weld", p2)
- w2.Part0 = b
- w2.Part1 = p2
- w2.C0 = CFrame.new(0,0.02,-0.525)
- w2.C1 = CFrame.new(0,0.2,0)
- if i == 1 then
- w.C1 = CFrame.new(0.2,0,0)
- w.C0 = w.C0 * CFrame.Angles(-0.25,0,-math.pi/7)
- w2.C0 = w2.C0 * CFrame.Angles(0.12,0,-0.2)
- else
- w.C1 = CFrame.new(-0.2,0,0)
- w.C0 = w.C0 * CFrame.Angles(-0.25,0,math.pi/7)
- w2.C0 = w2.C0 * CFrame.Angles(0.12,0,0.2)
- end
- end
- for i = 1, 2 do
- local p = P:Clone()
- p.Parent = mdl
- p.Name = "DaggerHolder"..i
- p.BrickColor = BrickColor.new("Brown")
- local mesh = Instance.new("BlockMesh", p)
- mesh.Scale = Vector3.new(0.15,0.8,0.3) *5
- local w = Instance.new("Weld", p)
- w.Part0 = b
- w.Part1 = p
- w.C1 = CFrame.new(0,0.1,0)
- local p2 = P:Clone()
- p2.Parent = mdl
- p2.Name = "DaggerHolderTip"..i
- p2.BrickColor = BrickColor.new("Brown")
- local mesh = Instance.new("SpecialMesh", p2)
- mesh.MeshType = "Wedge"
- mesh.Scale = Vector3.new(0.15,0.3,0.3) *5
- local ww = Instance.new("Weld", p2)
- ww.Part0 = p
- ww.Part1 = p2
- ww.C0 = CFrame.new(0,-0.55,0) * CFrame.Angles(-math.pi/2,0,0)
- if i == 1 then
- w.C0 = CFrame.new(1.06,0,-0.2) * CFrame.Angles(-math.pi/5,0,0)
- RightHolder = w
- else
- w.C0 = CFrame.new(-1.06,0,-0.2) * CFrame.Angles(-math.pi/5,0,0)
- LeftHolder = w
- end
- end
- -------------------------- Daggers ------------------------------
- for i = 1, 2 do
- local h = P:Clone()
- h.Parent = mdl
- h.BrickColor = BrickColor.new(handlecolor)
- h.Name = "Handle"
- local mesh = Instance.new("BlockMesh", h)
- mesh.Scale = Vector3.new(0.14,0.8,0.3) *5
- local w = Instance.new("Weld", h)
- w.Part1 = h
- w.C0 = CFrame.new(0,0.87,0) * CFrame.Angles(math.pi,0,0)
- if i == 1 then
- w.Part0 = RightHolder.Parent
- RightDagger = w
- else
- w.Part0 = LeftHolder.Parent
- LeftDagger = w
- end
- for o = 1, 2 do
- local p = P:Clone()
- p.Parent = mdl
- p.BrickColor = BrickColor.new("Dark stone grey")
- p.Name = "Guard"
- local mesh = Instance.new("BlockMesh", p)
- mesh.Scale = Vector3.new(0.2,0.15,0.35) *5
- local w = Instance.new("Weld", p)
- w.Part0 = h
- w.Part1 = p
- local g = P:Clone()
- g.Parent = mdl
- g.BrickColor = BrickColor.new("Dark stone grey")
- g.Name = "BottomGuard"
- local mesh = Instance.new("BlockMesh", g)
- mesh.Scale = Vector3.new(0.12,0.1,0.27) *5
- local w2 = Instance.new("Weld", g)
- w2.Part0 = p
- w2.Part1 = g
- if o == 1 then
- w.C0 = CFrame.new(0,0.4,0)
- w2.C0 = CFrame.new(0,0.075,0)
- else
- w.C0 = CFrame.new(0,-0.4,0)
- w2.C0 = CFrame.new(0,-0.075,0)
- end
- end
- local bl = P:Clone()
- bl.Parent = mdl
- bl.BrickColor = BrickColor.new("Light stone grey")
- bl.Name = "Blade"
- bl.Reflectance = 0.7
- local mesh = Instance.new("BlockMesh", bl)
- mesh.Scale = Vector3.new(0.06,0.8,0.2) *5
- local w = Instance.new("Weld", bl)
- w.Part0 = h
- w.Part1 = bl
- w.C0 = CFrame.new(0,0.8,0)
- local t = P:Clone()
- t.Parent = mdl
- t.BrickColor = BrickColor.new("Light stone grey")
- t.Name = "BladeTip"
- t.Reflectance = 0.7
- local mesh = Instance.new("SpecialMesh", t)
- mesh.MeshType = "Wedge"
- mesh.Scale = Vector3.new(0.06,0.3,0.2) *5
- local w = Instance.new("Weld", bl)
- w.Part0 = bl
- w.Part1 = t
- w.C0 = CFrame.new(0,0.55,0) * CFrame.Angles(0,math.pi,0)
- end --- end of dagger creation
- end
- Build()
- function B1D(mouse)
- end
- function Climb(velo,part,pos, bg,bv)
- print("Climbing")
- RS.Part0 = nil
- LS.Part0 = nil
- RH.Part0 = nil
- LH.Part0 = nil
- N.Part0 = nil
- Joint1.Parent = Torsoz
- Joint1.Part0 = Torsoz
- Joint1.Part1 = RA
- Joint2.Parent = Torsoz
- Joint2.Part0 = Torsoz
- Joint2.Part1 = LA
- Joint3.Parent = Torsoz
- Joint3.Part0 = Torsoz
- Joint3.Part1 = RL
- Joint4.Parent = Torsoz
- Joint4.Part0 = Torsoz
- Joint4.Part1 = LL
- Joint5.Parent = Torsoz
- Joint5.Part0 = Torsoz
- Joint5.Part1 = H
- if bv == nil then
- SetWeld(Joint1,1,1, NV,NV,Vector3.new(1.5,0.5,0), Vector3.new(math.pi - 0.3,0,-0.18))
- SetWeld(Joint2,1,1, NV,NV,Vector3.new(-1.5,0.5,0), Vector3.new(math.pi - 0.3,0,0.18))
- SetWeld(Joint3,1,1, NV,NV,Vector3.new(0.5,-1,0), Vector3.new(math.pi/7,0,0.2))
- SetWeld(Joint4,1,1, NV,NV,Vector3.new(-0.5,-1,0), Vector3.new(math.pi/7,0,-0.2))
- RightDagger.Part0 = RA
- RightDagger.C0 = CFrame.new(0,-1,0) * CFrame.Angles(math.pi/2,0,0)
- LeftDagger.Part0 = LA
- LeftDagger.C0 = CFrame.new(0,-1,0) * CFrame.Angles(math.pi/2,0,0)
- end
- SetWeld(Joint5,1,1, NV,NV,Vector3.new(0,1,0), Vector3.new(-math.pi/8,0,0))
- local dir,dir2 = FindSurface(part,pos)
- local downdir = (CFrame.new(NV,-dir) * CFrame.new(0,-1,0)).p.unit
- local bp = Instance.new("BodyPosition", Torsoz)
- bp.maxForce = Vector3.new(1/0,1/0,1/0)
- bp.position = pos + (dir*1)
- local bppos = bp.position
- bp.D = 100
- bg = bg or Instance.new("BodyGyro", Torsoz)
- bg.maxTorque = Vector3.new(1/0,1/0,1/0)
- bg.D = 100
- bg.cframe = CFrame.new(NV,-dir)
- bv = bv or Instance.new("BodyVelocity")
- bv:remove()
- local i = 0
- local j1,j1a = GetWeld(Joint1)
- local j2,j2a = GetWeld(Joint2)
- local j3,j3a = GetWeld(Joint3)
- local j4,j4a = GetWeld(Joint4)
- local j5,j5a = GetWeld(Joint5)
- local herp1,lastpos1 = RAY(RightDagger.Parent.Position, -dir*1.6)
- local herp2,lastpos2 = RAY(LeftDagger.Parent.Position, -dir*1.6)
- local lastpos = pos
- local lastpart = part
- local lastpartcf = part.CFrame
- local offset = lastpartcf:pointToObjectSpace(lastpos+dir)
- if velo < -10 then
- while velo < -1 and Ctrl do
- Hu.PlatformStand = true
- i = i + 1
- if i <= 4 then
- SetWeld(Joint1,i,4, j1,j1a,j1, Vector3.new(math.pi - 0.3,0,-0.18))
- SetWeld(Joint2,i,4, j2,j2a,j2, Vector3.new(math.pi - 0.3,0,0.18))
- SetWeld(Joint3,i,4, j3,j3a,j3, Vector3.new(math.pi/7,0,0.2))
- SetWeld(Joint4,i,4, j4,j4a,j4, Vector3.new(math.pi/7,0,-0.2))
- end
- velo = velo + 0.4 + (-velo/14)
- bv.velocity = downdir*-velo
- bp.position = bp.position + Vector3.new(0,velo/30,0)
- local hitz, enz = RAY(Torsoz.Position, ((Torsoz.CFrame * CFrame.new(0,-1,0)).p - Torsoz.Position).unit*3.4)
- if hitz ~= nil then
- velo = 0
- bp.position = Vector3.new(bp.position.x,enz.y+2.6,bp.position.z)
- end
- -------- knife marks ----------------
- local herp1,newpos1 = RAY(RightDagger.Parent.Position, -dir*1.6)
- local herp2,newpos2 = RAY(LeftDagger.Parent.Position, -dir*1.6)
- if i > 3 then
- local p1 = P:Clone()
- p1.Parent = Torsoz
- p1.BrickColor = BrickColor.new("Really black")
- p1.Anchored = true
- p1.CFrame = CFrame.new((lastpos1 + newpos1)/2,newpos1)
- local mesh = Instance.new("BlockMesh", p1)
- mesh.Scale = Vector3.new(0.08,0.08,(lastpos1 - newpos1).magnitude) *5
- table.insert(KnifeCuts, p1)
- local p2 = P:Clone()
- p2.Parent = Torsoz
- p2.BrickColor = BrickColor.new("Really black")
- p2.Anchored = true
- p2.CFrame = CFrame.new((lastpos2 + newpos2)/2,newpos2)
- local mesh = Instance.new("BlockMesh", p2)
- mesh.Scale = Vector3.new(0.08,0.08,(lastpos2 - newpos2).magnitude) *5
- table.insert(KnifeCuts, p2)
- end
- lastpos1 = newpos1
- lastpos2 = newpos2
- ----- moving on parts ----------
- local hitz, enz = RAY(bp.position, -dir*2.5)
- if hitz ~= nil and lastpart == part and lastpartcf ~= part.CFrame then
- local offset = lastpartcf:pointToObjectSpace(lastpos)
- local newposi = part.CFrame * CFrame.new(offset)
- dir, dir2 = FindSurface(hitz,enz)
- bg.cframe = CFrame.new(NV,-dir)
- --Torsoz.CFrame = CFrame.new(newposi.p, newposi.p - dir) + dir
- bp.position = Vector3.new(newposi.x+dir.x,bp.position.y,newposi.z+dir.z)
- elseif hitz == nil then
- Ctrl = false
- break
- end
- hitz, enz = RAY(bp.position, -dir*2.5)
- lastpart = hitz
- lastpartcf = part.CFrame
- lastpos = enz
- wait(0.02)
- end
- end
- bv:remove()
- --bp.position = bp.position + Vector3.new(0,Torsoz.Position.y-bp.position.y,0)
- bp.maxForce = Vector3.new(1/0,1/0,1/0)
- while Ctrl do
- if i <= 4 then
- SetWeld(Joint1,i,4, j1,j1a,j1, Vector3.new(math.pi - 0.3,0,-0.18))
- SetWeld(Joint2,i,4, j2,j2a,j2, Vector3.new(math.pi - 0.3,0,0.18))
- SetWeld(Joint3,i,4, j3,j3a,j3, Vector3.new(math.pi/7,0,0.2))
- SetWeld(Joint4,i,4, j4,j4a,j4, Vector3.new(math.pi/7,0,-0.2))
- i = i + 1
- end
- ----- moving on parts ----------
- local hitz, enz = RAY(bp.position, -dir*2.5)
- if hitz ~= nil and lastpart == part and lastpartcf ~= part.CFrame then
- local offset = lastpartcf:pointToObjectSpace(lastpos)
- local newposi = part.CFrame * CFrame.new(offset)
- dir, dir2 = FindSurface(hitz,enz)
- bg.cframe = CFrame.new(NV,-dir)
- Torsoz.CFrame = CFrame.new(newposi.p, newposi.p - dir) + dir
- bp.position = newposi.p + dir
- elseif hitz == nil then
- Ctrl = false
- break
- end
- hitz, enz = RAY(bp.position, -dir*2.5)
- lastpart = hitz
- lastpartcf = part.CFrame
- lastpos = enz
- wait(0.02)
- end
- Torsoz.Anchored = false
- Hu.PlatformStand = false
- bp:remove()
- bg:remove()
- Unequip()
- end
- function Jump()
- Animating = true
- local gravity = 0.83
- RS.Part0 = nil
- LS.Part0 = nil
- RH.Part0 = nil
- LH.Part0 = nil
- N.Part0 = nil
- Joint1.Parent = Torsoz
- Joint1.Part0 = Torsoz
- Joint1.Part1 = RA
- Joint1.C1 = CFrame.new(0,0.5,0)
- SetWeld(Joint1,1,1, NV,NV,Vector3.new(1.5,0.5,0),NV)
- Joint2.Parent = Torsoz
- Joint2.Part0 = Torsoz
- Joint2.Part1 = LA
- Joint2.C1 = CFrame.new(0,0.5,0)
- SetWeld(Joint2,1,1, NV,NV,Vector3.new(-1.5,0.5,0),NV)
- Joint3.Parent = Torsoz
- Joint3.Part0 = Torsoz
- Joint3.Part1 = RL
- Joint3.C1 = CFrame.new(0,1,0)
- SetWeld(Joint3,1,1, NV,NV,Vector3.new(0.5,-1,0),NV)
- Joint4.Parent = Torsoz
- Joint4.Part0 = Torsoz
- Joint4.Part1 = LL
- Joint4.C1 = CFrame.new(0,1,0)
- SetWeld(Joint4,1,1, NV,NV,Vector3.new(-0.5,-1,0),NV)
- Joint5.Parent = Torsoz
- Joint5.Part0 = Torsoz
- Joint5.Part1 = H
- Joint5.C1 = CFrame.new(0,-0.5,0)
- SetWeld(Joint5,1,1, NV,NV,Vector3.new(0,1,0),NV)
- local j1,j1a = GetWeld(Joint1)
- local j2,j2a = GetWeld(Joint2)
- local j3,j3a = GetWeld(Joint3)
- local j4,j4a = GetWeld(Joint4)
- local j5,j5a = GetWeld(Joint5)
- local thepart, thepos
- local bv = Instance.new("BodyVelocity", Torsoz)
- bv.maxForce = Vector3.new(1/0,1/0,1/0)
- local dir = cam.CoordinateFrame.lookVector
- dir = Vector3.new(dir.x,0,dir.z).unit
- local bg = Instance.new("BodyGyro", Torsoz)
- bg.maxTorque = Vector3.new(1/0,1/0,1/0)
- bg.D = 100
- bg.cframe = CFrame.new(NV,dir) * CFrame.Angles(-math.pi/8,0,0)
- Torsoz.CFrame = CFrame.new(Torsoz.Position, Torsoz.Position + dir)
- local i = 0
- local state = "Jumping"
- while Ctrl do
- i = i + 1
- if i <= 27 then
- SetWeld(Joint5,1,1, j5,j5a,j5, Vector3.new(((-math.pi/7)*((i-10)/20)) + (math.pi/8/2),0,0))
- end
- if i <= 3 then
- SetWeld(Joint1,i,3, j1,j1a,j1, Vector3.new(math.pi/4,0,-0.35))
- SetWeld(Joint2,i,3, j2,j2a,j2, Vector3.new(math.pi/4,0,0.35))
- if i == 3 then
- j1,j1a = GetWeld(Joint1)
- j2,j2a = GetWeld(Joint2)
- RightDagger.Part0 = RA
- RightDagger.C0 = CFrame.new(0,-1,0) * CFrame.Angles(math.pi/2,0,0)
- LeftDagger.Part0 = LA
- LeftDagger.C0 = CFrame.new(0,-1,0) * CFrame.Angles(math.pi/2,0,0)
- end
- elseif i <= 6 then
- SetWeld(Joint1,i-3,3, j1,j1a,j1, Vector3.new(math.pi+(math.pi/8),0,0.2))
- SetWeld(Joint2,i-3,3, j2,j2a,j2, Vector3.new(math.pi+(math.pi/8),0,-0.2))
- SetWeld(Joint3,i-3,3, j3,j3a,j3, Vector3.new(-0.5,0,0.12))
- SetWeld(Joint4,i-3,3, j4,j4a,j4, Vector3.new(-0.5,0,-0.12))
- end
- bv.velocity = Vector3.new(dir.x,gravity,dir.z).unit * (Vector3.new(dir.x,gravity,dir.z).magnitude*36)
- local hitz, enz = RAY(Torsoz.Position, dir*3)
- if hitz ~= nil then
- state = "Climbing"
- Climb(Torsoz.Velocity.y,hitz,enz, bg,bv)
- break
- end
- if i > 3 then
- local hitz2,enz2 = RAY(Torsoz.Position, Vector3.new(0,-3.2,0))
- if hitz2 ~= nil then
- bg.cframe = CFrame.new(NV,dir)
- break
- end
- end
- if gravity > -100 then
- gravity = gravity - 0.08
- end
- wait(0.02)
- end --- end of jumping loop
- if state == "Jumping" then
- bv:remove()
- bg:remove()
- Unequip()
- end
- Animating = false
- end
- function Unequip()
- Animating = true
- local j1,j1a = GetWeld(Joint1)
- local j2,j2a = GetWeld(Joint2)
- local j3,j3a = GetWeld(Joint3)
- local j4,j4a = GetWeld(Joint4)
- local j5,j5a = GetWeld(Joint5)
- for i = 1, 3 do
- SetWeld(Joint1,i,3, j1,j1a,j1, Vector3.new(math.pi/4,0,-0.35))
- SetWeld(Joint2,i,3, j2,j2a,j2, Vector3.new(math.pi/4,0,0.35))
- SetWeld(Joint3,i,3, j3,j3a,j3, NV)
- SetWeld(Joint4,i,3, j4,j4a,j4, NV)
- SetWeld(Joint5,i,3, j5,j5a,j5, NV)
- wait(0.02)
- end
- j1,j1a = GetWeld(Joint1)
- j2,j2a = GetWeld(Joint2)
- Build()
- for i = 1, 2 do
- SetWeld(Joint1,i,2, j1,j1a,j1, NV)
- SetWeld(Joint2,i,2, j2,j2a,j2, NV)
- wait(0.02)
- end
- for i = 1, 2 do
- Joint1.Parent = nil
- Joint2.Parent = nil
- Joint3.Parent = nil
- Joint4.Parent = nil
- Joint5.Parent = nil
- N.Parent = Torsoz
- N.Part0 = Torsoz
- N.Part1 = H
- RS.Parent = Torsoz
- RS.Part0 = Torsoz
- RS.Part1 = RA
- LS.Parent = Torsoz
- LS.Part0 = Torsoz
- LS.Part1 = LA
- RH.Parent = Torsoz
- RH.Part0 = Torsoz
- RH.Part1 = RL
- LH.Parent = Torsoz
- LH.Part0 = Torsoz
- LH.Part1 = LL
- wait(0.02)
- end
- Animating = false
- end
- function KD(key, mouse)
- if key == string.char(50) then
- if Animating == false and Ctrl == false then
- Ctrl = true
- local hitz,enz = RAY(Torsoz.Position, Vector3.new(0,-4,0))
- local dir = cam.CoordinateFrame.lookVector
- dir = Vector3.new(dir.x,0,dir.z).unit
- local hitz2, enz2 = RAY(Torsoz.Position, dir*3)
- if hitz2 ~= nil then
- Climb(Torsoz.Velocity.y,hitz2,enz2)
- elseif hitz ~= nil then
- Jump()
- end
- end
- end
- end
- function KU(key, mouse)
- if key == string.char(50) then
- Ctrl = false
- end
- end
- mouse.Button1Down:connect(function() B1D(mouse) end)
- mouse.KeyDown:connect(function(key) KD(key, mouse) end)
- mouse.KeyUp:connect(function(key) KU(key, mouse) end)
- local knifecutdeb = 1
- game:service("RunService").Stepped:connect(function()
- knifecutdeb = (knifecutdeb + 1)%2
- if knifecutdeb == 0 then
- for i,v in pairs(KnifeCuts) do
- if v.Transparency < 0.94 then
- v.Transparency = v.Transparency + 0.045
- else
- v:remove()
- table.remove(KnifeCuts,i)
- end
- end
- end
- end)
Add Comment
Please, Sign In to add comment