Advertisement
TheYoutuber_Pro

Untitled

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