Advertisement
tomonaoboys

keystroke test

Sep 11th, 2017
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.32 KB | None | 0 0
  1. Lighting=game:FindFirstChildOfClass("Lighting")
  2. Players=game:FindFirstChildOfClass("Players")PL=Players.LocalPlayer
  3. Mouse=PL:GetMouse()Stroke=""PC=PL.Character HRP=PC.HumanoidRootPart Humanoid=PC:FindFirstChildOfClass("Humanoid")
  4. Camera=workspace.CurrentCamera Active=false
  5. if Humanoid.RigType==Enum.HumanoidRigType.R15 then print("Unable to use with R15.")end
  6. Torso=PC.Torso Stand=false
  7. local debri=game:GetService("Debris")
  8. local name=""for i=1,32 do name=name..tostring(math.random(9))end
  9. local music=Instance.new("Sound",PL)
  10. local mesh={}mesh[1]="rbxassetid://991320318"
  11. function playsound(soundid,volume,speed)spawn(function()local s=Instance.new("Sound",workspace)s.SoundId=soundid s.PlayOnRemove=true s.Volume=volume if speed~=nil then s.PlaybackSpeed=speed end s:Play()wait(5)s.Volume=0 s:Remove()end)end
  12. local Create = LoadLibrary("RbxUtility").Create
  13. function a(part)
  14.     local j=Instance.new("BodyVelocity",part)j.MaxForce=Vector3.new(1/0,1/0,1/0)j.Velocity=Vector3.new(0,0,0)
  15. end
  16. function mov(part,vec3)
  17.     local j=Instance.new("BodyVelocity",part)j.MaxForce=Vector3.new(1/0,1/0,1/0)j.Velocity=vec3
  18. end
  19. RightArm=PC["Right Arm"]LeftArm=PC["Left Arm"]RightLeg=PC["Right Leg"]LeftLeg=PC["Left Leg"]
  20. if PC:FindFirstChild("Animate")~=nil then PC.Animate:Remove()end
  21. local newMotor = function(part0, part1, c0, c1)
  22.     local w = Create('Motor'){
  23.         Parent = part0,
  24.         Part0 = part0,
  25.         Part1 = part1,
  26.         C0 = c0,
  27.         C1 = c1,
  28.     }
  29.     return w
  30. end
  31. function clerp(a, b, t)
  32.     return a:lerp(b, t)
  33. end
  34.  
  35. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  36. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  37. local RootPart = PC.HumanoidRootPart
  38. local RootJoint = RootPart.RootJoint
  39. local RW = newMotor(Torso,RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  40. local LW = newMotor(Torso,LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  41. local RH = newMotor(Torso,RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  42. local LH = newMotor(Torso,LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  43. RootJoint.C1 = CFrame.new(0, 0, 0)RootJoint.C0 = CFrame.new(0, 0, 0)Torso.Neck.C1 = CFrame.new(0, 0, 0)Torso.Neck.C0 = CFrame.new(0, 1.5, 0)local rarmc1 = RW.C1
  44. local larmc1 = LW.C1
  45. local rlegc1 = RH.C1
  46. local llegc1 = LH.C1
  47. local resetc1 = false
  48. function PlayAnimationFromTable(table, speed, bool)
  49.     RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  50.     Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  51.     RW.C0 = clerp(RW.C0, table[3], speed)
  52.     LW.C0 = clerp(LW.C0, table[4], speed)
  53.     RH.C0 = clerp(RH.C0, table[5], speed)
  54.     LH.C0 = clerp(LH.C0, table[6], speed)
  55.     if bool == true then
  56.         if resetc1 == false then
  57.             resetc1 = true
  58.             RootJoint.C1 = RootJoint.C1
  59.             Torso.Neck.C1 = Torso.Neck.C1
  60.             RW.C1 = rarmc1
  61.             LW.C1 = larmc1
  62.             RH.C1 = rlegc1
  63.             LH.C1 = llegc1
  64.         end
  65.     end
  66. end
  67. function stroke(key)
  68.     if key~=Enum.KeyCode.Space then
  69.     Stroke=Stroke..key
  70.     end
  71. end
  72. function clear()
  73.     Stroke=""Stand=false Active=false
  74. end
  75. function dodamage(part,damage,percent)
  76.     if part.Parent~=nil then
  77.         if part.Parent.Name~=PL.Name then
  78.             if part.Parent:FindFirstChildOfClass("Humanoid")~=nil then
  79.                 if part.Name=="Torso"or part.Name=="UpperTorso"then
  80.                 if percent then
  81.                     part.Parent:FindFirstChildOfClass("Humanoid").Health=part.Parent:FindFirstChildOfClass("Humanoid").Health-(part.Parent:FindFirstChildOfClass("Humanoid").MaxHealth*damage)
  82.                     local p=Instance.new("Part")p.CanCollide=false p.Transparency=1 p.Position=part.Position
  83.                     local b=Instance.new("BillboardGui",p)b.Size=UDim2.new(1,0,1,0)b.Adornee=p
  84.                     local t=Instance.new("TextLabel",b)t.Size=UDim2.new(1,0,1,0)t.TextSize=40 t.Text=part.Parent:FindFirstChildOfClass("Humanoid").MaxHealth*damage
  85.                     t.BackgroundTransparency=1 t.BorderSizePixel=0 t.Font="Bodoni"t.TextColor3=Color3.new(1,0,0)t.TextStrokeTransparency=0
  86.                     mov(p,Vector3.new(0,2,0))debri:AddItem(p,3)
  87.                     p.Parent=workspace
  88.                 else
  89.                     part.Parent:FindFirstChildOfClass("Humanoid").Health=part.Parent:FindFirstChildOfClass("Humanoid").Health-damage
  90.                     local p=Instance.new("Part")p.CanCollide=false p.Transparency=1 p.Position=part.Position
  91.                     local b=Instance.new("BillboardGui",p)b.Size=UDim2.new(1,0,1,0)b.Adornee=p
  92.                     local t=Instance.new("TextLabel",b)t.Size=UDim2.new(1,0,1,0)t.TextSize=40 t.Text=damage
  93.                     t.BackgroundTransparency=1 t.BorderSizePixel=0 t.Font="Bodoni"t.TextColor3=Color3.new(1,0,0)t.TextStrokeTransparency=0
  94.                     mov(p,Vector3.new(0,2,0))debri:AddItem(p,3)
  95.                     p.Parent=workspace
  96.                 end
  97.                 end
  98.             end
  99.         end
  100.     end
  101. end
  102. Mouse.KeyDown:connect(stroke)
  103. spawn(function()while wait()do if Stroke~=nil then wait(.5)Stroke=""end end end)spawn(function()while wait()do if #Stroke>=7 then Stroke=""end end end)
  104. spawn(function()
  105.     while wait()do
  106.         Humanoid.MaxHealth=1/0
  107.         Humanoid.Health=1/0 local m=""for i=1,27 do m=m..tostring(math.random(9))end Humanoid.Name=m
  108.         local c=PC:GetChildren()for i=1,#c do if c[i]:IsA("Part")then c[i].Locked=true end end
  109.         if PC:FindFirstChildOfClass("ForceField")then PC:FindFirstChildOfClass("ForceField").Visible=false else Instance.new("ForceField",PC)end
  110.         if Stand then Humanoid.PlatformStand=false Humanoid.WalkSpeed=0 else Humanoid.PlatformStand=false Humanoid.WalkSpeed=20 HRP.CFrame=CFrame.new(HRP.CFrame.p,Vector3.new(Mouse.Hit.x,HRP.CFrame.y,Mouse.Hit.z))end
  111.         if Stroke=="sax"and not Active then
  112.             playsound("rbxassetid://182707266",math.huge,2)
  113.             HRP.CFrame=HRP.CFrame*CFrame.new(0,0,-60)local part={}
  114.             for i=1,20 do part[i]=Instance.new("Part")part[i].Material="Neon"part[i].CFrame=HRP.CFrame*CFrame.new(0,0,-i*-3)a(part[i])part[i].Color=Color3.new(0,0,0)part[i].Size=Vector3.new(1,1,3)part[i].Touched:connect(function(pt)dodamage(pt,.25,true)end)part[i].Parent=workspace end
  115.             spawn(function()for i2=0,1,.05 do for i=1,20 do local pos=part[i].CFrame part[i].Transparency=i2 part[i].Size=part[i].Size+Vector3.new(i*-.01,i*-.01,0)
  116.             part[i].CFrame=pos end wait()end for i=1,#part do part[i]:Destroy()end end)
  117.         clear()end
  118.         if Stroke=="dsc"and not Active then
  119.             Active=true Stand=true wait(.5)local part={}
  120.             for i=1,20 do part[i]=Instance.new("Part")part[i].Material="Neon"part[i].CFrame=HRP.CFrame*CFrame.new(0,0,-i*-3)a(part[i])part[i].Color=Color3.new(0,0,0)part[i].Size=Vector3.new(1,0,3)part[i].CanCollide=false part[i].Touched:connect(function(pt)dodamage(pt,.25,true)end)part[i].Parent=workspace end
  121.             local p=Instance.new("Part")p.CanCollide=false p.Size=Vector3.new(25,25,25)p.Shape="Ball"local m=Instance.new("SpecialMesh",p)m.MeshId="rbxassetid://991320318"p.Position=HRP.Position a(p)p.Color=Color3.new(1,0,0)
  122.             local p2=p:Clone()p2.Color=Color3.new(0,0,0)local m2=p2:FindFirstChildOfClass("SpecialMesh")
  123.             playsound("rbxassetid://156572165",5,2)playsound("rbxassetid://201858087",1/0,.5)p.Parent=workspace p2.Parent=workspace
  124.             p.Touched:connect(function(pt)dodamage(pt,.5,true)end)
  125.             spawn(function()for i=0,1,.01 do m.Scale=Vector3.new(i*5,i*5,i*5)m2.Scale=m.Scale+Vector3.new(1,1,1)p.Transparency=i p2.Transparency=i wait()end p:Destroy()p2:Destroy()end)
  126.             spawn(function()for i2=0,1,.05 do for i=1,20 do local pos=part[i].CFrame part[i].Transparency=i2 part[i].Size=part[i].Size+Vector3.new(i*-.01,i*-.01,0)
  127.             part[i].CFrame=pos end wait()end for i=1,#part do part[i]:Destroy()end end)
  128.             HRP.CFrame=HRP.CFrame*CFrame.new(0,0,60)
  129.             clear()
  130.         end
  131.         if Stroke=="ww" or Stroke=="aa" or Stroke=="ss" or Stroke=="dd"then clear()end
  132.     end
  133. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement