Advertisement
Finnegan5

Slap

Aug 12th, 2017
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.38 KB | None | 0 0
  1. script.Parent = workspace.CurrentCamera
  2. local plr = game:GetService("Players").LocalPlayer
  3.  
  4. local tool = Instance.new("Tool",plr:WaitForChild("Backpack"))
  5. tool.Grip = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  6. tool.Name = "bluE"
  7.  
  8. local part = Instance.new("Part",tool)
  9. part.Name = "Handle"
  10. part.Size = Vector3.new(4,6,4)
  11. part.TopSurface = "Smooth"
  12. part.BottomSurface = "Smooth"
  13. part.CanCollide = false
  14. part:BreakJoints()
  15.  
  16. local mesh = Instance.new("SpecialMesh",part)
  17. mesh.MeshId = "rbxassetid://432429191" --mesh.MeshId = "rbxassetid://132920499"
  18. mesh.TextureId = "rbxassetid://432429255" --"http://www.roblox.com/asset/?id=134479421"mesh.Scale = Vector3.new(2,2,2)
  19.  
  20. local sound = Instance.new("Sound",part)
  21. sound.SoundId = "rbxassetid://511340819"
  22. sound.Volume = 3
  23.  
  24. local sound2 = Instance.new("Sound",part)
  25. sound2.SoundId = "rbxassetid://12222208"
  26. sound2.Volume = 5
  27.  
  28. local sound3 = Instance.new("Sound",part)
  29. sound3.SoundId = "rbxassetid://877875884"
  30. sound3.Volume = 100
  31.  
  32. local sound4 = Instance.new("Sound",part)
  33. sound4.SoundId = "rbxassetid://429400881"
  34. sound4.Volume = 10
  35.  
  36. local sound5 = Instance.new("Sound",part)
  37. sound5.SoundId = "rbxassetid://130932305"
  38. sound5.Volume = 10
  39.  
  40. local sound6 = Instance.new("Sound",part)
  41. sound6.SoundId = "rbxassetid://316891313"
  42. sound6.Volume = 10
  43. sound6.TimePosition = 2
  44.  
  45. function firstHum(target)
  46. for i,v in pairs(target:GetChildren()) do
  47. if v:IsA("Humanoid") then
  48. return v
  49. end
  50. end
  51. return nil
  52. end
  53.  
  54. local slap = false
  55. local cd = false
  56.  
  57. plr:GetMouse().Button1Down:connect(function()
  58. if tool.Parent == plr.Character then
  59. if slap == false then
  60. slap = true
  61. sound2:Play()
  62. local str = Instance.new("StringValue")
  63. str.Name = "toolanim"
  64. str.Value = "Slash"
  65. str.Parent = tool
  66. wait(1)
  67. slap = false
  68. end
  69. end
  70. end)
  71.  
  72. part.Touched:connect(function(hit)
  73. if slap == true then
  74. if cd == false then
  75. if not hit:IsDescendantOf(plr.Character) then
  76. if hit.Parent:IsA("Model") then
  77. local fhum = firstHum(hit.Parent)
  78. if fhum then
  79. cd = true
  80. fhum.PlatformStand = true
  81. sound:Play()
  82. local con1
  83. con1 = game:GetService("RunService").Heartbeat:connect(function()
  84. fhum.PlatformStand = true
  85. end)
  86. wait(0.1)
  87. local vel = Instance.new("BodyVelocity",hit)
  88. vel.Velocity = ((hit.Position - plr.Character:WaitForChild("HumanoidRootPart").Position).unit + Vector3.new(0,0.5,0))*50
  89. vel.MaxForce = Vector3.new(10000000,10000000,10000000)
  90. wait(1)
  91. cd = false
  92. vel:Destroy()
  93. local vel2 = Instance.new("BodyVelocity",hit)
  94. vel2.Velocity = Vector3.new(0,12.5,0)
  95. vel2.MaxForce = Vector3.new(10000000,10000000,10000000)
  96. local p2 = Instance.new("Part",hit)
  97. p2.Anchored = true
  98. p2.Transparency = 0.6
  99. p2.CanCollide = false
  100. p2.Size = Vector3.new(0.2,0.2,0.2)
  101. p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
  102. p2.BrickColor = BrickColor.new("Really black")
  103. p2.Material = "Neon"
  104. local m2 = Instance.new("CylinderMesh",p2)
  105. m2.Scale = Vector3.new(60,10000,60)
  106. local scln = sound3:Clone()
  107. scln.Parent = hit
  108. scln:Play()
  109. local con2
  110. con2 = game:GetService("RunService").Heartbeat:connect(function()
  111. p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
  112. end)
  113. wait(7)
  114. vel2.Velocity = Vector3.new(0,0,0)
  115. wait(0.5)
  116. scln:Stop()
  117. local scln3 = sound5:Clone()
  118. scln3.Parent = hit
  119. scln3:Play()
  120. wait(1)
  121. local bav = Instance.new("BodyAngularVelocity",hit)
  122. bav.AngularVelocity = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360))
  123. vel2.Velocity = Vector3.new(0,-250,0)
  124. p2.BrickColor = BrickColor.new("Really red")
  125. local scln6 = sound6:Clone()
  126. scln6.Parent = hit
  127. scln6:Play()
  128. local continue = false
  129. local htc
  130. htc = hit.Touched:connect(function(hitp)
  131. if not hitp:IsDescendantOf(hit.Parent) then
  132. continue = true
  133. scln6:Stop()
  134. vel2:Destroy()
  135. con2:Disconnect()
  136. con1:Disconnect()
  137. htc:Disconnect()
  138. p2:Destroy()
  139. end
  140. end)
  141. repeat wait() until continue == true
  142. local ctab = {}
  143. for i=1,4 do
  144. local p = Instance.new("Part",hit)
  145. p.Size = Vector3.new(30,30,30)
  146. p.Anchored = true
  147. p.CanCollide = false
  148. p.TopSurface = "Smooth"
  149. p.BottomSurface = "Smooth"
  150. p.Color = Color3.fromRGB(255,math.random(0,255),0)
  151. p.CFrame = hit.CFrame
  152. local con
  153. con = game:GetService("RunService").Heartbeat:connect(function()
  154. p.CFrame = p.CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  155. p.Transparency = p.Transparency + 0.01
  156. if p.Transparency >= 1 then
  157. con:Disconnect()
  158. end
  159. end)
  160. table.insert(ctab,con)
  161. end
  162. Instance.new("Explosion",workspace).Position = hit.Position
  163. local scln2 = sound4:Clone()
  164. scln2.Parent = hit
  165. scln2:Play()
  166. vel2:Destroy()
  167. hit.Parent:BreakJoints()
  168. repeat wait() until not hit:IsDescendantOf(workspace)
  169. con2:Disconnect()
  170. end
  171. end
  172. end
  173. end
  174. end
  175. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement