Advertisement
Guest User

Edgy crab

a guest
Nov 16th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---------------------------------
  2. -----THE CRAB MASTER-----
  3. ---------------------------------
  4.  
  5. --This script is made by mrfunnylaughs4 and edgy edit made by Breadencatfam.
  6.  
  7. local plr = owner
  8. local char = plr.Character
  9. local hum = char:FindFirstChildOfClass("Humanoid")
  10. local idleanim = Instance.new("Animation")
  11. idleanim.Name = "Roblox Idle Animation"
  12. idleanim.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  13. local idleanimplay = hum:LoadAnimation(idleanim)
  14. idleanimplay:Play()
  15. wait(0.1)
  16. if char:FindFirstChild("Animate") then
  17. char.Animate:Destroy()
  18. end
  19. local remote = Instance.new("RemoteEvent", char)
  20. remote.Name = "ReplicationEvent"
  21. local client = NLS([==[
  22. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  23. local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  24. spawn(function()
  25. while game:GetService("RunService").Heartbeat:Wait() do
  26. remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  27. end
  28. end)
  29. game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
  30. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
  31. remote:FireServer(1, input.KeyCode)
  32. end
  33. end)
  34. mouse.Button1Down:Connect(function()
  35. remote:FireServer(2)
  36. end)
  37. remote.OnClientEvent:Connect(function()
  38. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position, Vector3.new(mouse.Hit.Position.X, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.Y, mouse.Hit.Position.Z))
  39. end)
  40. ]==], char)
  41. local crabrave = Instance.new("Sound", char.Torso)
  42. local RS = char.Torso["Right Shoulder"]
  43. local LS = char.Torso["Left Shoulder"]
  44. local RH = char.Torso["Right Hip"]
  45. local LH = char.Torso["Left Hip"]
  46. local rootj = char.HumanoidRootPart.RootJoint
  47. local throwbutton = false
  48. local throw = false
  49. local normalanim = true
  50. local attackd = false
  51. local animpose = "Idle"
  52. local timepos = 0
  53. local sine = 0
  54. local RSnor = RS.C0
  55. local LSnor = LS.C0
  56. local RHnor = RH.C0
  57. local LHnor = LH.C0
  58. local rootjnor = rootj.C0
  59.  
  60. ---------------------------------
  61. --------------Set up-------------
  62. ---------------------------------
  63.  
  64. local sur = Instance.new("BillboardGui", char.Head)
  65. sur.Name = "Billboard"
  66. sur.Adornee = char.Head
  67. sur.Size = UDim2.new(10, 0, 5, 0)
  68. sur.StudsOffset = Vector3.new(0, 5, 0)
  69. local text = Instance.new("TextLabel", sur)
  70. text.Text = "THE
  71. CRAB
  72. MASTER"
  73. text.Size = UDim2.new(1, 0, 1, 0)
  74. text.TextScaled = true
  75. text.BackgroundTransparency = 1
  76. text.Font = Enum.Font.SourceSansLight
  77. text.TextColor3 = Color3.new(1, 1, 1)
  78. text.TextStrokeTransparency = 0
  79.  
  80. ---------------------------------
  81. -------------Attacks-------------
  82. ---------------------------------
  83.  
  84. remote.OnServerEvent:Connect(function(Player, number, key)
  85. if number == 1 and plr.Name == Player.Name and attackd == false then
  86. if key == Enum.KeyCode.Z then
  87. sine = 0
  88. attackd = true
  89. normalanim = false
  90. hum.WalkSpeed = 0
  91. hum.JumpPower = 0
  92. for i = 1, 15 do
  93. game:GetService("RunService").Heartbeat:Wait()
  94. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(1.2, 0, 0) + Vector3.new(0, -1.6, 0), 0.15)
  95. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 1.1) + Vector3.new(0, 0, -0.3), 0.15)
  96. LS.C0 = LS.C0:Lerp(LSnor, 0.15)
  97. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  98. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  99. end
  100. for i = 1, 20 do
  101. game:GetService("RunService").Heartbeat:Wait()
  102. LS.C0 = LS.C0 * CFrame.Angles(0, 0, -0.06) + Vector3.new(0, 0, -0.03)
  103. end
  104. local banpart = Instance.new("Part", char)
  105. banpart.Size = Vector3.new(1, 1, 1)
  106. banpart.CanCollide = false
  107. local mesh = Instance.new("SpecialMesh", banpart)
  108. mesh.MeshType = "FileMesh"
  109. mesh.MeshId = "rbxassetid://28937301"
  110. mesh.TextureId = "rbxassetid://28937670"
  111. mesh.Scale = Vector3.new(0.8, 0.8, 0.8)
  112. local weld = Instance.new("Weld", banpart)
  113. weld.Part0 = char["Left Arm"]
  114. weld.Part1 = banpart
  115. weld.C1 = CFrame.new(0, 1, 0)
  116. for i = 1, 20 do
  117. game:GetService("RunService").Heartbeat:Wait()
  118. rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
  119. RS.C0 = RS.C0:Lerp(RSnor, 0.15)
  120. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, -4), 0.15)
  121. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  122. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  123. end
  124. throwbutton = true
  125. throw = true
  126. repeat game:GetService("RunService").Heartbeat:Wait()
  127. remote:FireClient(plr)
  128. until throw == false
  129. for i = 1, 15 do
  130. game:GetService("RunService").Heartbeat:Wait()
  131. LS.C0 = LS.C0:Lerp(LS.C0 * CFrame.Angles(0, 0, 0.01), i)
  132. end
  133. banpart.Parent = workspace
  134. weld:Destroy()
  135. banpart.CanCollide = true
  136. banpart.Velocity = char.HumanoidRootPart.CFrame.LookVector * 60
  137. local start = LS.C0
  138. for i = 1, 0, -1 / 15 do
  139. game:GetService("RunService").Heartbeat:Wait()
  140. LS.C0 = LSnor:Lerp(start, i * i)
  141. end
  142. normalanim = true
  143. attackd = false
  144. hum.WalkSpeed = 16
  145. hum.JumpPower = 50
  146. banpart.Touched:Connect(function(hit)
  147. if hit.Parent and game:GetService("Players"):FindFirstChild(hit.Parent.Name) then
  148. local character = hit.Parent
  149. character:FindFirstChildOfClass("Humanoid").Sit = true
  150. local s = Instance.new("Sound", character.Head)
  151. s.SoundId = "rbxassetid://28976727"
  152. s.Volume = 10
  153. s:Play()
  154. end
  155. end)
  156. spawn(function()
  157. wait(15)
  158. if banpart.Parent == workspace then
  159. banpart:Destroy()
  160. end
  161. end)
  162. end
  163. if key == Enum.KeyCode.X then
  164. attackd = true
  165. local bpart = Instance.new("Part", workspace)
  166. bpart.Size = Vector3.new(2.4, 3.5, 2.4)
  167. bpart.Locked = true
  168. bpart.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2)
  169. bpart.Velocity = Vector3.new(0, 50, 0) + char.HumanoidRootPart.CFrame.LookVector * 50
  170. local mesh = Instance.new("SpecialMesh", bpart)
  171. mesh.MeshType = "FileMesh"
  172. mesh.MeshId = "http://www.roblox.com/asset/?id=29873142"
  173. mesh.Scale = Vector3.new(1.1, 1.1, 1.1)
  174. mesh.TextureId = "http://www.roblox.com/asset/?id=31082268"
  175. local update = 0.4
  176. while update > 0.1 do
  177. local sound = Instance.new("Sound", bpart)
  178. sound.SoundId = "rbxasset://sounds\\clickfast.wav"
  179. sound.Volume = 5
  180. sound:Play()
  181. wait(update)
  182. update = update * 0.9
  183. end
  184. for i = 1, 50 do
  185. local banpart = Instance.new("Part", workspace)
  186. banpart.Size = Vector3.new(1, 1, 1)
  187. banpart.CanCollide = true
  188. banpart.CFrame = bpart.CFrame
  189. local bCFrame = CFrame.new(0, 0, 0)
  190. local bVel = Vector3.new(0, 0, 0)
  191. local mesh = Instance.new("SpecialMesh", banpart)
  192. mesh.MeshType = "FileMesh"
  193. mesh.MeshId = "rbxassetid://28937301"
  194. mesh.TextureId = "rbxassetid://28937670"
  195. mesh.Scale = Vector3.new(0.8, 0.8, 0.8)
  196. local weld = Instance.new("Weld", banpart)
  197. weld.Part0 = bpart
  198. weld.Part1 = banpart
  199. spawn(function()
  200. wait(1)
  201. banpart.Touched:Connect(function(hit)
  202. if hit.Parent and game:GetService("Players"):FindFirstChild(hit.Parent.Name) then
  203. local character = hit.Parent
  204. character:FindFirstChildOfClass("Humanoid").Sit = true
  205. local s = Instance.new("Sound", character.Head)
  206. s.SoundId = "rbxassetid://28976727"
  207. s.Volume = 10
  208. s:Play()
  209. end
  210. end)
  211. end)
  212. spawn(function()
  213. while wait() do
  214. if banpart.Parent ~= workspace then
  215. banpart = Instance.new("Part", workspace)
  216. banpart.Size = Vector3.new(1, 1, 1)
  217. banpart.CanCollide = true
  218. mesh = Instance.new("SpecialMesh", banpart)
  219. mesh.MeshType = "FileMesh"
  220. mesh.MeshId = "rbxassetid://28937301"
  221. mesh.TextureId = "rbxassetid://28937670"
  222. mesh.Scale = Vector3.new(0.8, 0.8, 0.8)
  223. banpart.CFrame = bCFrame
  224. banpart.Velocity = bVel
  225. banpart.Touched:Connect(function(hit)
  226. if hit.Parent and game:GetService("Players"):FindFirstChild(hit.Parent.Name) then
  227. local character = hit.Parent
  228. character:FindFirstChildOfClass("Humanoid").Sit = true
  229. local s = Instance.new("Sound", character.Head)
  230. s.SoundId = "rbxassetid://28976727"
  231. s.Volume = 10
  232. s:Play()
  233. end
  234. end)
  235. else
  236. bCFrame = banpart.CFrame
  237. bVel = banpart.Velocity
  238. end
  239. end
  240. end)
  241. end
  242. local explosion = Instance.new("Explosion", bpart)
  243. explosion.Position = bpart.Position
  244. local sound2 = Instance.new("Sound", bpart)
  245. sound2.SoundId = "rbxasset://sounds\\Rocket shot.wav"
  246. sound2.Volume = 5
  247. sound2:Play()
  248. bpart.CanCollide = false
  249. attackd = false
  250. end
  251. if key == Enum.KeyCode.C then
  252. sine = 0
  253. attackd = true
  254. normalanim = false
  255. hum.WalkSpeed = 0
  256. hum.JumpPower = 0
  257. for i = 1, 20 do
  258. game:GetService("RunService").Heartbeat:Wait()
  259. rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
  260. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, 4), 0.15)
  261. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, -4), 0.15)
  262. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  263. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  264. end
  265. local tpart = Instance.new("Part", char)
  266. tpart.Size = Vector3.new(5.523, 6.19, 22.966)
  267. tpart.Anchored = true
  268. tpart.BrickColor = BrickColor.new("Pine Cone")
  269. tpart.Material = "Wood"
  270. tpart.CanCollide = false
  271. tpart.CFrame = char["Right Arm"].CFrame * CFrame.Angles(math.pi, -math.pi / 2, 0) * CFrame.new(0, 4, 1)
  272. local mesh = Instance.new("SpecialMesh", tpart)
  273. mesh.MeshType = "FileMesh"
  274. mesh.MeshId = "rbxassetid://1760841786"
  275. wait(0.5)
  276. for i = 1, 15 do
  277. game:GetService("RunService").Heartbeat:Wait()
  278. RS.C0 = RS.C0:Lerp(RS.C0 * CFrame.Angles(0, 0, -0.01), i)
  279. LS.C0 = LS.C0:Lerp(LS.C0 * CFrame.Angles(0, 0, 0.01), i)
  280. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  281. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  282. tpart.CFrame = char["Right Arm"].CFrame * CFrame.Angles(math.pi, -math.pi / 2, 0) * CFrame.new(0, 4, 1)
  283. end
  284. tpart.Anchored = false
  285. tpart.Velocity = char.HumanoidRootPart.CFrame.LookVector * 100
  286. tpart.CanCollide = true
  287. tpart.Parent = workspace
  288. spawn(function()
  289. wait(0.3)
  290. tpart.Touched:Connect(function(hit)
  291. if hit.Size.X + hit.Size.Y + hit.Size.Z < 1000 then
  292. hit:BreakJoints()
  293. hit.Anchored = false
  294. hit.Velocity = tpart.Velocity
  295. end
  296. end)
  297. end)
  298. for i = 1, 20 do
  299. game:GetService("RunService").Heartbeat:Wait()
  300. rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
  301. RS.C0 = RS.C0:Lerp(RSnor, 0.15)
  302. LS.C0 = LS.C0:Lerp(LSnor, 0.15)
  303. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  304. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  305. end
  306. attackd = false
  307. normalanim = true
  308. hum.WalkSpeed = 16
  309. hum.JumpPower = 50
  310. end
  311. elseif Player.Name == plr.Name and number == 2 and throw == true and throwbutton == true then
  312. throwbutton = false
  313. throw = false
  314. end
  315. end)
  316.  
  317. ---------------------------------
  318. -----------Wrapping up-----------
  319. ---------------------------------
  320.  
  321. while game:GetService("RunService").Heartbeat:Wait() do
  322. if normalanim then
  323. sine = sine + 1
  324. end
  325. if crabrave.Parent == char.Torso then
  326. crabrave.SoundId = "rbxassetid://1609256184"
  327. crabrave.Playing = true
  328. crabrave.Volume = 1
  329. crabrave.Looped = true
  330. timepos = crabrave.TimePosition
  331. else
  332. crabrave = Instance.new("Sound", char.Torso)
  333. crabrave.TimePosition = timepos
  334. end
  335. if remote.Parent == char then
  336. remote.Name = "ReplicationEvent"
  337. else
  338. remote = Instance.new("RemoteEvent", char)
  339. end
  340. local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char)
  341. if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
  342. animpose = "Walking"
  343. elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
  344. animpose = "Jumping"
  345. elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
  346. animpose = "Falling"
  347. else
  348. animpose = "Idle"
  349. end
  350. if animpose == "Idle" and normalanim then
  351. RS.C0 = RSnor * CFrame.Angles(0, 0, 1 + math.sin(sine / 5))
  352. LS.C0 = LSnor * CFrame.Angles(0, 0, -1 + math.sin(sine / 5))
  353. RH.C0 = RH.C0:Lerp(RHnor, 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
  354. LH.C0 = LH.C0:Lerp(LHnor, 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
  355. rootj.C0 = rootjnor * CFrame.new(math.sin(sine / 10) / 2, 0, math.sin(sine / 5) / 2)
  356. elseif animpose == "Walking" and normalanim then
  357. RS.C0 = RSnor * CFrame.Angles(0, 0, 1 + math.sin(sine / 5))
  358. LS.C0 = LSnor * CFrame.Angles(0, 0, -1 + math.sin(sine / 5))
  359. RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 10)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
  360. LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 10)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 10, 0)
  361. rootj.C0 = rootjnor * CFrame.new(math.sin(sine / 10) / 2, 0, math.sin(sine / 5) / 2)
  362. elseif animpose == "Jumping" and normalanim then
  363. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(-0.5, 0, 0), 0.15)
  364. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
  365. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
  366. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  367. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  368. elseif animpose == "Falling" and normalanim then
  369. rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(0.5, 0, 0), 0.15)
  370. RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
  371. LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
  372. RH.C0 = RH.C0:Lerp(RHnor, 0.15)
  373. LH.C0 = LH.C0:Lerp(LHnor, 0.15)
  374. end
  375. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement