Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game:GetService("Players")
- local lplr = player.LocalPlayer
- if lplr.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
- if lplr.Character:FindFirstChild("Torso") then
- torso = lplr.Character.Torso
- else
- torso = lplr.Character.UpperTorso
- end
- local CapeP = Instance.new("Part", torso.Parent)
- CapeP.Name = "Cape"
- CapeP.Anchored = false
- CapeP.CanCollide = false
- CapeP.TopSurface = 0
- CapeP.BottomSurface = 0
- CapeP.Color = Color3.fromRGB(34,34,34)
- CapeP.FormFactor = "Custom"
- CapeP.Size = Vector3.new(0.2,0.2,0.2)
- local decal = Instance.new("Decal", CapeP)
- decal.Texture = "rbxthumb://type=Asset&id=9879986954&w=150&h=150"
- decal.Face = "Back"
- local msh = Instance.new("BlockMesh", CapeP)
- msh.Scale = Vector3.new(9,17.5,0.5)
- local motor = Instance.new("Motor", CapeP)
- motor.Part0 = CapeP
- motor.Part1 = torso
- motor.MaxVelocity = 0.01
- motor.C0 = CFrame.new(0,1.75,0) * CFrame.Angles(0,math.rad(90),0)
- motor.C1 = CFrame.new(0,1,0.45) * CFrame.Angles(0,math.rad(90),0)
- local wave = false
- repeat wait(1/44)
- decal.Transparency = torso.Transparency
- local ang = 0.1
- local oldmag = torso.Velocity.magnitude
- local mv = 0.002
- if wave then
- ang = ang + ((torso.Velocity.magnitude/10) * 0.05) + 0.05
- wave = false
- else
- wave = true
- end
- ang = ang + math.min(torso.Velocity.magnitude/11, 0.5)
- motor.MaxVelocity = math.min((torso.Velocity.magnitude/111), 0.04) + mv
- motor.DesiredAngle = -ang
- if motor.CurrentAngle < -0.2 and motor.DesiredAngle > -0.2 then
- motor.MaxVelocity = 0.04
- end
- repeat wait() until motor.CurrentAngle == motor.DesiredAngle or math.abs(torso.Velocity.magnitude - oldmag) >= (torso.Velocity.magnitude/10) + 1
- if torso.Velocity.magnitude < 0.1 then
- wait(0.1)
- end
- until not CapeP or CapeP.Parent ~= torso.Parent
- end
- end)
Add Comment
Please, Sign In to add comment