Advertisement
lafur

Untitled

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