Orangeplayer1431

Untitled

Dec 11th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.75 KB | None | 0 0
  1.  
  2. function clerp(c1,c2,al)
  3. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  4. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  5. for i,v in pairs(com1) do
  6. com1[i] = v+(com2[i]-v)*al
  7. end
  8. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  9. end
  10.  
  11. plr = game:service'Players'.LocalPlayer
  12. char = plr.Character
  13. mouse = plr:GetMouse()
  14. humanoid = char:findFirstChild("Humanoid")
  15. torso = char:findFirstChild("Torso")
  16. head = char.Head
  17. ra = char:findFirstChild("Right Arm")
  18. la = char:findFirstChild("Left Arm")
  19. rl = char:findFirstChild("Right Leg")
  20. ll = char:findFirstChild("Left Leg")
  21. rs = torso:findFirstChild("Right Shoulder")
  22. ls = torso:findFirstChild("Left Shoulder")
  23. rh = torso:findFirstChild("Right Hip")
  24. lh = torso:findFirstChild("Left Hip")
  25. neck = torso:findFirstChild("Neck")
  26. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  27. anim = char:findFirstChild("Animate")
  28. do --Removing ROBLOX's new Looped bug >_>
  29. local function rec(x)
  30. for i,v in pairs(x:children()) do
  31. if v:IsA'Animation' then
  32. v.AnimationId = 'rbxassetid://28159255'
  33. end
  34. rec(v)
  35. end
  36. end
  37. rec(anim) --the Animate script
  38. end
  39.  
  40. humanoid.Jump = true
  41.  
  42. wait(.4)
  43.  
  44.  
  45. if anim then
  46. anim:Destroy()
  47. end
  48. rootpart = char:findFirstChild("HumanoidRootPart")
  49. camera = workspace.CurrentCamera
  50. modelforparts = char:findFirstChild("ModelForParts") or Instance.new("Model", char)
  51. modelforparts.Name = "ModelForParts"
  52.  
  53. function trailconnect(obj, wat)
  54. local trail = {}
  55. for i = 1, 4 do
  56. local p = Instance.new("Part")
  57. p.BrickColor = obj.BrickColor
  58. p.formFactor = "Custom"
  59. p.Size = Vector3.new(1,1,1)
  60. p.Locked = true
  61. p.Anchored = true
  62. p.CanCollide = false
  63. local mesh = Instance.new("CylinderMesh", p)
  64. mesh.Name = "Mesh"
  65. table.insert(trail,{p,0})
  66. end
  67. local lastpos = obj.Position
  68. local updatethis = 0
  69. local dontdothis = false
  70. game:service'RunService'.Stepped:connect(function()
  71. if wat == true then if dontdothis then return end
  72. for i,v in pairs(trail) do
  73. game:service'Debris':AddItem(obj, 0)
  74. table.remove(v, i)
  75. end
  76. dontdothis = true
  77. return
  78. end
  79. updatethis = ((updatethis) % 4) + 1
  80. local dstnc = (obj.Position - lastpos).magnitude
  81. trail[updatethis][1].Mesh.Scale = Vector3.new(.2,dstnc,.2)
  82. trail[updatethis][1].Parent = obj.Parent
  83. trail[updatethis][1].CFrame = CFrame.new((obj.Position + lastpos)/2,obj.Position) * CFrame.Angles(math.pi/2, 0, 0)
  84. trail[updatethis][2] = 0
  85. for i,v in pairs(trail) do
  86. v[2] = v[2] + .15
  87. v[1].Transparency = v[2]
  88. end
  89. lastpos = obj.Position
  90. end)
  91. end
  92.  
  93. do --rayCast
  94. function rayCast(startpos, Speed, Gravity, Dmg, color)
  95. local ran,err = ypcall(function()
  96. local rayPart = Instance.new("Part")
  97. rayPart.Name = "RayPart"
  98. rayPart.BrickColor = BrickColor.new(color)
  99. rayPart.Anchored = true
  100. rayPart.CanCollide = false
  101. rayPart.Locked = true
  102. rayPart.FormFactor = "Custom"
  103. rayPart.TopSurface = Enum.SurfaceType.Smooth
  104. rayPart.BottomSurface = Enum.SurfaceType.Smooth
  105. rayPart.Size = Vector3.new(.2, 50, .2)
  106. rayPart:breakJoints()
  107. Instance.new("CylinderMesh", rayPart)
  108. local fire = Instance.new("Fire", rayPart)
  109. fire.Color = rayPart.BrickColor.Color
  110. fire.SecondaryColor = rayPart.BrickColor.Color
  111. fire.Heat = 0
  112. fire.Size = 10
  113. local pl = Instance.new("PointLight", rayPart)
  114. pl.Color = Color3.new(rayPart.BrickColor.r/1.5, rayPart.BrickColor.g/1.5, rayPart.BrickColor.b/1.5)
  115. pl.Range = 18
  116.  
  117. local hitobj = false
  118. local bulletposition = startpos.Position
  119. rayPart.CFrame = startpos.CFrame
  120. trailconnect(rayPart, hitobj)
  121.  
  122. local bulletvelocity = (Vector3.new(math.random(-2,2), math.random(-2,2), math.random(-2,2)))+( mouse.Hit.p - bulletposition).unit*Speed
  123. local bulletlastposition = bulletposition
  124.  
  125. coroutine.resume(coroutine.create(function()
  126. while true do
  127.  
  128. local dt = wait()
  129. bulletlastposition = bulletposition
  130. bulletvelocity = bulletvelocity + (Vector3.new(0, -3.81*Gravity, 0)*dt)
  131. bulletposition = bulletposition + (bulletvelocity*dt)
  132. local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition))
  133. local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, {char, modelforparts} )
  134.  
  135. if (torso.Position - rayPart.Position).magnitude > 840 then
  136. rayPart:Destroy()
  137. hitobj = true
  138. break
  139. end
  140.  
  141.  
  142. if hit then
  143. hitobj = true
  144. local damage = math.random(Dmg, Dmg+6)
  145. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  146. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage
  147. elseif hit.Parent:IsA("Hat") and hit.Parent.Parent:findFirstChild("Humanoid") then
  148. hit.Parent.Parent.Humanoid.Health = hit.Parent.Parent.Humanoid.Health - damage
  149. end
  150. local boom = Instance.new("Part", modelforparts)
  151. boom.BrickColor = rayPart.BrickColor
  152. boom.Anchored = true
  153. boom.FormFactor = "Custom"
  154. boom.Size = Vector3.new(1,1,1)
  155. boom.CanCollide = false
  156. boom.Transparency = 0.25
  157. boom.CFrame = CFrame.new(hitposition.x, hitposition.y, hitposition.z)
  158. boom.TopSurface = 0
  159. boom.BottomSurface = 0
  160. local sphere = Instance.new("SpecialMesh", boom)
  161. sphere.MeshType = "Sphere"
  162. local pl = Instance.new("PointLight", boom)
  163. pl.Color = Color3.new(boom.BrickColor.r/1.5, boom.BrickColor.g/1.5, boom.BrickColor.b/1.5)
  164. pl.Range = 20
  165. for ye = 0, 8 do
  166. local lite = Instance.new("Part", boom)
  167. lite.FormFactor = "Custom"
  168. lite.Size = Vector3.new(.2, 1.5, .2)
  169. lite.BrickColor = boom.BrickColor
  170. lite.CanCollide = false
  171. lite.TopSurface = 0
  172. lite.Anchored = false
  173. lite.BottomSurface = 0
  174. lite.Position = boom.Position + Vector3.new(math.random(-10, 10), math.random(6,15), math.random(-10, 10))
  175. end
  176.  
  177. for i = 0, 20, 2.5 do
  178. sphere.Scale = sphere.Scale + Vector3.new(i,i,i)
  179. boom.Transparency = boom.Transparency + i/60
  180. pl.Range = pl.Range + i/15
  181. wait()
  182. end
  183. boom:Destroy()
  184. for i,v in pairs(workspace:children()) do
  185. if v:IsA("Model") and v:findFirstChild("Humanoid") then
  186. if v:findFirstChild("Head") and v:findFirstChild("Torso") then
  187. if (v:findFirstChild("Torso").Position - boom.Position).magnitude < 16 and v.Name ~= char.Name then
  188. v:findFirstChild("Humanoid"):TakeDamage(math.random(Dmg+2,Dmg+6))
  189. end
  190. end
  191. end
  192. if v and v:IsA("Part") and v.Name ~= "Base" then
  193. if (v.Position - boom.Position).magnitude < 16 then
  194. v:BreakJoints()
  195. v.TopSurface = 0
  196. v.BottomSurface = 0
  197. v.LeftSurface = 0
  198. v.RightSurface = 0
  199. v.FrontSurface = 0
  200. v.BackSurface = 0
  201. v.Anchored = false
  202. end
  203. end
  204. end
  205. pcall(function()
  206. bulletposition = hitposition
  207. rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
  208. rayPart:Destroy()
  209. end)
  210. break
  211. end
  212. rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
  213. rayPart.Parent = modelforparts
  214. end
  215. end))
  216. for i = 70, 65, -1.5 do
  217. firing = true
  218. camera.FieldOfView = i
  219. wait()
  220. end
  221. for i = 65, 70, 2.5 do
  222. firing = false
  223. camera.FieldOfView = i
  224. wait()
  225. end
  226. end)
  227. if err then
  228. print(err)
  229. end
  230. end
  231. end
  232.  
  233.  
  234. charge = 100
  235.  
  236. plrgui = game:service'Players'.LocalPlayer:findFirstChild("PlayerGui")
  237.  
  238. local statusgui = Instance.new("ScreenGui", plrgui)
  239. local mainframe = Instance.new("Frame", statusgui)
  240. mainframe.Size = UDim2.new(0, 200, 0, 200)
  241. mainframe.Position = UDim2.new(.75, 0, .75, 0)
  242. mainframe.Style = 3
  243. local image = Instance.new("ImageLabel", mainframe)
  244. image.Size = UDim2.new(1, 0, .47, 0)
  245. image.Position = UDim2.new(0, 0, .235, 0)
  246. image.BackgroundTransparency = 1
  247. image.Image = "rbxassetid://145057975"
  248. local chargetext = Instance.new("TextLabel", mainframe)
  249. chargetext.FontSize = "Size18"
  250. chargetext.Size = UDim2.new(1, 0, .95, 0)
  251. chargetext.TextYAlignment = "Bottom"
  252. chargetext.BackgroundTransparency = 1
  253. chargetext.TextColor3 = Color3.new(1,1,1)
  254. game:service'RunService'.Stepped:connect(function()
  255. chargetext.Text = math.floor(charge).."%"
  256. end)
  257.  
  258.  
  259.  
  260. local rm = Instance.new("Weld", torso)
  261. rm.C0 = CFrame.new(1.5, 0.5, 0)
  262. rm.C1 = CFrame.new(0, 0.5, 0)
  263. rm.Part0 = torso
  264. rm.Part1 = ra
  265. local lm = Instance.new("Weld", torso)
  266. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  267. lm.C1 = CFrame.new(0, 0.5, 0)
  268. lm.Part0 = torso
  269. lm.Part1 = la
  270.  
  271. sound = Instance.new("Sound", head)
  272. sound.Volume = 1
  273. sound.SoundId = "rbxassetid://130855491"
  274. sound.Looped = true
  275.  
  276.  
  277. dancemode = true
  278. debounceofsprint = false
  279.  
  280. --create func
  281. function part(parent, size, color, formfactor, collide, transparency)
  282. if transparency == nil then transparency=0 end
  283. if collide == nil then collide=false end
  284. if formfactor == nil then formfactor="Custom" end
  285. local p = Instance.new("Part", parent)
  286. p.FormFactor = formfactor
  287. p.CanCollide = collide
  288. p.Size = size
  289. p.Locked = true
  290. p.Transparency = transparency
  291. p.Position = torso.Position + Vector3.new(0, 1, 0)
  292. p.BrickColor = color
  293. p.FrontSurface = "SmoothNoOutlines"
  294. p.BackSurface = "SmoothNoOutlines"
  295. p.LeftSurface = "SmoothNoOutlines"
  296. p.BottomSurface = "SmoothNoOutlines"
  297. p.TopSurface = "SmoothNoOutlines"
  298. p.RightSurface = "SmoothNoOutlines"
  299. return p
  300. end
  301. function wedge(parent, size, color, formfactor, collide, transparency)
  302. if transparency==nil then transparency=0 end
  303. if collide==nil then collide=false end
  304. if formfactor==nil then formfactor="Custom" end
  305. local p = Instance.new("WedgePart", parent)
  306. p.FormFactor = formfactor
  307. p.CanCollide = collide
  308. p.Size = size
  309. p.Locked = true
  310. p.Position = torso.Position
  311. p.BrickColor = color
  312. p.FrontSurface = "SmoothNoOutlines"
  313. p.BackSurface = "SmoothNoOutlines"
  314. p.LeftSurface = "SmoothNoOutlines"
  315. p.BottomSurface = "SmoothNoOutlines"
  316. p.TopSurface = "SmoothNoOutlines"
  317. p.RightSurface = "SmoothNoOutlines"
  318. return p
  319. end
  320. function weld(part0, part1, c0, parent, c1)
  321. if parent == nil then parent=char end
  322. if c1 == nil then c1=CFrame.new() end
  323.  
  324. local wel = Instance.new("Weld", parent)
  325. wel.Part0 = part0
  326. wel.Part1 = part1
  327. wel.C0 = c0
  328. wel.C1 = c1
  329. return wel
  330. end
  331. function specialmesh(parent, meshType, scale, meshId)
  332. if meshId==nil then meshId="" end
  333. local mesh = Instance.new("SpecialMesh", parent)
  334. mesh.Scale = scale
  335. mesh.MeshType = meshType
  336. mesh.MeshId = meshId
  337. return mesh
  338. end
  339. ----------------------------------------------------------------------------------------------------------
  340. --function part(parent, size, color, formfactor, collide, transparency)
  341. --function weld(part0, part1, c0, parent, c1)
  342.  
  343. ----------------------------------------------------------------------------------------------------------
  344. function animatehuman(animationid, object)
  345. local animation = object:findFirstChild("Humanoid"):LoadAnimation(animationid)
  346. animation:Play()
  347. end
  348. local danceAnim = Instance.new("Animation", char)
  349. danceAnim.AnimationId = "http://www.roblox.com/asset/?id=130018893"
  350. danceAnim.Name = "DancingAnimation"
  351. ----------------------------------------------------------------------------------------------------------
  352. local main = Instance.new("Part", char)
  353. main.FormFactor = "Custom"
  354. main.CanCollide = false
  355. main.Size = Vector3.new(.75, 1, 1.2)
  356. main.Locked = true
  357. main.BrickColor = BrickColor.new("Black")
  358. main.TopSurface = 0
  359. main.BottomSurface = 0
  360. main.Position = torso.Position
  361. main:BreakJoints()
  362. local weld1 = weld(main, ra, CFrame.new(), char, CFrame.new(0, -.8, -.6))
  363. local speaker = Instance.new("Part", char)
  364. speaker.FormFactor = "Custom"
  365. speaker.CanCollide = false
  366. speaker.Size = Vector3.new(1.5, .25, 1.4)
  367. speaker.Locked = true
  368. speaker.BrickColor = BrickColor.new("Black")
  369. speaker.TopSurface = 0
  370. speaker.BottomSurface = 0
  371. speaker.Position = torso.Position
  372. speaker:BreakJoints()
  373. local weld2 = weld(speaker, main, CFrame.new(), char, CFrame.new(-.25, -1.7, .6))
  374. local speaker2 = Instance.new("Part", char)
  375. speaker2.FormFactor = "Custom"
  376. speaker2.CanCollide = false
  377. speaker2.Size = Vector3.new(1, .25, 2)
  378. speaker2.Locked = true
  379. speaker2.BrickColor = BrickColor.new("Black")
  380. speaker2.TopSurface = 0
  381. speaker2.BottomSurface = 0
  382. speaker2.Position = torso.Position
  383. speaker2:BreakJoints()
  384. local weld3 = weld(speaker2, main, CFrame.new(), char, CFrame.new(0, -1.7, -.2))
  385. local main2 = Instance.new("Part", char)
  386. main2.FormFactor = "Custom"
  387. main2.CanCollide = false
  388. main2.Size = Vector3.new(.751, 1, .6)
  389. main2.Locked = true
  390. main2.BrickColor = BrickColor.new("Black")
  391. main2.TopSurface = 0
  392. main2.BottomSurface = 0
  393. main2.Position = torso.Position
  394. main2:BreakJoints()
  395. local weld4 = weld(main2, ra, CFrame.new(), char, CFrame.new(0, 0, -.9))
  396. local main3 = Instance.new("Part", char)
  397. main3.FormFactor = "Custom"
  398. main3.CanCollide = false
  399. main3.Size = Vector3.new(.751, 1.45, 1)
  400. main3.Locked = true
  401. main3.BrickColor = BrickColor.new("Black")
  402. main3.TopSurface = 0
  403. main3.BottomSurface = 0
  404. main3.Position = torso.Position
  405. main3:BreakJoints()
  406. local weld5 = weld(main3, ra, CFrame.new(), char, CFrame.new(0, -1.6, -.9))
  407. local main4 = Instance.new("Part", char)
  408. main4.FormFactor = "Custom"
  409. main4.CanCollide = false
  410. main4.Size = Vector3.new(1, .76, 1)
  411. Instance.new("CylinderMesh", main4)
  412. main4.Locked = true
  413. main4.BrickColor = BrickColor.new("Black")
  414. main4.TopSurface = 0
  415. main4.BottomSurface = 0
  416. main4.Position = torso.Position
  417. main4:BreakJoints()
  418. local weld6 = weld(main4, main, CFrame.new(), char, CFrame.new(0, -.15, -.5)*CFrame.Angles(math.pi/2, 0, math.pi/2))
  419. local speaker3 = Instance.new("Part", char)
  420. speaker3.FormFactor = "Custom"
  421. speaker3.CanCollide = false
  422. speaker3.Size = Vector3.new(1.5, .5, 1.4)
  423. speaker3.Locked = true
  424. speaker3.BrickColor = BrickColor.new("Black")
  425. speaker3.TopSurface = 0
  426. speaker3.BottomSurface = 0
  427. speaker3.Position = torso.Position
  428. speaker3:BreakJoints()
  429. local welds1 = weld(speaker3, main, CFrame.new(), char, CFrame.new(-.25, -2.2, .6))
  430. local speaker4 = Instance.new("Part", char)
  431. speaker4.FormFactor = "Custom"
  432. speaker4.CanCollide = false
  433. speaker4.Size = Vector3.new(1, .5, 2)
  434. speaker4.Locked = true
  435. speaker4.BrickColor = BrickColor.new("Black")
  436. speaker4.TopSurface = 0
  437. speaker4.BottomSurface = 0
  438. speaker4.Position = torso.Position
  439. speaker4:BreakJoints()
  440. local welds2 = weld(speaker4, main, CFrame.new(), char, CFrame.new(0, -2.205, -.2))
  441. local speaker5 = Instance.new("Part", char)
  442. speaker5.FormFactor = "Custom"
  443. speaker5.CanCollide = false
  444. speaker5.Size = Vector3.new(1.4, .4, 1.3)
  445. speaker5.Locked = true
  446. speaker5.BrickColor = BrickColor.new("Black")
  447. speaker5.TopSurface = 0
  448. speaker5.BottomSurface = 0
  449. speaker5.Position = torso.Position
  450. speaker5:BreakJoints()
  451. local welds3 = weld(speaker5, main, CFrame.new(), char, CFrame.new(-.25, -2, .6))
  452. local speaker6 = Instance.new("Part", char)
  453. speaker6.FormFactor = "Custom"
  454. speaker6.CanCollide = false
  455. speaker6.Size = Vector3.new(.9, .4, 1.9)
  456. speaker6.Locked = true
  457. speaker6.BrickColor = BrickColor.new("Black")
  458. speaker6.TopSurface = 0
  459. speaker6.BottomSurface = 0
  460. speaker6.Position = torso.Position
  461. speaker6:BreakJoints()
  462. local welds4 = weld(speaker6, main, CFrame.new(), char, CFrame.new(0, -2, -.2))
  463.  
  464. local support = Instance.new("Part", char)
  465. support.FormFactor = "Custom"
  466. support.CanCollide = false
  467. support.Size = Vector3.new(.3, .4, .6)
  468. support.Locked = true
  469. support.BrickColor = BrickColor.new("Black")
  470. support.TopSurface = 0
  471. support.BottomSurface = 0
  472. support.Position = torso.Position
  473. support:BreakJoints()
  474. local welds5 = weld(support, main, CFrame.new(), char, CFrame.new(0, -1.5, -.4))
  475.  
  476.  
  477. debounce = false
  478.  
  479. function stopsound()
  480. if debounce then return end
  481. if not sound.IsPlaying then return end
  482. sound:stop()
  483. debounce = true
  484. local dancebro = Instance.new("StringValue", game:service'Lighting')
  485. dancebro.Name = ('STOPDANCING'..plr.Name)
  486. game:service'Debris':AddItem(dancebro, 1)
  487. coroutine.wrap(function()
  488. while not sound.IsPlaying do
  489. if charge <= 100 then
  490. charge = charge + .1
  491. wait()
  492. elseif charge > 100 then
  493. charge = 100
  494. break
  495. end
  496. end
  497. end)()
  498. wait(.1)
  499. debounce = false
  500. end
  501. mouse.Button1Down:connect(function(mous)
  502. if debounceofsprint then return end
  503. if sound.IsPlaying then return end
  504. if debounce then return end
  505. sound:play()
  506. for i = 70, 55, -.35 do
  507. if not sound.IsPlaying then debounce = true camera.FieldOfView = 70 return end
  508. camera.FieldOfView = i
  509. wait()
  510. end
  511. for i = 65, 70, 2.5 do
  512. if not sound.IsPlaying then debounce = true camera.FieldOfView = 70 return end
  513. camera.FieldOfView = i
  514. wait()
  515. end
  516. if debounce then debounce = false return end
  517. if dancemode then
  518. for i,v in pairs(workspace:children()) do
  519. if not sound.IsPlaying then break end
  520. coroutine.wrap(function()
  521. if v:IsA("Model") and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("ModelForParts") == nil and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - head.Position).magnitude < 30 then
  522. danceAnimClone = danceAnim:clone()
  523. danceAnimClone.Parent = v
  524. danceAnimClone.AnimationId = "http://www.roblox.com/asset/?id=130018893"
  525. wait()
  526. NLS([[
  527. function animatehuman(animationid, object)
  528. local animation = object:findFirstChild("Humanoid"):LoadAnimation(animationid)
  529. animation:Play()
  530. end
  531. while wait(.5) do
  532. if game:service'Lighting':findFirstChild("STOPDANCING]]..plr.Name..[[") and game:service'Lighting':findFirstChild("STOPDANCING]]..plr.Name..[["):IsA("StringValue") then game:service'Debris':AddItem(script.Parent:findFirstChild("DancingAnimation"), 5) break end
  533. animatehuman(script.Parent:findFirstChild("DancingAnimation"), script.Parent)
  534. end
  535. ]], v)
  536. end
  537. end)()
  538. end
  539. end
  540. coroutine.wrap(function()
  541. while sound.IsPlaying do
  542. if charge <= 1 then
  543. if debounce then break end
  544. if not sound.IsPlaying then break end
  545. sound:stop()
  546. debounce = true
  547. chargetext.TextColor3 = Color3.new(1,0,0)
  548. dancebro = Instance.new("StringValue", game:service'Lighting')
  549. dancebro.Name = ('STOPDANCING'..plr.Name)
  550. game:service'Debris':AddItem(dancebro, 1)
  551. coroutine.wrap(function()
  552. repeat wait() until charge >= 10
  553. debounce = false
  554. chargetext.TextColor3 = Color3.new(1,1,1)
  555. end)()
  556. coroutine.wrap(function()
  557. while not sound.IsPlaying do
  558. if charge <= 100 then
  559. charge = charge + .1
  560. wait()
  561. elseif charge > 100 then
  562. charge = 100
  563. break
  564. end
  565. end
  566. end)()
  567. else
  568. charge = charge - .08
  569. wait()
  570. end
  571. end
  572. end)()
  573. coroutine.wrap(function()
  574. local ran,err = ypcall(function()
  575. while sound.IsPlaying and Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 do
  576. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  577. if not sound.IsPlaying then break end
  578. rayCast(speaker, 1250, 0, 5, "Lavender")
  579. wait(.35)
  580. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  581. if not sound.IsPlaying then break end
  582. rayCast(speaker, 1250, 0, 5, "Pink")
  583. wait(.95)
  584. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  585. if not sound.IsPlaying then break end
  586. rayCast(speaker, 1250, 0, 5, "Bright bluish green")
  587. wait(.55)
  588. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  589. if not sound.IsPlaying then break end
  590. rayCast(speaker, 1250, 0, 5, "Pink")
  591. wait(.4)
  592. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  593. if not sound.IsPlaying then break end
  594. rayCast(speaker, 1250, 0, 5, "Bright bluish green")
  595. local pl = Instance.new("PointLight", torso)
  596. pl.Color = Color3.new(153/255/1.25, 102/255/1.25, 204/255/1.25)
  597. pl.Range = 30
  598. pl.Brightness = 0.7
  599. game:service'Debris':AddItem(pl, .3)
  600. wait(.45)
  601. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then stopsound() break end
  602. if not sound.IsPlaying then break end
  603. rayCast(speaker, 1250, 0, 5, "Lavender")
  604. wait(.75)
  605. end
  606. end) if err then print(err) end
  607. end)()
  608. end)
  609.  
  610. mouse.Button1Up:connect(function(mous)
  611. stopsound()
  612. end)
  613. ctrl = false
  614. mouse.KeyDown:connect(function(k)
  615. if string.byte(k) == 50 then
  616. ctrl = true
  617. humanoid.WalkSpeed = 8
  618. end
  619. if string.byte(k) == 48 then
  620. humanoid.WalkSpeed = 28
  621. end
  622. end)
  623.  
  624. mouse.KeyUp:connect(function(k)
  625. if string.byte(k) == 50 then
  626. ctrl = false
  627. humanoid.WalkSpeed = 16
  628. end
  629. if string.byte(k) == 48 then
  630. humanoid.WalkSpeed = 16
  631. if ctrl then
  632. humanoid.WalkSpeed = 8
  633. end
  634. end
  635. end)
  636.  
  637. humanoid.Died:connect(function()
  638. deathpos = torso.Position
  639. WorkModel = Instance.new("Model", workspace)
  640. WorkModel.Name = " "
  641. wait(1/60)
  642. humanoid.Parent = nil
  643. if torso then
  644. local Head = char:FindFirstChild("Head")
  645. if Head then
  646. local Neck = Instance.new("Weld")
  647. Neck.Name = "Neck"
  648. Neck.Part0 = torso
  649. Neck.Part1 = Head
  650. Neck.C0 = CFrame.new(0, 1.5, 0)
  651. Neck.C1 = CFrame.new()
  652. Neck.Parent = torso
  653. end
  654. local Limb = char:FindFirstChild("Right Arm")
  655. if Limb then
  656.  
  657. Limb.CFrame = torso.CFrame * CFrame.new(1.5, 0, 0)
  658. local Joint = Instance.new("Glue")
  659. Joint.Name = "RightShoulder"
  660. Joint.Part0 = torso
  661. Joint.Part1 = Limb
  662. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  663. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  664. Joint.Parent = torso
  665.  
  666. local B = Instance.new("Part")
  667. B.TopSurface = 0
  668. B.BottomSurface = 0
  669. B.formFactor = "Symmetric"
  670. B.Size = Vector3.new(1, 1, 1)
  671. B.Transparency = 1
  672. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  673. B.Parent = char
  674. B.CanCollide = false
  675. local W = Instance.new("Weld")
  676. W.Part0 = Limb
  677. W.Part1 = B
  678. W.C0 = CFrame.new(0, -0.5, 0)
  679. W.Parent = Limb
  680.  
  681. end
  682. local Limb = char:FindFirstChild("Left Arm")
  683. if Limb then
  684.  
  685. Limb.CFrame = torso.CFrame * CFrame.new(-1.5, 0, 0)
  686. local Joint = Instance.new("Glue")
  687. Joint.Name = "LeftShoulder"
  688. Joint.Part0 = torso
  689. Joint.Part1 = Limb
  690. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  691. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  692. Joint.Parent = torso
  693.  
  694. local B = Instance.new("Part")
  695. B.TopSurface = 0
  696. B.BottomSurface = 0
  697. B.formFactor = "Symmetric"
  698. B.Size = Vector3.new(1, 1, 1)
  699. B.Transparency = 1
  700. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  701. B.Parent = char
  702. B.CanCollide = false
  703. local W = Instance.new("Weld")
  704. W.Part0 = Limb
  705. W.Part1 = B
  706. W.C0 = CFrame.new(0, -0.5, 0)
  707. W.Parent = Limb
  708.  
  709. end
  710. local Limb = char:FindFirstChild("Right Leg")
  711. if Limb then
  712.  
  713. Limb.CFrame = torso.CFrame * CFrame.new(0.5, -2, 0)
  714. local Joint = Instance.new("Glue")
  715. Joint.Name = "RightHip"
  716. Joint.Part0 = torso
  717. Joint.Part1 = Limb
  718. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  719. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  720. Joint.Parent = torso
  721.  
  722. local B = Instance.new("Part")
  723. B.TopSurface = 0
  724. B.BottomSurface = 0
  725. B.formFactor = "Symmetric"
  726. B.Size = Vector3.new(1, 1, 1)
  727. B.Transparency = 1
  728. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  729. B.Parent = char
  730. B.CanCollide = false
  731. local W = Instance.new("Weld")
  732. W.Part0 = Limb
  733. W.Part1 = B
  734. W.C0 = CFrame.new(0, -0.5, 0)
  735. W.Parent = Limb
  736.  
  737. end
  738. local Limb = char:FindFirstChild("Left Leg")
  739. if Limb then
  740.  
  741. Limb.CFrame = torso.CFrame * CFrame.new(-0.5, -2, 0)
  742. local Joint = Instance.new("Glue")
  743. Joint.Name = "LeftHip"
  744. Joint.Part0 = torso
  745. Joint.Part1 = Limb
  746. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  747. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  748. Joint.Parent = torso
  749.  
  750. local B = Instance.new("Part")
  751. B.TopSurface = 0
  752. B.BottomSurface = 0
  753. B.formFactor = "Symmetric"
  754. B.Size = Vector3.new(1, 1, 1)
  755. B.Transparency = 1
  756. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  757. B.Parent = char
  758. B.CanCollide = false
  759. local W = Instance.new("Weld")
  760. W.Part0 = Limb
  761. W.Part1 = B
  762. W.C0 = CFrame.new(0, -0.5, 0)
  763. W.Parent = Limb
  764. end
  765. for blood = 0, 3 do
  766. local blood = Instance.new("Part", workspace)
  767. blood.BrickColor = BrickColor.Red()
  768. blood.FormFactor = "Custom"
  769. blood.Size = Vector3.new(.2,.2,.2)
  770. blood.Anchored = true
  771. blood.TopSurface = "Smooth"
  772. blood.BackSurface = "Smooth"
  773. local bloodmesh = Instance.new("CylinderMesh", blood)
  774. bloodmesh.Scale = Vector3.new(3, 0, 3)
  775. local rayzb = Ray.new(torso.Position, Vector3.new(0, -20, 0) + Vector3.new(math.random(-2, 2), 0, math.random(-2, 2)))
  776. local hitzb, hitposb = workspace:findPartOnRay(rayzb, char)
  777. if hitzb then
  778. blood.CFrame = CFrame.new(hitposb.x,hitposb.y,hitposb.z)
  779. blood.CFrame = blood.CFrame * CFrame.new(0, .05, 0)
  780. coroutine.wrap(function()
  781. for cframe = 0, math.random(16, 24) do
  782. bloodmesh.Scale = bloodmesh.Scale + Vector3.new(.45, 0, .45)
  783. wait()
  784. end
  785. end)()
  786. elseif not hitzb then
  787. blood:Destroy()
  788. end
  789. end
  790. local BP = Instance.new("BodyPosition", torso)
  791. BP.maxForce = Vector3.new(1,1,1)/0
  792. BP.position = deathpos
  793. for i,v in pairs(char:children()) do
  794. if v:IsA("Part") then v.Parent = WorkModel end
  795. end
  796. wait(.3)
  797. BP:Destroy()
  798. end
  799. end)
  800.  
  801. local rlegm = Instance.new("Motor", torso)
  802. rlegm.C0 = CFrame.new(0.5, -1, 0)
  803. rlegm.C1 = CFrame.new(0, 1, 0)
  804. rlegm.Part0 = torso
  805. rlegm.Part1 = rl
  806. rlegm.Name = "Right Hip"
  807. local llegm = Instance.new("Motor", torso)
  808. llegm.C0 = CFrame.new(-0.5, -1, 0)
  809. llegm.C1 = CFrame.new(0, 1, 0)
  810. llegm.Part0 = torso
  811. llegm.Part1 = ll
  812. llegm.Name = "Left Hip"
  813. neck.C0 = CFrame.new(0, 1, 0)
  814. neck.C1 = CFrame.new(0, -0.5, 0)
  815. rj.C0 = CFrame.new(0, -1, 0)
  816. rj.C1 = CFrame.new(0, -1, 0)
  817. rsc0 = rm.C0
  818. lsc0 = lm.C0
  819. neckc0 = neck.C0
  820. rootc0 = rj.C0
  821. llc0 = llegm.C0
  822. rlc0 = rlegm.C0
  823. speed = 0.4
  824. angle = 0
  825. anglespeed = 0
  826. mvmnt = 0
  827. game:service'RunService'.RenderStepped:connect(function()
  828. angle = (angle % 100) + anglespeed/10
  829. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  830. local rscf = rsc0
  831. local lscf = lsc0
  832. local rlcf = rlc0
  833. local llcf = llc0
  834. local rjcf = rootc0
  835. local ncf = neckc0
  836. local rayz = Ray.new(rootpart.Position, Vector3.new(0, -4.1, 0))
  837. local hitz, enz = workspace:findPartOnRay(rayz, char)
  838. --math.asin(mouse.UnitRay.Direction.y)
  839. ncf = neckc0 * CFrame.Angles(camera.CoordinateFrame.lookVector.y, 0, 0)
  840. rscf = rsc0 * CFrame.new(-.55, 0, .35) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, 0)
  841. lscf = lsc0 * CFrame.new(.85, 0, -.65) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, math.rad(45))
  842. if firing then
  843. rscf = rsc0 * CFrame.new(-.55, .15, .65) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, 0)
  844. lscf = lsc0 * CFrame.new(.85, .15, -.35) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2, 0, math.rad(45))
  845. end
  846. if not hitz then
  847. ncf = neckc0 * CFrame.Angles(math.pi/18, 0, 0)
  848. rscf = rsc0 * CFrame.new(-.45, 0, -.75) * CFrame.Angles(math.pi/5+math.pi/18, 0, math.rad(-70))
  849. lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.pi/3.5+math.pi/18, 0, 0)
  850. rjcf = rootc0 * CFrame.Angles(-math.pi/32, 0, 0)
  851. rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) * CFrame.Angles(-math.pi/14, 0, 0)
  852. llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
  853. elseif humanoid.Sit then
  854. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  855. rjcf = rootc0 * CFrame.new(0, -.2, 0)
  856. rlcf = rlc0 * CFrame.Angles(math.pi/2, 0, math.rad(7.5))
  857. llcf = llc0 * CFrame.Angles(math.pi/2, 0, -math.rad(7.5))
  858. if sprinting then
  859. debounceofsprint = false
  860. sprinting = false
  861. end
  862. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  863. speed = 0.3
  864. if ctrl then
  865. rjcf = rootc0 * CFrame.new(0, -1.25, 0)
  866. llcf = llc0 * CFrame.new(0, 0, -.45) * CFrame.Angles(-math.pi/2.2, 0, 0)
  867. rlcf = rlcf * CFrame.new(0, 1.25, -.85)
  868. else
  869. rjcf = rootc0
  870. rlcf = rlc0 * CFrame.Angles(-math.rad(.5), 0, math.rad(1.5))
  871. llcf = llc0 * CFrame.Angles(math.rad(1.5), 0, -math.rad(1.5))
  872. end
  873. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 then
  874. if not humanoid.Sit then
  875. anglespeed = 2
  876. if ctrl then
  877. anglespeed = 3
  878. ncf = neckc0 * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/18, 0, 0)
  879. rjcf = rootc0 * CFrame.new(0, -.35, 0) * CFrame.Angles(-math.pi/18, 0, 0)
  880. rscf = rsc0 * CFrame.new(-.55, 0, .35) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2+math.pi/18, 0, 0)
  881. lscf = lsc0 * CFrame.new(.85, 0, -.65) * CFrame.Angles(camera.CoordinateFrame.lookVector.y+math.pi/2+math.pi/18, 0, math.rad(45))
  882. llcf = llc0 * CFrame.new(0, .45, -.35) * CFrame.Angles(math.pi/18 - math.sin(angle)*.45, 0, 0)
  883. rlcf = rlcf * CFrame.new(0, .45, -.35) * CFrame.Angles(math.pi/18 + math.sin(angle)*.45, 0, 0)
  884. else
  885. rjcf = rootc0
  886. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.65, 0, math.rad(.5))
  887. llcf = llc0 * CFrame.Angles(math.sin(angle)*.65, 0, -math.rad(.5))
  888. end
  889. if sprinting then
  890. debounceofsprint = false
  891. sprinting = false
  892. end
  893. end
  894. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
  895. if not humanoid.Sit then
  896. anglespeed = 2.7
  897. ncf = neckc0 * CFrame.Angles(math.pi/18, 0, 0)
  898. rscf = rsc0 * CFrame.new(-.45, 0, -.75) * CFrame.Angles(math.pi/5+math.pi/18, 0, math.rad(-70))
  899. lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.pi/3.5+math.pi/18, 0, 0)
  900. rjcf = rootc0 * CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/18, math.sin(angle)*.1, math.sin(angle)*.045)
  901. rlcf = rlc0 * CFrame.new(0, .3 + -math.cos(-angle)*.3, -.2+math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  902. llcf = llc0 * CFrame.new(0, .3 - -math.cos(angle)*.3, -.05-math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  903. sprinting = true
  904. debounceofsprint = true
  905. end
  906. end
  907. rm.C0 = clerp(rm.C0,rscf,speed)
  908. lm.C0 = clerp(lm.C0,lscf,speed)
  909. rj.C0 = clerp(rj.C0,rjcf,speed)
  910. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  911. llegm.C0 = clerp(llegm.C0,llcf,speed)
  912. neck.C0 = clerp(neck.C0,ncf,speed)
  913. end)
Add Comment
Please, Sign In to add comment