Advertisement
skylershults

Untitled

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