TheUnknownDiscord

Untitled

Nov 10th, 2021 (edited)
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. char = owner.Character
  2. bg = Instance.new("BodyGyro",char["Right Arm"])
  3. bg.MaxTorque = Vector3.new(0,0,0)
  4. bg.P = 50000
  5. bg2 = Instance.new("BodyGyro",char.Head)
  6. bg2.MaxTorque = Vector3.new(0,0,0)
  7. bg2.P = 50000
  8.             local limbcollider = Instance.new("Part", char:findFirstChild("Right Arm"))
  9.                 limbcollider.Size = Vector3.new(1.4,1,1)
  10.                 limbcollider.Transparency = 1
  11.                 limbcollider.Name = "LimbCollider"
  12.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  13.                 limbcolliderweld.Part0 = char:findFirstChild("Right Arm")
  14.                 limbcolliderweld.Part1 = limbcollider
  15.                 limbcollider.Shape = "Cylinder"
  16.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  17.             local limbcollider2 = Instance.new("Part", char:findFirstChild("Left Arm"))
  18.                 limbcollider2.Size = Vector3.new(1.4,1,1)
  19.                 limbcollider2.Transparency = 1
  20.                 limbcollider2.Name = "LimbCollider"
  21.                 limbcollider2.Shape = "Cylinder"
  22.                 local limbcolliderweld2 = Instance.new("Weld", limbcollider2)
  23.                 limbcolliderweld2.Part0 = char:findFirstChild("Left Arm")
  24.                 limbcolliderweld2.Part1 = limbcollider2
  25.                 limbcolliderweld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  26.             local limbcollider3 = Instance.new("Part", char.Head)
  27.                 limbcollider3.Size = Vector3.new(0.75,0.75,0.75)
  28.                 limbcollider3.Shape = "Ball"
  29.                 limbcollider3.Transparency = 1
  30.                 limbcollider3.Name = "LimbCollider"
  31.                 local limbcolliderweld = Instance.new("Weld", limbcollider3)
  32.                 limbcolliderweld.Part0 = char.Head
  33.                 limbcolliderweld.Part1 = limbcollider3
  34.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  35.     char.Humanoid.RequiresNeck = false
  36.     for i,v in pairs(char:GetDescendants()) do
  37. pcall(function()
  38.         if v:IsA("Motor6D") then
  39. if v.Name ~= "RootJoint" then
  40.             v.Enabled = false
  41. end
  42. end
  43. end)
  44. end
  45. function the()
  46.             local Socket = Instance.new("BallSocketConstraint")
  47.             local a1 = Instance.new("Attachment")
  48.             local a2 = Instance.new("Attachment")
  49.             a1.Parent = char["Left Arm"]
  50.             a2.Parent = char.Torso
  51.             Socket.Parent = char["Left Arm"]
  52.             Socket.Attachment0 = a1
  53.             Socket.Attachment1 = a2
  54.             a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,0.5,0)
  55.             a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(-1.5,0.5,0)
  56. end
  57. function the2()
  58.             local Socket = Instance.new("BallSocketConstraint")
  59.             local a1 = Instance.new("Attachment")
  60.             local a2 = Instance.new("Attachment")
  61.             a1.Parent = char["Right Arm"]
  62.             a2.Parent = char.Torso
  63.             Socket.Parent = char["Right Arm"]
  64.             Socket.Attachment0 = a1
  65.             Socket.Attachment1 = a2
  66.             a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,0.5,0)
  67.             a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(1.5,0.5,0)
  68. end
  69. function the3()
  70.             local Socket = Instance.new("BallSocketConstraint")
  71.             local a1 = Instance.new("Attachment")
  72.             local a2 = Instance.new("Attachment")
  73.             a1.Parent = char["Left Leg"]
  74.             a2.Parent = char.Torso
  75.             Socket.Parent = char["Left Leg"]
  76.             Socket.Attachment0 = a1
  77.             Socket.Attachment1 = a2
  78.             a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,1,0)
  79.             a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(-0.5,-1,0)
  80. end
  81. function the4()
  82.             local Socket = Instance.new("BallSocketConstraint")
  83.             local a1 = Instance.new("Attachment")
  84.             local a2 = Instance.new("Attachment")
  85.             a1.Parent = char["Right Leg"]
  86.             a2.Parent = char.Torso
  87.             Socket.Parent = char["Right Leg"]
  88.             Socket.Attachment0 = a1
  89.             Socket.Attachment1 = a2
  90.             a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,1,0)
  91.             a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(0.5,-1,0)
  92. end
  93. the()
  94. the2()
  95. the3()
  96. the4()
  97. function s()
  98.             local Socket = Instance.new("BallSocketConstraint")
  99.             local a1 = Instance.new("Attachment")
  100.             local a2 = Instance.new("Attachment")
  101.             a1.Parent = char.Head
  102.             a2.Parent = char.Torso
  103.             Socket.Parent = char.Head
  104.             Socket.Attachment0 = a1
  105.             Socket.Attachment1 = a2
  106.             a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,-0.5,0)
  107.             a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(0,1,0)
  108. end
  109. s()
  110. local density = 1
  111. local friction = 1
  112. local elasticity = 0
  113. local frictionWeight = 100000000000
  114. local elasticityWeight = 10000000000
  115. local physProperties = PhysicalProperties.new(density, friction, elasticity, frictionWeight, elasticityWeight)
  116. for i,v in pairs(owner.Character:GetDescendants()) do
  117. pcall(function()
  118. v.CustomPhysicalProperties = physProperties
  119. end)
  120. end
  121. for i,v in pairs(owner.Character:GetDescendants()) do
  122. if v:IsA("Part") then
  123. local nocollide = Instance.new("NoCollisionConstraint",owner.Character.HumanoidRootPart)
  124. nocollide.Part0 = v
  125. nocollide.Part1 = owner.Character.HumanoidRootPart
  126. end
  127. end
  128. on = false
  129. nocollide2 = Instance.new("NoCollisionConstraint",owner.Character.Torso)
  130. nocollide2.Part0 = limbcollider
  131. nocollide2.Part1 = owner.Character.Torso
  132. nocollide2.Enabled = false
  133. owner.Character.ChildAdded:Connect(function(v)
  134. if v:IsA("Tool") then
  135. on = true
  136. nocollide2.Enabled = true
  137. end
  138. end)
  139. owner.Character.ChildRemoved:Connect(function(v)
  140. if v:IsA("Tool") then
  141. on = false
  142. nocollide2.Enabled = false
  143. end
  144. end)
  145. e = Instance.new("RemoteEvent",owner.Character)
  146. NLS([[
  147. e = script.Parent
  148. game:GetService("RunService").RenderStepped:Connect(function()
  149. e:FireServer(workspace.CurrentCamera.CFrame)
  150. end)
  151. ]],e)
  152. e.OnServerEvent:Connect(function(_,camcf)
  153. bg2.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
  154. bg2.CFrame = bg2.CFrame:Lerp(camcf.Rotation,0.1)
  155. if on then
  156. bg.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
  157. bg.CFrame = bg.CFrame:Lerp(camcf * CFrame.Angles(math.rad(90),0,0),0.1)
  158. elseif not on then
  159. bg.MaxTorque = Vector3.new(0,0,0)
  160. end
  161. end)
  162. while task.wait() do
  163. if owner.Character.Humanoid.MoveDirection ~= Vector3.new(0,0,0) then
  164. owner.Character["Left Leg"]:ApplyAngularImpulse(owner.Character.Humanoid.MoveDirection)
  165. owner.Character["Right Leg"]:ApplyAngularImpulse(owner.Character.Humanoid.MoveDirection)
  166. end
  167. end
Add Comment
Please, Sign In to add comment