DogeOnDiscord

Work in progress (stage 1) UZI

Feb 18th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.59 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local char = plr.Character
  3. local mouse = plr:GetMouse()
  4. local torso = char.Torso
  5. local rs = torso["Right Shoulder"]
  6. local ls = torso["Left Shoulder"]
  7. local rh = torso["Right Hip"]
  8. local lh = torso["Left Hip"]
  9. local rj = char.HumanoidRootPart.RootJoint
  10. local neck = torso.Neck
  11. local animpose = "Idle"
  12. local attacking = false
  13. local cananim = true
  14. local rage = false
  15. local shield
  16. local sprint = false
  17. local canrage = true
  18. local legs = true
  19. local bc = char:WaitForChild("Body Colors")
  20. local multiplier = 1
  21. local lac = char["Body Colors"].LeftArmColor
  22. local rac = char["Body Colors"].RightArmColor
  23. local rlc = char["Body Colors"].RightArmColor
  24. local llc = char["Body Colors"].LeftLegColor
  25. local hc = char["Body Colors"].HeadColor
  26. local tc = char["Body Colors"].TorsoColor
  27. local humanoid = char:FindFirstChildOfClass("Humanoid")
  28. local huge = Vector3.new(math.huge, math.huge, math.huge)
  29. local mobs = Instance.new("Sound", char)
  30. mobs.SoundId = "rbxassetid://685388224"
  31. mobs.Looped = true
  32. mobs.Volume = 3
  33. humanoid.MaxHealth = math.huge
  34. wait()
  35. humanoid.Health = math.huge
  36. humanoid.Name = "BOOM BOOM BOOOMMMM!"
  37. mobs:Play()
  38. if char:FindFirstChild("Animate") then
  39. char.Animate:Destroy()
  40. end
  41. if char:FindFirstChildOfClass("Humanoid"):FindFirstChild("Animator") then
  42. char:FindFirstChildOfClass("Humanoid").Animator:Destroy()
  43. end
  44. function legsonly()
  45. spawn(function()
  46. for i = 0, 10 do
  47. wait(0.001)
  48. if attacking then
  49. break
  50. end
  51. end
  52. if not attacking then
  53. legs = false
  54. end
  55. end)
  56. end
  57. function swait(t)
  58. if t == nil or t == 0 then
  59. game:service("RunService").Stepped:wait(0)
  60. else
  61. for i = 0, t do
  62. game:service("RunService").Stepped:wait(0)
  63. end
  64. end
  65. end
  66. function KICK(PLAYER)
  67. spawn(function()
  68. local function SKICK()
  69. if PLAYER.Character and PLAYER.Character:FindFirstChild("HumanoidRootPart") and PLAYER.Character:FindFirstChild("Torso") then
  70. PLAYER.Character.HumanoidRootPart.CFrame = CFrame.new(math.random(999000, 1001000), 1000000, 1000000)
  71. do
  72. local SP = Instance.new("SkateboardPlatform", PLAYER.Character)
  73. SP.Position = PLAYER.Character.HumanoidRootPart.Position
  74. SP.Transparency = 1
  75. spawn(function()
  76. repeat
  77. swait()
  78. if PLAYER.Character and PLAYER.Character:FindFirstChild("HumanoidRootPart") then
  79. SP.Position = PLAYER.Character.HumanoidRootPart.Position
  80. end
  81. until not game:GetService("Players"):FindFirstChild(PLAYER.Name)
  82. end)
  83. PLAYER.Character.Torso.Anchored = true
  84. end
  85. end
  86. end
  87. spawn(function()
  88. repeat
  89. wait()
  90. if PLAYER ~= nil then
  91. SKICK()
  92. end
  93. until not game:GetService("Players"):FindFirstChild(PLAYER.Name)
  94. if not game:GetService("Players"):FindFirstChild(PLAYER.Name) then
  95. print("REMOVED " .. PLAYER.Name)
  96. end
  97. end)
  98. end)
  99. end
  100. function hurt(hit, dmg)
  101. if hit.Parent then
  102. if hit.Parent:IsA("LocalScript") then
  103. print("bocks!11")
  104. hit.Parent:Destroy()
  105. end
  106. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  107. if hum and hum.Parent.Name ~= plr.Name then
  108. if dmg == "Kill" or hum.Health > 100000 then
  109. hit.Parent:BreakJoints()
  110. return true
  111. else
  112. if math.random(0, 100) == 50 then
  113. hum.Health = hum.Health - dmg * multiplier * 86866
  114. else
  115. hum.Health = hum.Health - dmg * multiplier
  116. end
  117. return true
  118. end
  119. end
  120. end
  121. end
  122. function soundeffect(id, volume, speed, parent)
  123. spawn(function()
  124. local s = Instance.new("Sound")
  125. s.SoundId = id
  126. s.Volume = volume
  127. s.PlaybackSpeed = speed
  128. s.Parent = parent
  129. s:Play()
  130. repeat
  131. wait()
  132. until not s.Playing
  133. s:Destroy()
  134. end)
  135. end
  136. function gethum(obj)
  137. if obj.Parent and obj.Parent:FindFirstChild("Humanoid") and obj.Parent.Name ~= plr.Name then
  138. return obj.Parent:FindFirstChildOfClass("Humanoid")
  139. end
  140. end
  141. function smooth(obj)
  142. local sides = {
  143. "Left",
  144. "Right",
  145. "Top",
  146. "Bottom",
  147. "Front",
  148. "Back"
  149. }
  150. for i, v in pairs(sides) do
  151. obj[v .. "Surface"] = "SmoothNoOutlines"
  152. end
  153. end
  154. function fade(obj, dest, grow)
  155. spawn(function()
  156. local oldcf = obj.CFrame
  157. for i = 0, 10 do
  158. if grow then
  159. obj.Size = obj.Size + Vector3.new(1, 1, 1)
  160. obj.CFrame = oldcf
  161. end
  162. obj.Transparency = obj.Transparency + 0.1
  163. swait()
  164. end
  165. if dest then
  166. obj:Destroy()
  167. end
  168. end)
  169. end
  170. local keyamount = 0
  171. mouse.KeyDown:connect(function(key)
  172. if key == "w" or key == "a" or key == "s" or key == "d" then
  173. keyamount = keyamount + 1
  174. if animpose ~= "Falling" then
  175. if keyamount > 3 then
  176. keyamount = 0
  177. end
  178. animpose = "Walking"
  179. end
  180. end
  181. end)
  182. mouse.KeyUp:connect(function(key)
  183. if key == "w" or key == "a" or key == "s" or key == "d" then
  184. keyamount = keyamount - 1
  185. if keyamount < 0 then
  186. keyamount = 0
  187. end
  188. if keyamount == 0 then
  189. animpose = "Idle"
  190. end
  191. end
  192. end)
  193. local gun = Instance.new("Part")
  194. gun.Size = Vector3.new(3.175, 1.916, 0.465)
  195. gun.CanCollide = false
  196. local m = Instance.new("SpecialMesh", gun)
  197. m.MeshId = "rbxassetid://453991339"
  198. m.Scale = Vector3.new(0.1, 0.1, 0.1)
  199. gun.CFrame = char.Torso.CFrame
  200. gun.Parent = char
  201. local gunw = Instance.new("Weld", gun)
  202. gunw.Part0 = gun
  203. gunw.Part1 = char["Right Arm"]
  204. gunw.C0 = CFrame.new(-1.7838248, -0.410839319, 0, -0.0871557146, -0.996194541, 0, 0.996194541, -0.0871557146, 0, 0, 0, 1)
  205. mouse.Button1Down:connect(function()
  206. local cf = gun.CFrame * CFrame.new(0, 0, 0.958)
  207. local mag = (gun.Position - mouse.Hit.p).magnitude
  208. local p = Instance.new("Part")
  209. p.CanCollide = false
  210. p.Anchored = false
  211. p.BrickColor = BrickColor.new("Smoky grey")
  212. p.Size = Vector3.new(0.2, 0.2, mag)
  213. smooth(p)
  214. p.Material = "Slate"
  215. p.CFrame = CFrame.new(gun.Position, mouse.Hit.p) * CFrame.new(0, 0, -mag / 2)
  216. local m = Instance.new("SpecialMesh", p)
  217. m.MeshType = "Wedge"
  218. p.Parent = workspace
  219. p.Touched:connect(function(hit)
  220. hurt(hit, "Kill")
  221. if hit.Size.X > 100 and 100 < hit.Size.Z and hit.Size.Y < 3 then
  222. elseif hit.Parent and hit.Parent.Name ~= plr.Name then
  223. fade(hit, true)
  224. end
  225. end)
  226. local bp = Instance.new("BodyPosition", p)
  227. bp.MaxForce = huge
  228. bp.Position = p.Position
  229. local saved = p.CFrame
  230. for i = 1, 10 do
  231. p.Size = p.Size + Vector3.new(0.01, 0.01, 0.01)
  232. p.CFrame = saved
  233. p.Velocity = Vector3.new(0, 0, 100)
  234. p.Transparency = p.Transparency + 0.1
  235. wait()
  236. end
  237. p:Destroy()
  238. end)
  239. mouse.KeyDown:connect(function(key)
  240. if key == "l" then
  241. function a(b)
  242. pcall(function()
  243. for i, v in pairs(b:children()) do
  244. pcall(function()
  245. if v:IsA("BasePart") and v.Parent and v.Parent.Name == "WafflesAreVeryGood" and v.Anchored then
  246. v.Anchored = false
  247. end
  248. if v:IsA("Sound") and v.Parent.Name ~= "WafflesAreVeryGood" then
  249. v:Destroy()
  250. end
  251. if v:IsA("ParticleEmitter") then
  252. v:Destroy()
  253. end
  254. a(v)
  255. end)
  256. end
  257. end)
  258. end
  259. a(game)
  260. end
  261. if key == "q" then
  262. local cf = gun.CFrame * CFrame.new(0, 0, 0.958)
  263. local mag = (gun.Position - mouse.Hit.p).magnitude
  264. local p = Instance.new("Part")
  265. p.CanCollide = false
  266. p.Anchored = false
  267. p.BrickColor = BrickColor.new("Really red")
  268. p.Size = Vector3.new(0.2, 0.2, mag)
  269. smooth(p)
  270. p.Material = "Neon"
  271. p.CFrame = CFrame.new(gun.Position, mouse.Hit.p) * CFrame.new(0, 0, -mag / 2)
  272. local m = Instance.new("SpecialMesh", p)
  273. m.MeshType = "Brick"
  274. p.Parent = workspace
  275. p.Touched:connect(function(hit)
  276. if gethum(hit) then
  277. for i, v in pairs(hit.Parent:children()) do
  278. if v:IsA("Model") then
  279. v:BreakJoints()
  280. end
  281. local ok = false
  282. for i, e in pairs({
  283. "Right Arm",
  284. "Left Arm",
  285. "Right Leg",
  286. "Left Leg",
  287. "Head",
  288. "Torso",
  289. "HumanoidRootPart"
  290. }) do
  291. if v.Name == e then
  292. ok = true
  293. end
  294. end
  295. if v:IsA("BasePart") and not ok then
  296. fade(v, true)
  297. end
  298. end
  299. end
  300. if hit:FindFirstChildOfClass("TouchTransmitter") then
  301. hit:FindFirstChildOfClass("TouchTransmitter"):Destroy()
  302. end
  303. end)
  304. local bp = Instance.new("BodyPosition", p)
  305. bp.MaxForce = huge
  306. bp.Position = p.Position
  307. local saved = p.CFrame
  308. for i = 1, 10 do
  309. p.Size = p.Size + Vector3.new(0.01, 0.01, 0.01)
  310. p.CFrame = saved
  311. p.Velocity = Vector3.new(0, 0, 100)
  312. p.Transparency = p.Transparency + 0.1
  313. wait()
  314. end
  315. p:Destroy()
  316. end
  317. if key == "e" then
  318. local cf = gun.CFrame * CFrame.new(0, 0, 0.958)
  319. local mag = (gun.Position - mouse.Hit.p).magnitude
  320. local p = Instance.new("Part")
  321. p.CanCollide = false
  322. p.Anchored = false
  323. p.BrickColor = BrickColor.new("New Yeller")
  324. p.Size = Vector3.new(0.2, 0.2, mag)
  325. smooth(p)
  326. p.Material = "Neon"
  327. p.CFrame = CFrame.new(gun.Position, mouse.Hit.p) * CFrame.new(0, 0, -mag / 2)
  328. local m = Instance.new("SpecialMesh", p)
  329. m.MeshType = "Brick"
  330. p.Parent = workspace
  331. p.Touched:connect(function(hit)
  332. if gethum(hit) then
  333. local target = game.Players:FindFirstChild(hit.Parent.Name)
  334. if target then
  335. KICK(target)
  336. end
  337. end
  338. end)
  339. local bp = Instance.new("BodyPosition", p)
  340. bp.MaxForce = huge
  341. bp.Position = p.Position
  342. local saved = p.CFrame
  343. for i = 1, 10 do
  344. p.Size = p.Size + Vector3.new(0.01, 0.01, 0.01)
  345. p.CFrame = saved
  346. p.Velocity = Vector3.new(0, 0, 100)
  347. p.Transparency = p.Transparency + 0.1
  348. wait()
  349. end
  350. p:Destroy()
  351. end
  352. if key == "r" then
  353. local cf = gun.CFrame * CFrame.new(0, 0, 0.958)
  354. local mag = (gun.Position - mouse.Hit.p).magnitude
  355. local p = Instance.new("Part")
  356. p.CanCollide = false
  357. p.Anchored = false
  358. p.BrickColor = BrickColor.new("Lime green")
  359. p.Size = Vector3.new(0.2, 0.2, mag)
  360. smooth(p)
  361. p.Material = "Fabric"
  362. p.CFrame = CFrame.new(gun.Position, mouse.Hit.p) * CFrame.new(0, 0, -mag / 2)
  363. local m = Instance.new("SpecialMesh", p)
  364. m.MeshType = "Cylinder"
  365. p.Parent = workspace
  366. p.Touched:connect(function(hit)
  367. local hum = gethum(hit)
  368. if hum then
  369. hum.Health = hum.MaxHealth
  370. end
  371. end)
  372. local bp = Instance.new("BodyPosition", p)
  373. bp.MaxForce = huge
  374. bp.Position = p.Position
  375. local saved = p.CFrame
  376. for i = 1, 10 do
  377. p.Size = p.Size + Vector3.new(0.01, 0.01, 0.01)
  378. p.CFrame = saved
  379. p.Velocity = Vector3.new(0, 0, 100)
  380. p.Transparency = p.Transparency + 0.1
  381. wait()
  382. end
  383. p:Destroy()
  384. end
  385. end)
  386. game:GetService("RunService").Stepped:connect(function()
  387. local x, z
  388. local dir = CFrame.new(char.HumanoidRootPart.Position, mouse.Hit.p).lookVector
  389. x = dir.X
  390. z = dir.Z
  391. local cf = CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position + Vector3.new(x, 0, z))
  392. char.HumanoidRootPart.CFrame = char.HumanoidRootPart.CFrame:Lerp(cf, 0.5)
  393. humanoid.AutoRotate = false
  394. end)
  395. while wait() do
  396. if animpose == "Walking" and cananim and legs then
  397. for i = 0, 0.7, 0.1 do
  398. if animpose == "Walking" and cananim and legs then
  399. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.104528472, -0.994522035, 0, 0.994522035, 0.104528472, 1, 0, 0), 0.2)
  400. rs.C0 = rs.C0:Lerp(CFrame.new(1.54167628, 0.0454798974, 0, -0.482965499, -0.871292651, -0.087155737, -0.0422539636, -0.0762281716, 0.996195912, -0.874620378, 0.484809875, 0), 0.2)
  401. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -0.500000656, -0.866026223, 0, -1.61309954E-9, 9.31323796E-10, 1.00000024, -0.866026342, 0.500000715, -1.86264515E-9), 0.2)
  402. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.469472021, 0.882948279, 0, 0, 0, 1, 0.882948279, 0.469472021, 0), 0.2)
  403. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -0.0219629817, 0.02712203, -0.999390841, -0.628937364, 0.776673257, 0.0348994955, 0.777146697, 0.6293208, 0), 0.4)
  404. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0.0238014236, -0.0255239103, 0.999390841, -0.681583524, 0.73090899, 0.0348994955, -0.731354535, -0.681998909, 0), 0.4)
  405. wait()
  406. else
  407. break
  408. end
  409. end
  410. for i = 0, 0.7, 0.1 do
  411. if animpose == "Walking" and cananim and legs then
  412. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.104528472, -0.994522035, 0, 0.994522035, 0.104528472, 1, 0, 0), 0.2)
  413. rs.C0 = rs.C0:Lerp(CFrame.new(1.54167628, 0.0454798974, 0, -0.482965499, -0.871292651, -0.087155737, -0.0422539636, -0.0762281716, 0.996195912, -0.874620378, 0.484809875, 0), 0.2)
  414. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -0.500000656, -0.866026223, 0, -1.61309954E-9, 9.31323796E-10, 1.00000024, -0.866026342, 0.500000715, -1.86264515E-9), 0.2)
  415. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.469472021, 0.882948279, 0, 0, 0, 1, 0.882948279, 0.469472021, 0), 0.2)
  416. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, 0.0205134545, 0.0282343514, -0.999390841, 0.587428331, 0.808525503, 0.0348994955, 0.809018135, -0.587786257, 0), 0.4)
  417. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -0.0224330258, -0.0267346334, 0.999390841, 0.642397523, 0.765579402, 0.0348994955, -0.76604569, 0.642788768, 0), 0.4)
  418. wait()
  419. else
  420. break
  421. end
  422. end
  423. end
  424. if animpose == "Idle" and cananim and legs then
  425. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.104528472, -0.994522035, 0, 0.994522035, 0.104528472, 1, 0, 0), 0.2)
  426. rs.C0 = rs.C0:Lerp(CFrame.new(1.54167628, 0.0454798974, 0, -0.482965499, -0.871292651, -0.087155737, -0.0422539636, -0.0762281716, 0.996195912, -0.874620378, 0.484809875, 0), 0.2)
  427. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -0.500000656, -0.866026223, 0, -1.61309954E-9, 9.31323796E-10, 1.00000024, -0.866026342, 0.500000715, -1.86264515E-9), 0.2)
  428. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.469472021, 0.882948279, 0, 0, 0, 1, 0.882948279, 0.469472021, 0), 0.2)
  429. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, 0, 0.0523359552, -0.99862957, 0, 0.99862957, 0.0523359552, 1, 0, 0), 0.5)
  430. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0, -0.0523359627, 0.998629689, 0, 0.998629689, 0.0523359627, -1, 0, 0), 0.5)
  431. end
  432. end
Advertisement
Add Comment
Please, Sign In to add comment