· 6 years ago · Nov 24, 2019, 11:38 PM
1--3DMG Made by Syharaa
2--Hopefully someone can learn from this and grasp an idea of how most Gears are made
3--No double hook feature
4--Very basic for educational purposes, feel free to expand on it
5--NOTE: The CameraShaker Module can be retrieved here: https://www.roblox.com/library/1461025953/Camera-Shaker
6--[[Extra NOTE: You may need a solid grasp with the ROBLOX Engine and Lua itself to be able to comprehend some of this and link things together.]]
7
8--//ModuleScript[API]
9local API = {}
10local mt = {__index = API}
11
12local TweenService = game:GetService("TweenService")
13local Variables = require(script.Parent:FindFirstChild("GlobalVariables"))
14local CamShaker = require(script.Parent:FindFirstChild("CameraShaker"))
15
16local GrappleSpeed = 270
17local VelocitySpeed = 125
18local DriftSpeed = 100
19 --//Objects\\--
20API.new = function(Camera, Character, Gear, Mouse)
21 local self = {}
22 setmetatable(self, mt)
23 self.Character = Character
24 self.Humanoid = self.Character:WaitForChild("Humanoid")
25 self.Camera = Camera
26 self.Gear = Gear
27 self.Mouse = Mouse
28 self.Animations = self.Gear:WaitForChild("Animation")
29 self.AnimTable = {}
30
31 self.Exhaust = self.Gear:FindFirstChild("Back"):FindFirstChild("Meshes/3dmgbase").Exhaust.ParticleEmitter
32 self.HookRight = self.Gear:FindFirstChild("Thruster1").HookStart
33 self.HookLeft = self.Gear:FindFirstChild("Thruster2").HookStart
34
35 self.PlayerVelocity = self:CreateVelocity(self.Character.HumanoidRootPart, 0, 0, Vector3.new(), "PlayerVelocity")
36 self.PlayerGyro = self:CreateGyro(self.Character.HumanoidRootPart, 0, 0, 0, CFrame.new(), "PlayerGyro")
37 self.PlayerInertia = self:CreateForce(self.Character.HumanoidRootPart)
38
39 for i,v in pairs(self.Animations:GetChildren()) do
40 self.AnimTable[v.Name] = Character.Humanoid:LoadAnimation(v)
41 end
42 self.Humanoid.WalkSpeed = 10
43 workspace.Gravity = workspace.Gravity/1.3
44 return self
45end
46
47function API:CreateGrapple(CF)
48 local Grapple = Instance.new("Part")
49 Grapple.Anchored = true
50 Grapple.CanCollide = false
51 Grapple.Size = Vector3.new(0.15,0.15,0.15)
52 Grapple.CFrame = CF
53 Grapple.Parent = self.Gear:FindFirstChild("Debris")
54 Grapple.Transparency = 0
55 Grapple.Name = "Grapple"
56
57 self:CreateAttachment(Grapple)
58
59 return Grapple
60end
61
62function API:CreateRope(A1, A2, Object)
63 local Rope = Instance.new("Beam")
64 Rope.TextureLength = 4
65 Rope.LightInfluence = 1
66 Rope.TextureMode = Enum.TextureMode.Stretch
67 Rope.TextureSpeed = 0
68 Rope.Transparency = NumberSequence.new(0)
69 Rope.Segments = 10
70 Rope.FaceCamera = true
71 Rope.Width0 = 1
72 Rope.Width1 = 1
73 Rope.Texture = "rbxassetid://3629489460"
74 Rope.Attachment0 = A1
75 Rope.Attachment1 = A2
76 Rope.Parent = Object
77 Rope.Name = "Rope"
78 return Rope
79end
80
81function API:CreateVelocity(Object, Power, Force, Vector, Name)
82 local Velocity = Instance.new("BodyVelocity")
83 Velocity.P = Power
84 Velocity.MaxForce = Vector3.new(Force, Force, Force)
85 Velocity.Parent = Object
86 Velocity.Velocity = Vector
87 Velocity.Name = Name or "BodyVelocity"
88 return Velocity
89end
90
91function API:CreateForce(Object)
92 local BForce = Instance.new("BodyForce")
93 BForce.Force = Vector3.new()
94 BForce.Parent = Object
95 return BForce
96end
97
98function API:CreateGyro(Object, D, Torque, P, CF, Name)
99 local Gyro = Instance.new("BodyGyro")
100 Gyro.D = D
101 Gyro.MaxTorque = Vector3.new(Torque, Torque, Torque)
102 Gyro.P = P
103 Gyro.CFrame = CF
104 Gyro.Name = Name or "BodyGyro"
105 Gyro.Parent = Object
106 return Gyro
107end
108
109function API:CreateAttachment(Object)
110 local Attachment = Instance.new("Attachment")
111 Attachment.Parent = Object
112 return nil
113end
114
115 --//Functions\\--
116
117function API:SetVelocity(PW, F, Vector)
118 local TweenPower = TweenService:Create(self.PlayerVelocity, TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {P = PW})
119 local TweenVelocity = TweenService:Create(self.PlayerVelocity, TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {Velocity = Vector})
120 local TweenForce = TweenService:Create(self.PlayerVelocity, TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {MaxForce = Vector3.new(F, F, F)})
121 TweenPower:Play()
122 TweenForce:Play()
123 if Vector then
124 TweenVelocity:Play()
125 end
126end
127
128function API:SetVelocityNIL()
129 local TweenPower = TweenService:Create(self.PlayerVelocity, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {P = 0})
130 local TweenVelocity = TweenService:Create(self.PlayerVelocity, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {Velocity = Vector3.new()})
131 local TweenForce = TweenService:Create(self.PlayerVelocity, TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {MaxForce = Vector3.new()})
132
133 TweenForce:Play()
134 TweenPower:Play()
135 TweenVelocity:Play()
136end
137
138
139function API:SetGyro(Dampening, Power, Torque, CF)
140 self.PlayerGyro.MaxTorque = Vector3.new(Torque, Torque, Torque)
141 self.PlayerGyro.P = Power
142 self.PlayerGyro.D = Dampening
143 if CF then
144 self.PlayerGyro.CFrame = CF
145 end
146
147end
148
149function API:SetInertia()
150 self.PlayerInertia.Force = self.Character.HumanoidRootPart.CFrame.LookVector * 4600
151end
152
153function API:UpdateGyroLeft()
154 if Variables["ODMG"]["isLeftHooked"] and Variables["ODMG"]["isRightHooked"] == false then
155 self:SetGyro(550, 2e4, 2e4, CFrame.new(self.Character.HumanoidRootPart.Position, self.LeftGrapple.Position))
156 self.Character.Humanoid.AutoRotate = false
157 elseif Variables["ODMG"]["isLeftHooked"] == false and Variables["ODMG"]["isRightHooked"] ~= true then
158 self:SetGyro(0, 0, 0)
159 self.Character.Humanoid.AutoRotate = true
160 end
161end
162
163function API:UpdateGyroRight()
164 if Variables["ODMG"]["isRightHooked"] and Variables["ODMG"]["isLeftHooked"] == false then
165 self:SetGyro(550, 2e4, 2e4, CFrame.new(self.Character.HumanoidRootPart.Position, self.RightGrapple.Position))
166 self.Character.Humanoid.AutoRotate = false
167 elseif Variables["ODMG"]["isRightHooked"] == false and Variables["ODMG"]["isLeftHooked"] ~= true then
168 self:SetGyro(0, 0, 0)
169 self.Character.Humanoid.AutoRotate = true
170 end
171end
172
173function API:UpdateGas()
174 if Variables["ODMG"]["Gas"] then
175 self.Exhaust.Enabled = true
176 elseif Variables["ODMG"]["Gas"] == false then
177 self.Exhaust.Enabled = false
178 end
179end
180
181function API:UpdateVelocity(dt)
182-- local CShake = self:ShakeCamera()
183 if Variables["ODMG"]["isLeftHooked"] then
184 local Tween = TweenService:Create(self.Camera, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {FieldOfView = 120})
185 Tween:Play()
186 Variables["ODMG"]["Gas"] = true
187 --CShake:Start()
188 --CShake:Shake(CamShaker.Presets.Bump)
189 if Variables["ODMG"]["isPressingA"] then
190 self:SetVelocity(3e4, 1e5, (-self.Character.HumanoidRootPart.CFrame.rightVector + (self.Character.HumanoidRootPart.CFrame.lookVector/2))*DriftSpeed)
191 self:SetInertia()
192 elseif Variables["ODMG"]["isPressingD"] then
193 self:SetVelocity(3e4, 1e5, (self.Character.HumanoidRootPart.CFrame.rightVector + (self.Character.HumanoidRootPart.CFrame.lookVector/2))*DriftSpeed)
194 self:SetInertia()
195 else
196 self:SetVelocity(3e4, 1e5, ((self.LeftGrapple.Position - self.Character.HumanoidRootPart.Position).unit)*VelocitySpeed)
197 self:SetInertia()
198 end
199 elseif Variables["ODMG"]["isRightHooked"] then
200 -- CShake:Start()
201 --CShake:Shake(CamShaker.Presets.Bump)
202 local Tween = TweenService:Create(self.Camera, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {FieldOfView = 120})
203 Tween:Play()
204 Variables["ODMG"]["Gas"] = true
205 if Variables["ODMG"]["isPressingA"] then
206 self:SetVelocity(3e4, 1e5, (-self.Character.HumanoidRootPart.CFrame.rightVector + (self.Character.HumanoidRootPart.CFrame.lookVector/2))*DriftSpeed)
207 self:SetInertia()
208 elseif Variables["ODMG"]["isPressingD"] then
209 self:SetVelocity(3e4, 1e5, (self.Character.HumanoidRootPart.CFrame.rightVector + (self.Character.HumanoidRootPart.CFrame.lookVector/2))*DriftSpeed)
210 self:SetInertia()
211 else
212 self:SetVelocity(3e4, 1e5, ((self.RightGrapple.Position - self.Character.HumanoidRootPart.Position).unit)*VelocitySpeed)
213 self:SetInertia()
214 end
215 end
216end
217
218function API:UpdateNoVelocity(dt)
219 if Variables["ODMG"]["isLeftHooked"] == false and Variables["ODMG"]["isRightHooked"] then
220 elseif Variables["ODMG"]["isRightHooked"] == false and Variables["ODMG"]["isLeftHooked"] then
221 else
222 local Tween = TweenService:Create(self.Camera, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {FieldOfView = 70})
223 Tween:Play()
224 Variables["ODMG"]["Gas"] = false
225 self:SetVelocityNIL()
226 self:SetInertia()
227 end
228end
229 --//LeftSide\\--
230
231function API:LeftUpdate()
232 --//If the Player is pressing Q
233 if Variables["ODMG"]["isPressingQ"] and self.Mouse.Target and (self.Mouse.Hit.Position - self.Character.HumanoidRootPart.Position).magnitude <= 300 then
234 --//We check to see if the grapple is hooked to make sure that it doesnt tween when it's already hooked
235 if Variables["ODMG"]["isLeftHooked"] == false then
236 --//this is to be sure that it doesn't tween when it's already tweening
237 if Variables["ODMG"]["leftInMotion"] == false then
238 --//Passed all the checks, we can now fire the hook and tween it
239 Variables["ODMG"]["leftInMotion"] = true
240 self.LeftGrapple = self:CreateGrapple(self.HookLeft.CFrame * CFrame.new(Vector3.new(-0.5, 0, 0), Vector3.new()))
241 local Rope = self:CreateRope(self.LeftGrapple.Attachment, self.HookLeft.Attachment, self.LeftGrapple)
242 local Tween = TweenService:Create(self.LeftGrapple, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), {Position = self.Mouse.Hit.Position})
243 Tween:Play()
244 Tween.Completed:Connect(function()
245 Variables["ODMG"]["leftInMotion"] = false
246 Variables["ODMG"]["isLeftHooked"] = true
247 Rope.TextureLength = 0
248 end)
249 end
250 end
251
252 --//If the player isn't pressing Q then
253 elseif Variables["ODMG"]["isPressingQ"] == false then
254 --//Check to see if the Thing is hooked so we can retract, if yes retract
255 if Variables["ODMG"]["isLeftHooked"] then
256 Variables["ODMG"]["isLeftHooked"] = false
257 Variables["ODMG"]["RetractLeftHook"] = true
258
259 --//Check to see if it's moving to retract
260 elseif Variables["ODMG"]["leftInMotion"] then
261 Variables["ODMG"]["leftInMotion"] = false
262 Variables["ODMG"]["RetractLeftHook"] = true
263 end
264 end
265end
266
267function API:RetractLeftHook()
268 wait(0.05)
269 if Variables["ODMG"]["RetractLeftHook"] then
270 Variables["ODMG"]["RetractLeftHook"] = false
271 local Pos = self.HookLeft.Position
272 local Tween = TweenService:Create(self.LeftGrapple, TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {Position = Pos})
273 if self.LeftGrapple and self.LeftGrapple.Rope then
274 self.LeftGrapple.Rope.TextureLength = 4
275 Tween:Play()
276 self.LeftGrapple:Destroy()
277 else
278 self.LeftGrapple:Destroy()
279 end
280 end
281end
282
283 --//RightSide\\--
284
285function API:RightUpdate()
286 --//If the Player is pressing E
287 if Variables["ODMG"]["isPressingE"] and self.Mouse.Target and (self.Mouse.Hit.Position - self.Character.HumanoidRootPart.Position).magnitude <= 300 then
288 --//We check to see if the grapple is hooked to make sure that it doesnt tween when it's already hooked
289 if Variables["ODMG"]["isRightHooked"] == false then
290 --//this is to be sure that it doesn't tween when it's already tweening
291 if Variables["ODMG"]["rightInMotion"] == false then
292 --//Passed all the checks, we can now fire the hook and tween it
293 Variables["ODMG"]["rightInMotion"] = true
294 self.RightGrapple = self:CreateGrapple(self.HookRight.CFrame * CFrame.new(Vector3.new(-0.5, 0, 0), Vector3.new()))
295 local Rope = self:CreateRope(self.RightGrapple.Attachment, self.HookRight.Attachment, self.RightGrapple)
296 local Tween = TweenService:Create(self.RightGrapple, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), {Position = self.Mouse.Hit.Position})
297 Tween:Play()
298 Tween.Completed:Connect(function()
299 Variables["ODMG"]["rightInMotion"] = false
300 Variables["ODMG"]["isRightHooked"] = true
301 Rope.TextureLength = 0
302 end)
303 end
304 end
305
306 --//If the player isn't pressing E then
307 elseif Variables["ODMG"]["isPressingE"] == false then
308 --//Check to see if the Thing is hooked so we can retract, if yes retract
309 if Variables["ODMG"]["isRightHooked"] then
310 Variables["ODMG"]["isRightHooked"] = false
311 Variables["ODMG"]["RetractRightHook"] = true
312
313 --//Check to see if it's moving to retract
314 elseif Variables["ODMG"]["rightInMotion"] then
315 Variables["ODMG"]["rightInMotion"] = false
316 Variables["ODMG"]["RetractRightHook"] = true
317 end
318 end
319end
320
321function API:RetractRightHook()
322 wait(0.05)
323 if Variables["ODMG"]["RetractRightHook"] then
324 Variables["ODMG"]["RetractRightHook"] = false
325 local Pos = self.HookRight.Position
326 local Tween = TweenService:Create(self.RightGrapple, TweenInfo.new(0.15, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {Position = Pos})
327 local Rope = self.RightGrapple:FindFirstChild("Rope")
328 Rope.TextureLength = 4
329 Tween:Play()
330 self.RightGrapple:Destroy()
331 end
332end
333
334
335function API:UpdateAnim()
336 if Variables["ODMG"]["isRightHooked"] or Variables["ODMG"]["isLeftHooked"] then
337 self.AnimTable["Fly"]:Play()
338 elseif not Variables["ODMG"]["isRightHooked"] or not Variables["ODMG"]["isLeftHooked"] then
339 if self.AnimTable["Fly"].IsPlaying then
340 self.AnimTable["Fly"]:Stop()
341 end
342 end
343end
344
345function API:ShakeCamera()
346 return CamShaker.new(Enum.RenderPriority.Camera.Value, function(CFrame)
347 self.Camera.CFrame = self.Camera.CFrame * CFrame
348 end)
349end
350
351return API
352
353--//ModuleScript[End]
354
355--//ModuleScript[GlobalVariables]
356local variables = {}
357
358variables["ODMG"] = {
359 --//Key Variables
360 ["isPressingE"] = false;
361 ["isPressingQ"] = false;
362 ["isPressingA"] = false;
363 ["isPressingD"] = false;
364 ["isPressingF"] = false;
365
366 --//State Variables
367 ["isLeftHooked"] = false;
368 ["isRightHooked"] = false;
369 ["isBothHooked"] = false;
370 ["leftInMotion"] = false;
371 ["rightInMotion"] = false;
372 ["bothInMotion"] = false;
373
374 ["RetractLeftHook"] = false;
375 ["RetractRightHook"] = false;
376
377 ["Gas"] = false;
378
379 ["isRunning"] = false;
380
381}
382
383variables["Anims"] = {
384 ["OrbitLeft"] = false;
385 ["OrbitRight"] = false;
386 ["Flying"] = false;
387 }
388--//ModuleScript[End]
389
390--//LocalScript[Controller]
391local Player = game.Players.LocalPlayer
392local Character = Player.Character or Player.CharacterAdded:Wait()
393local Mouse = Player:GetMouse()
394local Camera = workspace.CurrentCamera
395
396local Gear = Character:WaitForChild("3DMG")
397
398local Storage = game.ReplicatedStorage
399local Mechanism = require(Storage.Scripts:WaitForChild("Mechanism")).new(Camera, Character, Gear, Mouse)
400local Variables = require(Storage.Scripts:WaitForChild("GlobalVariables"))
401
402local RunService = game["Run Service"]
403local ActionService = game["ContextActionService"]
404local TweenService = game["TweenService"]
405local InputService = game:GetService("UserInputService")
406
407
408--//Gear Stuff
409local function KeyInput1(name, state, object)
410 if state == Enum.UserInputState.Begin then
411 if Variables["ODMG"]["isPressingE"] == false then
412 Variables["ODMG"]["isPressingQ"] = true
413 end
414 elseif state == Enum.UserInputState.End then
415 Variables["ODMG"]["isPressingQ"] = false
416 end
417 return Enum.ContextActionResult.Pass
418end
419
420local function KeyInput2(name, state, object)
421 if state == Enum.UserInputState.Begin then
422 if Variables["ODMG"]["isPressingQ"] == false then
423 Variables["ODMG"]["isPressingE"] = true
424 end
425 elseif state == Enum.UserInputState.End then
426 Variables["ODMG"]["isPressingE"] = false
427 end
428 return Enum.ContextActionResult.Pass
429end
430
431local function KeyInput3(name, state, object)
432 if state == Enum.UserInputState.Begin then
433 Variables["ODMG"]["isPressingD"] = true
434 elseif state == Enum.UserInputState.End then
435 Variables["ODMG"]["isPressingD"] = false
436 end
437 return Enum.ContextActionResult.Pass
438end
439
440local function KeyInput4(name, state, object)
441 if state == Enum.UserInputState.Begin then
442 Variables["ODMG"]["isPressingA"] = true
443 elseif state == Enum.UserInputState.End then
444 Variables["ODMG"]["isPressingA"] = false
445 end
446 return Enum.ContextActionResult.Pass
447end
448
449
450ActionService:BindAction("LeftHook", KeyInput1, false, Enum.KeyCode.Q)
451ActionService:BindAction("RightHook", KeyInput2, false, Enum.KeyCode.E)
452ActionService:BindAction("DriftRight", KeyInput3, false, Enum.KeyCode.D)
453ActionService:BindAction("DriftLeft", KeyInput4, false, Enum.KeyCode.A)
454
455
456--//Sprinting
457local Pressed = false
458local isSprinting = false
459local Time = tick()
460InputService.InputBegan:Connect(function(obj, gps)
461 if not Variables["ODMG"]["isLeftHooked"] and not Variables["ODMG"]["isRightHooked"] then
462 if not gps and obj.KeyCode == Enum.KeyCode.W then
463 if math.abs((tick() - Time)) <= 0.5 then
464 isSprinting = true
465 Mechanism.Humanoid.WalkSpeed = 35
466 Mechanism.AnimTable["Run"]:Play()
467 end
468 end
469 Time = tick()
470 end
471end)
472
473Mechanism.Humanoid.Running:Connect(function(Speed)
474 if Speed < 1 and isSprinting then
475 isSprinting = false
476 Mechanism.Humanoid.WalkSpeed = 10
477 Mechanism.AnimTable["Run"]:Stop()
478 end
479end)
480
481--//Orbiting Anims
482InputService.InputBegan:Connect(function(obj, gps)
483 if not gps and obj.KeyCode == Enum.KeyCode.D then
484 if Variables["ODMG"]["isLeftHooked"] or Variables["ODMG"]["isRightHooked"] then
485 Mechanism.AnimTable["OrbitRight"]:AdjustSpeed(0.5)
486 Mechanism.AnimTable["OrbitRight"]:Play()
487 end
488 end
489end)
490
491
492InputService.InputBegan:Connect(function(obj, gps)
493 if not gps and obj.KeyCode == Enum.KeyCode.A then
494 if Variables["ODMG"]["isLeftHooked"] or Variables["ODMG"]["isRightHooked"] then
495 Mechanism.AnimTable["OrbitLeft"]:AdjustSpeed(0.5)
496 Mechanism.AnimTable["OrbitLeft"]:Play()
497 end
498 end
499end)
500
501
502--/Events
503RunService.Stepped:Connect(function()
504 Mechanism:LeftUpdate()
505 Mechanism:RightUpdate()
506
507end)
508RunService.Stepped:Connect(function(dt)
509 Mechanism:UpdateVelocity(dt)
510 Mechanism:UpdateNoVelocity(dt)
511 Mechanism:UpdateGyroLeft()
512 Mechanism:UpdateGyroRight()
513 Mechanism:UpdateGas()
514 Mechanism:UpdateAnim()
515
516 Mechanism:RetractLeftHook()
517 Mechanism:RetractRightHook()
518end)
519--//LocalScript[End]
520
521--//ServerScript
522local ReplicatedStorage = game.ReplicatedStorage
523local WeldConstraint = require(ReplicatedStorage.Scripts.Weld)
524local Gear = ReplicatedStorage.Gear:WaitForChild("3DMG")
525
526game.Players.PlayerAdded:Connect(function(player)
527 player.CharacterAdded:Connect(function(Char)
528 local GearClone = Gear:Clone()
529 local Sword = GearClone.Weapons.Sword
530 local Sword1 = GearClone.Weapons.Sword1
531
532 local Torso = Char:FindFirstChild("Torso")
533 local LeftArm = Char:FindFirstChild("Left Arm")
534 local RightArm = Char:FindFirstChild("Right Arm")
535 GearClone.Parent = Char
536
537 local GearConstraint = WeldConstraint.new(Torso, GearClone.PrimaryPart)
538 GearClone.PrimaryPart.Position = Torso.Position + Vector3.new(0, -0.85, -1.15)
539
540 local SwordConstraint = WeldConstraint.new(LeftArm, Sword.PrimaryPart)
541 local SwordConstraint1 = WeldConstraint.new(RightArm, Sword1.PrimaryPart)
542 Sword.PrimaryPart.Position = LeftArm.Position + Vector3.new(0, -LeftArm.Size.Y/2, 0)
543 Sword1.PrimaryPart.Position = RightArm.Position + Vector3.new(0, -RightArm.Size.Y/2, 0)
544 end)
545end)
546--//ServerScript[End]