Advertisement
memberhero

Untitled

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