Advertisement
jayrock3401

Untitled

Mar 28th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.16 KB | None | 0 0
  1. --[[jayrock3401
  2. --this is for personal reference on rotation so i dont forget it
  3. X: ROLL
  4. Y: YAW
  5. Z: PITCH
  6. ]]
  7. wait(1)
  8. math.randomseed(tick())
  9. local walkSpeed=32
  10. local plr=game.Players.LocalPlayer;local char=plr.Character;local hum=char.Humanoid;local head=char.Head;local rootPart=char.HumanoidRootPart;local la=char['Left Arm'];local ll=char['Left Leg'];local ra=char['Right Arm'];local rl=char['Right Leg'];local tor=char.Torso;local mouse=plr:GetMouse();
  11. local rs=Instance.new('Weld',tor);rs.C0=CFrame.new(1.5,0.5,0);rs.C1=CFrame.new(0,0.5,0);rs.Part0=tor;rs.Part1=ra;
  12. local ls=Instance.new('Weld',tor);ls.C0=CFrame.new(-1.5,0.5,0);ls.C1=CFrame.new(0,0.5,0);ls.Part0=tor;ls.Part1=la;
  13. local neck=tor['Neck']
  14. local rh=tor['Right Hip']
  15. local lh=tor['Left Hip']
  16. local rootJoint=rootPart.RootJoint
  17. local shooting=false
  18. local shootenabled=true
  19. tor['Right Shoulder']:Destroy()
  20. tor['Left Shoulder']:Destroy()
  21. neck.C0=CFrame.new(0,1,0)
  22. neck.C1=CFrame.new(0,-0.5,0)
  23. hum.WalkSpeed=walkSpeed
  24. local anim=char.Animate
  25. anim.Disabled=false
  26. local animator=char.Humanoid.Animator
  27. local settings={changePoseEnabled=true,pose='',handEffectEnabled=true,motorsEnabled={rs=true,ls=true,rh=true,neck=true,rj=true,rh=true,lh=true}}
  28. local originC0={
  29. n=neck.C0*CFrame.fromEulerAnglesXYZ(0,0,0),
  30. rs=rs.C0*CFrame.fromEulerAnglesXYZ(0,0,0),
  31. ls=ls.C0*CFrame.fromEulerAnglesXYZ(0,0,0),
  32. rj=rootJoint.C0*CFrame.fromEulerAnglesXYZ(0,0,0),
  33. rh=rh.C0*CFrame.fromEulerAnglesXYZ(0,0,0),
  34. lh=lh.C0*CFrame.fromEulerAnglesXYZ(0,0,0)
  35. }
  36. Part=function(par, a, c, col, t, s, cf)
  37. local p=Instance.new("Part", par) p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.BrickColor=BrickColor.new(col) p.Transparency=t p.Size=s p.CFrame=cf or CFrame.new()
  38. return p
  39. end,
  40. Wedge=function(par, a, c, col, t, s, cf)
  41. local p=Instance.new("WedgePart", par) p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.BrickColor=BrickColor.new(col) p.Transparency=t p.Size=s p.CFrame=cf or CFrame.new()
  42. return p
  43. end,
  44. Weld=function(par, p1, cf)
  45. local w=Instance.new("Weld", par) w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or CFrame.new()
  46. return w
  47. end,
  48. Mesh=function(ins, par, s, of, t)
  49. local m=Instance.new(ins, par) m.Scale=s or Vector3.new() m.Offset=of or Vector3.new() pcall(function() m.MeshType=t end)
  50. return m
  51. end
  52. }
  53. local scriptname="Santoryu" --Name here
  54. pcall(function() player.Backpack[scriptname]:remove() char[scriptname]:remove() char[scriptname.."B"]:remove() player.PlayerGui[scriptname]:remove() end)
  55. local model=Instance.new("Model", char) model.Name=scriptname
  56. local modelB=Instance.new("Model", char) modelB.Name=scriptname.."B"
  57. local gui=Instance.new("ScreenGui", player.PlayerGui) gui.Name=scriptname
  58. local sound=Instance.new("Sound", char)
  59. local bin=Instance.new("HopperBin", player.Backpack) bin.Name=model.Name
  60. local skincolor="White"
  61. local body={}
  62. local animate={}
  63. local obj={}
  64. function createParts()
  65. --==PARTS==--
  66. body.Head=head:clone() body.Head.Parent=model body.Head.BrickColor=BrickColor.new(skincolor) body.Head.Transparency=0
  67. body.Torso=add.Part(model, false, false, skincolor, 0, Vector3.new(2, 2, 1), nil)
  68. body.ArmLeft, body.ArmRight=add.Part(model, false, false, skincolor, 0, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 0, Vector3.new(1, 1, 1), nil)
  69. body.LegLeft, body.LegRight=add.Part(model, false, false, skincolor, 0, Vector3.new(1, 1, 1), nil), add.Part(model, false, false, skincolor, 0, Vector3.new(1, 1, 1), nil)
  70. p(function() for i, v in pairs(char:children()) do v.Transparency=1 end end)
  71. p(function() for i, v in pairs(char:children()) do v["face"]:clone().Parent=body.Head v["face"]:remove() end end)
  72. p(function() for i, v in pairs(char:children()) do if v.ClassName=="Hat" then v:remove() end end end)
  73. --==WELDS==--
  74. body.HeadW=add.Weld(body.Head, body.Torso, CFrame.new(0, 1.5, 0))
  75. body.TorsoW=add.Weld(body.Torso, torso, nil)
  76. body.ArmLeftW, body.ArmRightW=add.Weld(body.ArmLeft, body.Torso, CFrame.new(-1.5, .5, 0)), add.Weld(body.ArmRight, body.Torso, CFrame.new(1.5, .5, 0))
  77. body.LegLeftW, body.LegRightW=add.Weld(body.LegLeft, body.Torso, CFrame.new(-.5, -1.5, 0)), add.Weld(body.LegRight, body.Torso, CFrame.new(.5, -1.5, 0))
  78. --==MESHES==--
  79. add.Mesh("BlockMesh", body.ArmLeft, Vector3.new(1, 2, 1), Vector3.new(0, -.5, 0), nil)
  80. add.Mesh("BlockMesh", body.ArmRight, Vector3.new(1, 2, 1), Vector3.new(0, -.5, 0), nil)
  81. add.Mesh("BlockMesh", body.LegLeft, Vector3.new(1, 2, 1), Vector3.new(0, -.5, 0), nil)
  82. add.Mesh("BlockMesh", body.LegRight, Vector3.new(1, 2, 1), Vector3.new(0, -.5, 0), nil)
  83. ---------------------------------------------------------------------------------------
  84. animate={
  85. ["Head"]=function(cf) p(function() for i, v in pairs(model:children()) do v.Transparency=0 end end) leg.Left.Transparency=1 leg.Right.Transparency=1
  86. body.HeadW.C1=CFrame.new(0, 1.5, 0)*cf
  87. end;
  88. ["Torso"]=function(cf) p(function() for i, v in pairs(model:children()) do v.Transparency=0 end end) leg.Left.Transparency=1 leg.Right.Transparency=1
  89. body.TorsoW.C1=cf
  90. end;
  91. ["ArmLeft"]=function(cf) p(function() for i, v in pairs(model:children()) do v.Transparency=0 end end) leg.Left.Transparency=1 leg.Right.Transparency=1
  92. body.ArmLeftW.C1=CFrame.new(-1.5, .5, 0)*cf
  93. end;
  94. ["ArmRight"]=function(cf) p(function() for i, v in pairs(model:children()) do v.Transparency=0 end end) leg.Left.Transparency=1 leg.Right.Transparency=1
  95. body.ArmRightW.C1=CFrame.new(1.5, .5, 0)*cf
  96. end;
  97. ["LegLeft"]=function(cf) p(function() for i, v in pairs(model:children()) do v.Transparency=0 end end) leg.Left.Transparency=1 leg.Right.Transparency=1
  98. body.LegLeftW.C1=CFrame.new(-.5, -1.5, 0)*cf
  99. end;
  100. ["LegRight"]=function(cf) p(function() for i, v in pairs(model:children()) do v.Transparency=0 end end) leg.Left.Transparency=1 leg.Right.Transparency=1
  101. body.LegRightW.C1=CFrame.new(.5, -1.5, 0)*cf
  102. end;
  103. ["Bazooka"]=function(mouse)
  104. target=mouse.Target.Position
  105. for i=0, 1, .2 do
  106. wait()
  107. weld.Head.C1=CFrame.new(0, 1.5, 0)*CFrame.Angles(math.rad(45)*i, 0, 0)
  108. weld.Arm.Left.C1=CFrame.new(-1.5, .5, 0)*CFrame.Angles(0, -math.rad(90)*i, -math.rad(90)*i)
  109. weld.Arm.Right.C1=CFrame.new(1.5, .5, 0)*CFrame.Angles(0, math.rad(90)*i, math.rad(90)*i)
  110. weld.Leg.Left.C1=CFrame.new(-.5, -1.5, 0)*CFrame.Angles(-math.rad(45)*i, 0, -math.rad(45)*i)
  111. weld.Leg.Right.C1=CFrame.new(.5, -1.5, 0)*CFrame.Angles(-math.rad(45)*i, 0, math.rad(45)*i)
  112. end
  113. computePos(torso.CFrame.p, mouse.Hit.p)
  114. torso.CFrame=torso.CFrame+torso.CFrame.lookVector*5
  115. pcall(function()ray(arm.Left.Position, target)end)
  116. pcall(function()ray(arm.Right.Position, target)end)
  117. for i=1, 0, -.2 do
  118. wait()
  119. weld.Head.C1=CFrame.new(0, 1.5, 0)*CFrame.Angles(math.rad(45)*i, 0, 0)
  120. weld.Arm.Left.C1=CFrame.new(-1.5, .5, 0)*CFrame.Angles(0, -math.rad(90)*i, -math.rad(90)*i)
  121. weld.Arm.Right.C1=CFrame.new(1.5, .5, 0)*CFrame.Angles(0, math.rad(90)*i, math.rad(90)*i)
  122. weld.Leg.Left.C1=CFrame.new(-.5, -1.5, 0)*CFrame.Angles(-math.rad(45)*i, 0, -math.rad(45)*i)
  123. weld.Leg.Right.C1=CFrame.new(.5, -1.5, 0)*CFrame.Angles(-math.rad(45)*i, 0, math.rad(45)*i)
  124. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement