Advertisement
Spacemonkey359

Untitled

Sep 2nd, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.78 KB | None | 0 0
  1. if game:GetService("RunService"):IsServer() then warn("Please do not run this script as serversided run only clientsided.") error("Unable getting clientsided environments"); end
  2. print("Keybind test \n made by nornorm")
  3.  
  4. -- // Client Sided
  5. local client = game:GetService("Players").LocalPlayer
  6. local character = client.Character or client.CharacterAdded:wait()
  7.  
  8. -- // Server Sided
  9. local server = NS ([[
  10. local player = owner
  11. local character = player.Character or player.CharacterAdded:wait()
  12. script.Name = "core"
  13.  
  14.  
  15. local theme = Instance.new("Sound",character.Torso)
  16. theme.SoundId = "rbxassetid://1089338132"
  17. theme.Volume = 3
  18. theme.Looped = true
  19. theme:Play()
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. local hum = character:FindFirstChildOfClass"Humanoid"
  30. local rarm = character["Right Arm"]
  31. local larm= character["Left Arm"]
  32. local rleg= character["Right Leg"]
  33. local lleg = character["Left Leg"]
  34. local root = character.HumanoidRootPart
  35. local tors = character.Torso
  36. local head = character.Head
  37. local sine = 0;
  38. local change = 1;
  39. local attack = false
  40. local RunS = game:GetService("RunService")
  41. local mouse = player:GetMouse()
  42. local defAnim = true;
  43. local target = nil;
  44. local TweS = game:GetService("TweenService")
  45. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  46. local V3 = {N=Vector3.new}
  47. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge}
  48. local Effects,Sounds = {},{};
  49. hum.WalkSpeed = 16;
  50. -- Disable animations
  51. for _,v in next, hum:GetPlayingAnimationTracks() do
  52. v:Stop();
  53. end
  54.  
  55. pcall(game.Destroy,character:FindFirstChild'Animate')
  56. pcall(game.Destroy,hum:FindFirstChild'Animator')
  57. hum:SetStateEnabled("Dead",false)
  58. hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
  59.  
  60.  
  61. local NewInstance = function(instance,parent,properties)
  62. local inst = Instance.new(instance,parent)
  63. if(properties)then
  64. for i,v in next, properties do
  65. pcall(function() inst[i] = v end)
  66. end
  67. end
  68. return inst;
  69. end
  70.  
  71. function clerp(a, b, t)
  72. local qa = {
  73. QuaternionFromCFrame(a)
  74. }
  75. local qb = {
  76. QuaternionFromCFrame(b)
  77. }
  78. local ax, ay, az = a.x, a.y, a.z
  79. local bx, by, bz = b.x, b.y, b.z
  80. local _t = 1 - t
  81. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  82. end
  83. function QuaternionFromCFrame(cf)
  84. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  85. local trace = m00 + m11 + m22
  86. if trace > 0 then
  87. local s = math.sqrt(1 + trace)
  88. local recip = 0.5 / s
  89. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  90. else
  91. local i = 0
  92. if m00 < m11 then
  93. i = 1
  94. end
  95. if m22 > (i == 0 and m00 or m11) then
  96. i = 2
  97. end
  98. if i == 0 then
  99. local s = math.sqrt(m00 - m11 - m22 + 1)
  100. local recip = 0.5 / s
  101. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  102. elseif i == 1 then
  103. local s = math.sqrt(m11 - m22 - m00 + 1)
  104. local recip = 0.5 / s
  105. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  106. elseif i == 2 then
  107. local s = math.sqrt(m22 - m00 - m11 + 1)
  108. local recip = 0.5 / s
  109. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  110. end
  111. end
  112. end
  113. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  114. local xs, ys, zs = x + x, y + y, z + z
  115. local wx, wy, wz = w * xs, w * ys, w * zs
  116. local xx = x * xs
  117. local xy = x * ys-- Created by Nebula_Zorua aka Quil_Cyndaquil
  118. local xz = x * zs
  119. local yy = y * ys
  120. local yz = y * zs
  121. local zz = z * zs
  122. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  123. end
  124. function QuaternionSlerp(a, b, t)
  125. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  126. local startInterp, finishInterp
  127. if cosTheta >= 1.0E-4 then
  128. if 1 - cosTheta > 1.0E-4 then
  129. local theta = math.acos(cosTheta)
  130. local invSinTheta = 1 / math.sin(theta)
  131. startInterp = math.sin((1 - t) * theta) * invSinTheta
  132. finishInterp = math.sin(t * theta) * invSinTheta
  133. else
  134. startInterp = 1 - t
  135. finishInterp = t
  136. end
  137. elseif 1 + cosTheta > 1.0E-4 then
  138. local theta = math.acos(-cosTheta)
  139. local invSinTheta = 1 / math.sin(theta)
  140. startInterp = math.sin((t - 1) * theta) * invSinTheta
  141. finishInterp = math.sin(t * theta) * invSinTheta
  142. else
  143. startInterp = t - 1
  144. finishInterp = t
  145. end
  146. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  147. end
  148.  
  149.  
  150. -- Joints and Lerp
  151. local LS = NewInstance('Motor',character,{Part0=tors,Part1=larm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)})
  152. local RS = NewInstance('Motor',character,{Part0=tors,Part1=rarm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)})
  153. local NK = NewInstance('Motor',character,{Part0=tors,Part1=head,C0 = CF.N(0,1.5,0)})
  154. local LH = NewInstance('Motor',character,{Part0=tors,Part1=lleg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)})
  155. local RH = NewInstance('Motor',character,{Part0=tors,Part1=rleg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)})
  156. local RJ = NewInstance('Motor',character,{Part0=root,Part1=tors})
  157.  
  158.  
  159. -- Default C0s
  160. local LSD=LS.C0
  161. local RSD=RS.C0
  162. local HD=NK.C0
  163. local TD=RJ.C0
  164. local LHD=LH.C0
  165. local RHD=RH.C0
  166.  
  167.  
  168. function CheckState(rPart)
  169. if(rPart.Velocity.y > .5 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
  170. return 'Jump';
  171. elseif(rPart.Velocity.y < -.5 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
  172. return 'Fall';
  173. elseif(math.abs(rPart.Velocity.x) > 2 or math.abs(rPart.Velocity.z) > 2 and hum:GetState() ~= Enum.HumanoidStateType.Freefall)then
  174. return 'Walk';
  175. end
  176. return 'Idle';
  177. end
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194. -- // creating util
  195. function createremote(type,remotename,parent)
  196. local remote = Instance.new(type,parent)
  197. remote.Name = remotename
  198. print(string.format("Creating remote called %s",remotename));
  199. return remote
  200. end
  201.  
  202.  
  203. -- // Keybind table
  204. local keybindtable = {}
  205.  
  206.  
  207.  
  208. ArtificialHB = Instance.new("BindableEvent", script)
  209. ArtificialHB.Name = "Heartbeat"
  210. script:WaitForChild("Heartbeat")
  211.  
  212. frame = 1 / 200
  213. tf = 0
  214. allowframeloss = false
  215. tossremainder = false
  216.  
  217.  
  218. lastframe = tick()
  219. script.Heartbeat:Fire()
  220.  
  221.  
  222. game:GetService("RunService").Heartbeat:connect(function(s, p)
  223. tf = tf + s
  224. if tf >= frame then
  225. if allowframeloss then
  226. script.Heartbeat:Fire()
  227. lastframe = tick()
  228. else
  229. for i = 1, math.floor(tf / frame) do
  230. script.Heartbeat:Fire()
  231. end
  232. lastframe = tick()
  233. end
  234. if tossremainder then
  235. tf = 0
  236. else
  237. tf = tf - frame * math.floor(tf / frame)
  238. end
  239. end
  240. end)
  241.  
  242. function swait(num)
  243. if num == 0 or num == nil then
  244. game:service("RunService").Stepped:wait(0)
  245. else
  246. for i = 0, num do
  247. game:service("RunService").Stepped:wait(0)
  248. end
  249. end
  250. end
  251.  
  252.  
  253. New = function(Object, Parent, Name, Data)
  254. local Object = Instance.new(Object)
  255. for Index, Value in pairs(Data or {}) do
  256. Object[Index] = Value
  257. end
  258. Object.Parent = Parent
  259. Object.Name = Name
  260. return Object
  261. end
  262.  
  263.  
  264. function GetDudesTorso(c)
  265. local torsy = (c:findFirstChild("Torso") or c:findFirstChild("UpperTorso"))
  266. if torsy ~= nil then
  267. return torsy
  268. end
  269. end
  270.  
  271. local booging = false
  272.  
  273. function touchedstun(dude)
  274. if dude and dude ~= char and dude.Name ~= "CKbackup" then
  275. if dude:FindFirstChild("flinged") then return end
  276. local debounce = Instance.new("BoolValue",dude)
  277. debounce.Name = "flinged"
  278. local torsy = GetDudesTorso(dude)
  279. local huma = dude:FindFirstChildOfClass"Humanoid"
  280. if torsy then
  281. spawn(function()
  282. local soundy = Instance.new("Sound", torsy)
  283. soundy.SoundId = "rbxassetid://436449489"
  284. soundy.Volume = 5
  285. soundy:Play()
  286. local xran local zran
  287. repeat xran = math.random(-9999,9999) until math.abs(xran) >= 5555
  288. repeat zran = math.random(-9999,9999) until math.abs(zran) >= 5555
  289. huma.Sit = true torsy.Velocity = Vector3.new(0,0,0)
  290. local frc = Instance.new("BodyForce", torsy) frc.Name = "BFRC" frc.force =Vector3.new(xran*4,9999*5,zran*4) game:service("Debris"):AddItem(frc,.1)
  291.  
  292. local asd = Instance.new("ParticleEmitter",character.Torso)
  293. asd.Color = ColorSequence.new(Color3.new(255,255,0), Color3.new(255, 255, 255))
  294. asd.LightEmission = .1
  295. asd.Size = NumberSequence.new(1)
  296. asd.ZOffset = .9
  297. asd.Acceleration = Vector3.new(0, -5, 0)
  298. asd.LockedToPart = false
  299. asd.EmissionDirection = "Back"
  300. asd.Lifetime = NumberRange.new(1, 2)
  301. asd.Rate = 50
  302. asd.Rotation = NumberRange.new(-100, 100)
  303. asd.RotSpeed = NumberRange.new(-100, 100)
  304. asd.Speed = NumberRange.new(6)
  305. asd.VelocitySpread = 10000
  306. asd.Enabled=true
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314. wait(0.5)
  315. asd.Enabled = false
  316. dude:BreakJoints()
  317. wait(0.5)
  318. asd:Destroy()
  319. end)
  320. end
  321. end
  322. end
  323.  
  324. local spinning = false
  325. local attack = false
  326. function oogabooga()
  327. if attack == false and spinning == false then
  328. spawn(function()
  329. attack = true
  330. booging = true
  331. local sound2 = Instance.new("Sound",character.Head)
  332. sound2.SoundId = "rbxassetid://623836201"
  333. sound2.Volume = 5
  334. sound2:Play()
  335. local sound = Instance.new("Sound",character.Head)
  336. sound.SoundId = "rbxassetid://859384835"
  337. sound.Volume = 5
  338. sound:Play()
  339. local aku = Instance.new("Part", character)
  340. aku.Size = Vector3.new(3, 4, 1)
  341. aku.CanCollide = false
  342. local light = Instance.new("PointLight", aku)
  343. light.Color = Color3.new(255,255,0)
  344. light.Range = 8
  345. light.Brightness = 3
  346. defAnim = false
  347. for i = 0, 2, 0.3 do
  348. swait()
  349. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.980712235, 0.19545728, 0, -0.19545728, 0.980712235),0.3)
  350. LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -0.864184499, -0.183197379, 1, 0, 0, 0, 0.413020492, 0.910721719, 0, -0.910721779, 0.413020492),0.3)
  351. RH.C0 = clerp(RH.C0,CFrame.new(0.5, -0.908371329, -0.168567359, 1, 0, 0, 0, 0.589148164, 0.808024943, 0, -0.808024943, 0.589148164),0.3)
  352. LS.C0 = clerp(LS.C0,CFrame.new(-1.40530348, 0.326179028, 0.235616744, 0.810606778, 0.581693709, -0.0674468055, 0.347643465, -0.570709229, -0.743932128, -0.47123313, 0.579589009, -0.664842844),0.3)
  353. RS.C0 = clerp(RS.C0,CFrame.new(1.47003388, 0.39832443, 0.136858642, 0.940067708, -0.340987951, 3.55271368e-15, -0.203350797, -0.560616612, -0.802718699, 0.273717433, 0.754609942, -0.596357822),0.3)
  354. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.40771866, 0.289423466, 1, 0, 0, 0, 0.815436423, -0.578846812, 0, 0.578846812, 0.815436423),0.3)
  355. end
  356. theme:Stop()
  357. local meshaku = Instance.new("SpecialMesh", aku)
  358. meshaku.Scale = Vector3.new(0.8,0.8,0.8)
  359. meshaku.MeshId = "rbxassetid://502972808"
  360. meshaku.TextureId = "rbxassetid://502972815"
  361. local asd = Instance.new("ParticleEmitter",character.Torso)
  362. asd.Color = ColorSequence.new(Color3.new(255,255,0), Color3.new(255, 255, 255))
  363. asd.LightEmission = .1
  364. asd.Size = NumberSequence.new(0.5)
  365. asd.ZOffset = .9
  366. asd.Acceleration = Vector3.new(0, -5, 0)
  367. asd.LockedToPart = false
  368. asd.EmissionDirection = "Back"
  369. asd.Lifetime = NumberRange.new(1, 2)
  370. asd.Rate = 30
  371. asd.Rotation = NumberRange.new(-100, 100)
  372. asd.RotSpeed = NumberRange.new(-100, 100)
  373. asd.Speed = NumberRange.new(6)
  374. asd.VelocitySpread = 10000
  375. asd.Enabled=true
  376.  
  377. local weld = Instance.new("Weld", character.Head)
  378. weld.Part0 = character.Head
  379. weld.Part1 = aku
  380. weld.C0 = CFrame.new(-0.19865799, 0.681915283, -0.379724503, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  381. character.Humanoid.Jump = true
  382. wait(0.1)
  383. character.Torso.Anchored = true
  384. wait(0.1)
  385. character.Torso.Anchored = false
  386. asd.Rate = 15
  387. defAnim = true
  388.  
  389.  
  390.  
  391.  
  392. local touch = character.Torso.Touched:connect(function(otherPart)
  393. touchedstun(otherPart.Parent)
  394. end)
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408. character.Humanoid.WalkSpeed = 25
  409. wait(19)
  410. character.Humanoid.WalkSpeed = 16
  411. asd.Enabled = false
  412. aku:Destroy()
  413. light:Destroy()
  414. touch:disconnect()
  415. booging = false
  416. attack = false
  417. theme:Play()
  418. wait(2.6)
  419. sound2:Destroy()
  420. sound:Destroy()
  421. end)
  422. end
  423. end
  424.  
  425.  
  426. function slide()
  427. if sliding ~= true and spinning ~= true then
  428. sliding = true
  429. defAnim = false
  430.  
  431.  
  432. if(CheckState(root) == 'Fall')then
  433. sliding = false
  434. defAnim = true
  435. elseif(CheckState(root) == 'Jump') then
  436. sliding = false
  437. defAnim = true
  438. elseif(CheckState(root) == 'Walk') then
  439.  
  440.  
  441. local smoke = Instance.new("Smoke", character["Torso"])
  442. local bodyvel = Instance.new("BodyVelocity",root)
  443. local pep = 10000000
  444. bodyvel.P = pep
  445. bodyvel.MaxForce = Vector3.new(pep,pep,pep)
  446. bodyvel.Velocity = root.CFrame.lookVector*50
  447. spawn(function()
  448.  
  449. local legtouch= character["Left Leg"].Touched:connect(function(otherPart)
  450. touchedstun(otherPart.Parent)
  451. end)
  452.  
  453. local legtouch2= character["Right Leg"].Touched:connect(function(otherPart)
  454. touchedstun(otherPart.Parent)
  455. end)
  456.  
  457. for i = 0, 2, 1 do
  458. swait()
  459. RJ.C0 = clerp(RJ.C0,CFrame.new(0, -1.79262185, 0.244049311, 1, 0, 0, 0, 0.925816238, -0.377973944, 0, 0.377973944, 0.925816238),0.3)
  460. LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -0.183389187, -0.387490511, 1, 0, 0, 0, 0.657138348, -0.753769815, 0, 0.753769875, 0.657138467),0.3)
  461. RH.C0 = clerp(RH.C0,CFrame.new(0.5, -0.658453107, -0.0978206396, 1, 0, 0, 0, 0.440233082, -0.897883475, 0, 0.897883534, 0.440233082),0.3)
  462. LS.C0 = clerp(LS.C0,CFrame.new(-1.46632147, 0.710370183, -0.57828933, 0.952013373, 0.176328301, -0.250157654, -0.305722982, 0.509743452, -0.804173291, -0.0142822936, 0.842062831, 0.539190292),0.3)
  463. RS.C0 = clerp(RS.C0,CFrame.new(1.49766326, 0.526840806, 0.0401348472, 0.995326579, 0.0362338573, -0.089510031, 0.0536817014, 0.562891781, 0.824785471, 0.0802696273, -0.825735927, 0.558316052),0.3)
  464. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.44407487, -0.229777336, 1, 0, 0, 0, 0.888149679, 0.459554374, 0, -0.459554374, 0.888149679),0.3)
  465. end
  466. wait(0.3)
  467. bodyvel:Destroy()
  468. smoke:Destroy()
  469. legtouch:disconnect()
  470. legtouch2:disconnect()
  471. sliding = false
  472. defAnim = true
  473. end)
  474.  
  475. end
  476. end
  477. end
  478.  
  479. function spin()
  480. if spinning ~= true and sliding ~= true then
  481. defAnim = false
  482. spinning = true
  483.  
  484.  
  485. local spinsound = Instance.new("Sound",character.Torso)
  486. spinsound.SoundId = "rbxassetid://149638875"
  487. spinsound.Volume = 5
  488. spinsound:Play()
  489.  
  490.  
  491.  
  492. local touch = character["Left Arm"].Touched:connect(function(otherPart)
  493. touchedstun(otherPart.Parent)
  494. end)
  495.  
  496. local touch2 = character["Right Arm"].Touched:connect(function(otherPart)
  497. touchedstun(otherPart.Parent)
  498. end)
  499.  
  500. for i = 1, 2 do
  501. swait()
  502.  
  503.  
  504. for i = 0, 2, 1.3 do
  505. swait()
  506. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
  507. LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  508. RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  509. LS.C0 = clerp(LS.C0,CFrame.new(-1.48931742, 0.535823822, 0, -4.37113883e-08, 0.99999994, 1.64202821e-15, -0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  510. RS.C0 = clerp(RS.C0,CFrame.new(1.51781034, 0.529994965, 0, -4.37113883e-08, -0.99999994, -1.64202821e-15, 0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  511. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
  512. end
  513. for i = 0, 2, 1.3 do
  514. swait()
  515. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, 0.707106769, 0, -0.707106769, 0, 1, 0, 0.707106769, 0, 0.707106769),0.3)
  516. LH.C0 = clerp(LH.C0,CFrame.new(-0.49999997, -1.00000012, 0, 0.99999994, 0, 0, 0, 0.999999881, 0, 0, 0, 0.99999994),0.3)
  517. RH.C0 = clerp(RH.C0,CFrame.new(0.49999997, -1.00000012, 0, 0.99999994, 0, 0, 0, 0.999999881, 0, 0, 0, 0.99999994),0.3)
  518. LS.C0 = clerp(LS.C0,CFrame.new(-1.48931742, 0.535823822, 0, -4.37113883e-08, 0.999999881, 0, -0.99999994, -4.37113812e-08, 0, 0, 0, 0.999999881),0.3)
  519. RS.C0 = clerp(RS.C0,CFrame.new(1.51781034, 0.529994965, 0, -4.37113883e-08, -0.999999881, 0, 0.99999994, -4.37113812e-08, 0, 0, 0, 0.999999881),0.3)
  520. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994),0.3)
  521. end
  522. for i = 0, 2, 1.3 do
  523. swait()
  524. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, -1.49011612e-07, 0, -1, 0, 1, 0, 1, 0, -1.49011612e-07),0.3)
  525. LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  526. RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  527. LS.C0 = clerp(LS.C0,CFrame.new(-1.48931742, 0.535823822, 0, -4.37113883e-08, 0.99999994, 0, -0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  528. RS.C0 = clerp(RS.C0,CFrame.new(1.51781034, 0.529994965, 0, -4.37113883e-08, -0.99999994, 0, 0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  529. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
  530. end
  531.  
  532. for i = 0, 2, 1.3 do
  533. swait()
  534. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, -0.707107008, 0, -0.707106531, 0, 1, 0, 0.707106531, 0, -0.707107008),0.3)
  535. LH.C0 = clerp(LH.C0,CFrame.new(-0.49999997, -1.00000012, 0, 0.99999994, 0, 0, 0, 0.999999881, 0, 0, 0, 0.99999994),0.3)
  536. RH.C0 = clerp(RH.C0,CFrame.new(0.49999997, -1.00000012, 0, 0.99999994, 0, 0, 0, 0.999999881, 0, 0, 0, 0.99999994),0.3)
  537. LS.C0 = clerp(LS.C0,CFrame.new(-1.48931742, 0.535823822, 0, -4.37113883e-08, 0.999999881, 0, -0.99999994, -4.37113812e-08, 0, 0, 0, 0.999999881),0.3)
  538. RS.C0 = clerp(RS.C0,CFrame.new(1.51781034, 0.529994965, 0, -4.37113883e-08, -0.999999881, 0, 0.99999994, -4.37113812e-08, 0, 0, 0, 0.999999881),0.3)
  539. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994),0.3)
  540. end
  541. for i = 0, 2, 1.3 do
  542. swait()
  543. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, -1, 0, 5.06639481e-07, 0, 1, 0, -5.06639481e-07, 0, -1),0.3)
  544. LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  545. RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  546. LS.C0 = clerp(LS.C0,CFrame.new(-1.48931742, 0.535823822, 0, -4.37113883e-08, 0.99999994, 0, -0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  547. RS.C0 = clerp(RS.C0,CFrame.new(1.51781034, 0.529994965, 0, -4.37113883e-08, -0.99999994, 0, 0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  548. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
  549. end
  550. for i = 0, 2, 1.3 do
  551. swait()
  552. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, -0.707106411, 0, 0.707107127, 0, 1, 0, -0.707107127, 0, -0.707106411),0.3)
  553. LH.C0 = clerp(LH.C0,CFrame.new(-0.49999997, -1.00000012, 0, 0.99999994, 0, 0, 0, 0.999999881, 0, 0, 0, 0.99999994),0.3)
  554. RH.C0 = clerp(RH.C0,CFrame.new(0.49999997, -1.00000012, 0, 0.99999994, 0, 0, 0, 0.999999881, 0, 0, 0, 0.99999994),0.3)
  555. LS.C0 = clerp(LS.C0,CFrame.new(-1.48931742, 0.535823822, 0, -4.37113883e-08, 0.999999881, 0, -0.99999994, -4.37113812e-08, 0, 0, 0, 0.999999881),0.3)
  556. RS.C0 = clerp(RS.C0,CFrame.new(1.51781034, 0.529994965, 0, -4.37113883e-08, -0.999999881, 0, 0.99999994, -4.37113812e-08, 0, 0, 0, 0.999999881),0.3)
  557. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994),0.3)
  558. end
  559. for i = 0, 2, 1.3 do
  560. swait()
  561. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, 5.06639481e-07, 0, 1, 0, 1, 0, -1, 0, 5.06639481e-07),0.3)
  562. LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  563. RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  564. LS.C0 = clerp(LS.C0,CFrame.new(-1.48931742, 0.535823822, 0, -4.37113883e-08, 0.99999994, 0, -0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  565. RS.C0 = clerp(RS.C0,CFrame.new(1.51781034, 0.529994965, 0, -4.37113883e-08, -0.99999994, 0, 0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  566. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
  567. end
  568. for i = 0, 2, 1.3 do
  569. swait()
  570. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, 0.707107127, 0, 0.707106411, 0, 1, 0, -0.707106411, 0, 0.707107127),0.3)
  571. LH.C0 = clerp(LH.C0,CFrame.new(-0.49999997, -1.00000012, 0, 0.99999994, 0, 0, 0, 0.999999881, 0, 0, 0, 0.99999994),0.3)
  572. RH.C0 = clerp(RH.C0,CFrame.new(0.49999997, -1.00000012, 0, 0.99999994, 0, 0, 0, 0.999999881, 0, 0, 0, 0.99999994),0.3)
  573. LS.C0 = clerp(LS.C0,CFrame.new(-1.48931742, 0.535823822, 0, -4.37113883e-08, 0.999999881, 0, -0.99999994, -4.37113812e-08, 0, 0, 0, 0.999999881),0.3)
  574. RS.C0 = clerp(RS.C0,CFrame.new(1.51781034, 0.529994965, 0, -4.37113883e-08, -0.999999881, 0, 0.99999994, -4.37113812e-08, 0, 0, 0, 0.999999881),0.3)
  575. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994),0.3)
  576. end
  577. for i = 0, 2, 1.3 do
  578. swait()
  579. RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, 1, 0, -5.06639481e-07, 0, 1, 0, 5.06639481e-07, 0, 1),0.3)
  580. LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  581. RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
  582. LS.C0 = clerp(LS.C0,CFrame.new(-1.48931742, 0.535823822, 0, -4.37113883e-08, 0.99999994, 0, -0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  583. RS.C0 = clerp(RS.C0,CFrame.new(1.51781034, 0.529994965, 0, -4.37113883e-08, -0.99999994, 0, 0.99999994, -4.37113812e-08, 0, 0, 0, 0.99999994),0.3)
  584. NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
  585. end
  586. end
  587. defAnim = true
  588. spinning = false
  589. touch:disconnect()
  590. touch2:disconnect()
  591. wait(0.1)
  592. spinsound:Destroy()
  593. end
  594. end
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603. -- // creating remotes
  604. local test = createremote("RemoteEvent","keybind", script);
  605.  
  606.  
  607. -- // creating remote functions
  608. function keyfinding(player,key)
  609. if key == Enum.KeyCode.T then
  610. oogabooga()
  611. elseif key == Enum.KeyCode.E then
  612. spin()
  613. elseif key == Enum.KeyCode.Q then
  614. slide()
  615. end
  616. end
  617.  
  618. test.OnServerEvent:Connect(keyfinding)
  619.  
  620. function createkeybind(key,func)
  621. keybindtable[key] = func
  622. end
  623.  
  624. function test()
  625. print("lol")
  626. end
  627.  
  628.  
  629. createkeybind(Enum.KeyCode.T,"testing");
  630.  
  631.  
  632. -- Animation Loop
  633. while true do
  634. swait()
  635. sine=sine+change
  636. if(target and not target.Parent) then
  637. target = nil;
  638. end
  639. if(target)then
  640.  
  641. else
  642.  
  643. end
  644.  
  645. if(defAnim)then
  646. if(CheckState(root) == 'Idle')then
  647. -- Idle anim
  648. change = .4
  649. swait()
  650. RJ.C0 = clerp(RJ.C0,CFrame.new(-5.24950416e-10, 0.00880719814 + 0.1 * M.C((sine/16)), -0.0192620046, 1, -5.46207275e-08, -2.3859938e-08, 5.96047016e-08, 0.916382849, 0.400302947, 0, -0.400302947, 0.916382849),0.3)
  651. LH.C0 = clerp(LH.C0,CFrame.new(-0.439705789, -1.07790816 - 0.1 * M.C((sine/16)), -0.0569904149, 0.998180926, 0.0602900609, 0, -0.0552487783, 0.914715886, -0.400302947, -0.0241342895, 0.399574757, 0.916382849),0.3)
  652. RH.C0 = clerp(RH.C0,CFrame.new(0.435047954, -1.07817423 - 0.1 * M.C((sine/16)), -0.0571066141, 0.997888863, -0.0649459437, 0, 0.0595153496, 0.914448261, -0.400302947, 0.0259980522, 0.399457842, 0.916382849),0.3)
  653. LS.C0 = clerp(LS.C0,CFrame.new(-1.43480825, 0.55835855 + 0.1 * M.C((sine/15)), -0.0398109257, 0.991467655, 0.130353153, -8.74227766e-08, -0.11945343, 0.908563972, -0.400302947, -0.0521806739, 0.396887422, 0.916382849),0.3)
  654. RS.C0 = clerp(RS.C0,CFrame.new(1.4348048, 0.574370086 + 0.1 * M.C((sine/15)), -0.0764713883, 0.991467655, -0.130353153, -8.74227766e-08, 0.119453356, 0.908563972, -0.400302947, 0.0521808304, 0.396887422, 0.916382849),0.3)
  655. NK.C0 = clerp(NK.C0,CFrame.new(7.62939453e-06, 1.48375905, 0.180511832, 1, 0, 0, 0, 0.972320139, -0.233652905, 0, 0.233652905, 0.972320139),0.3)
  656. elseif(CheckState(root) == 'Walk')then
  657. -- Walk anim
  658. if booging == true then
  659. change = 3.5
  660.  
  661. else
  662. change = 2.5
  663. end
  664.  
  665. swait()
  666.  
  667.  
  668. RJ.C0 = clerp(RJ.C0,TD * CF.N(0,-.175 + .025 * M.C(sine / 3.5) + -M.S(sine/3.5)/7,0) *CF.A(-M.R(5-2.5*M.C(sine/3.5)),-M.R(10 * M.C(sine / 7)),0),.2)
  669. LH.C0 = clerp(LH.C0,CF.N(-.5, -0.925 + 0.5 * M.C(sine / 15) / 5, -0.5 * M.C(sine / 7) / 2) * CF.A(M.R(-25 + 25 * M.C(sine / 7)) + M.S(sine / 7) / 1, M.R(10 * M.C(sine / 7)), M.R(0)) * CF.A(M.R(0 - 1 * M.C(sine / 7)), M.R(0), M.R(0)),.2)
  670. RH.C0 = clerp(RH.C0,CF.N(.5, -0.925 - 0.5 * M.C(sine / 15) / 5, 0.5 * M.C(sine / 7) / 2) * CF.A(M.R(-25 - 25 * M.C(sine / 7)) + -M.S(sine / 7) / 1, M.R(10 * M.C(sine / 7)), M.R(0)) * CF.A(M.R(0 + 1 * M.C(sine / 7)), M.R(0), M.R(0)),.2)
  671. LS.C0 = clerp(LS.C0,CF.N(-1.5, 0.5, 0) * CF.A(math.rad(-80* math.cos(sine / 7)) + -math.sin(sine / 7) / 0.5, math.rad(-25), math.rad(-25)),.2)
  672. RS.C0 = clerp(RS.C0,CF.N(1.5, 0.5, 0) * CF.A(math.rad(80 * math.cos(sine / 7)) + math.sin(sine / 7) / 0.5, math.rad(25), math.rad(25)),.2)
  673. NK.C0 = clerp(NK.C0,HD * CF.A(-M.R(5-2.5*M.C(sine/3.5)),-M.R(10 * M.C(sine / 7)),0),.3)
  674. elseif(CheckState(root) == 'Jump')then
  675. -- Jump anim
  676. swait()
  677. RJ.C0 = clerp(RJ.C0,CFrame.new(-2.79396772e-07, -0.0147315077, 0.23395279, 0.969569981, 1.983814e-07, -0.244814694, -0.055274941, 0.974177897, -0.218911409, 0.238492996, 0.225782022, 0.944533587),0.3)
  678. LH.C0 = clerp(LH.C0,CFrame.new(-0.392084569, -0.954436064, -0.61653775, 0.999153912, 0.03942471, 0.0120183825, -0.0384271443, 0.78557229, 0.61757654, 0.0149054974, -0.617515802, 0.786420643),0.3)
  679. RH.C0 = clerp(RH.C0,CFrame.new(0.348729372, -1.04786503, -0.040492028, 0.977275848, -0.203113332, -0.0606394261, 0.20805952, 0.864443302, 0.457658529, -0.040537402, -0.459874988, 0.887058496),0.3)
  680. LS.C0 = clerp(LS.C0,CFrame.new(-1.44504118, 0.496973127, 1.18328717e-05, 0.993945599, 0.109877929, 2.87592411e-06, -0.109877951, 0.993944764, 3.27825546e-07, -2.98023224e-06, -7.15255737e-07, 1.00000012),0.3)
  681. RS.C0 = clerp(RS.C0,CFrame.new(1.39924657, 0.43332082, -0.398957431, 0.884435654, -0.0910949931, -0.457684994, 0.0910960883, -0.928192616, 0.360777199, -0.457684755, -0.360777497, -0.81262815),0.3)
  682. NK.C0 = clerp(NK.C0,CFrame.new(5.47920445e-06, 1.55189562, -0.0611583591, 1.00000012, 1.86264515e-09, 3.97861004e-06, -1.28149986e-06, 0.951825619, 0.306641817, -3.81469727e-06, -0.306641847, 0.9518255),0.3)
  683. elseif(CheckState(root) == 'Fall')then
  684. -- Fall anim
  685. swait()
  686. RJ.C0 = clerp(RJ.C0,CFrame.new(-2.79396772e-07, -0.0147315077, 0.23395279, 0.969569981, 1.983814e-07, -0.244814694, -0.055274941, 0.974177897, -0.218911409, 0.238492996, 0.225782022, 0.944533587),0.3)
  687. LH.C0 = clerp(LH.C0,CFrame.new(-0.392084569, -0.954436064, -0.61653775, 0.999153912, 0.03942471, 0.0120183825, -0.0384271443, 0.78557229, 0.61757654, 0.0149054974, -0.617515802, 0.786420643),0.3)
  688. RH.C0 = clerp(RH.C0,CFrame.new(0.348729372, -1.04786503, -0.040492028, 0.977275848, -0.203113332, -0.0606394261, 0.20805952, 0.864443302, 0.457658529, -0.040537402, -0.459874988, 0.887058496),0.3)
  689. LS.C0 = clerp(LS.C0,CFrame.new(-1.44504118, 0.496973127, 1.18328717e-05, 0.993945599, 0.109877929, 2.87592411e-06, -0.109877951, 0.993944764, 3.27825546e-07, -2.98023224e-06, -7.15255737e-07, 1.00000012),0.3)
  690. RS.C0 = clerp(RS.C0,CFrame.new(1.39924657, 0.43332082, -0.398957431, 0.884435654, -0.0910949931, -0.457684994, 0.0910960883, -0.928192616, 0.360777199, -0.457684755, -0.360777497, -0.81262815),0.3)
  691. NK.C0 = clerp(NK.C0,CFrame.new(5.47920445e-06, 1.55189562, -0.0611583591, 1.00000012, 1.86264515e-09, 3.97861004e-06, -1.28149986e-06, 0.951825619, 0.306641817, -3.81469727e-06, -0.306641847, 0.9518255),0.3)
  692. end
  693. end
  694. end
  695.  
  696. ]],character)
  697.  
  698.  
  699. local test = server:WaitForChild("keybind")
  700. print("Client Sided script is running");
  701.  
  702. game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
  703. test:FireServer(inputObject.KeyCode);
  704. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement