Advertisement
BmanExoni

Untitled

Jun 21st, 2015
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --MADE BY OneLegend (NOT THE SCRIPT) LOCAL SCRIPT: Go to line 12 and put your name where it says "YOUR NAME HERE"
  2.  
  3.  
  4. Plrs = game:GetService("Players")
  5.  
  6.  
  7.  
  8. GuitarColour = "Navy blue"
  9.  
  10.  
  11.  
  12. me = Plrs.Control22
  13. char = me.Character
  14.  
  15. Modelname = "xGuitar"
  16.  
  17. Toolname = "Guitar"
  18.  
  19. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  20.  
  21. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  22.  
  23. selected = false
  24.  
  25. Hurt = false
  26.  
  27. Deb = true
  28.  
  29. Able = true
  30.  
  31. Prop = {Damage = 30}
  32.  
  33. volume = 0.75
  34.  
  35.  
  36.  
  37. ToolIcon = ""
  38.  
  39. MouseIc = ""
  40.  
  41. MouseDo = ""
  42.  
  43.  
  44.  
  45. Add = {
  46.  
  47. Sphere = function(P)
  48.  
  49. local m = Instance.new("SpecialMesh",P)
  50.  
  51. m.MeshType = "Sphere"
  52.  
  53. return m
  54.  
  55. end,
  56.  
  57. BF = function(P)
  58.  
  59. local bf = Instance.new("BodyForce",P)
  60.  
  61. bf.force = Vector3.new(0, P:GetMass()*187, 0)
  62.  
  63. return bf
  64.  
  65. end,
  66.  
  67. BP = function(P)
  68.  
  69. local bp = Instance.new("BodyPosition",P)
  70.  
  71. bp.maxForce = Vector3.new(math.huge, 0, math.huge)
  72.  
  73. bp.P = 14000
  74.  
  75. return bp
  76.  
  77. end,
  78.  
  79. BG = function(P)
  80.  
  81. local bg = Instance.new("BodyGyro",P)
  82.  
  83. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  84.  
  85. bg.P = 14000
  86.  
  87. return bg
  88.  
  89. end,
  90.  
  91. Mesh = function(P, ID, x, y, z)
  92.  
  93. local m = Instance.new("SpecialMesh")
  94.  
  95. m.MeshId = ID
  96.  
  97. m.Scale = Vector3.new(x, y, z)
  98.  
  99. m.Parent = P
  100.  
  101. return m
  102.  
  103. end,
  104.  
  105. Sound = function(P, ID, vol, pitch)
  106.  
  107. local s = Instance.new("Sound")
  108.  
  109. s.SoundId = ID
  110.  
  111. s.Volume = vol
  112.  
  113. s.Pitch = pitch
  114.  
  115. s.Parent = P
  116.  
  117. return s
  118.  
  119. end
  120.  
  121. }
  122.  
  123.  
  124.  
  125. function find(tab, arg)
  126.  
  127. local ah = nil
  128.  
  129. for i,v in pairs(tab) do
  130.  
  131. if v == arg then
  132.  
  133. ah = v
  134.  
  135. end
  136.  
  137. end
  138.  
  139. return ah
  140.  
  141. end
  142.  
  143.  
  144.  
  145. function getAllParts(from)
  146.  
  147. local t = {}
  148.  
  149. function getParts(where)
  150.  
  151. for i, v in pairs(where:children()) do
  152.  
  153. if v:IsA("BasePart") then
  154.  
  155. if v.Parent ~= char and v.Parent.Parent ~= char then
  156.  
  157. table.insert(t, v)
  158.  
  159. end
  160.  
  161. end
  162.  
  163. getParts(v)
  164.  
  165. end
  166.  
  167. end
  168.  
  169. getParts(workspace)
  170.  
  171. return t
  172.  
  173. end
  174.  
  175.  
  176.  
  177. function RayCast(pos1, pos2, maxDist, forward)
  178.  
  179. local list = getAllParts(workspace)
  180.  
  181. local pos0 = pos1
  182.  
  183. for dist = 1, maxDist, forward do
  184.  
  185. pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -dist)).p
  186.  
  187. for _, v in pairs(list) do
  188.  
  189. local pos3 = v.CFrame:pointToObjectSpace(pos0)
  190.  
  191. local s = v.Size
  192.  
  193. if pos3.x > -(s.x/2) and pos3.x < (s.x/2) and pos3.y > -(s.y/2) and pos3.y < (s.y/2) and pos3.z > -(s.z/2) and pos3.x < (s.z/2) and v.CanCollide == true then
  194.  
  195. return pos0, v
  196.  
  197. end
  198.  
  199. end
  200.  
  201. end
  202.  
  203. return pos0, nil
  204.  
  205. end
  206.  
  207.  
  208.  
  209. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  210.  
  211. local p = Instance.new("Part")
  212.  
  213. p.formFactor = "Custom"
  214.  
  215. p.Anchored = Anchor
  216.  
  217. p.CanCollide = Collide
  218.  
  219. p.Transparency = Tran
  220.  
  221. p.Reflectance = Ref
  222.  
  223. p.BrickColor = BrickColor.new(Color)
  224.  
  225. for _, Surf in pairs(Surfaces) do
  226.  
  227. p[Surf] = "Smooth"
  228.  
  229. end
  230.  
  231. p.Size = Vector3.new(X, Y, Z)
  232.  
  233. if Break then
  234.  
  235. p:BreakJoints()
  236.  
  237. else p:MakeJoints() end
  238.  
  239. p.Parent = Parent
  240.  
  241. return p
  242.  
  243. end
  244.  
  245.  
  246.  
  247. function Weld(p0, p1, x, y, z, a, b, c)
  248.  
  249. local w = Instance.new("Weld")
  250.  
  251. w.Parent = p0
  252.  
  253. w.Part0 = p0
  254.  
  255. w.Part1 = p1
  256.  
  257. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c)
  258.  
  259. return w
  260.  
  261. end
  262.  
  263.  
  264.  
  265. function ComputePos(pos1, pos2)
  266.  
  267. local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
  268.  
  269. return CFrame.new(pos1, pos3)
  270.  
  271. end
  272.  
  273.  
  274.  
  275. function getHumanoid(c)
  276.  
  277. local h = nil
  278.  
  279. for i,v in pairs(c:children()) do
  280.  
  281. if v:IsA("Humanoid") and c ~= char then
  282.  
  283. if v.Health > 0 then
  284.  
  285. h = v
  286.  
  287. end
  288.  
  289. end
  290.  
  291. end
  292.  
  293. return h
  294.  
  295. end
  296.  
  297.  
  298.  
  299. for i,v in pairs(char:children()) do
  300.  
  301. if v.Name == Modelname then
  302.  
  303. v:remove()
  304.  
  305. end
  306.  
  307. end
  308.  
  309.  
  310.  
  311. torso = char.Torso
  312.  
  313. neck = torso.Neck
  314.  
  315. hum = char.Humanoid
  316.  
  317. Rarm = char["Right Arm"]
  318.  
  319. Larm = char["Left Arm"]
  320.  
  321. Rleg = char["Right Leg"]
  322.  
  323. Lleg = char["Left Leg"]
  324.  
  325.  
  326.  
  327. hc = Instance.new("Humanoid")
  328.  
  329. hc.Health = 0
  330.  
  331. hc.MaxHealth = 0
  332.  
  333.  
  334.  
  335. slash = Add.Sound(nil, "rbxasset://sounds//swordslash.wav", 0.9, 0.8)
  336.  
  337. hitsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2801263", 0.7, 0.6)
  338.  
  339. charge = Add.Sound(nil, "http://www.roblox.com/asset/?id=2101137", 0.8, 0.65)
  340.  
  341. boom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2691586", 0.8, 0.3)
  342.  
  343. smashsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2692806", 0.8, 0.35)
  344.  
  345. boomboom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2760979", 1, 0.18)
  346.  
  347. GSound = Add.Sound(nil, "http://www.roblox.com/asset/?id=1089403", 0.75, 1)
  348.  
  349.  
  350.  
  351. function PlaySound(sound, pitch, vol)
  352.  
  353. local s = sound:clone()
  354.  
  355. if pitch ~= nil then
  356.  
  357. if tonumber(pitch) then
  358.  
  359. s.Pitch = tonumber(pitch)
  360.  
  361. end
  362.  
  363. end
  364.  
  365. if vol ~= nil then
  366.  
  367. if tonumber(vol) then
  368.  
  369. s.Volume = tonumber(vol)
  370.  
  371. end
  372.  
  373. end
  374.  
  375. s.Parent = torso
  376.  
  377. s.PlayOnRemove = true
  378.  
  379. coroutine.resume(coroutine.create(function()
  380.  
  381. wait()
  382.  
  383. s:remove()
  384.  
  385. end))
  386.  
  387. end
  388.  
  389.  
  390.  
  391. Mo = Instance.new("Model")
  392.  
  393. Mo.Name = Modelname
  394.  
  395.  
  396.  
  397. RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  398.  
  399. LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  400.  
  401. RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  402.  
  403. LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  404.  
  405.  
  406.  
  407. RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  408.  
  409. LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
  410.  
  411. RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
  412.  
  413. LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
  414.  
  415.  
  416.  
  417. RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0)
  418.  
  419. LAW = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0)
  420.  
  421. RLW = Weld(RLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  422.  
  423. LLW = Weld(LLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  424.  
  425.  
  426.  
  427. HB = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  428.  
  429. HBW = Weld(Rarm, HB, 0, 1, 0, 0, 0, 0)
  430.  
  431. HW = Weld(HB, nil, 0, -1.3, 0, math.pi/2, 0, 0)
  432.  
  433.  
  434.  
  435. TH = Weld(torso, nil, -0.8, 0.4, -0.4, 0, math.pi/2, math.rad(80))
  436.  
  437. THMain = TH.C1
  438.  
  439.  
  440.  
  441. RAWStand, LAWStand, RLWStand, LLWStand, HWStand = nil
  442.  
  443. NeckStand = necko * CFrame.Angles(math.rad(17), 0, math.rad(35))
  444.  
  445.  
  446.  
  447. handle = Part(Mo, false, false, 0, 0, GuitarColour, 0.6, 1.5, 1.5, true)
  448.  
  449. handle.Name = "Handle"
  450.  
  451.  
  452.  
  453. handletip1 = Part(Mo, false, false, 0, 0.2, "Really black", 0.5, 0.5, 0.5, true)
  454.  
  455. local w1 = Weld(handle, handletip1, 0, 1.12, 0, 0, 0, 0)
  456.  
  457. w1.C0 = CFrame.Angles(math.rad(-45), 0, 0)
  458.  
  459. Add.Mesh(handletip1, "http://www.roblox.com/asset/?id=9756362", 0.65, 0.45, 0.65)
  460.  
  461.  
  462.  
  463. handletip2 = Part(Mo, false, false, 0, 0.2, "Dark grey", 0.5, 0.5, 0.5, true)
  464.  
  465. Weld(handletip1, handletip2, 0, 0, 0, 0, math.rad(45), 0)
  466.  
  467. Add.Mesh(handletip2, "http://www.roblox.com/asset/?id=9756362", 0.65, 0.35, 0.65)
  468.  
  469.  
  470.  
  471. for i = 45, 360+45-90, 90 do
  472.  
  473. local p = Part(Mo, false, false, 0, 0, GuitarColour, 0.7, 0.9, 0.6, true)
  474.  
  475. local w = Weld(handle, p, 0, 0, 0, 0, 0, 0)
  476.  
  477. w.C0 = CFrame.Angles(0, math.pi/2, math.rad(i))
  478.  
  479. w.C1 = CFrame.new(-1, 0, 0) * CFrame.Angles(0, 0, math.pi/4)
  480.  
  481. end
  482.  
  483.  
  484.  
  485. for i = 0, 40, 40 do
  486.  
  487. local p = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.2, 0.2, true)
  488.  
  489. Add.Mesh(p, "http://www.roblox.com/asset/?id=1033714", 0.14, 0.12, 0.14)
  490.  
  491. local w = Weld(handle, p, 0, -0.35, -0.7, 0, 0, math.pi/2)
  492.  
  493. w.C0 = CFrame.Angles(math.rad(i+130), 0, 0)
  494.  
  495. local p2 = Part(Mo, false, false, 0, 0, "Black", 0.2, 0.2, 0.2, true)
  496.  
  497. Instance.new("CylinderMesh",p2).Scale = Vector3.new(1, 0.7, 1)
  498.  
  499. Weld(p, p2, 0, -0.04, 0, 0, 0, 0)
  500.  
  501. end
  502.  
  503.  
  504.  
  505. fretboard = Part(Mo, false, false, 0, 0, "Black", 0.45, 2.6, 0.6, true)
  506.  
  507. Weld(handle, fretboard, -0.1, -1.95, 0, math.pi/4, 0, 0)
  508.  
  509.  
  510.  
  511. for i = 0, 2.48, 2.48/10 do
  512.  
  513. local asd = (1*i)
  514.  
  515. local p = Part(Mo, false, false, 0, 0, "Medium grey", 0.2, 0.55, 0.2, true)
  516.  
  517. Instance.new("CylinderMesh",p).Scale = Vector3.new(0.3, 1, 0.3)
  518.  
  519. Weld(fretboard, p, -0.21, 0, -1.1+asd, math.pi/2, 0, 0)
  520.  
  521. end
  522.  
  523.  
  524.  
  525. Strings = {}
  526.  
  527. for i = -0.24, 0.24, 0.48/6 do
  528.  
  529. local p = Part(Mo, false, false, 0, 0, "Medium grey", 0.2, 3.7, 0.2, true)
  530.  
  531. Instance.new("CylinderMesh",p).Scale = Vector3.new(0.06, 1, 0.06)
  532.  
  533. local w = Weld(fretboard, p, -0.25, 0.75, i+0.04, 0, 0, 0)
  534.  
  535. table.insert(Strings, {p, w})
  536.  
  537. end
  538.  
  539.  
  540.  
  541. for i = -20, 20, 20 do
  542.  
  543. local asd = (20+i)/60
  544.  
  545. local p = Part(Mo, false, false, 0, 0, "White", 0.2, 0.3, 0.6, true)
  546.  
  547. Instance.new("BlockMesh",p).Scale = Vector3.new(1, 0.5, 1)
  548.  
  549. local w = Weld(fretboard, p, 0, 0, 0, 0, 0, 0)
  550.  
  551. w.C0 = CFrame.new(0.11, -1.5-asd, 0)
  552.  
  553. w.C1 = CFrame.Angles(math.rad(i), 0, 0)
  554.  
  555. for x = -0.18, 0.18, 0.18 do
  556.  
  557. local p2 = Part(Mo, false, false, 0, 0, "Medium grey", 0.2, 0.2, 0.2, true)
  558.  
  559. Instance.new("CylinderMesh",p2).Scale = Vector3.new(0.5, 0.3, 0.5)
  560.  
  561. Weld(p, p2, 0, -0.08, x, 0, 0, math.pi/2)
  562.  
  563. end
  564.  
  565. end
  566.  
  567.  
  568.  
  569. stringattach = Part(Mo, false, false, 0, 0, "Medium grey", 0.2, 0.2, 0.8, true)
  570.  
  571. Instance.new("BlockMesh",stringattach)
  572.  
  573. Weld(fretboard, stringattach, -0.13, 2.55, 0, 0, 0, 0)
  574.  
  575.  
  576.  
  577. vibra = Part(Mo, false, false, 0, 0, "Medium grey", 0.2, 0.32, 0.2, true)
  578.  
  579. Instance.new("SpecialMesh",vibra).Scale = Vector3.new(0.35, 1, 0.35)
  580.  
  581. VW = Weld(stringattach, vibra, 0, -0.15, 0, 0, 0, 0)
  582.  
  583. VW.C0 = CFrame.new(0, 0, -0.36) * CFrame.Angles(0, 0, math.rad(-75))
  584.  
  585.  
  586.  
  587. vibra2 = Part(Mo, false, false, 0, 0, "Medium grey", 0.2, 0.62, 0.2, true)
  588.  
  589. Instance.new("SpecialMesh",vibra2).Scale = Vector3.new(0.35, 1, 0.35)
  590.  
  591. vwz = Weld(vibra, vibra2, 0, -0.29, 0, 0, 0, 0)
  592.  
  593. vwz.C0 = CFrame.new(0, 0.15, 0) * CFrame.Angles(0, 0, math.rad(70))
  594.  
  595.  
  596.  
  597. vibra3 = Part(Mo, false, false, 0, 0, GuitarColour, 0.2, 0.3, 0.2, true)
  598.  
  599. Add.Sphere(vibra3).Scale = Vector3.new(0.55, 1, 0.55)
  600.  
  601. Weld(vibra2, vibra3, 0, -0.25, 0, 0, 0, 0)
  602.  
  603.  
  604.  
  605. stringat2 = Part(Mo, false, false, 0, 0, "Dark grey", 0.2, 0.2, 0.7, true)
  606.  
  607. Instance.new("BlockMesh",stringat2).Scale = Vector3.new(1, 0.3, 1)
  608.  
  609. Weld(stringattach, stringat2, -0.02, 0, 0, 0, 0, 0)
  610.  
  611.  
  612.  
  613. for i = -0.2, 0.21, 0.4/5 do
  614.  
  615. local p = Part(Mo, false, false, 0, 0, "Mid gray", 0.2, 0.2, 0.2, true)
  616.  
  617. Instance.new("BlockMesh",p).Scale = Vector3.new(1, 0.8, 0.2)
  618.  
  619. Weld(stringat2, p, -0.01, 0, i, 0, 0, 0)
  620.  
  621. end
  622.  
  623.  
  624.  
  625. stringattach2 = Part(Mo, false, false, 0, 0, GuitarColour, 0.45, 1.2, 0.62, true)
  626.  
  627. local wdz = Weld(fretboard, stringattach2, 0, 0, 0, 0, 0, math.rad(8))
  628.  
  629. wdz.C0 = CFrame.new(0.1, 1.7, 0)
  630.  
  631.  
  632.  
  633. for i = 0, 180, 180 do
  634.  
  635. local p = Part(Mo, false, false, 0, 0, GuitarColour, 0.45, 1.2, 0.62, true)
  636.  
  637. Instance.new("SpecialMesh",p).MeshType = "Wedge"
  638.  
  639. local w = Weld(stringattach2, p, 0, 0, -0.21, math.rad(20), 0, math.pi)
  640.  
  641. w.C0 = CFrame.new(0, 0.4, 0) * CFrame.Angles(0, math.rad(i), 0)
  642.  
  643. for x = -0.4, 0.2, 0.3 do
  644.  
  645. local asd = -0.15 + (i/600)
  646.  
  647. local p2 = Part(Mo, false, false, 0, 0, "Dark grey", 0.2, 0.2, 0.2, true)
  648.  
  649. local w2 = Weld(p, p2, 0, 0, 0, 0, 0, math.pi/2)
  650.  
  651. w2.C0 = CFrame.new(asd, x, 0.15)
  652.  
  653. Instance.new("CylinderMesh",p2)
  654.  
  655. local p3 = Part(Mo, false, false, 0, 0, "Medium grey", 0.2, 0.3, 0.2, true)
  656.  
  657. Instance.new("CylinderMesh",p3).Scale = Vector3.new(0.8, 1, 0.8)
  658.  
  659. Weld(p2, p3, 0, 0, 0, 0, 0, 0)
  660.  
  661. end
  662.  
  663. end
  664.  
  665.  
  666.  
  667. for i = -0.6, 0.61, 1.2 do
  668.  
  669. local p = Part(Mo, false, false, 0, 0, "Really black", 0.5, 2.8, 0.2, true)
  670.  
  671. Weld(torso, p, 0, 0, i, 0, 0, math.rad(-40))
  672.  
  673. local p2 = Part(Mo, false, false, 0, 0, "Really black", 0.5, 0.2, 1.1, true)
  674.  
  675. Weld(torso, p2, -i*1.4, i*1.75, 0, 0, 0, 0)
  676.  
  677.  
  678.  
  679. end
  680.  
  681. Mo.Parent = char
  682.  
  683. TH.Part1 = handle
  684.  
  685.  
  686.  
  687. if script.Parent.className ~= "HopperBin" then
  688.  
  689. h = Instance.new("HopperBin",me.Backpack)
  690.  
  691. h.Name = Toolname
  692.  
  693. h.TextureId = ToolIcon
  694.  
  695. script.Parent = h
  696.  
  697. end
  698.  
  699.  
  700.  
  701. bin = script.Parent
  702.  
  703.  
  704.  
  705. function detach(bool)
  706.  
  707. LLW.C0 = CFrame.new(0, 0, 0)
  708.  
  709. RLW.C0 = CFrame.new(0, 0, 0)
  710.  
  711. LAW.C0 = CFrame.new(0,0,0)
  712.  
  713. RAW.C0 = CFrame.new(0, 0, 0)
  714.  
  715. if bool then
  716.  
  717. LLW.Part1 = nil
  718.  
  719. RLW.Part1 = nil
  720.  
  721. RAW.Part1 = nil
  722.  
  723. LAW.Part1 = nil
  724.  
  725. end
  726.  
  727. end
  728.  
  729.  
  730.  
  731. function attach()
  732.  
  733. RAW.Part1 = Rarm
  734.  
  735. LAW.Part1 = Larm
  736.  
  737. RLW.Part1 = Rleg
  738.  
  739. LLW.Part1 = Lleg
  740.  
  741. end
  742.  
  743.  
  744.  
  745. function normal()
  746.  
  747. neck.C0 = NeckStand
  748.  
  749. RAW.C0 = RAWStand
  750.  
  751. LAW.C0 = LAWStand
  752.  
  753. RLW.C0 = RLWStand
  754.  
  755. LLW.C0 = LLWStand
  756.  
  757. RAW.C1 = CFrame.new(0, 0.5, 0)
  758.  
  759. LAW.C1 = CFrame.new(0, 0.5, 0)
  760.  
  761. RLW.C1 = CFrame.new(0, 0.8, 0)
  762.  
  763. LLW.C1 = CFrame.new(0, 0.8, 0)
  764.  
  765. HW.C0 = HWStand
  766.  
  767. end
  768.  
  769.  
  770.  
  771. function selectanim()
  772.  
  773. RAW.Part1 = Rarm
  774.  
  775. for i = 0.09, 1, 0.09 do
  776.  
  777. TH.C0 = CFrame.Angles(0, math.rad(90*i), 0)
  778.  
  779. TH.C1 = THMain * CFrame.Angles(0, 0, math.rad(-30*i)) * CFrame.new(0, 0.3*i, -0.1*i)
  780.  
  781. RAW.C0 = CFrame.Angles(math.rad(110*i), 0, math.rad(10*i)) * CFrame.new(0, 0, -0.3*i)
  782.  
  783. neck.C0 = necko * CFrame.Angles(math.rad(5*i), 0, math.rad(-35*i))
  784.  
  785. wait()
  786.  
  787. end
  788.  
  789. LAW.Part1 = Larm
  790.  
  791. for i = 0.1, 1, 0.1 do
  792.  
  793. TH.C0 = CFrame.Angles(0, math.rad(90+90*i), 0)
  794.  
  795. TH.C1 = THMain * CFrame.Angles(math.rad(15*i), 0, math.rad(-30-30*i)) * CFrame.new(0, 0.3+0.2*i, -0.1)
  796.  
  797. RAW.C0 = CFrame.Angles(math.rad(110-65*i), 0, math.rad(10-30*i)) * CFrame.new(0, -0.5*i, -0.3-0.2*i)
  798.  
  799. LAW.C0 = CFrame.Angles(math.rad(75*i), math.rad(-15*i), math.rad(-10*i)) * CFrame.new(0, -0.2*i, 0)
  800.  
  801. neck.C0 = necko * CFrame.Angles(math.rad(5+12*i), 0, math.rad(-35+70*i))
  802.  
  803. wait()
  804.  
  805. end
  806.  
  807. if RAWStand == nil then
  808.  
  809. RAWStand = RAW.C0
  810.  
  811. LAWStand = LAW.C0
  812.  
  813. RLWStand = RLW.C0
  814.  
  815. LLWStand = LLW.C0
  816.  
  817. HWStand = HW.C0
  818.  
  819. end
  820.  
  821. normal()
  822.  
  823. end
  824.  
  825.  
  826.  
  827. function deselanim()
  828.  
  829. for i = 0.9, 0, -0.1 do
  830.  
  831. TH.C0 = CFrame.Angles(0, math.rad(90+90*i), 0)
  832.  
  833. TH.C1 = THMain * CFrame.Angles(math.rad(15*i), 0, math.rad(-30-30*i)) * CFrame.new(0, 0.3+0.2*i, -0.1)
  834.  
  835. RAW.C0 = CFrame.Angles(math.rad(110-65*i), 0, math.rad(10-30*i)) * CFrame.new(0, -0.5*i, -0.3-0.2*i)
  836.  
  837. LAW.C0 = CFrame.Angles(math.rad(75*i), math.rad(-15*i), math.rad(-10*i)) * CFrame.new(0, -0.2*i, 0)
  838.  
  839. neck.C0 = necko * CFrame.Angles(math.rad(5+12*i), 0, math.rad(-35+70*i))
  840.  
  841. wait()
  842.  
  843. end
  844.  
  845. LAW.Part1 = nil
  846.  
  847. for i = 0.91, 0, -0.09 do
  848.  
  849. TH.C0 = CFrame.Angles(0, math.rad(90*i), 0)
  850.  
  851. TH.C1 = THMain * CFrame.Angles(0, 0, math.rad(-30*i)) * CFrame.new(0, 0.3*i, -0.1*i)
  852.  
  853. RAW.C0 = CFrame.Angles(math.rad(110*i), 0, math.rad(10*i)) * CFrame.new(0, 0, -0.3*i)
  854.  
  855. neck.C0 = necko * CFrame.Angles(math.rad(5*i), 0, math.rad(-35*i))
  856.  
  857. wait()
  858.  
  859. end
  860.  
  861. neck.C0 = necko
  862.  
  863. detach(true)
  864.  
  865. end
  866.  
  867.  
  868.  
  869. keys = {"r", "t", "y", "u", "f", "g", "h", "j", "k", "l", "z", "x", "c", "v", "b", "n", "m"}
  870.  
  871.  
  872.  
  873. function PlayString(pitch, vol)
  874.  
  875. LAW.C0 = LAWStand * CFrame.new(pitch/7, 0, 0) * CFrame.Angles(0, 0, math.rad(pitch*18))
  876.  
  877. neck.C0 = NeckStand * CFrame.Angles(0, 0, math.rad(-pitch*13))
  878.  
  879. for i = 0, 1, 0.5 do
  880.  
  881. RAW.C0 = RAWStand * CFrame.Angles(math.rad(-5*i), 0, math.rad(-15*i)) * CFrame.new(0, 0.3*i, 0)
  882.  
  883. wait()
  884.  
  885. end
  886.  
  887. PlaySound(GSound, pitch, vol)
  888.  
  889. for i = 0, 1, 0.33 do
  890.  
  891. RAW.C0 = RAWStand * CFrame.Angles(math.rad(-5-10*i), 0, math.rad(-15+35*i)) * CFrame.new(0, 0.3-0.8*i, 0)
  892.  
  893. wait()
  894.  
  895. end
  896.  
  897. local lol = math.floor(pitch*2.5)
  898.  
  899. if lol < 1 then lol = 1 elseif lol > #keys then lol = #keys end
  900.  
  901. coroutine.resume(coroutine.create(function()
  902.  
  903. local vollol = vol*40
  904.  
  905. for i = 1, math.random(vollol/1.8, vollol) do
  906.  
  907. Strings[lol][2].C0 = CFrame.new(0, 0, math.random(-vollol, vollol)/1000)
  908.  
  909. wait()
  910.  
  911. end
  912.  
  913. Strings[lol][2].C0 = CFrame.new()
  914.  
  915. end))
  916.  
  917. for i = 0, 1, 0.25 do
  918.  
  919. RAW.C0 = RAWStand * CFrame.Angles(math.rad(-5-10+15*i), 0, math.rad(20-20*i)) * CFrame.new(0, 0.3-0.8+0.5*i, 0)
  920.  
  921. wait()
  922.  
  923. end
  924.  
  925. RAW.C0 = RAWStand
  926.  
  927. end
  928.  
  929.  
  930.  
  931. function select(mouse)
  932.  
  933. selectanim()
  934.  
  935. selected = true
  936.  
  937. mouse.KeyDown:connect(function(key)
  938.  
  939. key = key:lower()
  940.  
  941. for i, v in pairs(keys) do
  942.  
  943. if key == v then
  944.  
  945. local pitch = 0.3 + (i/7.5)
  946.  
  947. PlayString(pitch, volume)
  948.  
  949. end
  950.  
  951. end
  952.  
  953. end)
  954.  
  955. end
  956.  
  957.  
  958.  
  959. function deselect(mouse)
  960.  
  961. selected = false
  962.  
  963. deselanim()
  964.  
  965. end
  966.  
  967.  
  968.  
  969. bin.Selected:connect(select)
  970.  
  971. bin.Deselected:connect(deselect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement