Idirina

U.F.G.E

Nov 24th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.29 KB | None | 0 0
  1. Player = game:GetService("Players").LocalPlayer
  2. Character = Player.Character
  3. PlayerGui = Player.PlayerGui
  4. Backpack = Player.Backpack
  5. Torso = Character.Torso
  6. Head = Character.Head
  7. LeftArm = Character["Left Arm"]
  8. LeftLeg = Character["Left Leg"]
  9. RightArm = Character["Right Arm"]
  10. RightLeg = Character["Right Leg"]
  11. LS = Torso["Left Shoulder"]
  12. LH = Torso["Left Hip"]
  13. RS = Torso["Right Shoulder"]
  14. RH = Torso["Right Hip"]
  15. ModelName = "Weapon"
  16. attack = false
  17. attacktype = 1
  18. Hitdeb = 0
  19. Neck = Torso.Neck
  20. local neckcf0 = Neck.C0
  21. -----------------------
  22. local music = Instance.new("Sound")
  23. music.SoundId = "https://www.roblox.com/asset/?id=338003334"
  24. music.Volume = 1
  25. music.Playing = true
  26. music.Looped = true
  27. music.Pitch = 1.2
  28. music.Parent = Head
  29. ----------------------------
  30. --Customize
  31. Ammo = 50000000
  32. --if (string.match(Player.Unlocks.Value,"RasAlgethi Ammo+") ~= nil) then
  33. MaxAmmo = 50000000
  34. --else
  35. --MaxAmmo = 10000000
  36. --end
  37. mindamage = 5
  38. maxdamage = 999
  39. crtmaxdamage = 864
  40. omindamage = mindamage
  41. omaxdamage = maxdamage
  42. ocrtmaxdamage = crtmaxdamage
  43. crtrate = 100/15
  44. --100%/critpercentage
  45. oblkbrkr = 0
  46. blockbreaker = oblkbrkr
  47. spread = 0.5
  48. spread = spread*100
  49. Ammoregen = 10000
  50. --if (string.match(Player.Unlocks.Value,"RasAlgethi Range+") ~= nil) then
  51. range = 1000
  52. --else
  53. --range = 15000
  54. --end
  55. rangepower = 90
  56. CurrentAmmo = "Normal"
  57. handlecolor = BrickColor.new("Really black")
  58. bcolor = BrickColor.new("Dark stone grey")
  59. gemcolor = BrickColor.new("Really black")
  60. ammotrail = BrickColor.new("Really black")
  61. ToolName = "U.G.F.E Spraynozzle 2500"
  62. ---------------------------------------------------------------------------------------------------------------------------------------
  63. if Character:findFirstChild("EquippedVal",true) ~= nil then
  64. Character:findFirstChild("EquippedVal",true).Parent = nil
  65. end
  66. ev = Instance.new("BoolValue",Character)
  67. ev.Name = "EquippedVal"
  68. ev.Value = false
  69. if Character:findFirstChild("Block",true) ~= nil then
  70. Character:findFirstChild("Block",true).Parent = nil
  71. end
  72. --player
  73. player = nil
  74. --welds
  75. RW, LW , RWL, LWL = Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld")
  76. --what anim
  77. anim = "none"
  78. --other var
  79. player = Player
  80. ch = Character
  81. --save shoulders
  82. AoETrue = {}
  83. RSH, LSH , RHL, LHL = ch.Torso["Right Shoulder"], ch.Torso["Left Shoulder"] , ch.Torso["Right Hip"] , ch.Torso["Left Hip"]
  84. function RWFunc()
  85. RW.Part1 = ch["Right Arm"]
  86. RSH.Part1 = nil
  87. end
  88. function LWFunc()
  89. LW.Part1 = ch["Left Arm"]
  90. LSH.Part1 = nil
  91. end
  92. function RWLFunc()
  93. RWL.Part1 = ch["Right Leg"]
  94. RHL.Part1 = nil
  95. ch["Right Leg"].Name = "RightLeg"
  96. RightLeg.CanCollide = false
  97. end
  98. function LWLFunc()
  99. LWL.Part1 = ch["Left Leg"]
  100. LHL.Part1 = nil
  101. ch["Left Leg"].Name = "LeftLeg"
  102. LeftLeg.CanCollide = true
  103. end
  104. function RWLRem()
  105. RightLeg.Name = "Right Leg"
  106. RWL.Part1 = nil
  107. RHL.Part1 = ch["Right Leg"]
  108. RightLeg.CanCollide = false
  109. end
  110. function LWLRem()
  111. LeftLeg.Name = "Left Leg"
  112. LWL.Part1 = nil
  113. LHL.Part1 = ch["Left Leg"]
  114. LeftLeg.CanCollide = false
  115. end
  116. function RWRem()
  117. RW.Part1 = nil
  118. RSH.Part1 = ch["Right Arm"]
  119. end
  120. function LWRem()
  121. LW.Part1 = nil
  122. LSH.Part1 = ch["Left Arm"]
  123. end
  124. if Character:findFirstChild(ModelName,true) ~= nil then
  125. Character:findFirstChild(ModelName,true).Parent = nil
  126. RHL.Part1 = ch["Right Leg"]
  127. LHL.Part1 = ch["Left Leg"]
  128. RSH.Part1 = ch["Right Arm"]
  129. LSH.Part1 = ch["Left Arm"]
  130. end
  131. local swordholder = Instance.new("Model")
  132. swordholder.Name = ModelName
  133. swordholder.Parent = Character
  134. --derp
  135. RW.Part0 = ch.Torso
  136. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  137. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  138. RW.Parent = swordholder
  139. --
  140. LW.Part0 = ch.Torso
  141. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  142. LW.C1 = CFrame.new(0, 0.5, 0)
  143. LW.Parent = swordholder
  144. --
  145. RWL.Part0 = ch.Torso
  146. RWL.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(0, 0, 0)
  147. RWL.C1 = CFrame.new(0.5, 1, 0)
  148. RWL.Parent = swordholder
  149. --
  150. LWL.Part0 = ch.Torso
  151. LWL.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(0, 0, 0)
  152. LWL.C1 = CFrame.new(-0.5, 1, 0)
  153. LWL.Parent = swordholder
  154. local msh1 = Instance.new("BlockMesh")
  155. msh1.Scale = Vector3.new(1,1,1)
  156. local msh2 = Instance.new("BlockMesh")
  157. msh2.Scale = Vector3.new(1,1,1)
  158. local msh3 = Instance.new("BlockMesh")
  159. msh3.Scale = Vector3.new(1,1,1)
  160. local msh4 = Instance.new("BlockMesh")
  161. msh4.Scale = Vector3.new(1,1,1)
  162. local msh5 = Instance.new("BlockMesh")
  163. msh5.Scale = Vector3.new(1,1,1)
  164. local msh6 = Instance.new("BlockMesh")
  165. msh6.Scale = Vector3.new(1,1,1)
  166. local torsc = false
  167. for i,z in pairs(Character:GetChildren()) do
  168. if z.className == "CharacterMesh" then
  169. if z.BodyPart == Enum.BodyPart.Torso then
  170. torsc = true
  171. end
  172. end
  173. end
  174. if torsc then
  175. msh7 = Instance.new("SpecialMesh")
  176. msh7.MeshId = "http://www.roblox.com/asset/?id=3270017"
  177. msh7.Scale = Vector3.new(2.01,1,1.01)
  178. msh7.Scale = Vector3.new(2.01,1,1.01)
  179. else
  180. msh7 = Instance.new("BlockMesh")
  181. msh7.Scale = Vector3.new(2.01,0.1,1.01)
  182. end
  183. local msh8 = Instance.new("SpecialMesh")
  184. msh8.MeshId = "http://www.roblox.com/asset/?id=3270017"
  185. msh8.Scale = Vector3.new(0.5,0.5,7)
  186. msh8.Scale = Vector3.new(0.5,0.5,7)
  187. local msh9 = Instance.new("BlockMesh")
  188. msh9.Scale = Vector3.new(1,1,1)
  189. local prt1 = Instance.new("Part")
  190. prt1.formFactor = 3
  191. prt1.CanCollide = false
  192. prt1.Name = "Handle"
  193. prt1.Locked = true
  194. prt1.Size = Vector3.new(0.3,1,0.3)
  195. prt1.Parent = swordholder
  196. msh1.Parent = prt1
  197. prt1.BrickColor = handlecolor
  198. local prt2 = Instance.new("Part")
  199. prt2.formFactor = 3
  200. prt2.CanCollide = false
  201. prt2.Name = "Handle2"
  202. prt2.Locked = true
  203. prt2.Size = Vector3.new(0.5,0.2,1.5)
  204. prt2.Parent = swordholder
  205. msh2.Parent = prt2
  206. prt2.BrickColor = handlecolor
  207. local prt3 = Instance.new("Part")
  208. prt3.formFactor = 3
  209. prt3.CanCollide = false
  210. prt3.Name = "Handle3"
  211. prt3.Locked = true
  212. prt3.Size = Vector3.new(0.7,1.2,0.7)
  213. prt3.Parent = swordholder
  214. msh3.Parent = prt3
  215. prt3.BrickColor = bcolor
  216. local prt4 = Instance.new("Part")
  217. prt4.formFactor = 3
  218. prt4.CanCollide = false
  219. prt4.Name = "BackBarrel"
  220. prt4.Locked = true
  221. prt4.Size = Vector3.new(0.5,1.2,0.5)
  222. prt4.Parent = swordholder
  223. msh4.Parent = prt4
  224. prt4.BrickColor = handlecolor
  225. local prt5 = Instance.new("Part")
  226. prt5.formFactor = 3
  227. prt5.CanCollide = false
  228. prt5.Name = "Barrel"
  229. prt5.Locked = true
  230. prt5.Size = Vector3.new(0.4,2.5,0.4)
  231. prt5.Parent = swordholder
  232. msh5.Parent = prt5
  233. prt5.BrickColor = handlecolor
  234. local prt6 = Instance.new("Part")
  235. prt6.formFactor = 3
  236. prt6.CanCollide = false
  237. prt6.Name = "BarrelHandle"
  238. prt6.Locked = true
  239. prt6.Size = Vector3.new(0.3,1,0.3)
  240. prt6.Parent = swordholder
  241. msh6.Parent = prt6
  242. prt6.BrickColor = handlecolor
  243. local prt7 = Instance.new("Part")
  244. prt7.formFactor = 3
  245. prt7.CanCollide = false
  246. prt7.Name = "HolsterStrap"
  247. prt7.Locked = true
  248. prt7.Size = Vector3.new(1,1,1)
  249. prt7.Parent = swordholder
  250. msh7.Parent = prt7
  251. prt7.BrickColor = handlecolor
  252. local prt8 = Instance.new("Part")
  253. prt8.formFactor = 3
  254. prt8.CanCollide = false
  255. prt8.Name = "Holster"
  256. prt8.Locked = true
  257. prt8.Size = Vector3.new(1,1,1)
  258. prt8.Parent = swordholder
  259. msh8.Parent = prt8
  260. prt8.BrickColor = handlecolor
  261. local prt9 = Instance.new("Part")
  262. prt9.formFactor = 3
  263. prt9.CanCollide = false
  264. prt9.Name = "AmmoHolster"
  265. prt9.Locked = true
  266. prt9.Size = Vector3.new(0.2,1,0.7)
  267. prt9.Parent = swordholder
  268. msh9.Parent = prt9
  269. prt9.BrickColor = handlecolor
  270. local w1 = Instance.new("Weld")
  271. w1.Parent = prt1
  272. w1.Part0 = prt1
  273. local w2 = Instance.new("Weld")
  274. w2.Parent = prt2
  275. w2.Part0 = prt2
  276. w2.Part1 = prt1
  277. w2.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  278. w2.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 0.6,0.5)
  279. local w3 = Instance.new("Weld")
  280. w3.Parent = prt3
  281. w3.Part0 = prt3
  282. w3.Part1 = prt2
  283. w3.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  284. w3.C0 = CFrame.Angles(math.rad(90+45), 0, 0) * CFrame.new(0, 0.25,-0.5)
  285. local w4 = Instance.new("Weld")
  286. w4.Parent = prt4
  287. w4.Part0 = prt4
  288. w4.Part1 = prt2
  289. w4.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  290. w4.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,0.5)
  291. local w5 = Instance.new("Weld")
  292. w5.Parent = prt5
  293. w5.Part0 = prt5
  294. w5.Part1 = prt3
  295. w5.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  296. w5.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 1.5,0)
  297. local w6 = Instance.new("Weld")
  298. w6.Parent = prt6
  299. w6.Part0 = prt6
  300. w6.Part1 = prt3
  301. w6.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  302. w6.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 1.5,-0.5)
  303. local w7 = Instance.new("Weld")
  304. w7.Parent = prt7
  305. w7.Part0 = prt7
  306. w7.Part1 = Torso
  307. w7.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  308. if torsc then
  309. w7.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 1,0)
  310. else
  311. w7.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1,0)
  312. end
  313. local w8 = Instance.new("Weld")
  314. w8.Parent = prt8
  315. w8.Part0 = prt8
  316. w8.Part1 = Torso
  317. w8.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  318. w8.C0 = CFrame.Angles(math.rad(45), 0, 0) * CFrame.new(-1.1, 1-0.25,0)
  319. local w9 = Instance.new("Weld")
  320. w9.Parent = prt9
  321. w9.Part0 = prt9
  322. w9.Part1 = Torso
  323. w9.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  324. w9.C0 = CFrame.Angles(math.rad(45), 0, 0) * CFrame.new(1, 0.75,-0.5)
  325. local RAP = Instance.new("Part")
  326. RAP.formFactor = 0
  327. RAP.CanCollide = false
  328. RAP.Name = "RAPart"
  329. RAP.Locked = true
  330. RAP.Size = Vector3.new(1,1,1)
  331. RAP.Parent = swordholder
  332. RAP.Transparency = 1
  333. local w = Instance.new("Weld")
  334. w.Parent = RAP
  335. w.Part0 = RAP
  336. w.Part1 = RightArm
  337. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0)
  338. w.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), 0, 0) * CFrame.new(0, 1, 0)
  339. function unequipweld()
  340. w1.Part1 = Torso
  341. w1.C1 = CFrame.fromEulerAnglesXYZ(0, math.rad(0), math.rad(0)) * CFrame.new(0, 0,0)
  342. w1.C0 = CFrame.fromEulerAnglesXYZ(math.rad(180),math.rad(-0), math.rad(0)) * CFrame.new(-1.15, 1, -0.6)
  343. end
  344. unequipweld()
  345. function equipweld()
  346. w1.Part0 = prt1
  347. w1.Part1 = RAP
  348. w1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0)
  349. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  350. end
  351. function ss(parent,p) --Slash
  352. local SlashSound = Instance.new("Sound")
  353. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  354. SlashSound.Parent = parent
  355. SlashSound.Volume = .7
  356. SlashSound.Pitch = p
  357. SlashSound.PlayOnRemove = true
  358. coroutine.resume(coroutine.create(function()
  359. wait()
  360. SlashSound.Parent = nil
  361. end))
  362. end
  363. function uss(parent,p) --unsheath
  364. local SlashSound = Instance.new("Sound")
  365. SlashSound.SoundId = "rbxasset://sounds\\unsheath.wav"
  366. SlashSound.Parent = parent
  367. SlashSound.Volume = .7
  368. SlashSound.Pitch = p
  369. SlashSound.PlayOnRemove = true
  370. coroutine.resume(coroutine.create(function()
  371. wait()
  372. SlashSound.Parent = nil
  373. end))
  374. end
  375. function cs(parent,p) --Magic Charge
  376. local SlashSound = Instance.new("Sound")
  377. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2101137"
  378. SlashSound.Parent = parent
  379. SlashSound.Parent = parent
  380. SlashSound.Volume = .7
  381. SlashSound.Pitch = p
  382. SlashSound.PlayOnRemove = true
  383. coroutine.resume(coroutine.create(function()
  384. wait()
  385. SlashSound.Parent = nil
  386. end))
  387. end
  388. function ls(parent,p) --Lazer Sound
  389. local SlashSound = Instance.new("Sound")
  390. SlashSound.SoundId = "http://www.roblox.com/asset?id=1369158"
  391. SlashSound.Parent = parent
  392. SlashSound.Parent = parent
  393. SlashSound.Volume = .7
  394. SlashSound.Pitch = p
  395. SlashSound.PlayOnRemove = true
  396. coroutine.resume(coroutine.create(function()
  397. wait()
  398. SlashSound.Parent = nil
  399. end))
  400. end
  401. function ts(parent,p)
  402. local SlashSound = Instance.new("Sound")
  403. SlashSound.SoundId = "http://www.roblox.com/asset/?id=12222030"
  404. SlashSound.Parent = parent
  405. SlashSound.Parent = parent
  406. SlashSound.Volume = .7
  407. SlashSound.Pitch = p
  408. SlashSound.PlayOnRemove = true
  409. coroutine.resume(coroutine.create(function()
  410. wait()
  411. SlashSound.Parent = nil
  412. end))
  413. end
  414. function fs(parent,p) --Fire Sound
  415. local SlashSound = Instance.new("Sound")
  416. SlashSound.SoundId = "http://www.roblox.com/asset/?id=31758982"
  417. SlashSound.Parent = parent
  418. SlashSound.Parent = parent
  419. SlashSound.Volume = .7
  420. SlashSound.Pitch = p
  421. SlashSound.PlayOnRemove = true
  422. coroutine.resume(coroutine.create(function()
  423. wait()
  424. SlashSound.Parent = nil
  425. end))
  426. end
  427. function ms(parent,p) --Metal Cling Sound
  428. local SlashSound = Instance.new("Sound")
  429. SlashSound.SoundId = "rbxasset://sounds\\metal.ogg"
  430. SlashSound.Parent = parent
  431. SlashSound.Volume = 5
  432. SlashSound.Pitch = p
  433. SlashSound.PlayOnRemove = true
  434. coroutine.resume(coroutine.create(function()
  435. wait()
  436. SlashSound.Parent = nil
  437. end))
  438. end
  439. function bs(parent,p) --Berserk Sound
  440. local SlashSound = Instance.new("Sound")
  441. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2676305"
  442. SlashSound.Parent = parent
  443. SlashSound.Parent = parent
  444. SlashSound.Volume = 1
  445. SlashSound.Pitch = p
  446. SlashSound.PlayOnRemove = true
  447. coroutine.resume(coroutine.create(function()
  448. wait()
  449. SlashSound.Parent = nil
  450. end))
  451. end
  452. function hs(parent,p) --Ammo Hit Sound
  453. ms(parent,p)
  454. end
  455. function as(parent,p) --Gun Shoot Sound
  456. local SlashSound = Instance.new("Sound")
  457. SlashSound.SoundId = "http://roblox.com/asset/?id=132456294"
  458. SlashSound.Parent = parent
  459. SlashSound.Volume = 0.5
  460. SlashSound.Pitch = p
  461. SlashSound.PlayOnRemove = true
  462. coroutine.resume(coroutine.create(function()
  463. wait()
  464. SlashSound.Parent = nil
  465. end))
  466. end
  467. function ars(parent,p) --Gun Reload Sound
  468. local SlashSound = Instance.new("Sound")
  469. SlashSound.SoundId = "http://roblox.com/asset/?id=138084889"
  470. SlashSound.Parent = parent
  471. SlashSound.Parent = parent
  472. SlashSound.Volume = 1
  473. SlashSound.Pitch = 1
  474. SlashSound.PlayOnRemove = true
  475. coroutine.resume(coroutine.create(function()
  476. wait()
  477. SlashSound.Parent = nil
  478. end))
  479. end
  480. --
  481. --
  482. function returndmg()
  483. mindamage = omindamage
  484. maxdamage = omaxdamage
  485. crtmaxdamage = ocrtmaxdamage
  486. end
  487. function subdmg(sub)
  488. mindamage = omindamage - sub
  489. maxdamage = omaxdamage - sub
  490. crtmaxdamage = ocrtmaxdamage - sub
  491. end
  492. function prcntdmg(sub)
  493. mindamage = math.floor(omindamage - (omindamage*(sub/100)))
  494. maxdamage = math.floor(omaxdamage - (omaxdamage*(sub/100)))
  495. crtmaxdamage = math.floor(ocrtmaxdamage - (ocrtmaxdamage*(sub/100)))
  496. end
  497. function tagHumanoid(humanoid, player)
  498. local creator_tag = Instance.new("ObjectValue")
  499. creator_tag.Value = player
  500. creator_tag.Name = "creator"
  501. creator_tag.Parent = humanoid
  502. end
  503. function untagHumanoid(humanoid)
  504. if humanoid ~= nil then
  505. local tag = humanoid:findFirstChild("creator")
  506. if tag ~= nil then
  507. tag.Parent = nil
  508. end
  509. end
  510. end
  511. local function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  512. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  513. end
  514. function hideanim()
  515. attack = true
  516. ars(Head,0.85)
  517. for i = 0.25 ,1 ,0.25 do
  518. wait()
  519. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  520. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  521. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25+10*i))
  522. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  523. w3.C0 = CFrame.Angles(math.rad(90+25*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  524. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5*i),0,math.rad(0))
  525. end
  526. for i = 0.1 ,1 ,0.1 do
  527. wait()
  528. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  529. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  530. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(35+10*i))
  531. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  532. w3.C0 = CFrame.Angles(math.rad(115+20*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  533. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5-5*i),0,math.rad(0))
  534. end
  535. for i = 0.1 ,1 ,0.1 do
  536. wait()
  537. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90-130*i),math.rad(0),math.rad(-60+60*i))
  538. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  539. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(40-20*i),math.rad(0),math.rad(45-22.5*i))
  540. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  541. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  542. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10+40*i),0,math.rad(-30*i))
  543. end
  544. unequipweld()
  545. for i = 0.1 ,1 ,0.1 do
  546. wait()
  547. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(-20+20*i),math.rad(0),math.rad(0))
  548. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  549. LW.C0 = CFrame.new(-1.5, 0.5, -0.25+0.25*i) * CFrame.Angles(math.rad(20-20*i),math.rad(0),math.rad(22.5-22.5*i))
  550. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  551. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  552. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30-30*i),0,math.rad(-30+30*i))
  553. end
  554. Neck.C0 = neckcf0
  555. RWRem()
  556. LWRem()
  557. attack = false
  558. end
  559. function equipanim()
  560. attack = true
  561. RWFunc()
  562. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  563. for i = 0.1 ,1 ,0.1 do
  564. wait()
  565. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(-20*i),math.rad(0),math.rad(0))
  566. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  567. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  568. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  569. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30*i),0,math.rad(-30*i))
  570. end
  571. equipweld()
  572. ars(Head,1)
  573. for i = 0.1 ,1 ,0.1 do
  574. wait()
  575. RW.C0 = CFrame.new(1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(-20+130*i),math.rad(0),math.rad(0))
  576. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  577. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  578. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  579. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30-35*i),0,math.rad(-30))
  580. end
  581. LWFunc()
  582. for i = 0.1 ,1 ,0.1 do
  583. wait()
  584. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(110-20*i),math.rad(0),math.rad(-60*i))
  585. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  586. LW.C0 = CFrame.new(-1.5, 0.5, -0.5*i) * CFrame.Angles(math.rad(40*i),math.rad(0),math.rad(25*i))
  587. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  588. w3.C0 = CFrame.Angles(math.rad(135-45*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  589. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+5*i),0,math.rad(-30+30*i))
  590. end
  591. Neck.C0 = neckcf0
  592. attack = false
  593. end
  594. function faketors()
  595. local T = Instance.new("Part")
  596. T.formFactor = 0
  597. T.CanCollide = false
  598. T.Name = "FakeTorso"
  599. T.Locked = true
  600. T.Size = Torso.Size
  601. T.Parent = swordholder
  602. T.Transparency = 1
  603. T.BrickColor = Torso.BrickColor
  604. for i,z in pairs(Character:GetChildren()) do
  605. if z.className == "CharacterMesh" then
  606. if z.BodyPart == Enum.BodyPart.Torso then
  607. local SM = Instance.new("SpecialMesh",T)
  608. SM.MeshId = "http://www.roblox.com/asset/?id=" .. z.MeshId
  609. if z.BaseTextureId ~= 0 then
  610. SM.TextureId = z.BaseTextureId
  611. elseif z.OverlayTextureId ~= 0 then
  612. SM.TextureId = z.OverlayTextureId
  613. else
  614. SM.TextureId = ""
  615. end
  616. end
  617. end
  618. end
  619. local wt = Instance.new("Weld")
  620. wt.Parent = T
  621. wt.Part0 = T
  622. wt.Part1 = Torso
  623. RW.Part0 = T
  624. LW.Part0 = T
  625. T.Transparency = 0
  626. Torso.Transparency = 1
  627. RHL.Part0 = T
  628. LHL.Part0 = T
  629. return wt,T
  630. end
  631. if (script.Parent.className ~= "HopperBin") then
  632. Tool = Instance.new("HopperBin")
  633. Tool.Parent = Backpack
  634. Tool.Name = ToolName
  635. script.Parent = Tool
  636. end
  637. Bin = script.Parent
  638. function damagesplat(dmg,hit,crit,blocked)
  639. local mo = Instance.new("Model")
  640. mo.Name = dmg
  641. local pa = Instance.new("Part",mo)
  642. pa.formFactor = 3
  643. pa.Size = Vector3.new(0.8,0.3,0.8)
  644. if crit then
  645. pa.BrickColor = BrickColor.new("Bright yellow")
  646. elseif not crit then
  647. pa.BrickColor = BrickColor.new("Bright red")
  648. end
  649. if blocked then pa.BrickColor = BrickColor.new("Bright blue") end
  650. pa.CFrame = CFrame.new(hit.Position) * CFrame.new(0, 3, 0)
  651. pa.Name = "Head"
  652. local hah = Instance.new("Humanoid")
  653. hah.Parent = mo
  654. hah.MaxHealth = 0
  655. hah.Health = 0
  656. local bp = Instance.new("BodyPosition")
  657. bp.P = 14000
  658. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  659. bp.position = hit.Position + Vector3.new(0, 5, 0)
  660. coroutine.resume(coroutine.create(function()
  661. wait()
  662. mo.Parent = workspace
  663. bp.Parent = pa
  664. wait(1.4)
  665. mo:remove()
  666. end))
  667. return pa
  668. end
  669. function damage(hum,dmg,critornot)
  670. local pa = damagesplat(dmg,hum.Torso,critornot)
  671. hum.Parent:BreakJoints()
  672. coroutine.resume(coroutine.create(function()
  673. tagHumanoid(hum,Player)
  674. wait(1)
  675. untagHumanoid(hum)
  676. end))
  677. return pa
  678. end
  679. function AddAmmo(add)
  680. Ammo = Ammo + add
  681. if Ammo > MaxAmmo then
  682. Ammo = MaxAmmo
  683. end
  684. end
  685. function ADmg(humm,hit,pos)
  686. if CurrentAmmo == "Normal" then
  687. if humm.Parent:findFirstChild("Block") ~= nil then
  688. if humm.Parent.Block.Value then
  689. damagesplat(0,humm.Torso,false,true)
  690. return
  691. end
  692. end
  693. prcntdmg(0)
  694. if critrandomizer ~= 1 then
  695. local rndmdamage = math.random(mindamage,maxdamage)
  696. damage(humm,rndmdamage,false)
  697. elseif critrandomizer == 1 then
  698. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  699. damage(humm,rndmdamage,true)
  700. end
  701. elseif CurrentAmmo == "Poison" then
  702. if humm.Parent:findFirstChild("Block") ~= nil then
  703. if humm.Parent.Block.Value then
  704. damagesplat(0,humm.Torso,false,true)
  705. return
  706. end
  707. end
  708. prcntdmg(25)
  709. if critrandomizer ~= 1 then
  710. local rndmdamage = math.random(mindamage,maxdamage)
  711. damage(humm,rndmdamage,false)
  712. elseif critrandomizer == 1 then
  713. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  714. damage(humm,rndmdamage,true)
  715. end
  716. if math.random(1,5) == 1 then
  717. local poisoncount = math.random(2,10)
  718. coroutine.resume(coroutine.create(function()
  719. repeat
  720. wait()
  721. poisoncount = poisoncount - 1
  722. local rndmdamage = math.floor(math.random(1,5)/2)
  723. local pa = damage(humm,rndmdamage,false)
  724. pa.BrickColor = BrickColor.new("Alder")
  725. until poisoncount <= 0
  726. end))
  727. end
  728. elseif CurrentAmmo == "Knockback" then
  729. if humm.Parent:findFirstChild("Block") ~= nil then
  730. if humm.Parent.Block.Value then
  731. damagesplat(0,humm.Torso,false,true)
  732. return
  733. end
  734. end
  735. prcntdmg(25)
  736. if critrandomizer ~= 1 then
  737. local rndmdamage = math.random(mindamage,maxdamage)
  738. damage(humm,rndmdamage,false)
  739. elseif critrandomizer == 1 then
  740. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  741. damage(humm,rndmdamage,true)
  742. end
  743. local vel = Instance.new("BodyVelocity",humm.Torso)
  744. vel.maxForce = Vector3.new(1,1,1) * math.huge
  745. vel.P = vel.P * 5
  746. vel.velocity = Vector3.new(0,1,0) + CFrame.new(Torso.Position,humm.Torso.Position).lookVector * 10
  747. coroutine.resume(coroutine.create(function()
  748. wait()
  749. vel.Parent=nil
  750. end))
  751. returndmg()
  752. end
  753. end
  754. function OT(hit) --Normal Damage
  755. if Hitdeb == 1 then return end
  756. if hit.Parent == nil then return end
  757. local hum = hit.Parent:findFirstChild("Humanoid") if hum ~= nil and hum ~= Character.Humanoid then
  758. if hum.Health <= 0 then return end
  759. if hit.Parent:findFirstChild("Block") ~= nil then
  760. if hit.Parent.Block.Value then
  761. damagesplat(0,hum.Torso,false,true)
  762. Hitdeb = 1
  763. if hit.Parent.Block:findFirstChild("BlockPower") ~= nil then
  764. if hit.Parent.Block.BlockPower.Value <= 1 then
  765. hit.Parent.Block.Value = false
  766. elseif hit.Parent.Block.BlockPower.Value > 1 then
  767. local critrandomizer = math.random(crtrate)
  768. if critrandomizer ~= 1 then
  769. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker
  770. elseif critrandomizer == 1 then
  771. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker + 2
  772. end
  773. end
  774. end
  775. return end end
  776. local critrandomizer = math.random(crtrate)
  777. if critrandomizer ~= 1 then
  778. local rndmdamage = math.random(mindamage,maxdamage)
  779. damage(hum,rndmdamage,false)
  780. elseif critrandomizer == 1 then
  781. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  782. damage(hum,rndmdamage,true)
  783. end
  784. Hitdeb = 1
  785. end
  786. end
  787. function AoE(p,magnitude)
  788. local c = game.Workspace:GetChildren();
  789. for i = 1, #c do
  790. local hum = c[i]:findFirstChild("Humanoid")
  791. if hum ~= nil and hum.Health ~= 0 then
  792. local head = c[i]:findFirstChild("Head");
  793. if head ~= nil then
  794. local mag = (head.Position - p).magnitude;
  795. if mag <= magnitude and c[i].Name ~= Character.Name then
  796. local foundd = false
  797. for ii = 1 , #AoETrue do
  798. if AoETrue[ii] == c[i].Name then
  799. foundd = true
  800. end
  801. end
  802. if foundd then
  803. end
  804. --
  805. if not foundd then
  806. local critrandomizer = math.random(crtrate)
  807. if critrandomizer ~= 1 then
  808. local rndmdamage = math.random(mindamage,maxdamage)
  809. damage(hum,rndmdamage,false)
  810. elseif critrandomizer == 1 then
  811. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  812. damage(hum,rndmdamage,true)
  813. end
  814. table.insert(AoETrue,c[i].Name)
  815. end
  816. end
  817. end
  818. end
  819. end
  820. for ii = 1 , #AoETrue do
  821. table.remove(AoETrue,#AoETrue)
  822. end
  823. end
  824. --
  825. --
  826. function effect(Color,Ref,LP,P1)
  827. local effectsmsh = Instance.new("BlockMesh")
  828. effectsmsh.Scale = Vector3.new(1,1,1)
  829. effectsmsh.Name = "Mesh"
  830. local effectsg = Instance.new("Part")
  831. effectsg.formFactor = 3
  832. effectsg.CanCollide = false
  833. effectsg.Name = "Eff"
  834. effectsg.Locked = true
  835. effectsg.Anchored = true
  836. effectsg.Size = Vector3.new(0.2,1,0.2)
  837. effectsg.Parent = swordholder
  838. effectsmsh.Parent = effectsg
  839. effectsg.BrickColor = BrickColor.new(Color)
  840. effectsg.Reflectance = Ref
  841. local point1 = P1
  842. local mg = (LP.p - point1.p).magnitude
  843. effectsg.Size = Vector3.new(0.2,mg,0.2)
  844. effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  845. coroutine.resume(coroutine.create(function()
  846. for i = 0 , 1 , 0.1 do
  847. wait()
  848. effectsg.Transparency = 1*i
  849. effectsmsh.Scale = Vector3.new(1-1*i,1,1-1*i)
  850. end
  851. wait()
  852. effectsg.Parent = nil
  853. end))
  854. end
  855. --
  856. con = nil
  857. function dmgcnnct()
  858. if con ~= nil then
  859. con:disconnect()
  860. Hitdeb = 0
  861. end
  862. con = prt11.Touched:connect(OT)
  863. end
  864. function dmgdc()
  865. if con ~= nil then
  866. con:disconnect()
  867. Hitdeb = 0
  868. end
  869. end
  870. function rptddmg(value,des,inc)
  871. coroutine.resume(coroutine.create(function()
  872. repeat
  873. wait(inc)
  874. Hitdeb = 0
  875. until value == des
  876. end))
  877. end
  878. function atktype(s,e)
  879. coroutine.resume(coroutine.create(function ()
  880. attacktype = e
  881. wait()
  882. attacktype = s
  883. end))
  884. end
  885. function shoottrail(mouse)
  886. local p1 = (prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p
  887. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread)) / 100) * (p1-mouse.Hit.p).magnitude/100
  888. local dir = CFrame.new((p1+mouse.Hit.p)/2,mouse.Hit.p+spreadvector)
  889. local hit,pos = rayCast(p1,dir.lookVector,10,Character)
  890. local rangepos = range
  891. local function drawtrail(From,To)
  892. local effectsmsh = Instance.new("BlockMesh")
  893. effectsmsh.Scale = Vector3.new(1,1,1)
  894. effectsmsh.Name = "Mesh"
  895. local effectsg = Instance.new("Part")
  896. effectsg.formFactor = 3
  897. effectsg.CanCollide = false
  898. effectsg.Name = "Eff"
  899. effectsg.Locked = true
  900. effectsg.Anchored = true
  901. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  902. effectsg.Parent = swordholder
  903. effectsmsh.Parent = effectsg
  904. effectsg.BrickColor = ammotrail
  905. effectsg.Reflectance = 0.25
  906. local LP = From
  907. local point1 = To
  908. local mg = (LP - point1).magnitude
  909. effectsmsh.Scale = Vector3.new(1,mg*5,1)
  910. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  911. coroutine.resume(coroutine.create(function()
  912. for i = 0 , 1 , 0.1 do
  913. wait()
  914. effectsg.Transparency = 1*i
  915. effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i)
  916. end
  917. effectsg.Parent = nil
  918. end))
  919. end
  920. local newpos = p1
  921. local inc = rangepower
  922. repeat
  923. wait()
  924. rangepos = rangepos - 10
  925. dir = dir * CFrame.Angles(math.rad(-0.1),0,0)
  926. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  927. drawtrail(newpos,pos)
  928. newpos = newpos + (dir.lookVector * inc)
  929. if inc >= 20 then
  930. inc = inc - 10
  931. end
  932. if hit ~= nil then
  933. rangepos = 0
  934. end
  935. until rangepos <= 0
  936. if hit ~= nil then
  937. hs(Head,1)
  938. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  939. hum = hit.Parent.Humanoid
  940. ADmg(hum,hit,pos)
  941. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  942. hum = hit.Parent.Parent.Humanoid
  943. ADmg(hum,hit,pos)
  944. end
  945. end
  946. end
  947. function Ready(mouse)
  948. if Ammo <= 0 then Reload() return end
  949. attack = true
  950. local wt,t = faketors()
  951. w7.Part1 = t
  952. w8.Part1 = t
  953. w9.Part1 = t
  954. Character.Humanoid.WalkSpeed = 15
  955. for i = 0.2 , 1 , 0.2 do
  956. wait()
  957. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  958. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  959. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(40+35*i),math.rad(0),math.rad(25))
  960. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  961. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  962. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  963. wt.C0 = CFrame.Angles(0, math.rad(50*i), 0)
  964. end
  965. for i = 0.2 , 1 , 0.2 do
  966. wait()
  967. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  968. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  969. LW.C0 = CFrame.new(-1.5, 0.5, -0.25+0.25*i) * CFrame.Angles(math.rad(75+20*i),math.rad(0),math.rad(25))
  970. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  971. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  972. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  973. wt.C0 = CFrame.Angles(0, math.rad(50+10*i), 0)
  974. end
  975. repeat
  976. wait()
  977. as(Head,1)
  978. coroutine.resume(coroutine.create(function()
  979. for z = 1 ,2 do
  980. coroutine.resume(coroutine.create(function()
  981. local meshb1 = Instance.new("BlockMesh")
  982. meshb1.Scale = Vector3.new(1,1,1)
  983. local shellb1 = Instance.new("Part")
  984. meshb1.Parent = shellb1
  985. shellb1.Anchored = true
  986. shellb1.formFactor = 3
  987. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  988. shellb1.CFrame = CFrame.new((prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p) * CFrame.Angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  989. shellb1.Parent = swordholder
  990. shellb1.Transparency = 0
  991. if math.random(1,2) == 1 then
  992. shellb1.BrickColor = BrickColor.new("Bright red")
  993. else
  994. shellb1.BrickColor = BrickColor.new("Bright orange")
  995. end
  996. shellb1.CanCollide = false
  997. local incre = math.random(0,60)/100
  998. for i = 0 , 1 , 0.1 do
  999. wait()
  1000. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  1001. shellb1.Transparency = 1*i
  1002. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  1003. end
  1004. shellb1.Parent=nil
  1005. end))
  1006. end
  1007. shoottrail(mouse)
  1008. end))
  1009. Ammo = Ammo - 1
  1010. for i = 0.5 ,0.1 , 0.5 do
  1011. wait()
  1012. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1013. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5*i), 0, 0)
  1014. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(95+5*i),math.rad(0),math.rad(25))
  1015. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1016. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1017. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1018. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1019. end
  1020. for i = 0.5 , 0.1 , 0.5 do
  1021. wait()
  1022. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1023. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5+5*i), 0, 0)
  1024. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(100-5*i),math.rad(0),math.rad(25))
  1025. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1026. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1027. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1028. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1029. end
  1030. until not keyhold or Ammo <= 0
  1031. for i = 0.2 , 1 , 0.2 do
  1032. wait()
  1033. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1034. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15*i), 0, 0)
  1035. LW.C0 = CFrame.new(-1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(95-25*i),math.rad(0),math.rad(25))
  1036. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1037. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1038. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1039. wt.C0 = CFrame.Angles(0, math.rad(60-60*i), 0)
  1040. end
  1041. w7.Part1 = Torso
  1042. w8.Part1 = Torso
  1043. w9.Part1 = Torso
  1044. RW.Part0 = Torso
  1045. LW.Part0 = Torso
  1046. Torso.Transparency = 0
  1047. RHL.Part0 = Torso
  1048. LHL.Part0 = Torso
  1049. t.Parent = nil
  1050. Character.Humanoid.WalkSpeed = 15
  1051. for i = 0.2 , 1 , 0.2 do
  1052. wait()
  1053. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1054. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15+10*i), 0, 0)
  1055. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(70-30*i),math.rad(0),math.rad(25))
  1056. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1057. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1058. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1059. end
  1060. wait()
  1061. attack = false
  1062. end
  1063. function Reload()
  1064. attack = true
  1065. ars(Head,0.75)
  1066. for i = 0.1 , 1 , 0.1 do
  1067. wait()
  1068. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+20*i))
  1069. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-45*i), 0, 0)
  1070. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.5*i) * CFrame.Angles(math.rad(40-60*i),math.rad(0),math.rad(25-15*i))
  1071. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1072. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1073. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10*i),0,math.rad(-20*i))
  1074. end
  1075. for i = 0.2 , 1 , 0.2 do
  1076. wait()
  1077. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-40))
  1078. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-20+20*i), 0, 0)
  1079. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(-20+40*i),math.rad(0),math.rad(10-10*i))
  1080. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1081. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1082. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10+20*i),0,math.rad(-20))
  1083. end
  1084. for i = 0.2 , 1 , 0.2 do
  1085. wait()
  1086. RW.C0 = CFrame.new(1.5-0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-40-5*i))
  1087. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(45*i), 0, 0)
  1088. LW.C0 = CFrame.new(-1.5+0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(20+80*i),math.rad(0),math.rad(45*i))
  1089. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1090. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1091. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(10+10*i),0,math.rad(-20+10*i))
  1092. end
  1093. AddAmmo(Ammoregen)
  1094. for i = 0.2 , 1 , 0.2 do
  1095. wait()
  1096. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-45))
  1097. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(45+5*i), 0, 0)
  1098. LW.C0 = CFrame.new(-1, 0.5, -0.5) * CFrame.Angles(math.rad(100-10*i),math.rad(0),math.rad(45))
  1099. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1100. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1101. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(20+5*i),0,math.rad(-10+5*i))
  1102. end
  1103. for i = 0.1 , 1 , 0.1 do
  1104. wait()
  1105. RW.C0 = CFrame.new(1+0.5*i, 0.5, -0.5+0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-45-15*i))
  1106. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(50-25*i), 0, 0)
  1107. LW.C0 = CFrame.new(-1-0.5*i, 0.5, -0.5) * CFrame.Angles(math.rad(90-60*i),math.rad(0),math.rad(45-20*i))
  1108. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1109. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1110. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(25-25*i),0,math.rad(-5+5*i))
  1111. end
  1112. Neck.C0 = neckcf0
  1113. attack = false
  1114. end
  1115. function AimedReady(mouse)
  1116. if Ammo <= 0 then Reload() return end
  1117. attack = true
  1118. local wt,t = faketors()
  1119. w7.Part1 = t
  1120. w8.Part1 = t
  1121. w9.Part1 = t
  1122. Character.Humanoid.WalkSpeed = 15
  1123. for i = 0.2 , 1 , 0.2 do
  1124. wait()
  1125. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1126. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  1127. LW.C0 = CFrame.new(-1.5, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(40+35*i),math.rad(0),math.rad(25))
  1128. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1129. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1130. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1131. wt.C0 = CFrame.Angles(0, math.rad(50*i), 0)
  1132. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20*i),0)
  1133. end
  1134. for i = 0.2 , 1 , 0.2 do
  1135. wait()
  1136. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1137. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  1138. LW.C0 = CFrame.new(-1.5, 0.5, -0.25+0.25*i) * CFrame.Angles(math.rad(75+20*i),math.rad(0),math.rad(25))
  1139. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1140. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1141. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1142. wt.C0 = CFrame.Angles(0, math.rad(50+10*i), 0)
  1143. end
  1144. wait() wait()
  1145. local orispread = spread
  1146. spread = 0
  1147. repeat
  1148. wait()
  1149. as(Head,1)
  1150. coroutine.resume(coroutine.create(function()
  1151. for z = 1 ,2 do
  1152. coroutine.resume(coroutine.create(function()
  1153. local meshb1 = Instance.new("BlockMesh")
  1154. meshb1.Scale = Vector3.new(1,1,1)
  1155. local shellb1 = Instance.new("Part")
  1156. meshb1.Parent = shellb1
  1157. shellb1.Anchored = true
  1158. shellb1.formFactor = 3
  1159. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  1160. shellb1.CFrame = CFrame.new((prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p) * CFrame.Angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  1161. shellb1.Parent = swordholder
  1162. shellb1.Transparency = 0
  1163. if math.random(1,2) == 1 then
  1164. shellb1.BrickColor = BrickColor.new("Bright red")
  1165. else
  1166. shellb1.BrickColor = BrickColor.new("Bright orange")
  1167. end
  1168. shellb1.CanCollide = false
  1169. local incre = math.random(0,60)/100
  1170. for i = 0 , 1 , 0.1 do
  1171. wait()
  1172. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  1173. shellb1.Transparency = 1*i
  1174. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  1175. end
  1176. shellb1.Parent=nil
  1177. end))
  1178. end
  1179. shoottrail(mouse)
  1180. end))
  1181. Ammo = Ammo - 1
  1182. for i = 0.5 , 1 , 0.5 do
  1183. wait()
  1184. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1185. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5*i), 0, 0)
  1186. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(95+5*i),math.rad(0),math.rad(25))
  1187. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1188. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1189. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1190. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1191. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20+5*i),0)
  1192. end
  1193. for i = 0.5 , 1 , 0.5 do
  1194. wait()
  1195. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1196. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5+5*i), 0, 0)
  1197. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(100-5*i),math.rad(0),math.rad(25))
  1198. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1199. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1200. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1201. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  1202. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-15-5*i),0)
  1203. end
  1204. until not buttonhold or Ammo <= 0
  1205. spread = orispread
  1206. for i = 0.2 , 1 , 0.2 do
  1207. wait()
  1208. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1209. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15*i), 0, 0)
  1210. LW.C0 = CFrame.new(-1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(95-25*i),math.rad(0),math.rad(25))
  1211. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1212. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1213. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1214. wt.C0 = CFrame.Angles(0, math.rad(60-60*i), 0)
  1215. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20+20*i),0)
  1216. end
  1217. w7.Part1 = Torso
  1218. w8.Part1 = Torso
  1219. w9.Part1 = Torso
  1220. RW.Part0 = Torso
  1221. LW.Part0 = Torso
  1222. Torso.Transparency = 0
  1223. RHL.Part0 = Torso
  1224. LHL.Part0 = Torso
  1225. t.Parent = nil
  1226. Character.Humanoid.WalkSpeed = 14
  1227. for i = 0.2 , 1 , 0.2 do
  1228. wait()
  1229. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1230. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15+10*i), 0, 0)
  1231. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(70-30*i),math.rad(0),math.rad(25))
  1232. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1233. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1234. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1235. end
  1236. wait()
  1237. attack = false
  1238. end
  1239. function returnwelds()
  1240. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1241. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  1242. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  1243. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1244. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1245. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1246. RWL.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(0, 0, 0)
  1247. RWL.C1 = CFrame.new(0.5, 1, 0)
  1248. LWL.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(0, 0, 0)
  1249. LWL.C1 = CFrame.new(-0.5, 1, 0)
  1250. Neck.C0 = neckcf0
  1251. end
  1252. keyhold = false
  1253. function ob1d(mouse)
  1254. hold = true
  1255. if attack then return end
  1256. keyhold = true
  1257. Ready(mouse)
  1258. end
  1259. function ob1u(mouse)
  1260. keyhold = false
  1261. end
  1262. buttonhold = false
  1263. function key(key,mouse)
  1264. if attack then return end
  1265. if key == "r" then
  1266. Reload()
  1267. end
  1268. end
  1269. function s(mouse)
  1270. repeat wait() until not attack
  1271. repeat wait() until not ev.Value
  1272. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1273. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1274. mouse.KeyDown:connect(function(ke) key(ke,mouse) end)
  1275. mouse.KeyUp:connect(key2)
  1276. equipanim()
  1277. ev.Value = true
  1278. end
  1279. function ds(mouse)
  1280. keyhold = false
  1281. repeat wait() until not attack
  1282. repeat wait() until ev.Value
  1283. hideanim()
  1284. wait()
  1285. ev.Value = false
  1286. end
  1287. Bin.Selected:connect(s)
  1288. Bin.Deselected:connect(ds)
Add Comment
Please, Sign In to add comment