Advertisement
BabyGoatz

Untitled

Oct 7th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.48 KB | None | 0 0
  1. game.Workspace.BabyGoatz.Head.BrickColor = BrickColor.new("Really black")
  2. game.Workspace.BabyGoatz.Torso.BrickColor = BrickColor.new("Really black")
  3. game.Workspace.BabyGoatz['Left Arm'].BrickColor = BrickColor.new("Really black")
  4. game.Workspace.BabyGoatz['Left Leg'].BrickColor = BrickColor.new("Really black")
  5. game.Workspace.BabyGoatz['Right Arm'].BrickColor = BrickColor.new("Really black")
  6. game.Workspace.BabyGoatz['Right Leg'].BrickColor = BrickColor.new("Really black")
  7. game.Workspace.BabyGoatz['HipsterGlasses']:Remove()
  8. local head = game.Workspace.BabyGoatz.Head
  9. local mesh = Instance.new("SpecialMesh")
  10. mesh.Parent = head
  11. mesh.MeshId = "http://www.roblox.com/asset/?id=28199304"
  12. mesh.TextureId = "http://www.roblox.com/asset/?id=28199298"
  13. wait(2)
  14. local s = Instance.new("Sound", game.Workspace)
  15. s.SoundId = "rbxassetid://131301985"
  16. s.Looped = false
  17. s.PlayOnRemove = true
  18. s:Play()
  19. wait(2)
  20. local s1 = Instance.new("Sound", game.Workspace)
  21. s.SoundId = "rbxassetid://183166337"
  22. s.Looped = false
  23. s.PlayOnRemove = false
  24. s:Play()
  25. game.Lighting.TimeOfDay = 0
  26. wait(1)
  27. do --CFrame lerp (stravant, clerp by AntiBoomz0r)
  28. local function QuaternionFromCFrame(cf)
  29. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  30. local trace = m00 + m11 + m22
  31. if trace > 0 then
  32. local s = math.sqrt(1 + trace)
  33. local recip = 0.5/s
  34. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  35. else
  36. local i = 0
  37. if m11 > m00 then
  38. i = 1
  39. end
  40. if m22 > (i == 0 and m00 or m11) then
  41. i = 2
  42. end
  43. if i == 0 then
  44. local s = math.sqrt(m00-m11-m22+1)
  45. local recip = 0.5/s
  46. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  47. elseif i == 1 then
  48. local s = math.sqrt(m11-m22-m00+1)
  49. local recip = 0.5/s
  50. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  51. elseif i == 2 then
  52. local s = math.sqrt(m22-m00-m11+1)
  53. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  54. end
  55. end
  56. end
  57. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  58. local xs, ys, zs = x + x, y + y, z + z
  59. local wx, wy, wz = w*xs, w*ys, w*zs
  60. local xx = x*xs
  61. local xy = x*ys
  62. local xz = x*zs
  63. local yy = y*ys
  64. local yz = y*zs
  65. local zz = z*zs
  66. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  67. end
  68. function QuaternionSlerp(a, b, t)
  69. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  70. local startInterp, finishInterp;
  71. if cosTheta >= 0.0001 then
  72. if (1 - cosTheta) > 0.0001 then
  73. local theta = math.acos(cosTheta)
  74. local invSinTheta = 1/math.sin(theta)
  75. startInterp = math.sin((1-t)*theta)*invSinTheta
  76. finishInterp = math.sin(t*theta)*invSinTheta
  77. else
  78. startInterp = 1-t
  79. finishInterp = t
  80. end
  81. else
  82. if (1+cosTheta) > 0.0001 then
  83. local theta = math.acos(-cosTheta)
  84. local invSinTheta = 1/math.sin(theta)
  85. startInterp = math.sin((t-1)*theta)*invSinTheta
  86. finishInterp = math.sin(t*theta)*invSinTheta
  87. else
  88. startInterp = t-1
  89. finishInterp = t
  90. end
  91. end
  92. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  93. end
  94. function clerp(a,b,t)
  95. local qa = {QuaternionFromCFrame(a)}
  96. local qb = {QuaternionFromCFrame(b)}
  97. local ax, ay, az = a.x, a.y, a.z
  98. local bx, by, bz = b.x, b.y, b.z
  99. local _t = 1-t
  100. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  101. end
  102. end
  103.  
  104. plr = game:service'Players'.LocalPlayer
  105. char = plr.Character
  106. mouse = plr:GetMouse()
  107. humanoid = char:findFirstChild("Humanoid")
  108. torso = char:findFirstChild("Torso")
  109. head = char.Head
  110. ra = char:findFirstChild("Right Arm")
  111. la = char:findFirstChild("Left Arm")
  112. rl = char:findFirstChild("Right Leg")
  113. ll = char:findFirstChild("Left Leg")
  114. rs = torso:findFirstChild("Right Shoulder")
  115. ls = torso:findFirstChild("Left Shoulder")
  116. rh = torso:findFirstChild("Right Hip")
  117. lh = torso:findFirstChild("Left Hip")
  118. neck = torso:findFirstChild("Neck")
  119. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  120. animate = char:findFirstChild("Animate")
  121. if animate then
  122. animate:Destroy()
  123. end
  124. rootpart = char:findFirstChild("HumanoidRootPart")
  125. camera = workspace.CurrentCamera
  126.  
  127. gun = Instance.new("Model", char)
  128. gun.Name = "GunModel"
  129.  
  130. local rm = Instance.new("Motor", torso)
  131. rm.C0 = CFrame.new(1.5, 0.5, 0)
  132. rm.C1 = CFrame.new(0, 0.5, 0)
  133. rm.Part0 = torso
  134. rm.Part1 = ra
  135.  
  136. local lm = Instance.new("Motor", torso)
  137. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  138. lm.C1 = CFrame.new(0, 0.5, 0)
  139. lm.Part0 = torso
  140. lm.Part1 = la
  141.  
  142. local rlegm = Instance.new("Motor", torso)
  143. rlegm.C0 = CFrame.new(0.5, -1, 0)
  144. rlegm.C1 = CFrame.new(0, 1, 0)
  145. rlegm.Part0 = torso
  146. rlegm.Part1 = rl
  147. rlegm.Name = "Right Hip"
  148.  
  149. local llegm = Instance.new("Motor", torso)
  150. llegm.C0 = CFrame.new(-0.5, -1, 0)
  151. llegm.C1 = CFrame.new(0, 1, 0)
  152. llegm.Part0 = torso
  153. llegm.Part1 = ll
  154. llegm.Name = "Left Hip"
  155.  
  156. neck.C0 = CFrame.new(0, 1, 0)
  157. neck.C1 = CFrame.new(0, -0.5, 0)
  158.  
  159. rj.C0 = CFrame.new(0, -1.5, 0)
  160. rj.C1 = CFrame.new(0, -1.5, 0)
  161.  
  162. --[[local hydrotankbase = Instance.new("Part", gun)
  163. hydrotankbase.BrickColor = BrickColor.Black()
  164. hydrotankbase.FormFactor = 'Custom'
  165. hydrotankbase.CanCollide = false
  166. hydrotankbase.Material = 'SmoothPlastic'
  167. hydrotankbase.TopSurface = 'SmoothNoOutlines'
  168. hydrotankbase.BottomSurface = 'SmoothNoOutlines'
  169. hydrotankbase.LeftSurface = 'SmoothNoOutlines'
  170. hydrotankbase.RightSurface = 'SmoothNoOutlines'
  171. hydrotankbase.BackSurface = 'SmoothNoOutlines'
  172. hydrotankbase.FrontSurface = 'SmoothNoOutlines'
  173. hydrotankbase.Size = Vector3.new(1.2, .2, 1.2)
  174. Instance.new("CylinderMesh", hydrotankbase)
  175. local weld = Instance.new("Weld", hydrotankbase)
  176. weld.C0 = CFrame.new(torso.Size.x/2 - hydrotankbase.Size.x/2, .45, -torso.Size.z/2 - (hydrotankbase.Size.z/3))
  177. weld.Part0 = hydrotankbase
  178. weld.Part1 = torso
  179. local hydrotankbase2 = hydrotankbase:clone()
  180. hydrotankbase2.Parent = gun
  181. local weld = Instance.new("Weld", hydrotankbase)
  182. weld.C0 = CFrame.new(-torso.Size.x/2 + hydrotankbase2.Size.x/2, .45, -torso.Size.z/2 - (hydrotankbase2.Size.z/3))
  183. weld.Part0 = hydrotankbase2
  184. weld.Part1 = torso
  185. local hydroglass = hydrotankbase:clone()
  186. hydroglass.Parent = gun
  187. hydroglass.Size = Vector3.new(1.1, 1.5, 1.1)
  188. hydroglass.BrickColor = BrickColor.White()
  189. hydroglass.Transparency = .2
  190. local weld = Instance.new("Weld", hydroglass)
  191. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass.Size.y/2, 0)
  192. weld.Part0 = hydroglass
  193. weld.Part1 = hydrotankbase
  194. local hydroglass2 = hydroglass:clone()
  195. hydroglass2.Parent = gun
  196. local weld = Instance.new("Weld", hydrotankbase)
  197. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass2.Size.y/2, 0)
  198. weld.Part0 = hydroglass2
  199. weld.Part1 = hydrotankbase2
  200. local hydrotanktop = hydrotankbase:clone()
  201. hydrotanktop.Parent = gun
  202. local weld = Instance.new("Weld", hydrotankbase)
  203. weld.C0 = CFrame.new(0,- hydroglass2.Size.y/2 - hydrotanktop.Size.y/2,0)
  204. weld.Part0 = hydrotanktop
  205. weld.Part1 = hydroglass
  206. local hydrotanktop2 = hydrotankbase:clone()
  207. hydrotanktop2.Parent = gun
  208. local weld = Instance.new("Weld", hydrotankbase)
  209. weld.C0 = CFrame.new(0,- hydroglass2.Size.y/2 - hydrotanktop2.Size.y/2,0)
  210. weld.Part0 = hydrotanktop2
  211. weld.Part1 = hydroglass2
  212.  
  213. local hydrogen = hydrotankbase:clone()
  214. hydrogen.Parent = gun
  215. hydrogen.Material = 'Pebble'
  216. hydrogen.Size = Vector3.new(1, 1.5, 1)
  217. hydrogen.BrickColor = BrickColor.Blue()
  218. local weld = Instance.new("Weld", hydrogen)
  219. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass.Size.y/2, 0)
  220. weld.Part0 = hydrogen
  221. weld.Part1 = hydrotankbase
  222. local hydrogen2 = hydrogen:clone()
  223. hydrogen2.Parent = gun
  224. local weld = Instance.new("Weld", hydrogen2)
  225. weld.C0 = CFrame.new(0, -hydrotankbase.Size.y/2 - hydroglass2.Size.y/2, 0)
  226. weld.Part0 = hydrogen2
  227. weld.Part1 = hydrotankbase2]]--
  228.  
  229. rsc0 = rm.C0
  230. lsc0 = lm.C0
  231. neckc0 = neck.C0
  232. rootc0 = rj.C0
  233. llc0 = llegm.C0
  234. rlc0 = rlegm.C0
  235. speed = 0.25
  236. angle = 0
  237. mvmnt = 0
  238. anglespeed = 1
  239. humanoid.WalkSpeed = 8
  240. ctrl = false
  241. stopsprint = false
  242. action = false
  243. sprinting = false
  244. mouse.KeyDown:connect(function(k)
  245. repeat wait() until action == false
  246. if not action then
  247. if k:byte() == 48 then
  248. sprinting = true
  249. humanoid.WalkSpeed = 16
  250. end
  251. if k == '2' then
  252. ctrl = true
  253. humanoid.WalkSpeed = 5
  254. end
  255. end
  256. end)
  257.  
  258. mouse.KeyUp:connect(function(k)
  259. repeat wait() until action == false
  260. if not action then
  261. repeat wait() until action == false
  262. if k:byte() == 48 then
  263. sprinting = false
  264. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 10 and hitz then
  265. action = 'StopSprinting'
  266. end
  267. humanoid.WalkSpeed = 8
  268. if ctrl then
  269. humanoid.WalkSpeed = 5
  270. end
  271. end
  272. if k == '2' then
  273. ctrl = false
  274. humanoid.WalkSpeed = 8
  275. end
  276. end
  277. end)
  278.  
  279. Controls = game:service'ControllerService':children()[1]
  280.  
  281. local fakehead = head:clone()
  282. fakehead.Parent = head
  283. head.Transparency = 1
  284. for i,v in pairs(fakehead:children()) do
  285. if v:IsA'Sound' or v:IsA'Sound' then
  286. v:Destroy()
  287. end
  288. end
  289.  
  290. waitingloop = false
  291.  
  292. local fakeweld = Instance.new("Weld", head)
  293. fakeweld.Part0 = head
  294. fakeweld.Part1 = fakehead
  295.  
  296. humanoid.Jumping:connect(function()
  297. if not action then
  298. action = 'Jumping'
  299. end
  300. end)
  301.  
  302. game:service'RunService'.RenderStepped:connect(function()
  303. if not loopedaction then
  304. local rscf = rsc0
  305. local lscf = lsc0
  306. local rlcf = rlc0
  307. local llcf = llc0
  308. local rjcf = rootc0
  309. local ncf = neckc0
  310. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -4.1, 0))
  311. local hitz, enz = workspace:findPartOnRay(rayz, char)
  312. angle = (angle % 100) + anglespeed/10
  313. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  314. if action ~= false then
  315. if action == 'StopSprinting' then
  316. Controls.Parent = nil
  317. local bodyvelocity = Instance.new("BodyVelocity", rootpart)
  318. bodyvelocity.maxForce = Vector3.new(1/0,0,1/0)
  319. bodyvelocity.velocity = rootpart.CFrame.lookVector * 16
  320. ncf = neckc0 * CFrame.Angles(math.rad(-15), -math.rad(65), 0)
  321. rscf = rsc0 * CFrame.Angles(math.rad(-22), 0, math.rad(20.5))
  322. lscf = lsc0 * CFrame.Angles(math.rad(-54.5), 0, -math.rad(18.5))
  323. rjcf = rootc0 * CFrame.new(0, -.35, 0) * CFrame.Angles(math.rad(35), math.rad(70), 0)
  324. llcf = llc0 * CFrame.new(0, .25, -.25) * CFrame.Angles(0, 0, -math.rad(58))
  325. rlcf = rlcf * CFrame.new(0, -.25, -.15) * CFrame.Angles(0, 0, math.rad(10))
  326. loopedaction = true
  327. for i = 0, 25 do
  328. bodyvelocity.velocity = rootpart.CFrame.lookVector * (16 - i/2)
  329. rm.C0 = clerp(rm.C0,rscf,speed)
  330. lm.C0 = clerp(lm.C0,lscf,speed)
  331. rj.C0 = clerp(rj.C0,rjcf,speed)
  332. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  333. llegm.C0 = clerp(llegm.C0,llcf,speed)
  334. neck.C0 = clerp(neck.C0,ncf,speed)
  335. wait()
  336. end
  337. bodyvelocity:Destroy()
  338. loopedaction = false
  339. stopsprint = false
  340. action = false
  341. Controls.Parent = game:service'ControllerService'
  342. humanoid.WalkSpeed = 8
  343. if ctrl then
  344. humanoid.WalkSpeed = 5
  345. end
  346. end
  347. if action == 'Jumping' then
  348. loopedaction = true
  349. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  350. rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  351. rscf = rsc0 * CFrame.Angles(-math.pi/16, -math.sin(angle)*0.08, 0)
  352. lscf = lsc0 * CFrame.Angles(-math.pi/17, math.sin(angle)*0.08, 0)
  353. rlcf = rlc0 * CFrame.Angles(-math.pi/16+-math.sin(angle)*0.125, -math.sin(angle)*0.08, math.rad(2.5))
  354. llcf = llc0 * CFrame.Angles(-math.pi/17+-math.sin(angle)*0.125, math.sin(angle)*0.08, -math.rad(2.5))
  355. for i = 0, 12 do
  356. rm.C0 = clerp(rm.C0,rscf,speed)
  357. lm.C0 = clerp(lm.C0,lscf,speed)
  358. rj.C0 = clerp(rj.C0,rjcf,speed)
  359. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  360. llegm.C0 = clerp(llegm.C0,llcf,speed)
  361. neck.C0 = clerp(neck.C0,ncf,speed)
  362. wait()
  363. end
  364. loopedaction = false
  365. action = false
  366. end
  367. end
  368. if goinup and torso.Velocity.y <= 2 then
  369. goinup = false
  370. if ctrl then
  371. humanoid.WalkSpeed = 5
  372. elseif sprinting then
  373. humanoid.WalkSpeed = 16
  374. elseif not sprinting and not ctrl then
  375. humanoid.WalkSpeed = 8
  376. end
  377. end
  378. if not action then
  379. if not hitz then
  380. anglespeed = 1
  381. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 15 then
  382. if not waitingloop then
  383. waitingloop = true
  384. coroutine.wrap(function()
  385. repeat wait() until hitz
  386. action = 'StopSprinting'
  387. end)()
  388. end
  389. end
  390. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  391. rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  392. rscf = rsc0 * CFrame.Angles(-math.pi/19, -math.sin(angle)*0.08, math.rad(20.5))
  393. lscf = lsc0 * CFrame.Angles(-math.pi/24, math.sin(angle)*0.08, -math.rad(20.5))
  394. rlcf = rlc0 * CFrame.Angles(math.pi/24+-math.sin(angle)*0.025, -math.sin(angle)*0.08, math.rad(2.5))
  395. llcf = llc0 * CFrame.Angles(math.pi/24+-math.sin(angle)*0.025, math.sin(angle)*0.08, -math.rad(2.5))
  396. elseif torso.Velocity.y >= 2 and hitz then
  397. anglespeed = 1.75
  398. goinup = true
  399. humanoid.WalkSpeed = 5
  400. rjcf = rootc0 * CFrame.Angles(-math.pi/64, 0, 0)
  401. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  402. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  403. rlcf = rlc0 * CFrame.new(0, .45+math.abs(math.sin(angle))*.4, -.25+math.sin(angle)*0.2) * CFrame.Angles(math.sin(-angle)*.45, 0, math.rad(.5))
  404. llcf = llc0 * CFrame.new(0, .85-math.abs(math.sin(angle))*.4, -.25-math.sin(angle)*0.2) * CFrame.Angles(math.sin(angle)*.45, 0, -math.rad(.5))
  405. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  406. if not goinup then
  407. if stopsprint then
  408. action = 'StopSprinting'
  409. end
  410. anglespeed = 0.15
  411. if ctrl then
  412. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  413. rscf = rsc0 * CFrame.Angles(0, -math.sin(angle)*0.08, 0)
  414. lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.08, 0)
  415. rjcf = rootc0 * CFrame.new(0, -1.25, 0)
  416. llcf = llc0 * CFrame.new(0, 0, -.45) * CFrame.Angles(-math.pi/2.2, 0, 0)
  417. rlcf = rlcf * CFrame.new(0, 1.25, -.85)
  418. elseif not ctrl then
  419. ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
  420. rjcf = rootc0 * CFrame.Angles(math.sin(angle)*0.025, 0, 0)
  421. rscf = rsc0 * CFrame.Angles(0, -math.sin(angle)*0.08, 0)
  422. lscf = lsc0 * CFrame.Angles(0, math.sin(angle)*0.08, 0)
  423. rlcf = rlc0 * CFrame.Angles(-math.sin(angle)*0.025, -math.sin(angle)*0.08, math.rad(2.5))
  424. llcf = llc0 * CFrame.Angles(-math.sin(angle)*0.025, math.sin(angle)*0.08, -math.rad(2.5))
  425. end
  426. end
  427. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 10 then
  428. if not goinup then
  429. if stopsprint then
  430. action = 'StopSprinting'
  431. end
  432. anglespeed = 1.5
  433. if ctrl then
  434. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  435. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  436. rjcf = rootc0 * CFrame.new(0, -.7, 0) * CFrame.Angles(-math.pi/32, 0, 0)
  437. llcf = llc0 * CFrame.new(0, .65, -.5 + (-.4+math.sin(angle)*0.25)) * CFrame.Angles(math.pi/18 + -math.pi/10 - math.sin(angle)*.45, 0, 0)
  438. rlcf = rlcf * CFrame.new(0, .65, -.5 + (-.25-math.sin(angle)*0.25)) * CFrame.Angles(math.pi/18 + -math.pi/10 + math.sin(angle)*.45, 0, 0)
  439. else
  440. rjcf = rootc0 * CFrame.Angles(-math.pi/64, 0, 0)
  441. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*.5, 0, -math.abs(mvmnt)*0.02)
  442. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*.5, 0, math.abs(mvmnt)*0.02)
  443. rlcf = rlc0 * CFrame.new(0, 0, -.15+math.sin(angle)*0.1) * CFrame.Angles(math.sin(-angle)*.45, 0, math.rad(.5))
  444. llcf = llc0 * CFrame.new(0, 0, -.15-math.sin(angle)*0.1) * CFrame.Angles(math.sin(angle)*.45, 0, -math.rad(.5))
  445. end
  446. end
  447. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 15 then
  448. if not goinup then
  449. stopsprint = true --when released
  450. anglespeed = 2
  451. local RotVelocityZ = torso.RotVelocity.Y
  452. if RotVelocityZ >= 15 then
  453. RotVelocityZ = 15
  454. elseif RotVelocityZ <= -15 then
  455. RotVelocityZ = -15
  456. end
  457. ncf = neckc0 * CFrame.Angles(0, -math.sin(angle)*.1, 0)
  458. rscf = rsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(angle)*1.1, 0, -math.abs(mvmnt)*0.02)
  459. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*1.1, 0, math.abs(mvmnt)*0.02)
  460. rjcf = rootc0 * CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/18, math.sin(angle)*.1, math.sin(angle)*.045 + math.rad(RotVelocityZ)*2.5)
  461. rlcf = rlc0 * CFrame.new(0, 0, -.6+math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  462. llcf = llc0 * CFrame.new(0, 0, -math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  463. end
  464. end
  465. end
  466. rm.C0 = clerp(rm.C0,rscf,speed)
  467. lm.C0 = clerp(lm.C0,lscf,speed)
  468. rj.C0 = clerp(rj.C0,rjcf,speed)
  469. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  470. llegm.C0 = clerp(llegm.C0,llcf,speed)
  471. neck.C0 = clerp(neck.C0,ncf,speed)
  472. end
  473. end)
  474. wait()
  475. local part=Instance.new("Part",workspace)
  476. part.Anchored=true
  477. local you=game.Workspace.BabyGoatz.Torso
  478. local angle=0.01
  479. local speed=0.01
  480. local radius=10
  481. local function rot()
  482. if part then
  483. local x=math.cos(angle)*radius
  484. local y=0
  485. local z=math.sin(angle)*radius
  486. part.CFrame=CFrame.new(you.CFrame.p + Vector3.new(x,y,z)) * CFrame.Angles(math.rad(angle * 101),math.rad(angle * 101),math.rad(angle * 101))
  487. angle=angle+speed
  488. end
  489. end
  490. game:service'RunService'.Stepped:connect(function() rot() end)
  491. part.Material = "Neon"
  492. part.Size = Vector3.new(2,2,2)
  493. part.CanCollide = false
  494. part.Shape = "Ball"
  495. local click = Instance.new("ClickDetector")
  496. click.Parent = part
  497. local function onMouseClick(player)
  498. part.BrickColor = BrickColor.new("Really red")
  499. end
  500. click.MouseClick:connect(onMouseClick)
  501. part.Touched:connect(function(p)
  502. p.Parent.Humanoid:takeDamage(100)
  503. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement