Advertisement
giantgamingchannel

[LUA] Lots of keys test

Mar 7th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.34 KB | None | 0 0
  1. --By giantgamingchannel
  2. --Don't leak.
  3. --Discord: Polandball (giant)#3166
  4. print("Press z for something special.")
  5. print("Press A to dab")
  6. print("Press R to die, I dare you.")
  7. function onKeyPress(inputObject, gameProcessedEvent)
  8.     if inputObject.KeyCode == Enum.KeyCode.Z then
  9.         print("de special key was pressed")
  10. function onKeyPress(inputObject, gameProcessedEven
  11. if inputObject.KeyCode.KeyCode == Enum.KeyCode.A then
  12. local plr = game.Players.LocalPlayer
  13. local chr = plr.Character
  14. local mouse = plr:GetMouse()
  15.  
  16. q = Instance.new('HopperBin', plr.Backpack)
  17. q.Name = 'Dab'
  18. Bin=q
  19.  
  20.  
  21. dabbing=Instance.new('Sound', plr.Character.Torso)
  22. dabbing.Volume = 5
  23. dabbing.Pitch = 0.7
  24. dabbing.SoundId = 'rbxassetid://437235476'
  25.  
  26. function stopAnimations()
  27. for _,v in pairs(game.Players.LocalPlayer.Character.Humanoid:GetPlayingAnimationTracks()) do
  28. v:Stop()
  29. end
  30. end
  31.  
  32. Bin.Selected:connect(function(mouse)
  33. mouse.Button1Down:connect(function()
  34. local chr = game.Players.LocalPlayer.Character
  35. chr.Animate.Disabled = true
  36. chr.Torso["Left Shoulder"].C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  37. chr.Torso["Right Shoulder"].C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  38. game:GetService("Chat"):Chat(plr.Character.Head, "DAAAB", Enum.ChatColor.Blue)
  39. chr.Torso["Neck"].C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  40. dabbing:Play()
  41. wait(0.3)
  42. local chr = game.Players.LocalPlayer.Character
  43. stopAnimations()
  44. chr.Animate.Disabled = true
  45. chr.Torso["Left Shoulder"].C1 = CFrame.new(0, 0.699999988, 0, 0.939692616, 0, -0.342020124, -0.330366075, -0.258819044, -0.907673359, -0.0885213241, 0.965925813, -0.243210346)
  46. chr.Torso["Right Shoulder"].C1 = CFrame.new(-0.600000024, 0.5, -0.200000003, 0.664462984, 0.241844743, 0.707106769, -0.664462984, -0.241844788, 0.707106769, 0.342020154, -0.939692616, -3.09086197e-008)
  47. chr.Torso["Neck"].C1 = CFrame.new(0, -0.600000024, 0, -0.866025388, 0.5, 0, -0.171010137, -0.29619807, 0.939692616, 0.469846278, 0.813797653, 0.342020124)
  48. wait(2)
  49. stopAnimations()
  50. chr.Torso["Left Shoulder"].C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  51. chr.Torso["Right Shoulder"].C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  52. chr.Torso["Neck"].C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  53. chr.Animate.Disabled = false
  54. end)
  55. end)
  56. function onKeyPress(inputObject, gameProcessedEvent)
  57.     if inputObject.KeyCode == Enum.KeyCode.R then
  58. --Converted with ttyyuu12345's model to script plugin v4
  59. --By Rufus14
  60. mouse = game.Players.LocalPlayer:GetMouse()
  61. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge
  62. game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
  63. function sandbox(var,func)
  64.     local env = getfenv(func)
  65.     local newenv = setmetatable({},{
  66.         __index = function(self,k)
  67.             if k=="script" then
  68.                 return var
  69.             else
  70.                 return env[k]
  71.             end
  72.         end,
  73.     })
  74.     setfenv(func,newenv)
  75.     return func
  76. end
  77. cors = {}
  78. mas = Instance.new("Model",game:GetService("Lighting"))
  79. Part0 = Instance.new("Part")
  80. SpecialMesh1 = Instance.new("SpecialMesh")
  81. Part0.Name = "Gun"
  82. Part0.Parent = mas
  83. Part0.CanCollide = false
  84. Part0.Size = Vector3.new(0.970000505, 2.46999931, 0.380000055)
  85. Part0.CFrame = CFrame.new(-211.74501, 2.6168952, 37.920002, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  86. Part0.Position = Vector3.new(-211.74501, 2.6168952, 37.920002)
  87. SpecialMesh1.Parent = Part0
  88. SpecialMesh1.MeshId = "rbxassetid://505563629"
  89. SpecialMesh1.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
  90. SpecialMesh1.TextureId = "rbxassetid://505563636"
  91. SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  92. SpecialMesh1.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
  93. for i,v in pairs(mas:GetChildren()) do
  94.     v.Parent = game:GetService("Players").LocalPlayer.Character
  95.     pcall(function() v:MakeJoints() end)
  96. end
  97. mas:Destroy()
  98. for i,v in pairs(cors) do
  99.     spawn(function()
  100.         pcall(v)
  101.     end)
  102. end
  103. cankys = true
  104. weld = Instance.new("Weld", Part0)
  105. weld.Part0 = game.Players.LocalPlayer.Character["Left Arm"]
  106. weld.Part1 = Part0
  107. weld.C0 = CFrame.new(0.158004761, -1.63815379, -1.00455856, -5.79879307e-22, 9.29214533e-23, 1, -0.587791622, -0.809012473, -2.65673535e-22, 0.809012473, -0.587791622, 5.23747954e-22)
  108. function killyourself(key)
  109.     if cankys then
  110.         cankys = false
  111.         if game.Players.LocalPlayer.Character.Head:findFirstChild("face") then
  112.             game.Players.LocalPlayer.Character.Head.face.Texture = "rbxassetid://1148787155"
  113.         end
  114.         local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  115.         rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  116.         rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  117.         rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  118.         local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  119.         lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  120.         lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  121.         lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  122.         for i = 0,2 , 0.02 do
  123.             weld.C0 = weld.C0:lerp(CFrame.new(0.720336914, -0.258590698, -0.514060974, 0.409927189, 0.572569966, -0.710018694, 0.0567400455, 0.760912359, 0.646370947, 0.910354853, -0.305250764, 0.279430419),i)
  124.             lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.832244873, 0.405325174, -1.44667816, 0.719340205, -0.634600103, -0.28254649, -0.214658037, 0.183768019, -0.959245205, 0.660660148, 0.750674427, -0.00403028121),i)
  125.             rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.921920776, 0.294008493, -1.1861496, 0.88295126, 0.469464868, 6.12843053e-07, -0.0490720123, 0.0922940373, -0.994521856, -0.466893107, 0.878114343, 0.104528703),i)
  126.             game:GetService("RunService").RenderStepped:wait()
  127.         end
  128.         script.Parent = nil
  129. function ragdoll()
  130. game.Players.LocalPlayer.Character.Archivable = true
  131. clone = game.Players.LocalPlayer.Character:Clone()
  132. clone.Parent = workspace
  133. for i,v in pairs(clone:GetChildren()) do
  134.     if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  135.         v:destroy()
  136.     end
  137.     for i,p in pairs(v:GetChildren()) do
  138.     if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  139.         p:destroy()
  140.     end
  141. end
  142. end
  143. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  144.     if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  145.         t:destroy()
  146.     end
  147. end
  148. vel = Instance.new("BodyVelocity", clone.Torso)
  149. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  150. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  151. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=305296807"
  152. using = false
  153. hit = Instance.new("Sound", clone.Torso)
  154. hit.SoundId = "rbxassetid://260430060"
  155. hit.Volume = 0
  156. hit1 = Instance.new("Sound", clone.Torso)
  157. hit1.SoundId = "rbxassetid://138087186"
  158. hit1.Volume = 0
  159. hit2 = Instance.new("Sound", clone.Torso)
  160. hit2.SoundId = "rbxassetid://131237241"
  161. hit2.Volume = 0
  162. hit3 = Instance.new("Sound", clone.Torso)
  163. hit3.SoundId = "rbxassetid://278062209"
  164. hit3.Volume = 0
  165. hit3.TimePosition = 0.33
  166. ded = Instance.new("Sound", clone.Torso)
  167. ded.SoundId = "rbxassetid://304679846"
  168. ded.Volume = 10
  169. local leftarm = clone:findFirstChild("Left Arm")
  170. local rightrm = clone:findFirstChild("Right Arm")
  171. local leftleg = clone:findFirstChild("Left Leg")
  172. local rightleg = clone:findFirstChild("Right Leg")
  173. local head = clone:findFirstChild("Head")
  174. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  175.     if g.ClassName == "Part" then
  176.         g:destroy()
  177.     end
  178. end
  179. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  180.     if h.ClassName == "Accesory" then
  181.         h:destroy()
  182.     end
  183. end
  184. game.Workspace.CurrentCamera.CameraSubject = head
  185. if head then
  186.             local attachment = Instance.new("Attachment", clone.Head)
  187.             attachment.Position = Vector3.new(0, -0.5, 0)
  188.             attachment.Name = "lol"
  189.             attachment.Visible = false
  190.             clone.Torso.NeckAttachment.Visible = false
  191.             clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  192.             local ball = Instance.new("BallSocketConstraint", clone)
  193.             ball.Attachment0 = clone.Torso.NeckAttachment
  194.             ball.Attachment1 = attachment
  195.             ball.LimitsEnabled = true
  196.             ball.TwistLimitsEnabled = true
  197.             ball.UpperAngle = 90
  198.             ball.Restitution = 0.5
  199.             ball.TwistUpperAngle = 90
  200.             ball.TwistLowerAngle = -90
  201.             local  collidepartofleftleg = Instance.new("Part", clone.Torso)
  202.             collidepartofleftleg.Name = "Bone"
  203.             collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  204.             collidepartofleftleg.Transparency = 1
  205.             collidepartofleftleg:BreakJoints()
  206.             local weeld = Instance.new("Weld", collidepartofleftleg)
  207.             weeld.Part0 = collidepartofleftleg
  208.             weeld.Part1 = clone["Head"]
  209.         end
  210. if leftleg ~= nil then
  211. local glue = Instance.new("Glue", clone.Torso)
  212. glue.Part0 = clone.Torso
  213. glue.Part1 = leftleg
  214. glue.Name = "Left leg"
  215. local collider = Instance.new("Part", leftleg)
  216. collider.Position = Vector3.new(0,999,0)
  217. collider.Size = Vector3.new(1.5, 1, 1)
  218. collider.Shape = "Cylinder"
  219. local weld = Instance.new("Weld", collider)
  220. weld.Part0 = leftleg
  221. weld.Part1 = collider
  222. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  223. collider.TopSurface = "Smooth"
  224. collider.BottomSurface = "Smooth"
  225. collider.formFactor = "Symmetric"
  226. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  227. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  228. collider.Transparency = 1
  229. end
  230. ------------
  231. if rightleg ~= nil then
  232. local glue1 = Instance.new("Glue", clone.Torso)
  233. glue1.Part0 = clone.Torso
  234. glue1.Part1 = rightleg
  235. glue1.Name = "Right leg"
  236. local collider1 = Instance.new("Part", rightleg)
  237. collider1.Position = Vector3.new(0,999,0)
  238. collider1.Size = Vector3.new(1.5, 1, 1)
  239. collider1.Shape = "Cylinder"
  240. local weld1 = Instance.new("Weld", collider1)
  241. weld1.Part0 = rightleg
  242. weld1.Part1 = collider1
  243. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  244. collider1.TopSurface = "Smooth"
  245. collider1.BottomSurface = "Smooth"
  246. collider1.formFactor = "Symmetric"
  247. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  248. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  249. collider1.Transparency = 1
  250. end
  251. ------------
  252. if rightrm ~= nil then
  253. local glue11 = Instance.new("Glue", clone.Torso)
  254. glue11.Part0 = clone.Torso
  255. glue11.Part1 = rightrm
  256. glue11.Name = "Right shoulder"
  257. local collider11 = Instance.new("Part", rightrm)
  258. collider11.Position = Vector3.new(0,9999,0)
  259. collider11.Size = Vector3.new(1.5,1,1)
  260. collider11.Shape = "Cylinder"
  261. local weld11 = Instance.new("Weld", collider11)
  262. weld11.Part0 = rightrm
  263. weld11.Part1 = collider11
  264. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  265. collider11.TopSurface = "Smooth"
  266. collider11.BottomSurface = "Smooth"
  267. collider11.formFactor = "Symmetric"
  268. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  269. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  270. collider11.Transparency = 1
  271. end
  272. ------------
  273. if leftarm ~= nil then
  274. local glue111 = Instance.new("Glue", clone.Torso)
  275. glue111.Part0 = clone.Torso
  276. glue111.Part1 = leftarm
  277. glue111.Name = "Left shoulder"
  278. local collider111 = Instance.new("Part", leftarm)
  279. collider111.Position = Vector3.new(0,9999,0)
  280. collider111.Size = Vector3.new(1.5,1,1)
  281. collider111.Shape = "Cylinder"
  282. local weld111 = Instance.new("Weld", collider111)
  283. weld111.Part0 = leftarm
  284. weld111.Part1 = collider111
  285. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  286. collider111.TopSurface = "Smooth"
  287. collider111.BottomSurface = "Smooth"
  288. collider111.formFactor = "Symmetric"
  289. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  290. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  291. collider111.Transparency = 1
  292. ----------------
  293. sensoring = Instance.new("Part", clone.Torso)
  294. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  295. sensoring.CanCollide = false
  296. sensoring.Position = clone.Torso.Position
  297. local welder = Instance.new("Weld", sensoring)
  298. welder.Part0 = clone.Torso
  299. welder.Part1 = sensoring
  300. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  301. sensoring.Transparency = 1
  302. -----------------
  303. sensoring1 = Instance.new("Part", clone.Torso)
  304. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  305. sensoring1.CanCollide = false
  306. sensoring1.Position = clone.Torso.Position
  307. local welder1 = Instance.new("Weld", sensoring)
  308. welder1.Part0 = clone.Torso
  309. welder1.Part1 = sensoring1
  310. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  311. sensoring1.Transparency = 1
  312. end
  313. clone.Name = game.Players.LocalPlayer.Character.Name.." (Suicide)"
  314. ded:Play()
  315. vel:destroy()
  316. wait(0.5)
  317. local function touch()
  318.     if not using then
  319.         using = true
  320.         local Math = math.random(1,4)
  321.         if Math == 1 then
  322.             hit:Play()
  323.         end
  324.         if Math == 2 then
  325.             hit1:Play()
  326.         end
  327.         if Math == 3 then
  328.             hit2:Play()
  329.         end
  330.         if Math == 4 then
  331.             hit3:Play()
  332.         end
  333.         wait(0.1)
  334.         using = false
  335.     end
  336. end
  337. sensoring.Touched:connect(touch)
  338. sensoring1.Touched:connect(touch)
  339. while true do
  340.     clone.Head.CanCollide = false
  341.     game:GetService("RunService").Stepped:wait()
  342. end
  343. end
  344.  
  345. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  346.  
  347. --di ent
  348. game.Players.LocalPlayer.Character.Humanoid.Health = 0
  349.     end
  350. end
  351. mouse.Button1Down:connect(killyourself)
  352.        
  353.     end
  354. end
  355.  
  356. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement