DarkScriptZEditors

Untitled

Jan 9th, 2019
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.84 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return rawget(self,s) or _rg:GetService(s)
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136. --[[
  137. Script shared by eletronix ]]
  138.  
  139. GuitarColour = "Medium blue"
  140. me = game.Players.LocalPlayer
  141. char = me.Character
  142. Modelname = "xGuitar"
  143. Toolname = "Guitar"
  144. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  145. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  146. selected = false
  147. Hurt = false
  148. Deb = true
  149. Able = true
  150. Prop = {Damage = 30}
  151. volume = 0.75
  152. ToolIcon = ""
  153. MouseIc = ""
  154. MouseDo = ""
  155. Add = {
  156. Sphere = function(P)
  157. local m = Instance.new("SpecialMesh",P)
  158. m.MeshType = "Sphere"
  159. return m
  160. end,
  161. BF = function(P)
  162. local bf = Instance.new("BodyForce",P)
  163. bf.force = Vector3.new(0, P:GetMass()*187, 0)
  164. return bf
  165. end,
  166. BP = function(P)
  167. local bp = Instance.new("BodyPosition",P)
  168. bp.maxForce = Vector3.new(math.huge, 0, math.huge)
  169. bp.P = 14000
  170. return bp
  171. end,
  172. BG = function(P)
  173. local bg = Instance.new("BodyGyro",P)
  174. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  175. bg.P = 14000
  176. return bg
  177. end,
  178. Mesh = function(P, ID, x, y, z)
  179. local m = Instance.new("SpecialMesh")
  180. m.MeshId = ID
  181. m.Scale = Vector3.new(x, y, z)
  182. m.Parent = P
  183. return m
  184. end,
  185. Sound = function(P, ID, vol, pitch)
  186. local s = Instance.new("Sound")
  187. s.SoundId = ID
  188. s.Volume = vol
  189. s.Pitch = pitch
  190. s.Parent = P
  191. return s
  192. end
  193. }
  194. function find(tab, arg)
  195. local ah = nil
  196. for i,v in pairs(tab) do
  197. if v == arg then
  198. ah = v
  199. end
  200. end
  201. return ah
  202. end
  203. function getAllParts(from)
  204. local t = {}
  205. function getParts(where)
  206. for i, v in pairs(where:children()) do
  207. if v:IsA("BasePart") then
  208. if v.Parent ~= char and v.Parent.Parent ~= char then
  209. table.insert(t, v)
  210. end
  211. end
  212. getParts(v)
  213. end
  214. end
  215. getParts(workspace)
  216. return t
  217. end
  218. function RayCast(pos1, pos2, maxDist, forward)
  219. local list = getAllParts(workspace)
  220. local pos0 = pos1
  221. for dist = 1, maxDist, forward do
  222. pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -dist)).p
  223. for _, v in pairs(list) do
  224. local pos3 = v.CFrame:pointToObjectSpace(pos0)
  225. local s = v.Size
  226. 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
  227. return pos0, v
  228. end
  229. end
  230. end
  231. return pos0, nil
  232. end
  233. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  234. local p = Instance.new("Part")
  235. p.formFactor = "Custom"
  236. p.Anchored = Anchor
  237. p.CanCollide = Collide
  238. p.Transparency = Tran
  239. p.Reflectance = Ref
  240. p.BrickColor = BrickColor.new(Color)
  241. for _, Surf in pairs(Surfaces) do
  242. p[Surf] = "Smooth"
  243. end
  244. p.Size = Vector3.new(X, Y, Z)
  245. if Break then
  246. p:BreakJoints()
  247. else p:MakeJoints() end
  248. p.Parent = Parent
  249. return p
  250. end
  251. function Weld(p0, p1, x, y, z, a, b, c)
  252. local w = Instance.new("Weld")
  253. w.Parent = p0
  254. w.Part0 = p0
  255. w.Part1 = p1
  256. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c)
  257. return w
  258. end
  259. function ComputePos(pos1, pos2)
  260. local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
  261. return CFrame.new(pos1, pos3)
  262. end
  263. function getHumanoid(c)
  264. local h = nil
  265. for i,v in pairs(c:children()) do
  266. if v:IsA("Humanoid") and c ~= char then
  267. if v.Health > 0 then
  268. h = v
  269. end
  270. end
  271. end
  272. return h
  273. end
  274. for i,v in pairs(char:children()) do
  275. if v.Name == Modelname then
  276. v:remove()
  277. end
  278. end
  279. torso = char.Torso
  280. neck = torso.Neck
  281. hum = char.Humanoid
  282. Rarm = char["Right Arm"]
  283. Larm = char["Left Arm"]
  284. Rleg = char["Right Leg"]
  285. Lleg = char["Left Leg"]
  286. hc = Instance.new("Humanoid")
  287. hc.Health = 0
  288. hc.MaxHealth = 0
  289. slash = Add.Sound(nil, "rbxasset://sounds//swordslash.wav", 0.9, 0.8)
  290. hitsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2801263", 0.7, 0.6)
  291. charge = Add.Sound(nil, "http://www.roblox.com/asset/?id=2101137", 0.8, 0.65)
  292. boom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2691586", 0.8, 0.3)
  293. smashsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2692806", 0.8, 0.35)
  294. boomboom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2760979", 1, 0.18)
  295. GSound = Add.Sound(workspace, "http://www.roblox.com/asset/?id=1089403", 0.75, 1)
  296. Mo = Instance.new("Model")
  297. Mo.Name = Modelname
  298. RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  299. LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  300. RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  301. LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  302. RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  303. LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
  304. RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
  305. LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
  306. RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0)
  307. LAW = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0)
  308. RLW = Weld(RLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  309. LLW = Weld(LLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  310. HB = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  311. HBW = Weld(Rarm, HB, 0, 1, 0, 0, 0, 0)
  312. HW = Weld(HB, nil, 0, -1.3, 0, math.pi/2, 0, 0)
  313. TH = Weld(torso, nil, -0.8, 0.4, -0.4, 0, math.pi/2, math.rad(80))
  314. THMain = TH.C1
  315. RAWStand, LAWStand, RLWStand, LLWStand, HWStand = nil
  316. NeckStand = necko * CFrame.Angles(math.rad(17), 0, math.rad(35))
  317. handle = Part(Mo, false, false, 0, 0, GuitarColour, 0.6, 1.5, 1.5, true)
  318. handle.Name = "Handle"
  319. handletip1 = Part(Mo, false, false, 0, 0.2, "Really black", 0.5, 0.5, 0.5, true)
  320. local w1 = Weld(handle, handletip1, 0, 1.12, 0, 0, 0, 0)
  321. w1.C0 = CFrame.Angles(math.rad(-45), 0, 0)
  322. Add.Mesh(handletip1, "http://www.roblox.com/asset/?id=9756362", 0.65, 0.45, 0.65)
  323. handletip2 = Part(Mo, false, false, 0, 0.2, "White", 0.5, 0.5, 0.5, true)
  324. Weld(handletip1, handletip2, 0, 0, 0, 0, math.rad(45), 0)
  325. Add.Mesh(handletip2, "http://www.roblox.com/asset/?id=9756362", 0.65, 0.35, 0.65)
  326. for i = 45, 360+45-90, 90 do
  327. local p = Part(Mo, false, false, 0, 0, GuitarColour, 0.7, 0.9, 0.6, true)
  328. local w = Weld(handle, p, 0, 0, 0, 0, 0, 0)
  329. w.C0 = CFrame.Angles(0, math.pi/2, math.rad(i))
  330. w.C1 = CFrame.new(-1, 0, 0) * CFrame.Angles(0, 0, math.pi/4)
  331. end
  332. for i = 0, 40, 40 do
  333. local p = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.2, 0.2, true)
  334. Add.Mesh(p, "http://www.roblox.com/asset/?id=1033714", 0.14, 0.12, 0.14)
  335. local w = Weld(handle, p, 0, -0.35, -0.7, 0, 0, math.pi/2)
  336. w.C0 = CFrame.Angles(math.rad(i+130), 0, 0)
  337. local p2 = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.2, 0.2, true)
  338. Instance.new("CylinderMesh",p2).Scale = Vector3.new(1, 0.7, 1)
  339. Weld(p, p2, 0, -0.04, 0, 0, 0, 0)
  340. end
  341. fretboard = Part(Mo, false, false, 0, 0, "Really black", 0.45, 2.6, 0.6, true)
  342. Weld(handle, fretboard, -0.1, -1.95, 0, math.pi/4, 0, 0)
  343. for i = 0, 2.48, 2.48/10 do
  344. local asd = (1*i)
  345. local p = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.55, 0.2, true)
  346. Instance.new("CylinderMesh",p).Scale = Vector3.new(0.3, 1, 0.3)
  347. Weld(fretboard, p, -0.21, 0, -1.1+asd, math.pi/2, 0, 0)
  348. end
  349. Strings = {}
  350. for i = -0.24, 0.24, 0.48/6 do
  351. local p = Part(Mo, false, false, 0, 0, "White", 0.2, 3.7, 0.2, true)
  352. Instance.new("CylinderMesh",p).Scale = Vector3.new(0.06, 1, 0.06)
  353. local w = Weld(fretboard, p, -0.25, 0.75, i+0.04, 0, 0, 0)
  354. table.insert(Strings, {p, w})
  355. end
  356. for i = -20, 20, 20 do
  357. local asd = (20+i)/60
  358. local p = Part(Mo, false, false, 0, 0, "White", 0.2, 0.3, 0.6, true)
  359. Instance.new("BlockMesh",p).Scale = Vector3.new(1, 0.5, 1)
  360. local w = Weld(fretboard, p, 0, 0, 0, 0, 0, 0)
  361. w.C0 = CFrame.new(0.11, -1.5-asd, 0)
  362. w.C1 = CFrame.Angles(math.rad(i), 0, 0)
  363. for x = -0.18, 0.18, 0.18 do
  364. local p2 = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.2, 0.2, true)
  365. Instance.new("CylinderMesh",p2).Scale = Vector3.new(0.5, 0.3, 0.5)
  366. Weld(p, p2, 0, -0.08, x, 0, 0, math.pi/2)
  367. end
  368. end
  369. stringattach = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.2, 0.8, true)
  370. Instance.new("BlockMesh",stringattach)
  371. Weld(fretboard, stringattach, -0.13, 2.55, 0, 0, 0, 0)
  372. vibra = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.32, 0.2, true)
  373. Instance.new("SpecialMesh",vibra).Scale = Vector3.new(0.35, 1, 0.35)
  374. VW = Weld(stringattach, vibra, 0, -0.15, 0, 0, 0, 0)
  375. VW.C0 = CFrame.new(0, 0, -0.36) * CFrame.Angles(0, 0, math.rad(-75))
  376. vibra2 = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.62, 0.2, true)
  377. Instance.new("SpecialMesh",vibra2).Scale = Vector3.new(0.35, 1, 0.35)
  378. vwz = Weld(vibra, vibra2, 0, -0.29, 0, 0, 0, 0)
  379. vwz.C0 = CFrame.new(0, 0.15, 0) * CFrame.Angles(0, 0, math.rad(70))
  380. vibra3 = Part(Mo, false, false, 0, 0, GuitarColour, 0.2, 0.3, 0.2, true)
  381. Add.Sphere(vibra3).Scale = Vector3.new(0.55, 1, 0.55)
  382. Weld(vibra2, vibra3, 0, -0.25, 0, 0, 0, 0)
  383. stringat2 = Part(Mo, false, false, 0, 0, "White", 0.2, 0.2, 0.7, true)
  384. Instance.new("BlockMesh",stringat2).Scale = Vector3.new(1, 0.3, 1)
  385. Weld(stringattach, stringat2, -0.02, 0, 0, 0, 0, 0)
  386. for i = -0.2, 0.21, 0.4/5 do
  387. local p = Part(Mo, false, false, 0, 0, "White", 0.2, 0.2, 0.2, true)
  388. Instance.new("BlockMesh",p).Scale = Vector3.new(1, 0.8, 0.2)
  389. Weld(stringat2, p, -0.01, 0, i, 0, 0, 0)
  390. end
  391. stringattach2 = Part(Mo, false, false, 0, 0, GuitarColour, 0.45, 1.2, 0.62, true)
  392. local wdz = Weld(fretboard, stringattach2, 0, 0, 0, 0, 0, math.rad(8))
  393. wdz.C0 = CFrame.new(0.1, 1.7, 0)
  394. for i = 0, 180, 180 do
  395. local p = Part(Mo, false, false, 0, 0, GuitarColour, 0.45, 1.2, 0.62, true)
  396. Instance.new("SpecialMesh",p).MeshType = "Wedge"
  397. local w = Weld(stringattach2, p, 0, 0, -0.21, math.rad(20), 0, math.pi)
  398. w.C0 = CFrame.new(0, 0.4, 0) * CFrame.Angles(0, math.rad(i), 0)
  399. for x = -0.4, 0.2, 0.3 do
  400. local asd = -0.15 + (i/600)
  401. local p2 = Part(Mo, false, false, 0, 0, "White", 0.2, 0.2, 0.2, true)
  402. local w2 = Weld(p, p2, 0, 0, 0, 0, 0, math.pi/2)
  403. w2.C0 = CFrame.new(asd, x, 0.15)
  404. Instance.new("CylinderMesh",p2)
  405. local p3 = Part(Mo, false, false, 0, 0, "Really black", 0.2, 0.3, 0.2, true)
  406. Instance.new("CylinderMesh",p3).Scale = Vector3.new(0.8, 1, 0.8)
  407. Weld(p2, p3, 0, 0, 0, 0, 0, 0)
  408. end
  409. end
  410. for i = -0.6, 0.61, 1.2 do
  411. local p = Part(Mo, false, false, 0, 0, "Really black", 0.5, 2.8, 0.2, true)
  412. Weld(torso, p, 0, 0, i, 0, 0, math.rad(-40))
  413. local p2 = Part(Mo, false, false, 0, 0, "Really black", 0.5, 0.2, 1.1, true)
  414. Weld(torso, p2, -i*1.4, i*1.75, 0, 0, 0, 0)
  415.  
  416. end
  417. Mo.Parent = char
  418. TH.Part1 = handle
  419. if script.Parent.className ~= "HopperBin" then
  420. h = Instance.new("HopperBin",me.Backpack)
  421. h.Name = Toolname
  422. h.TextureId = ToolIcon
  423. script.Parent = h
  424. end
  425. bin = script.Parent
  426. function detach(bool)
  427. LLW.C0 = CFrame.new(0, 0, 0)
  428. RLW.C0 = CFrame.new(0, 0, 0)
  429. LAW.C0 = CFrame.new(0,0,0)
  430. RAW.C0 = CFrame.new(0, 0, 0)
  431. if bool then
  432. LLW.Part1 = nil
  433. RLW.Part1 = nil
  434. RAW.Part1 = nil
  435. LAW.Part1 = nil
  436. end
  437. end
  438. function attach()
  439. RAW.Part1 = Rarm
  440. LAW.Part1 = Larm
  441. RLW.Part1 = Rleg
  442. LLW.Part1 = Lleg
  443. end
  444. function normal()
  445. neck.C0 = NeckStand
  446. RAW.C0 = RAWStand
  447. LAW.C0 = LAWStand
  448. RLW.C0 = RLWStand
  449. LLW.C0 = LLWStand
  450. RAW.C1 = CFrame.new(0, 0.5, 0)
  451. LAW.C1 = CFrame.new(0, 0.5, 0)
  452. RLW.C1 = CFrame.new(0, 0.8, 0)
  453. LLW.C1 = CFrame.new(0, 0.8, 0)
  454. HW.C0 = HWStand
  455. end
  456. function selectanim()
  457. RAW.Part1 = Rarm
  458. for i = 0.09, 1, 0.09 do
  459. TH.C0 = CFrame.Angles(0, math.rad(90*i), 0)
  460. TH.C1 = THMain * CFrame.Angles(0, 0, math.rad(-30*i)) * CFrame.new(0, 0.3*i, -0.1*i)
  461. RAW.C0 = CFrame.Angles(math.rad(110*i), 0, math.rad(10*i)) * CFrame.new(0, 0, -0.3*i)
  462. neck.C0 = necko * CFrame.Angles(math.rad(5*i), 0, math.rad(-35*i))
  463. wait()
  464. end
  465. LAW.Part1 = Larm
  466. for i = 0.1, 1, 0.1 do
  467. TH.C0 = CFrame.Angles(0, math.rad(90+90*i), 0)
  468. 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)
  469. 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)
  470. LAW.C0 = CFrame.Angles(math.rad(75*i), math.rad(-15*i), math.rad(-10*i)) * CFrame.new(0, -0.2*i, 0)
  471. neck.C0 = necko * CFrame.Angles(math.rad(5+12*i), 0, math.rad(-35+70*i))
  472. wait()
  473. end
  474. if RAWStand == nil then
  475. RAWStand = RAW.C0
  476. LAWStand = LAW.C0
  477. RLWStand = RLW.C0
  478. LLWStand = LLW.C0
  479. HWStand = HW.C0
  480. end
  481. normal()
  482. end
  483. function deselanim()
  484. for i = 0.9, 0, -0.1 do
  485. TH.C0 = CFrame.Angles(0, math.rad(90+90*i), 0)
  486. 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)
  487. 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)
  488. LAW.C0 = CFrame.Angles(math.rad(75*i), math.rad(-15*i), math.rad(-10*i)) * CFrame.new(0, -0.2*i, 0)
  489. neck.C0 = necko * CFrame.Angles(math.rad(5+12*i), 0, math.rad(-35+70*i))
  490. wait()
  491. end
  492. LAW.Part1 = nil
  493. for i = 0.91, 0, -0.09 do
  494. TH.C0 = CFrame.Angles(0, math.rad(90*i), 0)
  495. TH.C1 = THMain * CFrame.Angles(0, 0, math.rad(-30*i)) * CFrame.new(0, 0.3*i, -0.1*i)
  496. RAW.C0 = CFrame.Angles(math.rad(110*i), 0, math.rad(10*i)) * CFrame.new(0, 0, -0.3*i)
  497. neck.C0 = necko * CFrame.Angles(math.rad(5*i), 0, math.rad(-35*i))
  498. wait()
  499. end
  500. neck.C0 = necko
  501. detach(true)
  502. end
  503. keys = {"r", "t", "y", "u", "f", "g", "h", "j", "k", "l", "z", "x", "c", "v", "b", "n", "m"}
  504. function PlayString(pitch, vol)
  505. LAW.C0 = LAWStand * CFrame.new(pitch/7, 0, 0) * CFrame.Angles(0, 0, math.rad(pitch*18))
  506. neck.C0 = NeckStand * CFrame.Angles(0, 0, math.rad(-pitch*13))
  507. for i = 0, 1, 0.5 do
  508. RAW.C0 = RAWStand * CFrame.Angles(math.rad(-5*i), 0, math.rad(-15*i)) * CFrame.new(0, 0.3*i, 0)
  509. wait()
  510. end
  511. GSound.Pitch=pitch
  512. GSound.Volume=vol
  513. GSound:Play()
  514. for i = 0, 1, 0.33 do
  515. 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)
  516. wait()
  517. end
  518. local lol = math.floor(pitch*2.5)
  519. if lol < 1 then lol = 1 elseif lol > #keys then lol = #keys end
  520. coroutine.resume(coroutine.create(function()
  521. local vollol = vol*40
  522. for i = 1, math.random(vollol/1.8, vollol) do
  523. Strings[lol][2].C0 = CFrame.new(0, 0, math.random(-vollol, vollol)/1000)
  524. wait()
  525. end
  526. Strings[lol][2].C0 = CFrame.new()
  527. end))
  528. for i = 0, 1, 0.25 do
  529. 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)
  530. wait()
  531. end
  532. RAW.C0 = RAWStand
  533. end
  534. function select(mouse)
  535. selectanim()
  536. selected = true
  537. mouse.KeyDown:connect(function(key)
  538. key = key:lower()
  539. for i, v in pairs(keys) do
  540. if key == v then
  541. local pitch = 0.3 + (i/7.5)
  542. PlayString(pitch, volume)
  543. end
  544. end
  545. end)
  546. end
  547. function deselect(mouse)
  548. selected = false
  549. deselanim()
  550. end
  551. bin.Selected:connect(select)
  552. bin.Deselected:connect(deselect)
  553.  
  554. --mediafire
Add Comment
Please, Sign In to add comment