SHOW:
|
|
- or go back to the newest paste.
1 | - | local bf = Instance.new("BodyForce", owner.Character.Head) |
1 | + | char = owner.Character |
2 | - | bf.Force = Vector3.new(0,workspace.Gravity * owner.Character.Head:GetMass() * 2,0) |
2 | + | bg = Instance.new("BodyGyro",char["Right Arm"]) |
3 | - | local limbcollider = Instance.new("Part", owner.Character:findFirstChild("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 | - | limbcolliderweld.Part0 = owner.Character:findFirstChild("Right Arm") |
8 | + | local limbcollider = Instance.new("Part", char:findFirstChild("Right Arm")) |
9 | limbcollider.Size = Vector3.new(1.4,1,1) | |
10 | limbcollider.Transparency = 1 | |
11 | - | local limbcollider2 = Instance.new("Part", owner.Character:findFirstChild("Left Arm")) |
11 | + | |
12 | local limbcolliderweld = Instance.new("Weld", limbcollider) | |
13 | limbcolliderweld.Part0 = char:findFirstChild("Right Arm") | |
14 | limbcolliderweld.Part1 = limbcollider | |
15 | limbcollider.Shape = "Cylinder" | |
16 | - | limbcolliderweld2.Part0 = owner.Character:findFirstChild("Left Arm") |
16 | + | |
17 | local limbcollider2 = Instance.new("Part", char:findFirstChild("Left Arm")) | |
18 | limbcollider2.Size = Vector3.new(1.4,1,1) | |
19 | - | local limbcollider3 = Instance.new("Part", owner.Character.Head) |
19 | + | |
20 | - | limbcollider3.Size = Vector3.new(0.5,0.5,0.5) |
20 | + | |
21 | limbcollider2.Shape = "Cylinder" | |
22 | local limbcolliderweld2 = Instance.new("Weld", limbcollider2) | |
23 | limbcolliderweld2.Part0 = char:findFirstChild("Left Arm") | |
24 | limbcolliderweld2.Part1 = limbcollider2 | |
25 | - | limbcolliderweld.Part0 = owner.Character.Head |
25 | + | |
26 | local limbcollider3 = Instance.new("Part", char.Head) | |
27 | limbcollider3.Size = Vector3.new(0.75,0.75,0.75) | |
28 | - | for i,v in pairs(owner.Character:GetDescendants()) do |
28 | + | |
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 | - | a1.Parent = owner.Character["Left Arm"] |
39 | + | if v.Name ~= "RootJoint" then |
40 | - | a2.Parent = owner.Character.Torso |
40 | + | |
41 | - | Socket.Parent = owner.Character["Left Arm"] |
41 | + | |
42 | end | |
43 | end) | |
44 | end | |
45 | function the() | |
46 | local Socket = Instance.new("BallSocketConstraint") | |
47 | - | function the5() |
47 | + | |
48 | local a2 = Instance.new("Attachment") | |
49 | a1.Parent = char["Left Arm"] | |
50 | a2.Parent = char.Torso | |
51 | - | a1.Parent = owner.Character["Left Leg"] |
51 | + | Socket.Parent = char["Left Arm"] |
52 | - | a2.Parent = owner.Character.Torso |
52 | + | |
53 | - | Socket.Parent = owner.Character["Left Leg"] |
53 | + | |
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 | - | a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,0.75,0) |
56 | + | |
57 | - | a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(-0.5,-1.25,0) |
57 | + | |
58 | local Socket = Instance.new("BallSocketConstraint") | |
59 | - | function the6() |
59 | + | |
60 | local a2 = Instance.new("Attachment") | |
61 | a1.Parent = char["Right Arm"] | |
62 | a2.Parent = char.Torso | |
63 | - | a1.Parent = owner.Character["Right Leg"] |
63 | + | Socket.Parent = char["Right Arm"] |
64 | - | a2.Parent = owner.Character.Torso |
64 | + | |
65 | - | Socket.Parent = owner.Character["Right Leg"] |
65 | + | |
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 | - | a1.WorldCFrame = a1.Parent.CFrame * CFrame.new(0,0.75,0) |
68 | + | |
69 | - | a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(0.5,-1.25,0) |
69 | + | |
70 | - | local limbcollider = Instance.new("Part", owner.Character:findFirstChild("Right Leg")) |
70 | + | |
71 | local a1 = Instance.new("Attachment") | |
72 | local a2 = Instance.new("Attachment") | |
73 | a1.Parent = char["Left Leg"] | |
74 | a2.Parent = char.Torso | |
75 | - | limbcolliderweld.Part0 = owner.Character:findFirstChild("Right Leg") |
75 | + | Socket.Parent = char["Left Leg"] |
76 | Socket.Attachment0 = a1 | |
77 | Socket.Attachment1 = a2 | |
78 | - | local limbcollider2 = Instance.new("Part", owner.Character:findFirstChild("Left Leg")) |
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 | - | limbcolliderweld2.Part0 = owner.Character:findFirstChild("Left Leg") |
83 | + | |
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 | - | a1.Parent = owner.Character.HumanoidRootPart |
91 | + | a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(0.5,-1,0) |
92 | - | a2.Parent = owner.Character.Torso |
92 | + | |
93 | - | Socket.Parent = owner.Character.HumanoidRootPart |
93 | + | |
94 | the2() | |
95 | the3() | |
96 | - | a1.WorldCFrame = a1.Parent.CFrame |
96 | + | |
97 | - | a2.WorldCFrame = a1.Parent.CFrame |
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 | - | a1.Parent = owner.Character.Head |
103 | + | Socket.Parent = char.Head |
104 | - | a2.Parent = owner.Character.Torso |
104 | + | |
105 | - | Socket.Parent = owner.Character.Head |
105 | + | |
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 | - | a2.WorldCFrame = a2.Parent.CFrame * CFrame.new(0,1.0625,0) |
109 | + | s() |
110 | - | Socket.TwistLimitsEnabled = true |
110 | + | |
111 | - | Socket.LimitsEnabled = true |
111 | + | |
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 | - | a1.Parent = owner.Character["Right Arm"] |
117 | + | |
118 | - | a2.Parent = owner.Character.Torso |
118 | + | |
119 | - | Socket.Parent = owner.Character["Right Arm"] |
119 | + | |
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 | - | the5() |
129 | + | nocollide2 = Instance.new("NoCollisionConstraint",owner.Character.Torso) |
130 | - | the6() |
130 | + | nocollide2.Part0 = limbcollider |
131 | - | owner.Character.Humanoid.RequiresNeck = false |
131 | + | nocollide2.Part1 = owner.Character.Torso |
132 | - | H = Instance.new("Sound",owner.Character.Head) |
132 | + | nocollide2.Enabled = false |
133 | - | H.SoundId = "rbxassetid://2101700076" |
133 | + | owner.Character.ChildAdded:Connect(function(v) |
134 | - | H.Volume = 2 |
134 | + | if v:IsA("Tool") then |
135 | - | H.Looped = true |
135 | + | on = true |
136 | - | game:GetService("RunService").Heartbeat:Connect(function() |
136 | + | nocollide2.Enabled = true |
137 | - | if owner.Character.Humanoid.MoveDirection == Vector3.new(0,0,0) then |
137 | + | |
138 | - | H:Stop() |
138 | + | |
139 | - | owner.Character.Humanoid.WalkSpeed = 5 |
139 | + | owner.Character.ChildRemoved:Connect(function(v) |
140 | - | elseif owner.Character.Humanoid.MoveDirection ~= Vector3.new(0,0,0) then |
140 | + | if v:IsA("Tool") then |
141 | - | if not H.IsPlaying then |
141 | + | on = false |
142 | - | H:Play() |
142 | + | nocollide2.Enabled = false |
143 | end | |
144 | - | owner.Character.Humanoid.WalkSpeed = owner.Character.Humanoid.WalkSpeed + 0.5 |
144 | + | |
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 | - | local elasticityWeight = 0 |
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 |