lafur

Untitled

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