Advertisement
zooperstar23

Untitled

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