Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsServer() then warn("Please do not run this script as serversided run only clientsided.") error("Unable getting clientsided environments"); end
- print("Keybind test \n made by nornorm")
- -- // Client Sided
- local client = game:GetService("Players").LocalPlayer
- local character = client.Character or client.CharacterAdded:wait()
- -- // Server Sided
- local server = NS ([[
- local player = owner
- local character = player.Character or player.CharacterAdded:wait()
- script.Name = "core"
- local theme = Instance.new("Sound",character.Torso)
- theme.SoundId = "rbxassetid://1089338132"
- theme.Volume = 3
- theme.Looped = true
- theme:Play()
- local hum = character:FindFirstChildOfClass"Humanoid"
- local rarm = character["Right Arm"]
- local larm= character["Left Arm"]
- local rleg= character["Right Leg"]
- local lleg = character["Left Leg"]
- local root = character.HumanoidRootPart
- local tors = character.Torso
- local head = character.Head
- local sine = 0;
- local change = 1;
- local attack = false
- local RunS = game:GetService("RunService")
- local mouse = player:GetMouse()
- local defAnim = true;
- local target = nil;
- local TweS = game:GetService("TweenService")
- local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
- local V3 = {N=Vector3.new}
- local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge}
- local Effects,Sounds = {},{};
- hum.WalkSpeed = 16;
- -- Disable animations
- for _,v in next, hum:GetPlayingAnimationTracks() do
- v:Stop();
- end
- pcall(game.Destroy,character:FindFirstChild'Animate')
- pcall(game.Destroy,hum:FindFirstChild'Animator')
- hum:SetStateEnabled("Dead",false)
- hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
- local NewInstance = function(instance,parent,properties)
- local inst = Instance.new(instance,parent)
- if(properties)then
- for i,v in next, properties do
- pcall(function() inst[i] = v end)
- end
- end
- return inst;
- end
- function clerp(a, b, t)
- local qa = {
- QuaternionFromCFrame(a)
- }
- local qb = {
- QuaternionFromCFrame(b)
- }
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1 - t
- return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5 / s
- return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
- else
- local i = 0
- if m00 < m11 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00 - m11 - m22 + 1)
- local recip = 0.5 / s
- return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
- elseif i == 1 then
- local s = math.sqrt(m11 - m22 - m00 + 1)
- local recip = 0.5 / s
- return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
- elseif i == 2 then
- local s = math.sqrt(m22 - m00 - m11 + 1)
- local recip = 0.5 / s
- return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w * xs, w * ys, w * zs
- local xx = x * xs
- local xy = x * ys-- Created by Nebula_Zorua aka Quil_Cyndaquil
- local xz = x * zs
- local yy = y * ys
- local yz = y * zs
- local zz = z * zs
- 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))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
- local startInterp, finishInterp
- if cosTheta >= 1.0E-4 then
- if 1 - cosTheta > 1.0E-4 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1 / math.sin(theta)
- startInterp = math.sin((1 - t) * theta) * invSinTheta
- finishInterp = math.sin(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- elseif 1 + cosTheta > 1.0E-4 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1 / math.sin(theta)
- startInterp = math.sin((t - 1) * theta) * invSinTheta
- finishInterp = math.sin(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- end
- 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
- end
- -- Joints and Lerp
- local LS = NewInstance('Motor',character,{Part0=tors,Part1=larm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)})
- local RS = NewInstance('Motor',character,{Part0=tors,Part1=rarm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)})
- local NK = NewInstance('Motor',character,{Part0=tors,Part1=head,C0 = CF.N(0,1.5,0)})
- local LH = NewInstance('Motor',character,{Part0=tors,Part1=lleg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)})
- local RH = NewInstance('Motor',character,{Part0=tors,Part1=rleg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)})
- local RJ = NewInstance('Motor',character,{Part0=root,Part1=tors})
- -- Default C0s
- local LSD=LS.C0
- local RSD=RS.C0
- local HD=NK.C0
- local TD=RJ.C0
- local LHD=LH.C0
- local RHD=RH.C0
- function CheckState(rPart)
- if(rPart.Velocity.y > .5 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
- return 'Jump';
- elseif(rPart.Velocity.y < -.5 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
- return 'Fall';
- elseif(math.abs(rPart.Velocity.x) > 2 or math.abs(rPart.Velocity.z) > 2 and hum:GetState() ~= Enum.HumanoidStateType.Freefall)then
- return 'Walk';
- end
- return 'Idle';
- end
- -- // creating util
- function createremote(type,remotename,parent)
- local remote = Instance.new(type,parent)
- remote.Name = remotename
- print(string.format("Creating remote called %s",remotename));
- return remote
- end
- -- // Keybind table
- local keybindtable = {}
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "Heartbeat"
- script:WaitForChild("Heartbeat")
- frame = 1 / 200
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- game:service("RunService").Stepped:wait(0)
- else
- for i = 0, num do
- game:service("RunService").Stepped:wait(0)
- end
- end
- end
- New = function(Object, Parent, Name, Data)
- local Object = Instance.new(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- Object.Name = Name
- return Object
- end
- function GetDudesTorso(c)
- local torsy = (c:findFirstChild("Torso") or c:findFirstChild("UpperTorso"))
- if torsy ~= nil then
- return torsy
- end
- end
- local booging = false
- function touchedstun(dude)
- if dude and dude ~= char and dude.Name ~= "CKbackup" then
- if dude:FindFirstChild("flinged") then return end
- local debounce = Instance.new("BoolValue",dude)
- debounce.Name = "flinged"
- local torsy = GetDudesTorso(dude)
- local huma = dude:FindFirstChildOfClass"Humanoid"
- if torsy then
- spawn(function()
- local soundy = Instance.new("Sound", torsy)
- soundy.SoundId = "rbxassetid://436449489"
- soundy.Volume = 5
- soundy:Play()
- local xran local zran
- repeat xran = math.random(-9999,9999) until math.abs(xran) >= 5555
- repeat zran = math.random(-9999,9999) until math.abs(zran) >= 5555
- huma.Sit = true torsy.Velocity = Vector3.new(0,0,0)
- 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)
- local asd = Instance.new("ParticleEmitter",character.Torso)
- asd.Color = ColorSequence.new(Color3.new(255,255,0), Color3.new(255, 255, 255))
- asd.LightEmission = .1
- asd.Size = NumberSequence.new(1)
- asd.ZOffset = .9
- asd.Acceleration = Vector3.new(0, -5, 0)
- asd.LockedToPart = false
- asd.EmissionDirection = "Back"
- asd.Lifetime = NumberRange.new(1, 2)
- asd.Rate = 50
- asd.Rotation = NumberRange.new(-100, 100)
- asd.RotSpeed = NumberRange.new(-100, 100)
- asd.Speed = NumberRange.new(6)
- asd.VelocitySpread = 10000
- asd.Enabled=true
- wait(0.5)
- asd.Enabled = false
- dude:BreakJoints()
- wait(0.5)
- asd:Destroy()
- end)
- end
- end
- end
- local spinning = false
- local attack = false
- function oogabooga()
- if attack == false and spinning == false then
- spawn(function()
- attack = true
- booging = true
- local sound2 = Instance.new("Sound",character.Head)
- sound2.SoundId = "rbxassetid://623836201"
- sound2.Volume = 5
- sound2:Play()
- local sound = Instance.new("Sound",character.Head)
- sound.SoundId = "rbxassetid://859384835"
- sound.Volume = 5
- sound:Play()
- local aku = Instance.new("Part", character)
- aku.Size = Vector3.new(3, 4, 1)
- aku.CanCollide = false
- local light = Instance.new("PointLight", aku)
- light.Color = Color3.new(255,255,0)
- light.Range = 8
- light.Brightness = 3
- defAnim = false
- for i = 0, 2, 0.3 do
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- end
- theme:Stop()
- local meshaku = Instance.new("SpecialMesh", aku)
- meshaku.Scale = Vector3.new(0.8,0.8,0.8)
- meshaku.MeshId = "rbxassetid://502972808"
- meshaku.TextureId = "rbxassetid://502972815"
- local asd = Instance.new("ParticleEmitter",character.Torso)
- asd.Color = ColorSequence.new(Color3.new(255,255,0), Color3.new(255, 255, 255))
- asd.LightEmission = .1
- asd.Size = NumberSequence.new(0.5)
- asd.ZOffset = .9
- asd.Acceleration = Vector3.new(0, -5, 0)
- asd.LockedToPart = false
- asd.EmissionDirection = "Back"
- asd.Lifetime = NumberRange.new(1, 2)
- asd.Rate = 30
- asd.Rotation = NumberRange.new(-100, 100)
- asd.RotSpeed = NumberRange.new(-100, 100)
- asd.Speed = NumberRange.new(6)
- asd.VelocitySpread = 10000
- asd.Enabled=true
- local weld = Instance.new("Weld", character.Head)
- weld.Part0 = character.Head
- weld.Part1 = aku
- weld.C0 = CFrame.new(-0.19865799, 0.681915283, -0.379724503, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- character.Humanoid.Jump = true
- wait(0.1)
- character.Torso.Anchored = true
- wait(0.1)
- character.Torso.Anchored = false
- asd.Rate = 15
- defAnim = true
- local touch = character.Torso.Touched:connect(function(otherPart)
- touchedstun(otherPart.Parent)
- end)
- character.Humanoid.WalkSpeed = 25
- wait(19)
- character.Humanoid.WalkSpeed = 16
- asd.Enabled = false
- aku:Destroy()
- light:Destroy()
- touch:disconnect()
- booging = false
- attack = false
- theme:Play()
- wait(2.6)
- sound2:Destroy()
- sound:Destroy()
- end)
- end
- end
- function slide()
- if sliding ~= true and spinning ~= true then
- sliding = true
- defAnim = false
- if(CheckState(root) == 'Fall')then
- sliding = false
- defAnim = true
- elseif(CheckState(root) == 'Jump') then
- sliding = false
- defAnim = true
- elseif(CheckState(root) == 'Walk') then
- local smoke = Instance.new("Smoke", character["Torso"])
- local bodyvel = Instance.new("BodyVelocity",root)
- local pep = 10000000
- bodyvel.P = pep
- bodyvel.MaxForce = Vector3.new(pep,pep,pep)
- bodyvel.Velocity = root.CFrame.lookVector*50
- spawn(function()
- local legtouch= character["Left Leg"].Touched:connect(function(otherPart)
- touchedstun(otherPart.Parent)
- end)
- local legtouch2= character["Right Leg"].Touched:connect(function(otherPart)
- touchedstun(otherPart.Parent)
- end)
- for i = 0, 2, 1 do
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- end
- wait(0.3)
- bodyvel:Destroy()
- smoke:Destroy()
- legtouch:disconnect()
- legtouch2:disconnect()
- sliding = false
- defAnim = true
- end)
- end
- end
- end
- function spin()
- if spinning ~= true and sliding ~= true then
- defAnim = false
- spinning = true
- local spinsound = Instance.new("Sound",character.Torso)
- spinsound.SoundId = "rbxassetid://149638875"
- spinsound.Volume = 5
- spinsound:Play()
- local touch = character["Left Arm"].Touched:connect(function(otherPart)
- touchedstun(otherPart.Parent)
- end)
- local touch2 = character["Right Arm"].Touched:connect(function(otherPart)
- touchedstun(otherPart.Parent)
- end)
- for i = 1, 2 do
- swait()
- for i = 0, 2, 1.3 do
- swait()
- RJ.C0 = clerp(RJ.C0,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
- LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- 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)
- 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)
- NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
- end
- for i = 0, 2, 1.3 do
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994),0.3)
- end
- for i = 0, 2, 1.3 do
- swait()
- 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)
- LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- 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)
- 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)
- NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
- end
- for i = 0, 2, 1.3 do
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994),0.3)
- end
- for i = 0, 2, 1.3 do
- swait()
- 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)
- LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- 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)
- 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)
- NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
- end
- for i = 0, 2, 1.3 do
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994),0.3)
- end
- for i = 0, 2, 1.3 do
- swait()
- 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)
- LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- 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)
- 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)
- NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
- end
- for i = 0, 2, 1.3 do
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994),0.3)
- end
- for i = 0, 2, 1.3 do
- swait()
- 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)
- LH.C0 = clerp(LH.C0,CFrame.new(-0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- RH.C0 = clerp(RH.C0,CFrame.new(0.5, -1.00000012, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),0.3)
- 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)
- 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)
- NK.C0 = clerp(NK.C0,CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),0.3)
- end
- end
- defAnim = true
- spinning = false
- touch:disconnect()
- touch2:disconnect()
- wait(0.1)
- spinsound:Destroy()
- end
- end
- -- // creating remotes
- local test = createremote("RemoteEvent","keybind", script);
- -- // creating remote functions
- function keyfinding(player,key)
- if key == Enum.KeyCode.T then
- oogabooga()
- elseif key == Enum.KeyCode.E then
- spin()
- elseif key == Enum.KeyCode.Q then
- slide()
- end
- end
- test.OnServerEvent:Connect(keyfinding)
- function createkeybind(key,func)
- keybindtable[key] = func
- end
- function test()
- print("lol")
- end
- createkeybind(Enum.KeyCode.T,"testing");
- -- Animation Loop
- while true do
- swait()
- sine=sine+change
- if(target and not target.Parent) then
- target = nil;
- end
- if(target)then
- else
- end
- if(defAnim)then
- if(CheckState(root) == 'Idle')then
- -- Idle anim
- change = .4
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- elseif(CheckState(root) == 'Walk')then
- -- Walk anim
- if booging == true then
- change = 3.5
- else
- change = 2.5
- end
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- elseif(CheckState(root) == 'Jump')then
- -- Jump anim
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- elseif(CheckState(root) == 'Fall')then
- -- Fall anim
- swait()
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- end
- end
- end
- ]],character)
- local test = server:WaitForChild("keybind")
- print("Client Sided script is running");
- game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
- test:FireServer(inputObject.KeyCode);
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement