memberhero

Untitled

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