Advertisement
Amokah

Untitled

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