memberhero

Untitled

Jul 30th, 2016
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.13 KB | None | 0 0
  1. function Part(Par, Anc, Colli, Tran, Ref, Col, Siz)
  2. local p = Instance.new("Part")
  3. p.formFactor = "Custom"
  4. p.TopSurface = 0
  5. p.BottomSurface = 0
  6. p.Transparency = Tran
  7. p.Reflectance = Ref
  8. p.Anchored = Anc
  9. p.CanCollide = Colli
  10. p.BrickColor = Col
  11. p.Size = Siz
  12. p.Locked = true
  13. p.Parent = Par
  14. p:BreakJoints()
  15. return p
  16. end
  17.  
  18. function Weld(P0, P1, C0, C1)
  19. local w = Instance.new("Weld")
  20. w.Part0 = P0
  21. w.Part1 = P1
  22. if C0 then
  23. w.C0 = C0
  24. end
  25. if C1 then
  26. w.C1 = C1
  27. end
  28. w.Parent = P0
  29. return w
  30. end
  31.  
  32. V3 = Vector3.new
  33. C3 = Color3.new
  34. BN = BrickColor.new
  35. CN = CFrame.new
  36. CA = CFrame.Angles
  37. MR = math.rad
  38. MRA = math.random
  39. MP = math.pi
  40. MH = math.huge
  41. UD = UDim2.new
  42.  
  43. Asset = "http://www.roblox.com/asset/?id="
  44. Noob = nil
  45.  
  46. function MakeMotor(torso, p1, c0, c1)
  47. local mot = Instance.new("Motor6D")
  48. mot.C0 = c0
  49. mot.C1 = c1
  50. mot.Part0 = torso
  51. mot.Part1 = p1
  52. mot.Parent = torso
  53. return mot
  54. end
  55.  
  56. function Set(tab)
  57. for _,v in pairs(tab) do
  58. local motor = v[1]
  59. local vel = v[2]
  60. local des = v[3]
  61. motor.MaxVelocity = vel
  62. motor.DesiredAngle = des
  63. end
  64. end
  65.  
  66. function Animate(Hum, RSH, LSH, RH, LH)
  67. local pose = "Standing"
  68. local function sit()
  69. pose = "Seated"
  70. end
  71. local function jump()
  72. pose = "Jumping"
  73. end
  74. local function died()
  75. pose = "Dead"
  76. end
  77. local function falling()
  78. pose = "Falling"
  79. end
  80. local function climbing()
  81. pose = "Climbing"
  82. end
  83. local function run(speed)
  84. if speed > 0.5 then
  85. pose = "Running"
  86. else
  87. pose = "Standing"
  88. end
  89. end
  90. local function move()
  91. if pose == "Seated" then
  92. Set({{RSH, 0.15, math.pi/2}, {LSH, 0.15, -math.pi/2}, {LH, 0.15, math.pi/2}, {RH, 0.15, -math.pi/2}})
  93. return
  94. end
  95. if pose == "Jumping" then
  96. Set({{RSH, 0.3, math.pi}, {LSH, 0.3, -math.pi}, {LH, 0.3, 0}, {RH, 0.3, 0}})
  97. return
  98. end
  99. if pose == "Standing" then
  100. Set({{RSH, 0.25, 0}, {LSH, 0.25, 0}, {LH, 0.25, 0}, {RH, 0.25, 0}})
  101. return
  102. end
  103. if pose == "Falling" then
  104. Set({{RSH, 0.35, math.pi}, {LSH, 0.35, -math.pi}, {LH, 0.35, 0}, {RH, 0.35, 0}})
  105. return
  106. end
  107. if pose == "Running" then
  108. Set({{RSH, 0.2, -0.8}, {LSH, 0.2, 0.8}, {LH, 0.2, 0}, {RH, 0.2, 0}})
  109. elseif pose == "Climbing" then
  110. Set({{RSH, 0.35, 2.8}, {LSH, 0.35, -2.8}, {LH, 0.35, 0.1}, {RH, 0.35, 0.1}})
  111. end
  112. end
  113. Hum.Jumping:connect(jump)
  114. Hum.Running:connect(run)
  115. Hum.Seated:connect(sit)
  116. Hum.Died:connect(died)
  117. Hum.FreeFalling:connect(falling)
  118. Hum.Climbing:connect(climbing)
  119. coroutine.resume(coroutine.create(function()
  120. while pose ~= "Dead" do
  121. wait(0.04)
  122. move()
  123. end
  124. end))
  125. end
  126.  
  127. function MakeNoob(pos, scale)
  128. local Nub = Instance.new("Model")
  129. Nub.Name = "Cannoneer nub"
  130. local Torso = Part(Nub, false, false, 0, 0, BN("Bright blue"), V3(2*scale, 2*scale, 1*scale))
  131. Torso.Name = "Torso"
  132. local Head = Part(Nub, false, false, 0, 0, BN("Bright yellow"), V3(2*scale, 1*scale, 1*scale))
  133. Head.Name = "Head"
  134. local Neck = MakeMotor(Torso, Head, CN(0, 1*scale, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), CN(0, -0.5*scale, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
  135. local HeadMesh = Instance.new("SpecialMesh",Head)
  136. HeadMesh.Scale = V3(1.25, 1.25, 1.25)
  137. local Face = Instance.new("Decal",Head)
  138. Face.Face = "Front"
  139. Face.Texture = Asset..(13038247)
  140. local Rarm = Part(Nub, false, false, 0, 0, BN("Bright yellow"), V3(1*scale, 2*scale, 1*scale))
  141. Rarm.Name = "Right Arm"
  142. local Larm = Part(Nub, false, false, 0, 0, BN("Bright yellow"), V3(1*scale, 2*scale, 1*scale))
  143. Larm.Name = "Left Arm"
  144. local Rleg = Part(Nub, false, false, 0, 0, BN("Br. yellowish green"), V3(1*scale, 2*scale, 1*scale))
  145. Rleg.Name = "Right Leg"
  146. local Lleg = Part(Nub, false, false, 0, 0, BN("Br. yellowish green"), V3(1*scale, 2*scale, 1*scale))
  147. Lleg.Name = "Left Leg"
  148. local RSH = MakeMotor(Torso, Rarm, CN(1*scale, 0.5*scale, 0) * CA(0, MR(90), 0), CN(-0.5*scale, 0.5*scale, 0) * CA(0, MR(90), 0))
  149. local LSH = MakeMotor(Torso, Larm, CN(-1*scale, 0.5*scale, 0) * CA(0, MR(-90), 0), CN(0.5*scale, 0.5*scale, 0) * CA(0, MR(-90), 0))
  150. local RH = MakeMotor(Torso, Rleg, CN(0.5*scale, -1*scale, 0) * CA(0, MR(-90), 0), CN(0, 1*scale, 0) * CA(0, MR(-90), 0))
  151. local LH = MakeMotor(Torso, Lleg, CN(-0.5*scale, -1*scale, 0) * CA(0, MR(90), 0), CN(0, 1*scale, 0) * CA(0, MR(90), 0))
  152. local Hum = Instance.new("Humanoid")
  153. local Speed = 14+(2*scale)
  154. Hum.Parent = Nub
  155. Hum.Died:connect(function()
  156. wait(6)
  157. Nub:remove()
  158. wait(5)
  159. MakeNoob(pos, scale)
  160. end)
  161. Nub.Parent = workspace
  162. Nub:MakeJoints()
  163. Hum.MaxHealth = 50+(scale*70)
  164. Hum.Health = 50+(scale*70)
  165. Nub:MoveTo(pos)
  166. coroutine.resume(coroutine.create(function()
  167. repeat wait()
  168. Hum.Health = Hum.MaxHealth
  169. until Hum.Health >= Hum.MaxHealth-1
  170. end))
  171. Animate(Hum,RSH,LSH,RH,LH)
  172. local Char = Nub
  173. local necko = CN(0, 1*scale, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  174. local ShootColors = {"Bright yellow", "New Yeller", "Bright orange", "Neon orange", "Really red", "Bright red"}
  175.  
  176. local Attacking = false
  177. local Accuracy = 5
  178. local Debounce = true
  179. local Hurt = false
  180. local Damage = {15,42}
  181. local Selected = false
  182.  
  183. local ContentProvider = game:GetService("ContentProvider")
  184.  
  185. local function RC(Pos, Dir, Max, Ignore)
  186. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999)), Ignore)
  187. end
  188.  
  189. local function RayC(Start, En, MaxDist, Ignore)
  190. return RC(Start, (En - Start), MaxDist, Ignore)
  191. end
  192.  
  193. local function ComputePos(pos1, pos2)
  194. return CN(pos1, V3(pos2.x, pos1.y, pos2.z))
  195. end
  196.  
  197. local function DetectSurface(pos, part)
  198. local surface = nil
  199. local pospos = part.CFrame
  200. local pos2 = pospos:pointToObjectSpace(pos)
  201. local siz = part.Size
  202. local shaep = part.Shape
  203. if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
  204. surface = {"Anything", CN(pospos.p, pos)*CN(0, 0, -(pospos.p - pos).magnitude)*CA(MR(-90), 0, 0)}
  205. else
  206. if pos2.Y > ((siz.Y/2)-0.04) then
  207. surface = {"Top", CA(0, 0, 0)}
  208. elseif pos2.Y < -((siz.Y/2)-0.04) then
  209. surface = {"Bottom", CA(-MP, 0, 0)}
  210. elseif pos2.X > ((siz.X/2)-0.04) then
  211. surface = {"Right", CA(0, 0, MR(-90))}
  212. elseif pos2.X < -((siz.X/2)-0.04) then
  213. surface = {"Left", CA(0, 0, MR(90))}
  214. elseif pos2.Z > ((siz.Z/2)-0.04) then
  215. surface = {"Back", CA(MR(90), 0, 0)}
  216. elseif pos2.Z < -((siz.Z/2)-0.04) then
  217. surface = {"Front", CA(MR(-90), 0, 0)}
  218. end
  219. end
  220. return surface
  221. end
  222.  
  223. local function waitChild(n, p)
  224. local c = p:findFirstChild(n)
  225. if c then return c end
  226. while true do
  227. c = p.ChildAdded:wait()
  228. if c.Name == n then return c end
  229. end
  230. end
  231.  
  232. local function Notime(func)
  233. coroutine.resume(coroutine.create(function()
  234. func()
  235. end))
  236. end
  237.  
  238. RSH.Part0 = Torso
  239. LSH.Part0 = Torso
  240. RH.Part0 = Torso
  241. LH.Part0 = Torso
  242.  
  243. local Add = {
  244. Mesh = function(P, ID, Scale, Tex)
  245. local m = Instance.new("SpecialMesh")
  246. m.MeshType = "FileMesh"
  247. m.MeshId = ID or ""
  248. m.Scale = Scale or V3(1, 1, 1)
  249. m.TextureId = Tex or ""
  250. m.Parent = P
  251. return m
  252. end,
  253. Sphere = function(P, Scale)
  254. local m = Instance.new("SpecialMesh")
  255. m.MeshType = "Sphere"
  256. m.Scale = Scale or V3(1, 1, 1)
  257. m.Parent = P
  258. return m
  259. end
  260. }
  261.  
  262. local Sounds = {
  263. Shoot = {Id = "http://www.roblox.com/asset/?id=2697431", Pitch = 0.3, Volume = 0.5},
  264. Boom = {Id = "http://www.roblox.com/asset/?id=2692806", Pitch = 0.55, Volume = 0.4},
  265. Slash = {Id = "rbxasset://sounds//swordslash.wav", Pitch = 0.5, Volume = 0.5},
  266. Hit = {Id = "http://www.roblox.com/asset/?id=2801263", Pitch = 0.85, Volume = 0.35},
  267. Reload = {Id = "rbxasset://sounds\\metal.ogg", Pitch = 1, Volume = 0.45},
  268. }
  269.  
  270. for _,v in pairs(Sounds) do
  271. ContentProvider:Preload(v.Id)
  272. end
  273.  
  274. local function PlaySound(Sound, bool)
  275. local s = Instance.new("Sound")
  276. s.Looped = false
  277. s.Volume = Sound.Volume
  278. s.SoundId = Sound.Id
  279. if bool then
  280. s.Pitch = MRA((Sound.Pitch*0.75)*1000, (Sound.Pitch*1.15)*1000)/1000
  281. else
  282. s.Pitch = Sound.Pitch
  283. end
  284. s.Parent = Torso
  285. s:play()
  286. Notime(function()
  287. wait(0.5)
  288. s:remove()
  289. end)
  290. end
  291.  
  292. local function GetParts(pos, dist)
  293. local parts = {}
  294. local function o(p)
  295. for _,v in pairs(p:children()) do
  296. if v:IsA("BasePart") then
  297. if (pos - v.Position).magnitude <= dist then
  298. table.insert(parts, {v, (pos - v.Position).magnitude, v.Anchored})
  299. end
  300. end
  301. o(v)
  302. end
  303. end
  304. o(workspace)
  305. return parts
  306. end
  307.  
  308. local function GetHum(P)
  309. for _,v in pairs(P:children()) do
  310. if v:IsA("Humanoid") then
  311. if v.Health > 0 then
  312. return v
  313. end
  314. end
  315. end
  316. end
  317.  
  318. local function GetGroup(Pos, Distance, Hit)
  319. local tab = {}
  320. for _,v in pairs(workspace:children()) do
  321. local h = GetHum(v)
  322. local t = v:findFirstChild("Torso")
  323. if h and t and v ~= Hit.Parent then
  324. if (t.Position - Pos).magnitude <= Distance then
  325. table.insert(tab, {h, v, (t.Position - Pos).magnitude})
  326. end
  327. end
  328. end
  329. if Hit then
  330. local h = GetHum(Hit.Parent)
  331. if h then
  332. table.insert(tab, {h, Hit.Parent, 0})
  333. end
  334. end
  335. return tab
  336. end
  337.  
  338. local Model = Instance.new("Model")
  339. Model.Name = "Hand Cannon"
  340.  
  341. local FTorso = Part(Model, false, false, 1, 0, Torso.BrickColor, V3(2*scale, 2*scale, 1*scale))
  342. local FW = Weld(Torso, FTorso)
  343.  
  344. local RAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  345. local LAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  346. local RLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  347. local LLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  348.  
  349. local RABW = Weld(Torso, RAB, CN(), CN(-1.5*scale, -0.5*scale, 0))
  350. local LABW = Weld(Torso, LAB, CN(), CN(1.5*scale, -0.5*scale, 0))
  351. local RLBW = Weld(Torso, RLB, CN(), CN(-0.5*scale, 1*scale, 0))
  352. local LLBW = Weld(Torso, LLB, CN(), CN(0.5*scale, 1*scale, 0))
  353.  
  354. local RAW = Weld(RAB, nil, CN(), CN(0, 0.5*scale, 0))
  355. local LAW = Weld(LAB, nil, CN(), CN(0, 0.5*scale, 0))
  356. local RLW = Weld(RLB, nil, CN(), CN(0, 1*scale, 0))
  357. local LLW = Weld(LLB, nil, CN(), CN(0, 1*scale, 0))
  358.  
  359. local TW = Weld(Torso, nil, CN(0.7*scale, 0.8*scale, 1.2*scale), CA(0, MR(180), MR(55)))
  360.  
  361. local Weapon = Instance.new("Model")
  362. Weapon.Name = "Cannon"
  363.  
  364. local HB = Part(Weapon, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  365. local HBW = Weld(Rarm, HB, CN(0, -0.7*scale, 0), CA(0, MR(90), MR(90)))
  366. local HW = Weld(HB, nil)
  367.  
  368. local Handle = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(0.5*scale, 0.5*scale, 0.3*scale))
  369. Add.Mesh(Handle, "http://www.roblox.com/asset/?id=3270017", V3(1*scale, 0.7*scale, 2.2*scale), "")
  370. TW.Part1 = Handle
  371.  
  372. local Main = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(1.5*scale, 1.5*scale, 3*scale))
  373. Add.Mesh(Main, "http://www.roblox.com/asset/?id=3270017", V3(1.6*scale, 1.6*scale, 15*scale), "")
  374. Weld(Handle, Main, CA(0, MR(90), MR(90)), CN(1*scale, 0, 0.2*scale))
  375.  
  376. local Main2 = Part(Weapon, false, false, 0, 0, BN("Gun metallic"), V3(1*scale, 1*scale, 1.5*scale))
  377. Add.Mesh(Main2, "http://www.roblox.com/asset/?id=3270017", V3(1.2*scale, 1.2*scale, 8*scale), "")
  378. Weld(Main, Main2, CN(), CN(0, 0, 1.7*scale))
  379.  
  380. local Handle2 = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(0.5*scale, 0.5*scale, 0.3*scale))
  381. Add.Mesh(Handle2, "http://www.roblox.com/asset/?id=3270017", V3(0.7*scale, 0.8*scale, 2.2*scale), "")
  382. Weld(Main2, Handle2, CA(0, MR(90), MR(90)), CN(-0.65*scale, 0, 0))
  383.  
  384. local Tip = Part(Weapon, false, false, 0, 0, BN("Earth yellow"), V3(1.6*scale, 1.6*scale, 0.6*scale))
  385. Add.Sphere(Tip, V3(1.05, 1.05, 1))
  386. Weld(Main, Tip, CN(), CN(0, 0, -1.15*scale))
  387.  
  388. local Tip4 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(1.2*scale, 1.2*scale, 0.3*scale))
  389. Add.Mesh(Tip4, "http://www.roblox.com/asset/?id=3270017", V3(1.7*scale, 1.7*scale, 10*scale), "")
  390. Weld(Main, Tip4, CN(), CN(0, 0, -0.15*scale))
  391.  
  392. for i = 1.3, 1.45, 0.1 do
  393. local Tip3 = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(1.2*scale, 1.2*scale, 0.3*scale))
  394. Add.Mesh(Tip3, "http://www.roblox.com/asset/?id=3270017", V3(i*scale, i*scale, 2*scale), "")
  395. Weld(Main2, Tip3, CN(), CN(0, 0, 0.6*scale))
  396. end
  397.  
  398. for i = -0.95, 0.66, 1.55 do
  399. local Tip3 = Part(Weapon, false, false, 0, 0, BN("Dark Curry"), V3(1.2*scale, 1.2*scale, 0.3*scale))
  400. Add.Mesh(Tip3, "http://www.roblox.com/asset/?id=3270017", V3(1.65*scale, 1.65*scale, 3*scale), "")
  401. Weld(Main, Tip3, CN(), CN(0, 0, i*scale))
  402. end
  403.  
  404. for i = 1.3, 1.5, 0.1 do
  405. local Tip2 = Part(Weapon, false, false, 0, 0, BN("Earth yellow"), V3(1.6*scale, 1.6*scale, 0.6*scale))
  406. Add.Mesh(Tip2, "http://www.roblox.com/asset/?id=3270017", V3(i*scale, i*scale, 2*scale), "")
  407. Weld(Main, Tip2, CN(), CN(0, 0, 1.1*scale))
  408. end
  409.  
  410. for i = -0.3, 1, 0.15 do
  411. local p = Part(Weapon, false, false, 0.7, 0, BN("Black"), V3(0.2, 0.2, 0.2))
  412. Add.Sphere(p, V3(6*scale, 6*scale, 2*scale))
  413. Weld(Main2, p, CN(0, 0, i*scale))
  414. end
  415.  
  416. Weapon.Parent = Model
  417. Model.Parent = Char
  418.  
  419. local function Show_Damage(P, D)
  420. local mo = Instance.new("Model")
  421. mo.Name = "- "..D
  422. local p = Part(mo, false, false, 0, 0, BN("Bright red"), V3(0.2, 0.2, 0.2))
  423. p.Name = "Head"
  424. local m = Instance.new("SpecialMesh")
  425. m.MeshType = "Brick"
  426. m.Scale = Vector3.new(4.5, 2.3, 4.5)
  427. m.Parent = p
  428. local bp = Instance.new("BodyPosition", p)
  429. bp.maxForce = V3(MH, MH, MH)
  430. bp.P = 9001
  431. bp.position = CN(P) * CN(0, 1.5, 0).p
  432. local h = Instance.new("Humanoid")
  433. h.Health = 0
  434. h.MaxHealth = 0
  435. h.Name = "asd"
  436. h.Parent = mo
  437. local nah = true
  438. mo.Parent = workspace
  439. p.CFrame = CN(P)
  440. Notime(function()
  441. wait(1.5)
  442. for i = 0, 1, 0.05 do
  443. p.Transparency = i
  444. if nah then mo.Name = "" nah = false else mo.Name = "- "..D nah = true end
  445. wait()
  446. end
  447. mo:remove()
  448. end)
  449. end
  450.  
  451. local function Kill(hit)
  452. if Debounce and Hurt then
  453. local Hu = GetHum(hit.Parent)
  454. if Hu then
  455. Debounce = false
  456. local Dmg = MRA(Damage[1], Damage[2])
  457. Hu.Health = Hu.Health - Dmg
  458. pcall(function() Show_Damage(Tip.Position, Dmg) end)
  459. PlaySound(Sounds.Hit, true)
  460. local chance = MRA(1, 10)
  461. if chance >=5 then
  462. Hu.PlatformStand = true
  463. wait(0.1)
  464. hit.Velocity = (CN(Torso.CFrame * CN(0, 0.5, 0).p, hit.Position).lookVector * 45)
  465. hit.RotVelocity = V3(MRA(-10, 10), MRA(-10, 10), MRA(-10, 10))
  466. wait(0.3)
  467. Hu.PlatformStand = false
  468. end
  469. end
  470. end
  471. end
  472.  
  473. Main.Touched:connect(Kill)
  474.  
  475. local function Attach(t)
  476. RSH.Part0 = t
  477. LSH.Part0 = t
  478. RH.Part0 = t
  479. LH.Part0 = t
  480. RABW.Part0 = t
  481. LABW.Part0 = t
  482. LLBW.Part0 = t
  483. RLBW.Part0 = t
  484. if t == Torso then
  485. FTorso.Transparency = 1
  486. else
  487. Torso.Transparency = 1
  488. end
  489. t.Transparency = 0
  490. end
  491.  
  492. local function SelectAnim()
  493. RAW.Part1 = Rarm
  494. for i = 0.25, 1, 0.25 do
  495. RAW.C0 = CA(MR(-10*i), 0, MR(-5*i))
  496. wait()
  497. end
  498. for i = 0.1, 1, 0.1 do
  499. RAW.C0 = CA(MR(-10-90*i), 0, MR(-5-30*i))
  500. wait()
  501. end
  502. for i = 0.5, 1, 0.5 do
  503. RAW.C0 = CA(MR(-100-5*i), 0, MR(-35))
  504. wait()
  505. end
  506. HW.Part1 = Handle
  507. HW.C0 = CA(MR(50), 0, MR(-37))
  508. TW.Part1 = nil
  509. Attach(FTorso)
  510. LAW.Part1 = Larm
  511. for i = 0.25, 1, 0.25 do
  512. RAW.C0 = CA(MR(-105+10*i), 0, MR(-35+5*i))
  513. LAW.C0 = CA(MR(15*i), 0, MR(5*i))
  514. FW.C0 = CA(0, MR(-5*i), 0)
  515. HW.C0 = CA(MR(50-5*i), 0, MR(-37))
  516. wait()
  517. end
  518. for i = 0.06, 1, 0.06 do
  519. RAW.C0 = CA(MR(-95+95*i), MR(35*i), MR(-30+50*i))
  520. LAW.C0 = CA(MR(15+25*i), 0, MR(5+15*i)) * CN(0, (-0.4*scale)*i, 0)
  521. FW.C0 = CA(0, MR(-5-30*i), 0)
  522. HW.C0 = CA(MR(45), 0, MR(-37+15*i))
  523. wait()
  524. end
  525. Hum.WalkSpeed = Speed-3
  526. for i = 0.1, 1, 0.1 do
  527. RAW.C0 = CA(MR(15*i), MR(35+10*i), MR(20+8*i))
  528. LAW.C0 = CA(MR(40+7*i), 0, MR(20+6*i)) * CN(0, (-0.4*scale)-(0.2*scale)*i, 0)
  529. FW.C0 = CA(0, MR(-35-10*i), 0)
  530. HW.C0 = CA(MR(45-11*i), 0, MR(-22+15*i))
  531. wait()
  532. end
  533. for i = 0.25, 1, 0.25 do
  534. RAW.C0 = CA(MR(15+5*i), MR(45+5*i), MR(28+2*i))
  535. LAW.C0 = CA(MR(47+3*i), 0, MR(26+4*i)) * CN(0, -0.6*scale, 0)
  536. FW.C0 = CA(0, MR(-45-5*i), 0)
  537. HW.C0 = CA(MR(34-4*i), 0, MR(-7+7*i))
  538. wait()
  539. end
  540. end
  541.  
  542. local function DeselAnim()
  543. for i = 0.25, 1, 0.25 do
  544. RAW.C0 = CA(MR(20-5*i), MR(50-5*i), MR(30-5*i))
  545. LAW.C0 = CA(MR(50-5*i), 0, MR(30-5*i)) * CN(0, -((0.6+0.1)*scale)*i, 0)
  546. FW.C0 = CA(0, MR(-50+5*i), 0)
  547. HW.C0 = CA(MR(30+5*i), 0, MR(-10*i))
  548. wait()
  549. end
  550. for i = 0.15, 1, 0.15 do
  551. RAW.C0 = CA(MR(15-30*i), MR(45-10*i), MR(25-5*i))
  552. LAW.C0 = CA(MR(45-20*i), 0, MR(25-15*i)) * CN(0, -0.5+0.2*i, 0)
  553. FW.C0 = CA(0, MR(-45+10*i), 0)
  554. HW.C0 = CA(MR(35+10*i), 0, MR(-10-15*i))
  555. wait()
  556. end
  557. for i = 0.12, 1, 0.12 do
  558. RAW.C0 = CA(MR(-15-70*i), MR(35-30*i), MR(20-30*i))
  559. LAW.C0 = CA(MR(25-25*i), 0, MR(10-10*i)) * CN(0, -0.3+0.3*i, 0)
  560. FW.C0 = CA(0, MR(-35+20*i), 0)
  561. HW.C0 = CA(MR(45+5*i), 0, MR(-25-12*i))
  562. wait()
  563. end
  564. LAW.Part1 = nil
  565. HW.C0 = CA(MR(50), 0, MR(-37))
  566. for i = 0.25, 1, 0.25 do
  567. RAW.C0 = CA(MR(-85-20*i), MR(5-5*i), MR(-10-25*i))
  568. FW.C0 = CA(0, MR(-15+15*i), 0)
  569. wait()
  570. end
  571. Attach(Torso)
  572. HW.Part1 = nil
  573. TW.Part1 = Handle
  574. Hum.WalkSpeed = 16
  575. for i = 0.15, 1, 0.15 do
  576. RAW.C0 = CA(MR(-105+95*i), 0, MR(-35+30*i))
  577. wait()
  578. end
  579. for i = 0.33, 1, 0.33 do
  580. RAW.C0 = CA(MR(-10+10*i), 0, MR(-5+5*i))
  581. wait()
  582. end
  583. RAW.Part1 = nil
  584. end
  585.  
  586. local function Explode(Par, Pos, surface)
  587. Notime(function()
  588. local cf = CN(Pos) * CA(Par.CFrame:toEulerAnglesXYZ()) * surface[2] * CN(0, 1, 0)
  589. local col = Par.BrickColor.Color
  590. local r, g, b = col.r, col.g, col.b
  591. local col1, col2, col3 = C3(MRA(r*60, r*100)/100, MRA(g*60, g*100)/100, MRA(b*60, b*100)/100), C3(MRA(r*60, r*100)/100, MRA(g*60, g*100)/100, MRA(b*60, b*100)/100), C3(MRA(r*60, r*100)/100, MRA(g*60, g*100)/100, MRA(b*60, b*100)/100)
  592. local p = Part(workspace, true, false, 0, 0, BN(col1.r, col1.g, col1.b), V3(0.2, 0.2, 0.2))
  593. local p2 = Part(workspace, true, false, 0, 0, BN(col2.r, col2.g, col2.b), V3(0.2, 0.2, 0.2))
  594. local p3 = Part(workspace, true, false, 0, 0, BN(col3.r, col3.g, col3.b), V3(0.2, 0.2, 0.2))
  595. p.CFrame = cf
  596. p2.CFrame = cf
  597. p3.CFrame = cf
  598. local m = Add.Mesh(p, "http://www.roblox.com/asset/?id=20329976", V3(1, 1, 1))
  599. local m2 = Add.Mesh(p2, "http://www.roblox.com/asset/?id=20329976", V3(1, 1, 1))
  600. local m3 = Add.Mesh(p3, "http://www.roblox.com/asset/?id=20329976", V3(1, 1, 1))
  601. for i = -0.2, 1, 0.12 do
  602. p2.Transparency = i+0.1
  603. p.Transparency = i
  604. p3.Transparency = i+0.2
  605. m.Scale = V3(scale+(2.5*scale)*i, (1.4*scale)+scale*i, scale+(2.5*scale)*i)
  606. m2.Scale = V3((0.8*scale)+(2*scale)*i, (1.2*scale)+scale*i, (0.8*scale)+(2*scale)*i)
  607. m3.Scale = V3((0.5*scale)+scale*i, scale+scale*i, (0.5*scale)+scale*i)
  608. wait()
  609. end
  610. p2:remove()
  611. p3:remove()
  612. p:remove()
  613. end)
  614. end
  615.  
  616. local function Shoot(Pos)
  617. coroutine.resume(coroutine.create(function()
  618. local acc = Accuracy*100
  619. local Start = Main2.CFrame * CN(0, 0, -0.5).p
  620. local Face = CN(Start, Pos) * CA(MR(MRA(-acc, acc))/100, MR(MRA(-acc, acc))/100, MR(MRA(-acc, acc))/100)
  621. local Cannonball = Part(Model, true, false, 0, 0, BN("Black"), V3(1.3*scale, 1.3*scale, 1.3*scale))
  622. Add.Sphere(Cannonball)
  623. Cannonball.CFrame = Face
  624. local Go = 3*scale
  625. local Drop = 0.55/(Go*3)
  626. local Dist = 500*scale
  627. local lastP = Start
  628. local omg = 0
  629. for i = Go, Dist, Go do
  630. Drop = Drop + 1/(Go*3)
  631. omg = omg + Drop
  632. local dropping = CA(MR(-Drop), 0, 0)
  633. if omg > 130 then
  634. dropping = CN()
  635. end
  636. Face = Face * dropping * CN(0, 0, -Go)
  637. Cannonball.CFrame = Face
  638. local Magn = (Face.p - lastP).magnitude
  639. local T = Part(Model, true, false, 0.1, 0, BN("Mid gray"), V3(0.2, 1, 0.2))
  640. local M = Instance.new("SpecialMesh",T)
  641. M.MeshType = "Head"
  642. M.Scale = V3(4.5*scale, Magn, 4.5*scale)
  643. T.CFrame = CN(lastP, Face.p) * CA(MR(-90), 0, 0) * CN(0, Magn/2, 0)
  644. Notime(function()
  645. wait(0.1)
  646. for i = 0.1, 1, 0.1 do
  647. T.Transparency = i+0.1
  648. M.Scale = V3(5-5*i, Magn+0.5, 5-5*i)
  649. wait()
  650. end
  651. T:remove()
  652. end)
  653. local Hit, Hitpos = RayC(lastP, Face.p, Go*2, Char)
  654. lastP = Face.p
  655. if Hit then
  656. PlaySound(Sounds.Boom, true)
  657. local s = DetectSurface(Hitpos, Hit)
  658. Explode(Hit, Hitpos, s)
  659. Cannonball.CFrame = CN(Hitpos)
  660. local hu = GetHum(Hit.Parent)
  661. if hu == nil and Hit.Parent.className ~= "Hat" and Hit.Anchored then
  662. coroutine.resume(coroutine.create(function()
  663. wait(10)
  664. for i = 0, 1, 0.04 do
  665. Cannonball.Transparency = i
  666. wait()
  667. end
  668. Cannonball:remove()
  669. end))
  670. else
  671. Cannonball:remove()
  672. end
  673. local Noobs = GetGroup(Hitpos, 5*scale, Hit)
  674. for _,v in pairs(Noobs) do
  675. local dm = 60/((v[3]+3)/3)
  676. local multi = (scale+10)/10
  677. dm = MRA(dm*0.9, dm*1.04)*multi
  678. v[1].Health = v[1].Health - dm
  679. local t = v[2]:findFirstChild("Head")
  680. if t then
  681. Show_Damage(t.Position, dm)
  682. end
  683. end
  684. local Parts = GetParts(Hitpos, 6*scale)
  685. for _,v in pairs(Parts) do
  686. if v[3] == false then
  687. Notime(function()
  688. if v[1].Name == "Brick wall" then
  689. v[1]:BreakJoints()
  690. v[1].Velocity = (CN(Hitpos, v[1].Position).lookVector * (110/((v[2]+2)/3)))
  691. wait(0.1)
  692. v[1].Velocity = (CN(Hitpos, v[1].Position).lookVector * (110/((v[2]+2)/3)))
  693. else
  694. v[1].Velocity = (CN(Hitpos, v[1].Position).lookVector * (80/((v[2]+2)/3)))
  695. end
  696. end)
  697. end
  698. end
  699. break
  700. end
  701. wait()
  702. end
  703. end))
  704. end
  705.  
  706. local function ShootAnim(pos)
  707. RLW.Part1 = Rleg
  708. LLW.Part1 = Lleg
  709. local cf = ComputePos(Torso.Position, pos)
  710. local bp = Instance.new("BodyPosition",Torso)
  711. bp.maxForce = V3(MH, 0, MH)
  712. bp.P = 11000
  713. PlaySound(Sounds.Shoot, true)
  714. local effect = Part(Model, false, false, 0, 0, BN(ShootColors[MRA(1,#ShootColors)]), V3(0.2, 0.2, 0.2))
  715. local effect2 = Part(Model, false, false, 0, 0, BN(ShootColors[MRA(1,#ShootColors)]), V3(0.2, 0.2, 0.2))
  716. local m1 = Add.Mesh(effect, "http://www.roblox.com/asset/?id=20329976", V3(1,1,1))
  717. local m2 = Add.Mesh(effect2, "http://www.roblox.com/asset/?id=20329976", V3(1,1,1))
  718. local w1 = Weld(Main2, effect, CA(MR(-90), 0, 0), CN(0, -1, 0))
  719. local w2 = Weld(Main2, effect2, CA(MR(-90), 0, 0), CN(0, -1, 0))
  720. for i = 0, 1, 0.5 do
  721. RAW.C0 = CA(MR(20-50*i), MR(50-25*i), MR(30+45*i))
  722. LAW.C0 = CA(MR(50-10*i), 0, MR(30+20*i)) * CN(0, (-0.6*scale)-(0.3*scale)*i, 0)
  723. RLW.C0 = CA(MR(30*i), 0, MR(-15*i))
  724. LLW.C0 = CA(MR(10*i), 0, MR(-35*i))
  725. FW.C0 = CA(MR(5*i), MR(-50-15*i), 0)
  726. HW.C0 = CA(MR(30), MR(35*i), MR(-25*i))
  727. Neck.C0 = necko * CA(MR(10*i), 0, 0)
  728. bp.position = cf * CN(0, 0, (3*scale)*i).p
  729. m1.Scale = V3((0.5*scale)+(0.6*scale)*i, (0.4*scale)+(0.2*scale)*i, (0.5*scale)+(0.6*scale)*i)
  730. m2.Scale = V3((0.3*scale)+(0.5*scale)*i, (0.5*scale)+scale*i, (0.3*scale)+(0.5*scale)*i)
  731. w1.C1 = CN(0, -scale-(0.2*scale)*i, 0)
  732. w2.C1 = CN(0, -scale-(0.5*scale)*i, 0)
  733. effect.Transparency = 0.2*i
  734. effect2.Transparency = 0.2*i
  735. wait()
  736. end
  737. for i = 0.2, 1, 0.2 do
  738. RAW.C0 = CA(MR(-30-10*i), MR(25-5*i), MR(75+5*i))
  739. LAW.C0 = CA(MR(40-5*i), 0, MR(50+5*i)) * CN(0, (-0.9*scale)-(0.05*scale)*i, 0)
  740. RLW.C0 = CA(MR(30+5*i), 0, MR(-15))
  741. LLW.C0 = CA(MR(10+5*i), 0, MR(-35-5*i))
  742. FW.C0 = CA(MR(5+5*i), MR(-65-5*i), 0)
  743. HW.C0 = CA(MR(30), MR(35+5*i), MR(-25-5*i))
  744. Neck.C0 = necko * CA(MR(10+5*i), 0, 0)
  745. bp.position = cf * CN(0, 0, (3*scale)+scale*i).p
  746. m1.Scale = V3(scale+scale*i, (0.7*scale)+(0.9*scale)*i, scale+scale*i)
  747. m2.Scale = V3((0.8*scale)+(0.6*scale)*i, (1.5*scale)+(1.6*scale)*i, (0.8*scale)+(0.6*scale)*i)
  748. w1.C1 = CN(0, (-1.2*scale)-(0.6*scale)*i, 0)
  749. w2.C1 = CN(0, (-1.5*scale)-(1.8*scale)*i, 0)
  750. effect.Transparency = 0.2+0.9*i
  751. effect2.Transparency = 0.2+0.9*i
  752. wait()
  753. end
  754. effect:remove()
  755. effect2:remove()
  756. for i = 0.2, 1, 0.2 do
  757. bp.position = cf * CN(0, 0, (4*scale)+(0.8*scale)*i).p
  758. wait()
  759. end
  760. for i = 0.08, 1, 0.06 do
  761. RAW.C0 = CA(MR(-40+50*i), MR(20+15*i), MR(80-35*i))
  762. LAW.C0 = CA(MR(35-30*i), 0, MR(55-45*i)) * CN(0, (-0.95*scale)+(0.5*scale)*i, 0)
  763. RLW.C0 = CA(MR(35-35*i), 0, MR(-15+25*i))
  764. LLW.C0 = CA(MR(15-15*i), 0, MR(-40+30*i))
  765. FW.C0 = CA(MR(10-7*i), MR(-70+40*i), 0)
  766. HW.C0 = CA(MR(30), MR(40-40*i), MR(-30-10*i))
  767. Neck.C0 = necko * CA(MR(15+5*i), 0, MR(20*i))
  768. bp.position = cf * CN(0, 0, (4.8*scale)+(0.8*scale)*i).p
  769. wait()
  770. end
  771. bp:remove()
  772. for i = 0.33, 1, 0.33 do
  773. RAW.C0 = CA(MR(10+10*i), MR(35+5*i), MR(45-5*i))
  774. LAW.C0 = CA(MR(5), 0, MR(10)) * CN(0, (-0.45*scale)+(0.1*scale)*i, 0)
  775. FW.C0 = CA(MR(3-3*i), MR(-30+5*i), 0)
  776. HW.C0 = CA(MR(30), 0, MR(-40-10*i))
  777. wait()
  778. end
  779. for i = 0.12, 1, 0.12 do
  780. RAW.C0 = CA(MR(20+5*i), MR(40+5*i), MR(40+5*i))
  781. LAW.C0 = CA(MR(5), 0, MR(10)) * CN(0, (-0.35*scale)-(0.3*scale)*i, 0)
  782. FW.C0 = CA(0, MR(-25+5*i), 0)
  783. HW.C0 = CA(MR(30), 0, MR(-50-5*i))
  784. wait()
  785. end
  786. local b = Part(Model, false, false, 0, 0, BN("Black"), V3(1.1*scale, 1.1*scale, 1.1*scale))
  787. local m = Add.Sphere(b)
  788. local w = Weld(Larm, b, CN(), CN(0, 1.4*scale, 0))
  789. for i = 0.16, 1, 0.16 do
  790. LAW.C0 = CA(MR(5+30*i), 0, MR(10+10*i)) * CN(0, (-0.65*scale)+(0.65*scale)*i, 0)
  791. RAW.C0 = CA(MR(25), MR(45+3*i), MR(40))
  792. m.Scale = V3(0.5+0.5*i, 0.5+0.5*i, 0.5+0.5*i)
  793. Neck.C0 = necko * CA(MR(20-10*i), 0, MR(20-15*i))
  794. wait()
  795. end
  796. for i = 0.1, 1, 0.1 do
  797. LAW.C0 = CA(MR(35+105*i), 0, MR(20+20*i)) * CN(0, (-0.9*scale)*i, 0)
  798. RAW.C0 = CA(MR(25), MR(48+6*i), MR(40))
  799. Neck.C0 = necko * CA(MR(10-10*i), 0, MR(5-35*i))
  800. wait()
  801. end
  802. for i = 0.16, 1, 0.16 do
  803. LAW.C0 = CA(MR(140-10*i), 0, MR(40-15*i)) * CN(0, (-0.9*scale)-(0.2*scale)*i, 0)
  804. RAW.C0 = CA(MR(25), MR(54), MR(40))
  805. Neck.C0 = necko * CA(MR(5*i), 0, MR(-30))
  806. w.C0 = CN((1.5*scale)*i, (0.55*scale)*i, (1.1*scale)*i)
  807. wait()
  808. end
  809. PlaySound(Sounds.Reload, true)
  810. b:remove()
  811. w:remove()
  812. for i = 0.2, 1, 0.2 do
  813. LAW.C0 = CA(MR(130-10*i), 0, MR(25-15*i)) * CN(0, (-1.1*scale)+(0.2*scale)*i, 0)
  814. RAW.C0 = CA(MR(25-10*i), MR(54), MR(40))
  815. Neck.C0 = necko * CA(MR(5-3*i), 0, MR(-30+5*i))
  816. HW.C0 = CA(MR(30), 0, MR(-55+10*i))
  817. FW.C0 = CA(0, MR(-20-5*i), 0)
  818. wait()
  819. end
  820. for i = 0.11, 1, 0.11 do
  821. LAW.C0 = CA(MR(120-60*i), 0, MR(10+15*i)) * CN(0, (-0.9*scale)+(0.3*scale)*i, 0)
  822. RAW.C0 = CA(MR(15+5*i), MR(54-4*i), MR(40-10*i))
  823. Neck.C0 = necko * CA(MR(2-2*i), 0, MR(-25+25*i))
  824. HW.C0 = CA(MR(30), 0, MR(-45+45*i))
  825. FW.C0 = CA(0, MR(-25-20*i), 0)
  826. RLW.C0 = CA(0, 0, MR(10-8*i))
  827. LLW.C0 = CA(0, 0, MR(-10+8*i))
  828. wait()
  829. end
  830. Neck.C0 = necko
  831. for i = 0.25, 1, 0.25 do
  832. LAW.C0 = CA(MR(60-10*i), 0, MR(25+5*i)) * CN(0, -0.6*scale, 0)
  833. RAW.C0 = CA(MR(20), MR(50), MR(30))
  834. HW.C0 = CA(MR(30), 0, 0)
  835. FW.C0 = CA(0, MR(-45-5*i), 0)
  836. RLW.C0 = CA(0, 0, MR(2-2*i))
  837. LLW.C0 = CA(0, 0, MR(-2+2*i))
  838. wait()
  839. end
  840. RLW.Part1 = nil
  841. LLW.Part1 = nil
  842. RAW.C0 = CA(MR(20), MR(50), MR(30))
  843. LAW.C0 = CA(MR(50), 0, MR(30)) * CN(0, -0.6*scale, 0)
  844. FW.C0 = CA(0, MR(-50), 0)
  845. HW.C0 = CA(MR(30), 0, 0)
  846. Neck.C0 = necko
  847. end
  848.  
  849. local function Melee()
  850. PlaySound(Sounds.Slash, true)
  851. for i = 0.25, 1, 0.25 do
  852. RAW.C0 = CA(MR(20+5*i), MR(50-5*i), MR(30+3*i))
  853. LAW.C0 = CA(MR(50), 0, MR(30+4*i)) * CN(0, (-0.6*scale)-(0.05*scale)*i, 0)
  854. HW.C0 = CA(MR(30), MR(5*i), 0)
  855. FW.C0 = CA(0, MR(-50-5*i), 0)
  856. wait()
  857. end
  858. for i = 0.12, 1, 0.12 do
  859. RAW.C0 = CA(MR(25+25*i), MR(45-30*i), MR(33+7*i))
  860. LAW.C0 = CA(MR(50), 0, MR(34+11*i)) * CN(0, (-0.65*scale)-(0.25*scale)*i, 0)
  861. HW.C0 = CA(MR(30), MR(5+25*i), 0)
  862. FW.C0 = CA(0, MR(-55-25*i), 0)
  863. wait()
  864. end
  865. for i = 0.33, 1, 0.33 do
  866. RAW.C0 = CA(MR(50+15*i), MR(15-5*i), MR(40-10*i)) * CN(0, (-0.2*scale)*i, 0)
  867. LAW.C0 = CA(MR(50+10*i), 0, MR(45-5*i)) * CN(0, (-0.9*scale)+(0.15*scale)*i, 0)
  868. HW.C0 = CA(MR(30+2*i), MR(30+5*i), 0)
  869. FW.C0 = CA(0, MR(-80+10*i), MR(-5*i))
  870. wait()
  871. end
  872. Hurt = true
  873. Debounce = true
  874. for i = 0.07, 1, 0.07 do
  875. RAW.C0 = CA(MR(65+55*i), MR(10), MR(30-70*i)) * CN(0, (-0.2*scale)-(1.1*scale)*i, 0)
  876. LAW.C0 = CA(MR(60+120*i), 0, MR(40-70*i)) * CN(0, (-0.75*scale)+(0.7*scale)*i, 0)
  877. HW.C0 = CA(MR(32+6*i), MR(35+20*i), MR(-4*i))
  878. FW.C0 = CA(0, MR(-70+110*i), 0)
  879. wait()
  880. end
  881. for i = 0.16, 1, 0.16 do
  882. RAW.C0 = CA(MR(120+10*i), MR(10), MR(-40-5*i)) * CN(0, (-1.3*scale)-(0.1*scale)*i, 0)
  883. LAW.C0 = CA(MR(180+15*i), 0, MR(-30-20*i)) * CN(0, (-0.05*scale)+(0.1*scale)*i, 0)
  884. HW.C0 = CA(MR(38+2*i), MR(55-6*i), MR(-4-1*i))
  885. FW.C0 = CA(0, MR(40+10*i), 0)
  886. wait()
  887. end
  888. Hurt = false
  889. for i = 0.2, 1, 0.2 do
  890. RAW.C0 = CA(MR(130+5*i), MR(10), MR(-45-2*i)) * CN(0, (-1.4*scale)-(0.05*scale)*i, 0)
  891. LAW.C0 = CA(MR(195+5*i), 0, MR(-50-8*i)) * CN(0, (0.05*scale)+(0.05*scale)*i, 0)
  892. HW.C0 = CA(MR(40), MR(49-2*i), MR(-5))
  893. FW.C0 = CA(0, MR(50+3*i), 0)
  894. wait()
  895. end
  896. wait(0.2)
  897. for i = 0.2, 1, 0.2 do
  898. RAW.C0 = CA(MR(135-10*i), MR(10+5*i), MR(-47+10*i)) * CN(0, (-1.45*scale)+(0.25*scale)*i, 0)
  899. LAW.C0 = CA(MR(200-10*i), 0, MR(-58+10*i)) * CN(0, (0.1*scale)-(0.1*scale)*i, 0)
  900. HW.C0 = CA(MR(40), MR(47-5*i), MR(-5+5*i))
  901. FW.C0 = CA(0, MR(53-10*i), 0)
  902. wait()
  903. end
  904. for i = 0.08, 1, 0.08 do
  905. RAW.C0 = CA(MR(125-90*i), MR(15+30*i), MR(-37+57*i)) * CN(0, (-1.2*scale)+(1.1*scale)*i, 0)
  906. LAW.C0 = CA(MR(190-125*i), 0, MR(-48+68*i)) * CN(0, (-0.5*scale)*i, 0)
  907. HW.C0 = CA(MR(40-7*i), MR(42-37*i), 0)
  908. FW.C0 = CA(0, MR(43-82*i), 0)
  909. wait()
  910. end
  911. for i = 0.2, 1, 0.2 do
  912. RAW.C0 = CA(MR(35-15*i), MR(45+5*i), MR(20+10*i)) * CN(0, (-0.1*scale)+(0.1*scale)*i, 0)
  913. LAW.C0 = CA(MR(65-15*i), 0, MR(20+10*i)) * CN(0, (-0.5*scale)-(0.1*scale)*i, 0)
  914. HW.C0 = CA(MR(33-3*i), MR(5-5*i), 0)
  915. FW.C0 = CA(0, MR(-41-9*i), 0)
  916. wait()
  917. end
  918. RLW.Part1 = nil
  919. LLW.Part1 = nil
  920. RAW.C0 = CA(MR(20), MR(50), MR(30))
  921. LAW.C0 = CA(MR(50), 0, MR(30)) * CN(0, -0.6*scale, 0)
  922. FW.C0 = CA(0, MR(-50), 0)
  923. HW.C0 = CA(MR(30), 0, 0)
  924. Neck.C0 = necko
  925. end
  926. wait(1)
  927. Selected = true
  928. SelectAnim()
  929. wait(1.5)
  930. while Hum.Health > 0 do
  931. local list = game.Players:GetPlayers()
  932. local targ = list[MRA(1,#list)].Character:findFirstChild("Torso")
  933. if targ then
  934. local choice = MRA(1,6)
  935. if choice == 1 then
  936. repeat
  937. wait(0.2)
  938. if targ.Parent == nil then break end
  939. Hum:MoveTo(CN(targ.Position, Torso.Position) * CN(0, 0, -(scale)).p, targ)
  940. until (Torso.Position - targ.Position).magnitude < (scale*2)+1
  941. Melee()
  942. else
  943. local bg = Instance.new("BodyGyro")
  944. bg.P = 3000
  945. bg.maxTorque = V3(MH, MH, MH)
  946. bg.cframe = ComputePos(Torso.Position, targ.Position)
  947. bg.Parent = Torso
  948. local pos = Torso.Position
  949. local pos2 = targ.Position
  950. for i = 1, 10, 1 do
  951. wait(0.1)
  952. bg.cframe = ComputePos(Torso.Position, targ.Position)
  953. pos2 = targ.Position
  954. end
  955. bg:remove()
  956. wait(0.2)
  957. if Hum.Health >0 then
  958. local magn = ((Torso.Position - pos2).magnitude+5)/((scale+10)/10)
  959. local pos = pos2 + V3(0, magn/11, 0)
  960. Shoot(pos)
  961. ShootAnim(pos)
  962. local p = RayC(pos, pos-V3(0, 10, 0), scale*4, Char)
  963. if p then
  964. Hum:MoveTo(CN(pos, Torso.Position) * CN(0, 0, -2).p, p)
  965. end
  966. end
  967. end
  968. end
  969. wait(0.2)
  970. end
  971. return Nub
  972. end
  973.  
  974. for i = 1, 1 do
  975. coroutine.resume(coroutine.create(function()
  976. local nub = MakeNoob(V3(MRA(-50, 50),20,MRA(-50, 50)), 30)
  977. end))
  978. end
Add Comment
Please, Sign In to add comment