Advertisement
Guest User

Baseball Bat Script Fe

a guest
Jul 25th, 2022
3,134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.59 KB | None | 0 0
  1.  
  2. --script by Astromnite :cool:
  3. --Hat Required: roblox.com/catalog/7063113820/Aluminium-Baseball-Bat
  4. clickfling = false -- set this to false if u dont want click fling or use torso fling
  5.  
  6. function rmesh(a)
  7. if not (workspace[game.Players.LocalPlayer.Name][a].Handle:FindFirstChild('Mesh') or workspace[game.Players.LocalPlayer.Name][a].Handle:FindFirstChild('SpecialMesh')) then return end
  8. old=game.Players.LocalPlayer.Character
  9. game.Players.LocalPlayer.Character=workspace[game.Players.LocalPlayer.Name]
  10. for i,v in next, workspace[game.Players.LocalPlayer.Name]:FindFirstChild(a).Handle:GetDescendants() do
  11. if v:IsA('Mesh') or v:IsA('SpecialMesh') then
  12. v:Remove()
  13. end
  14. end
  15. for i = 1 , 2 do
  16. game.Players.LocalPlayer.Character=old
  17. end
  18. end
  19.  
  20. a=game.Players.LocalPlayer b=game.Players.LocalPlayer.Character c={}d=table.insert e=false for D,E in next,game:GetService("Players").LocalPlayer.Character:GetDescendants()do if E:IsA("BasePart")then d(c,game:GetService("RunService").Heartbeat:connect(function()pcall(function()E.Velocity=Vector3.new(-30,0,0)sethiddenproperty(game.Players.LocalPlayer,"MaximumSimulationRadius",math.huge)sethiddenproperty(game.Players.LocalPlayer,"SimulationRadius",999999999)game.Players.LocalPlayer.ReplicationFocus=workspace end)end))end end function f(D,E,F)game.StarterGui:SetCore("SendNotification",{Title=D;Text=E;Duration=F or 5;})end local x=game:GetService("RunService")g=Instance.new('Folder',b)g.Name='CWExtra'b.Archivable=true local y=b:Clone()y.Name='NexoPD'for D,E in next,y:GetDescendants()do if E:IsA('BasePart')or E:IsA('Decal')then E.Transparency=1 end end h=5.65 a.Character=nil a.Character=b b.Humanoid.AutoRotate=false b.Humanoid.WalkSpeed=0 b.Humanoid.JumpPower=0 b.Torso.Anchored=true f('FE Bat by Kasy','Loading...\nPlease wait '..h..' seconds.')wait(h)b.Torso.Anchored=false f('FE Bat by Kasy','Loaded..')b.Humanoid.Health=0 y.Animate.Disabled=true y.Parent=g y.HumanoidRootPart.CFrame=b.HumanoidRootPart.CFrame*CFrame.new(0,5,0)function i(D,E,F,G)Instance.new("Attachment",D)Instance.new("AlignPosition",D)Instance.new("AlignOrientation",D)Instance.new("Attachment",E)D.Attachment.Name=D.Name E.Attachment.Name=D.Name D.AlignPosition.Attachment0=D[D.Name]D.AlignOrientation.Attachment0=D[D.Name]D.AlignPosition.Attachment1=E[D.Name]D.AlignOrientation.Attachment1=E[D.Name]E[D.Name].Position=F or Vector3.new()D[D.Name].Orientation=G or Vector3.new()D.AlignPosition.MaxForce=999999999 D.AlignPosition.MaxVelocity=math.huge D.AlignPosition.ReactionForceEnabled=false D.AlignPosition.Responsiveness=math.huge D.AlignOrientation.Responsiveness=math.huge D.AlignPosition.RigidityEnabled=false D.AlignOrientation.MaxTorque=999999999 D.Massless=true end function j(D,E,F)Instance.new("Attachment",D)Instance.new("AlignPosition",D)Instance.new("Attachment",E)D.Attachment.Name=D.Name E.Attachment.Name=D.Name D.AlignPosition.Attachment0=D[D.Name]D.AlignPosition.Attachment1=E[D.Name]E[D.Name].Position=F or Vector3.new()D.AlignPosition.MaxForce=999999999 D.AlignPosition.MaxVelocity=math.huge D.AlignPosition.ReactionForceEnabled=false D.AlignPosition.Responsiveness=math.huge D.Massless=true end for D,E in next,b:GetDescendants()do if E:IsA('BasePart')then d(c,x.RenderStepped:Connect(function()E.CanCollide=false end))end end for D,E in next,b:GetDescendants()do if E:IsA('BasePart')then d(c,x.Stepped:Connect(function()E.CanCollide=false end))end end for D,E in next,y:GetDescendants()do if E:IsA('BasePart')then d(c,x.RenderStepped:Connect(function()E.CanCollide=false end))end end for D,E in next,y:GetDescendants()do if E:IsA('BasePart')then d(c,x.Stepped:Connect(function()E.CanCollide=false end))end end for D,E in next,b:GetDescendants()do if E:IsA('Accessory')then i(E.Handle,y[E.Name].Handle)end end i(b['Head'],y['Head'])i(b['Torso'],y['Torso'])j(b['HumanoidRootPart'],y['Torso'],Vector3.new(0,0,0))i(b['Right Arm'],y['Right Arm'])i(b['Left Arm'],y['Left Arm'])i(b['Right Leg'],y['Right Leg'])i(b['Left Leg'],y['Left Leg'])k=a:GetMouse()local z=Instance.new("Part",g)z.CanCollide=false z.Transparency=1 d(c,x.RenderStepped:Connect(function()local D=workspace.CurrentCamera.CFrame.lookVector local E=y["HumanoidRootPart"]z.Position=E.Position z.CFrame=CFrame.new(z.Position,Vector3.new(D.X*10000,D.Y,D.Z*10000))end))l=false m=false n=false o=false p=false function q(D)r=Instance.new('BodyAngularVelocity',D)r.AngularVelocity=Vector3.new(9e9,9e9,9e9)r.MaxTorque=Vector3.new(9e9,9e9,9e9)end q(b.HumanoidRootPart)k=a:GetMouse()s=Instance.new('BodyPosition',b.HumanoidRootPart)s.P=9e9 s.D=9e9 s.MaxForce=Vector3.new(99999,99999,99999)local A d(c,x.Heartbeat:Connect(function()if A==true then s.Position=k.Hit.p b.HumanoidRootPart.Position=k.Hit.p else s.Position=y.Torso.Position b.HumanoidRootPart.Position=y.Torso.Position end end))local B=Instance.new("SelectionBox")B.Adornee=b.HumanoidRootPart B.LineThickness=0.02 B.Color3=Color3.fromRGB(250,0,0)B.Parent=b.HumanoidRootPart B.Name="RAINBOW"t=B if clickfling then d(c,k.Button1Down:Connect(function()A=true end))d(c,k.Button1Up:Connect(function()A=false end))end d(c,k.KeyDown:Connect(function(D)if D==' 'then p=true end if D=='w'then l=true end if D=='s'then m=true end if D=='a'then n=true end if D=='d'then o=true end end))d(c,k.KeyUp:Connect(function(D)if D==' 'then p=false end if D=='w'then l=false end if D=='s'then m=false end if D=='a'then n=false end if D=='d'then o=false end end))local function C(D,E,F)z.CFrame=z.CFrame*CFrame.new(-D,E,-F)y.Humanoid.WalkToPoint=z.Position end d(c,x.RenderStepped:Connect(function()if l==true then C(0,0,1e4)end if m==true then C(0,0,-1e4)end if n==true then C(1e4,0,0)end if o==true then C(-1e4,0,0)end if p==true then y.Humanoid.Jump=true end if l~=true and n~=true and m~=true and o~=true then y.Humanoid.WalkToPoint=y.HumanoidRootPart.Position end end))workspace.CurrentCamera.CameraSubject=y.Humanoid u=Instance.new('BindableEvent')d(c,u.Event:Connect(function()y:Destroy()e=true v=false for D,E in next,b:GetDescendants()do if E:IsA('BasePart')then E.Anchored=true end end w=b.Humanoid:Clone()b.Humanoid:Destroy()w.Parent=b game.Players:Chat('-re')for D,E in pairs(c)do E:Disconnect()end game:GetService("StarterGui"):SetCore("ResetButtonCallback",true)u:Remove()end))game:GetService("StarterGui"):SetCore("ResetButtonCallback",u)
  21.  
  22. IT = Instance.new
  23. CF = CFrame.new
  24. VT = Vector3.new
  25. RAD = math.rad
  26. C3 = Color3.new
  27. UD2 = UDim2.new
  28. BRICKC = BrickColor.new
  29. ANGLES = CFrame.Angles
  30. EULER = CFrame.fromEulerAnglesXYZ
  31. COS = math.cos
  32. ACOS = math.acos
  33. SIN = math.sin
  34. ASIN = math.asin
  35. ABS = math.abs
  36. MRANDOM = math.random
  37. FLOOR = math.floor
  38.  
  39. speed = 1
  40. sine = 1
  41. srv = game:GetService('RunService')
  42.  
  43. reanim = workspace.Camera.CameraSubject.Parent
  44.  
  45. function hat(h,p,c1,c0,m)
  46. reanim[h].Handle.AccessoryWeld.Part1=reanim[p]
  47. reanim[h].Handle.AccessoryWeld.C1=c1 or CFrame.new()
  48. reanim[h].Handle.AccessoryWeld.C0=reanim[h].Handle.AccessoryWeld.C0:Lerp(c0 or CFrame.new(),1)
  49. if m == true then
  50. rmesh(h)
  51. end
  52. end
  53.  
  54. m=game.Players.LocalPlayer:GetMouse()
  55. RJ = reanim.HumanoidRootPart.RootJoint
  56. RS = reanim.Torso['Right Shoulder']
  57. LS = reanim.Torso['Left Shoulder']
  58. RH = reanim.Torso['Right Hip']
  59. LH = reanim.Torso['Left Hip']
  60. Root = reanim.HumanoidRootPart
  61. NECK = reanim.Torso.Neck
  62. NECK.C0 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  63. NECK.C1 = CF(0,-0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  64. RJ.C1 = CF(0,-1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  65. RJ.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  66. RS.C1 = CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  67. LS.C1 = CF(0,0.5,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  68. RH.C1 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  69. LH.C1 = CF(0,1,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  70. RH.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  71. LH.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  72. RS.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  73. LS.C0 = CF(0,0,0)*ANGLES(RAD(0),RAD(0),RAD(0))
  74.  
  75. Mode='1'
  76. reanim.Humanoid.WalkSpeed = 16
  77. mousechanger=game.Players.LocalPlayer:GetMouse().KeyDown:Connect(function(k)
  78. if k == 'q' then-- first mode
  79. Mode='1'
  80. reanim.Humanoid.WalkSpeed = 16
  81. elseif k == 'e' then-- second mode
  82. Mode='2'
  83. end
  84. end)
  85.  
  86. attacklol=game.Players.LocalPlayer:GetMouse().Button1Down:Connect(function()
  87. Mode='Attack1'
  88. wait(0.1) -- time of attack u can edit this
  89. Mode='Attack2'
  90. wait(0.1)
  91. Mode='Attack3'
  92. wait(0.3)
  93. Mode ='2' -- change this mode to whatever u want the mode to be after attacking
  94. end)
  95. hat('Aluminium Baseball Bat','Torso',CFrame.new(0,0,0),CFrame.new(0+0*math["cos"](sine/10),0+0*math["cos"](sine/10),-0.7+0*math["cos"](sine/10))*CFrame.Angles(math.rad(0+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10)),math.rad(-25+0*math["cos"](sine/10))),false)
  96. coroutine.wrap(function()
  97. while true do -- anim changer
  98. if HumanDied then break end
  99. sine = sine + speed
  100. local rlegray = Ray.new(reanim["Right Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
  101. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  102. local llegray = Ray.new(reanim["Left Leg"].Position + Vector3.new(0, 0.5, 0), Vector3.new(0, -2, 0))
  103. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  104. local rightvector = (Root.Velocity * Root.CFrame.rightVector).X + (Root.Velocity * Root.CFrame.rightVector).Z
  105. local lookvector = (Root.Velocity * Root.CFrame.lookVector).X + (Root.Velocity * Root.CFrame.lookVector).Z
  106. if lookvector > reanim.Humanoid.WalkSpeed then
  107. lookvector = reanim.Humanoid.WalkSpeed
  108. end
  109. if lookvector < -reanim.Humanoid.WalkSpeed then
  110. lookvector = -reanim.Humanoid.WalkSpeed
  111. end
  112. if rightvector > reanim.Humanoid.WalkSpeed then
  113. rightvector = reanim.Humanoid.WalkSpeed
  114. end
  115. if rightvector < -reanim.Humanoid.WalkSpeed then
  116. rightvector = -reanim.Humanoid.WalkSpeed
  117. end
  118. local lookvel = lookvector / reanim.Humanoid.WalkSpeed
  119. local rightvel = rightvector / reanim.Humanoid.WalkSpeed
  120. if Mode == '1' then
  121. reanim.Humanoid.WalkSpeed = 16
  122. if Root.Velocity.y > 1 then -- jump
  123. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  124. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  125. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(20+0*math.cos(sine/10)),math.rad(45+0*math.cos(sine/10))),.2)
  126. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(-20+0*math.cos(sine/10)),math.rad(-45+0*math.cos(sine/10))),.2)
  127. RH.C0=RH.C0:Lerp(CFrame.new(0.5+0*math.cos(sine/10),0+0*math.cos(sine/10),-1+0*math.cos(sine/10))*CFrame.Angles(math.rad(-20+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  128. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),0+0*math.cos(sine/10),-1+0*math.cos(sine/10))*CFrame.Angles(math.rad(-15+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  129. hat('Aluminium Baseball Bat','Torso',CFrame.new(0,0,0),CFrame.new(0+0*math["cos"](sine/10),0+0*math["cos"](sine/10),-0.7+0*math["cos"](sine/10))*CFrame.Angles(math.rad(0+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10)),math.rad(-25+0*math["cos"](sine/10))),false)
  130. elseif Root.Velocity.y < -1 then -- fall
  131. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  132. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  133. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(20+0*math.cos(sine/10)),math.rad(45+0*math.cos(sine/10))),.2)
  134. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(-20+0*math.cos(sine/10)),math.rad(-45+0*math.cos(sine/10))),.2)
  135. RH.C0=RH.C0:Lerp(CFrame.new(0.5+0*math.cos(sine/10),0+0*math.cos(sine/10),-1+0*math.cos(sine/10))*CFrame.Angles(math.rad(-20+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  136. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),0+0*math.cos(sine/10),-1+0*math.cos(sine/10))*CFrame.Angles(math.rad(-15+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  137. hat('Aluminium Baseball Bat','Torso',CFrame.new(0,0,0),CFrame.new(0+0*math["cos"](sine/10),0+0*math["cos"](sine/10),-0.7+0*math["cos"](sine/10))*CFrame.Angles(math.rad(0+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10)),math.rad(-25+0*math["cos"](sine/10))),false)
  138. elseif Root.Velocity.Magnitude < 2 then -- idle
  139. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  140. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0.05*math.sin(sine/50),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  141. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),0.5+0.05*math.sin(sine/50),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  142. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),0.5+0.05*math.sin(sine/50),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  143. RH.C0=RH.C0:Lerp(CFrame.new(0.5+0*math.cos(sine/10),-1+-0.05*math.sin(sine/50),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  144. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),-1+-0.05*math.sin(sine/50),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  145. hat('Aluminium Baseball Bat','Torso',CFrame.new(0,0,0),CFrame.new(0+0*math["cos"](sine/10),0+0*math["cos"](sine/10),-0.7+0*math["cos"](sine/10))*CFrame.Angles(math.rad(0+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10)),math.rad(-25+0*math["cos"](sine/10))),false)
  146. elseif Root.Velocity.Magnitude > 20 then -- run
  147.  
  148. elseif Root.Velocity.Magnitude < 20 then -- walk
  149. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  150. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1.1+-0.1*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(-10+0*math.cos(sine/20)),math.rad(0+5*math.cos(sine/20)),math.rad(0+5*math.cos(sine/20))),.2)
  151. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+-60*math.cos(sine/20)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  152. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+60*math.cos(sine/20)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  153. RH.C0=RH.C0:Lerp(CFrame.new(0.5+0*math.cos(sine/20),-1+-0.2*math.sin(sine/20),0+-0.3*math.cos(sine/20))*CFrame.Angles(math.rad(0+60*math.cos(sine/20)),math.rad(0+0*math.cos(sine/20)),math.rad(0+0*math.cos(sine/20))),.2)
  154. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/20),-1+0.2*math.sin(sine/20),0+0.3*math.cos(sine/20))*CFrame.Angles(math.rad(10+-60*math.cos(sine/20)),math.rad(0+0*math.cos(sine/20)),math.rad(0+0*math.cos(sine/20))),.2)
  155. hat('Aluminium Baseball Bat','Torso',CFrame.new(0,0,0),CFrame.new(0+0*math["cos"](sine/10),0+0*math["cos"](sine/10),-0.7+0*math["cos"](sine/10))*CFrame.Angles(math.rad(0+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10)),math.rad(-25+0*math["cos"](sine/10))),false)
  156. end
  157.  
  158. elseif Mode == '2' then
  159. reanim.Humanoid.WalkSpeed = 35
  160. if Root.Velocity.y > 1 then -- jump
  161. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  162. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  163. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(20+0*math.cos(sine/10)),math.rad(45+0*math.cos(sine/10))),.2)
  164. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(-20+0*math.cos(sine/10)),math.rad(-45+0*math.cos(sine/10))),.2)
  165. RH.C0=RH.C0:Lerp(CFrame.new(0.5+0*math.cos(sine/10),0+0*math.cos(sine/10),-1+0*math.cos(sine/10))*CFrame.Angles(math.rad(-20+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  166. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),0+0*math.cos(sine/10),-1+0*math.cos(sine/10))*CFrame.Angles(math.rad(-15+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  167. hat('Aluminium Baseball Bat','Right Arm',CFrame.new(0,0,0),CFrame.new(0.9+0*math["cos"](sine/10),0.7+0*math["cos"](sine/10),-1+0*math["cos"](sine/10))*CFrame.Angles(math.rad(-90+0*math["cos"](sine/10)),math.rad(45+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10))),false)
  168. elseif Root.Velocity.y < -1 then -- fall
  169. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  170. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  171. RS.C0=RS.C0:Lerp(CFrame.new(1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(20+0*math.cos(sine/10)),math.rad(45+0*math.cos(sine/10))),.2)
  172. LS.C0=LS.C0:Lerp(CFrame.new(-1.5+0*math.cos(sine/10),0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(-20+0*math.cos(sine/10)),math.rad(-45+0*math.cos(sine/10))),.2)
  173. RH.C0=RH.C0:Lerp(CFrame.new(0.5+0*math.cos(sine/10),0+0*math.cos(sine/10),-1+0*math.cos(sine/10))*CFrame.Angles(math.rad(-20+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  174. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),0+0*math.cos(sine/10),-1+0*math.cos(sine/10))*CFrame.Angles(math.rad(-15+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  175. hat('Aluminium Baseball Bat','Right Arm',CFrame.new(0,0,0),CFrame.new(0.9+0*math["cos"](sine/10),0.7+0*math["cos"](sine/10),-1+0*math["cos"](sine/10))*CFrame.Angles(math.rad(-90+0*math["cos"](sine/10)),math.rad(45+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10))),false)
  176. elseif Root.Velocity.Magnitude < 2 then -- idle
  177. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  178. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0.05*math.sin(sine/50),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  179. RS.C0=RS.C0:Lerp(CFrame.new(1+0*math.cos(sine/10),0+0.05*math.sin(sine/50),-0.5+0*math.cos(sine/10))*CFrame.Angles(math.rad(100+0*math.cos(sine/10)),math.rad(13.23+0*math.cos(sine/10)),math.rad(-24.98+0*math.cos(sine/10))),.2)
  180. LS.C0=LS.C0:Lerp(CFrame.new(-0.14+0*math.cos(sine/10),-0.14+0.05*math.sin(sine/50),-0.5+0*math.cos(sine/10))*CFrame.Angles(math.rad(90+0*math.cos(sine/10)),math.rad(20.87+0*math.cos(sine/10)),math.rad(13.23+0*math.cos(sine/10))),.2)
  181. RH.C0=RH.C0:Lerp(CFrame.new(0.5+0*math.cos(sine/10),-1+-0.05*math.sin(sine/50),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  182. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/10),-1+-0.05*math.sin(sine/50),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  183. hat('Aluminium Baseball Bat','Right Arm',CFrame.new(0,0,0),CFrame.new(0.9+0*math["cos"](sine/10),0.7+0*math["cos"](sine/10),-1+0*math["cos"](sine/10))*CFrame.Angles(math.rad(-90+0*math["cos"](sine/10)),math.rad(45+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10))),false)
  184. elseif Root.Velocity.Magnitude > 20 then -- run
  185. NECK.C0=NECK.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  186. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0.1*math.sin(sine/7.5),0+0*math.cos(sine/7.5))*CFrame.Angles(math.rad(-17.34+0*math.cos(sine/7.5)),math.rad(0+0*math.cos(sine/7.5)),math.rad(0+0*math.cos(sine/7.5))),.2)
  187. RS.C0=RS.C0:Lerp(CFrame.new(1+0*math.cos(sine/10),0+0.1*math.sin(sine/7.5),-0.5+0*math.cos(sine/10))*CFrame.Angles(math.rad(50+0*math.cos(sine/10)),math.rad(13.23+0*math.cos(sine/10)),math.rad(-24.98+0*math.cos(sine/10))),.2)
  188. LS.C0=LS.C0:Lerp(CFrame.new(-0.14+0*math.cos(sine/10),-0.14+0.1*math.sin(sine/7.5),-0.5+0*math.cos(sine/10))*CFrame.Angles(math.rad(50+0*math.cos(sine/10)),math.rad(20.87+0*math.cos(sine/10)),math.rad(13.23+0*math.cos(sine/10))),.2)
  189. RH.C0=RH.C0:Lerp(CFrame.new(0.5+0*math.cos(sine/15),-1+-0.2*math.sin(sine/15),0+-0.5*math.cos(sine/15))*CFrame.Angles(math.rad(0+60*math.cos(sine/15)),math.rad(0+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  190. LH.C0=LH.C0:Lerp(CFrame.new(-0.5+0*math.cos(sine/15),-1+0.2*math.sin(sine/15),0+0.4*math.cos(sine/15))*CFrame.Angles(math.rad(0+-60*math.cos(sine/15)),math.rad(0+0*math.cos(sine/15)),math.rad(0+0*math.cos(sine/10))),.2)
  191. hat('Aluminium Baseball Bat','Right Arm',CFrame.new(0,0,0),CFrame.new(0.9+0*math["cos"](sine/10),0.7+0*math["cos"](sine/10),-1+0*math["cos"](sine/10))*CFrame.Angles(math.rad(-90+0*math["cos"](sine/10)),math.rad(45+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10))),false)
  192. elseif Root.Velocity.Magnitude < 20 then -- walk
  193.  
  194. end
  195.  
  196. elseif Mode == 'Attack1' then --attack clerp
  197. hat('Aluminium Baseball Bat','Right Arm',CFrame.new(0,0,0),CFrame.new(0.9+0*math["cos"](sine/10),0.7+0*math["cos"](sine/10),-1+0*math["cos"](sine/10))*CFrame.Angles(math.rad(-90+0*math["cos"](sine/10)),math.rad(45+0*math["cos"](sine/10)),math.rad(0+0*math["cos"](sine/10))),false)
  198. RS.C0=RS.C0:Lerp(CFrame.new(1+0*math.cos(sine/10),-0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(120+0*math.cos(sine/10)),math.rad(-35+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  199. LS.C0=LS.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),0.25+0*math.cos(sine/10),-0.5+0*math.cos(sine/10))*CFrame.Angles(math.rad(90+0*math.cos(sine/10)),math.rad(-15+0*math.cos(sine/10)),math.rad(45+0*math.cos(sine/10))),.2)
  200. elseif Mode == 'Attack2' then --attack clerp
  201. RS.C0=RS.C0:Lerp(CFrame.new(1+0*math.cos(sine/10),-0.5+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(120+0*math.cos(sine/10)),math.rad(-90+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  202. LS.C0=LS.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),0.25+0*math.cos(sine/10),-0.5+0*math.cos(sine/10))*CFrame.Angles(math.rad(90+0*math.cos(sine/10)),math.rad(-2.06+0*math.cos(sine/10)),math.rad(45+0*math.cos(sine/10))),.2)
  203. elseif Mode == 'Attack3' then --attack clerp
  204. RJ.C0=RJ.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),-1+0*math.cos(sine/10),0+0*math.cos(sine/10))*CFrame.Angles(math.rad(-10+0*math.cos(sine/10)),math.rad(20+0*math.cos(sine/10)),math.rad(0+0*math.cos(sine/10))),.2)
  205. RS.C0=RS.C0:Lerp(CFrame.new(0+0*math.cos(sine/10),0+0*math.cos(sine/10),-0.5+0*math.cos(sine/10))*CFrame.Angles(math.rad(188.99+0*math.cos(sine/10)),math.rad(-193.1+0*math.cos(sine/10)),math.rad(97.29+0*math.cos(sine/10))),.2)
  206. LS.C0=LS.C0:Lerp(CFrame.new(-1+0*math.cos(sine/10),0+0*math.cos(sine/10),0.5+0*math.cos(sine/10))*CFrame.Angles(math.rad(89.64+0*math.cos(sine/10)),math.rad(13.23+0*math.cos(sine/10)),math.rad(-32.62+0*math.cos(sine/10))),.2)
  207. end
  208. srv.RenderStepped:Wait()
  209. end
  210. end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement