Advertisement
spooderman

guI guy

Jul 10th, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 179.89 KB | None | 0 0
  1. -- Objects
  2.  
  3. local ScreenGui = Instance.new("ScreenGui")
  4. local Frame = Instance.new("Frame")
  5. local TextLabel = Instance.new("TextLabel")
  6. local TextButton = Instance.new("TextButton")
  7. local TextButton_2 = Instance.new("TextButton")
  8. local TextButton_3 = Instance.new("TextButton")
  9. local TextButton_4 = Instance.new("TextButton")
  10. local TextBox = Instance.new("TextBox")
  11.  
  12. -- Properties
  13.  
  14. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  15.  
  16. Frame.Parent = ScreenGui
  17. Frame.BackgroundColor3 = Color3.new(0, 1, 0)
  18. Frame.BackgroundTransparency = 0.5
  19. Frame.Size = UDim2.new(0, 206, 0, 461)
  20.  
  21. TextLabel.Parent = Frame
  22. TextLabel.BackgroundColor3 = Color3.new(1, 0, 0)
  23. TextLabel.Size = UDim2.new(0, 206, 0, 50)
  24. TextLabel.Font = Enum.Font.Garamond
  25. TextLabel.FontSize = Enum.FontSize.Size48
  26. TextLabel.Text = "Moploit"
  27. TextLabel.TextSize = 40
  28.  
  29. TextButton.Parent = Frame
  30. TextButton.BackgroundColor3 = Color3.new(0.333333, 1, 1)
  31. TextButton.BackgroundTransparency = 0.5
  32. TextButton.Position = UDim2.new(0, 3, 0, 55)
  33. TextButton.Size = UDim2.new(0, 200, 0, 50)
  34. TextButton.Font = Enum.Font.Garamond
  35. TextButton.FontSize = Enum.FontSize.Size48
  36. TextButton.Text = "Wings"
  37. TextButton.TextSize = 40
  38.  
  39. TextButton.MouseButton1Down:connect(function()
  40. --THIS IS A LOCAL SCRIPT JUST RUN IT IN RC7
  41.  
  42. function fly()
  43.  
  44. for i,v in pairs(script:GetChildren()) do
  45. pcall(function() v.Value = "" end)
  46. game:GetService("Debris"):AddItem(v,.1)
  47. end
  48.  
  49. function weld(p0,p1,c0,c1,par)
  50. local w = Instance.new("Weld",p0 or par)
  51. w.Part0 = p0
  52. w.Part1 = p1
  53. w.C0 = c0 or CFrame.new()
  54. w.C1 = c1 or CFrame.new()
  55. return w
  56. end
  57.  
  58. local motors = {}
  59.  
  60. function motor(p0,p1,c0,c1,des,vel,par)
  61. local w = Instance.new("Motor6D",p0 or par)
  62. w.Part0 = p0
  63. w.Part1 = p1
  64. w.C0 = c0 or CFrame.new()
  65. w.C1 = c1 or CFrame.new()
  66. w.MaxVelocity = tonumber(vel) or .05
  67. w.DesiredAngle = tonumber(des) or 0
  68. return w
  69. end
  70.  
  71. function lerp(a,b,c)
  72. return a+(b-a)*c
  73. end
  74.  
  75. function clerp(c1,c2,al)
  76. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  77. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  78. for i,v in pairs(com1) do
  79. com1[i] = lerp(v,com2[i],al)
  80. end
  81. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  82. end
  83.  
  84. function ccomplerp(c1,c2,al)
  85. local com1 = {c1:components()}
  86. local com2 = {c2:components()}
  87. for i,v in pairs(com1) do
  88. com1[i] = lerp(v,com2[i],al)
  89. end
  90. return CFrame.new(unpack(com1))
  91. end
  92.  
  93. function tickwave(time,length,offset)
  94. return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length
  95. end
  96.  
  97. function invcol(c)
  98. c = c.Color
  99. return BrickColor.new(Color3.new(1-c.b,1-c.g,1-c.r))
  100. end
  101. local oc = oc or function(...) return ... end
  102. local plr = game.Players.LocalPlayer
  103. local char = plr.Character
  104. local tor = char.Torso
  105. local hum = char.Humanoid
  106. hum.PlatformStand = false
  107. pcall(function()
  108. char.Wings:Destroy()
  109. end)
  110. pcall(function()
  111. char.Angel:Destroy() -- hat
  112. end)
  113. local mod = Instance.new("Model",char)
  114. mod.Name = "Wings"
  115. local special = {
  116. [game.Players.LocalPlayer.Name] = {"Black","Bright red",.5,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  117. }
  118. local topcolor = BrickColor.new("Really black")
  119. local feacolor = BrickColor.new("Black")
  120. local ptrans = 0
  121. local pref = 0
  122. local fire = true
  123. local fmcol = Color3.new()
  124. local fscol = Color3.new()
  125. local spec = special[plr.Name:lower()]
  126. if spec then
  127. topcolor,feacolor,ptrans,pref,fire,fmcol,fscol = spec[1] and BrickColor.new(spec[1]) or topcolor,spec[2] and BrickColor.new(spec[2]) or feacolor,spec[3],spec[4],spec[5],spec[6],spec[7]
  128. end
  129. local part = Instance.new("Part")
  130. part.FormFactor = "Custom"
  131. part.Size = Vector3.new(.2,.2,.2)
  132. part.TopSurface,part.BottomSurface = 0,0
  133. part.CanCollide = false
  134. part.BrickColor = BrickColor.new("Black")
  135. part.Transparency = ptrans
  136. part.Reflectance = pref
  137. local ef = Instance.new("Fire",fire and part or nil)
  138. ef.Size = .15
  139. ef.Color = BrickColor.new("Black").Color
  140. ef.SecondaryColor = BrickColor.new("Bright red").Color
  141. part:BreakJoints()
  142. function newpart()
  143. local clone = part:Clone()
  144. clone.Parent = mod
  145. clone:BreakJoints()
  146. return clone
  147. end
  148. local feath = newpart()
  149. feath.BrickColor = feacolor
  150. feath.Transparency = 0
  151. Instance.new("SpecialMesh",feath).MeshType = "Sphere"
  152. function newfeather()
  153. local clone = feath:Clone()
  154. clone.Parent = mod
  155. clone:BreakJoints()
  156. return clone
  157. end
  158.  
  159. ---------- RIGHT WING
  160. local r1 = newpart()
  161. r1.Size = Vector3.new(.3,1.5,.3)*1.2
  162. local rm1 = motor(tor,r1,CFrame.new(.35,.6,.4) * CFrame.Angles(0,0,math.rad(-60)) * CFrame.Angles(math.rad(30),math.rad(-25),0),CFrame.new(0,-.8,0),.1)
  163. local r2 = newpart()
  164. r2.Size = Vector3.new(.4,1.8,.4)*1.2
  165. local rm2 = motor(r1,r2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(-30),math.rad(15),0),CFrame.new(0,-.9,0),.1)
  166. local r3 = newpart()r3.Size = Vector3.new(.3,2.2,.3)*1.2
  167. local rm3 = motor(r2,r3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-1.1,0),.1)local r4 = newpart()
  168. r4.Size = Vector3.new(.25,1.2,.25)*1.2
  169. local rm4 = motor(r3,r4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-.6,0),.1)
  170. local feather = newfeather()feather.Mesh.Scale = Vector3.new(1,1,1)
  171. feather.Size = Vector3.new(.4,3,.3)
  172. weld(r4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0))
  173. feather = newfeather()
  174. feather.Mesh.Scale = Vector3.new(1,1,1)
  175. feather.Size = Vector3.new(.4,2.3,.3)
  176. weld(r4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0))
  177. feather = newfeather()
  178. feather.Mesh.Scale = Vector3.new(1,1,1)
  179. feather.Size = Vector3.new(.35,2.2,.25)
  180. weld(r4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0))
  181. local rf3 = {}
  182. for i=0,7 do
  183. feather = newfeather()
  184. feather.Mesh.Scale = Vector3.new(1,1,1)
  185. feather.Size = Vector3.new(.45,2.2,.35)
  186. table.insert(rf3,motor(r3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0)))
  187. end
  188. local rf2 = {}
  189. for i=0,6 do
  190. feather = newfeather()
  191. feather.Mesh.Scale = Vector3.new(1,1,1)
  192. feather.Size = Vector3.new(.45,2.2-i*.08,.3)
  193. table.insert(rf2,motor(r2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0)))
  194. end
  195. local rf1 = {}
  196. for i=0,6 do
  197. feather = newfeather()
  198. feather.Mesh.Scale = Vector3.new(1,1,1)
  199. feather.Size = Vector3.new(.37,1.65-i*.06,.25)
  200. table.insert(rf1,motor(r1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0)))
  201. end
  202. ---------- LEFT WING
  203. local l1 = newpart()
  204. l1.Size = Vector3.new(.3,1.5,.3)*1.2
  205. local lm1 = motor(tor,l1,CFrame.new(-.35,.6,.4) * CFrame.Angles(0,0,math.rad(60)) * CFrame.Angles(math.rad(30),math.rad(25),0) * CFrame.Angles(0,-math.pi,0),CFrame.new(0,-.8,0) ,.1)
  206. local l2 = newpart()
  207. l2.Size = Vector3.new(.4,1.8,.4)*1.2
  208. local lm2 = motor(l1,l2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(30),math.rad(-15),0),CFrame.new(0,-.9,0),.1)
  209. local l3 = newpart()
  210. l3.Size = Vector3.new(.3,2.2,.3)*1.2
  211. local lm3 = motor(l2,l3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-1.1,0),.1)
  212. local l4 = newpart()
  213. l4.Size = Vector3.new(.25,1.2,.25)*1.2
  214. local lm4 = motor(l3,l4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-.6,0),.1)
  215. local feather = newfeather()
  216. feather.Mesh.Scale = Vector3.new(1,1,1)
  217. feather.Size = Vector3.new(.4,3,.3)
  218. weld(l4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0))
  219. feather = newfeather()
  220. feather.Mesh.Scale = Vector3.new(1,1,1)
  221. feather.Size = Vector3.new(.4,2.3,.3)
  222. weld(l4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0))
  223. feather = newfeather()
  224. feather.Mesh.Scale = Vector3.new(1,1,1)
  225. feather.Size = Vector3.new(.35,2.2,.25)
  226. weld(l4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0))
  227. local lf3 = {}
  228. for i=0,7 do
  229. feather = newfeather()
  230. feather.Mesh.Scale = Vector3.new(1,1,1)
  231. feather.Size = Vector3.new(.45,2.2,.35)
  232. table.insert(lf3,motor(l3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0)))
  233. end
  234. local lf2 = {}
  235. for i=0,6 do
  236. feather = newfeather()
  237. feather.Mesh.Scale = Vector3.new(1,1,1)
  238. feather.Size = Vector3.new(.45,2.2-i*.08,.3)
  239. table.insert(lf2,motor(l2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0)))
  240. end
  241. local lf1 = {}
  242. for i=0,6 do
  243. feather = newfeather()
  244. feather.Mesh.Scale = Vector3.new(1,1,1)
  245. feather.Size = Vector3.new(.37,1.65-i*.06,.25)
  246. table.insert(lf1,motor(l1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0)))
  247. end
  248. local rwing = {rm1,rm2,rm3,rm4}
  249. local lwing = {lm1,lm2,lm3,lm4}
  250. local oc0 = {}
  251. for i,v in pairs(rwing) do
  252. oc0[v] = v.C0
  253. end
  254.  
  255. for i,v in pairs(lwing) do
  256. oc0[v] = v.C0
  257. end
  258.  
  259. function gotResized()
  260. if lastsize then
  261. if tor.Size == lastsize then return end -- This shouldn't happen?
  262. local scaleVec = tor.Size/lastsize
  263. for i,v in pairs(oc0) do
  264. oc0[i] = v-v.p+scaleVec*v.p
  265. end
  266. lastsize = tor.Size
  267. end
  268. lastsize = tor.Size
  269. end
  270. tor.Changed:connect(function(p)
  271. if p == "Size" then
  272. gotResized()
  273. end
  274. end)
  275. gotResized()
  276. local idle = {0,0.5,-.2,0; .05,.05,.1,.05; -.6,-1.5,.1,0;}--0,.3,0,0
  277. local outlow = {-.7,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
  278. local outhigh = {.5,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
  279. local veryhigh = {.9,-.3,1.9,0; .3,.05,.1,.05; .2,0,0,0}
  280. local flap1 = {-.3,.3,1.1,-.2; .3,.05,.1,.05; .2,-.6,0,0}
  281. local divebomb = {0,.2,.4,-.7; .3,.05,.1,.05; 0,-.5,-.6,0}
  282.  
  283. function setwings(tab,time)
  284. time = time or 10
  285. for i=1,4 do
  286. rwing[i].DesiredAngle = tab[i]
  287. lwing[i].DesiredAngle = tab[i]
  288. rwing[i].MaxVelocity = math.abs(tab[i]-rwing[i].CurrentAngle)/time
  289. lwing[i].MaxVelocity = math.abs(tab[i]-lwing[i].CurrentAngle)/time
  290. local rcf = oc0[rwing[i]] * (tab[12+i] or CFrame.new())
  291. local lcf = oc0[lwing[i]] * (tab[12+i] or CFrame.new())
  292. end
  293. for i,v in pairs(rf1) do
  294. v.DesiredAngle = tab[9]
  295. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  296. end
  297. for i,v in pairs(lf1) do
  298. v.DesiredAngle = tab[9]
  299. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  300. end
  301. for i,v in pairs(rf2) do
  302. v.DesiredAngle = tab[10]
  303. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  304. end
  305. for i,v in pairs(lf2) do
  306. v.DesiredAngle = tab[10]
  307. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  308. end
  309. for i,v in pairs(rf3) do
  310. v.DesiredAngle = tab[11]
  311. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  312. end
  313. for i,v in pairs(lf3) do
  314. v.DesiredAngle = tab[11]
  315. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  316. end
  317. end
  318. setwings(outhigh,1)
  319. flying = false
  320. moving = false
  321. for i,v in pairs(tor:GetChildren()) do
  322. if v.ClassName:lower():match("body") then
  323. v:Destroy()
  324. end
  325. end
  326. local ctor = tor:Clone()
  327. ctor:ClearAllChildren()
  328. ctor.Name = "cTorso"
  329. ctor.Transparency = 1
  330. ctor.CanCollide = false
  331. ctor.FormFactor = "Custom"
  332. ctor.Size = Vector3.new(.2,.2,.2)
  333. ctor.Parent = mod
  334. weld(tor,ctor)
  335. local bg = Instance.new("BodyGyro",ctor)
  336. bg.maxTorque = Vector3.new()
  337. bg.P = 15000
  338. bg.D = 1000
  339. local bv = Instance.new("BodyVelocity",ctor)
  340. bv.maxForce = Vector3.new()
  341. bv.P = 15000
  342. vel = Vector3.new()
  343. cf = CFrame.new()
  344. flspd = 0
  345. keysdown = {}
  346. keypressed = {}
  347. ktime = {}
  348. descendtimer = 0
  349. jumptime = tick()
  350. hum.Jumping:connect(function()
  351. jumptime = tick()
  352. end)
  353. cam = workspace.CurrentCamera
  354. kd = plr:GetMouse().KeyDown:connect(oc(function(key)
  355. keysdown[key] = true
  356. keypressed[key] = true
  357. if key == "q" then
  358. descendtimer = tick()
  359. elseif key == " " and not hum.Jump then
  360. jumptime = tick()
  361. elseif (key == "a" or key == "d") and ktime[key] and tick()-ktime[key] < .3 and math.abs(reqrotx) < .3 then
  362. reqrotx = key == "a" and math.pi*2 or -math.pi*2
  363. end
  364. ktime[key] = tick()
  365. end))
  366.  
  367. ku = plr:GetMouse().KeyUp:connect(function(key)
  368. keysdown[key] = false
  369. if key == " " then
  370. descendtimer = tick()
  371. end
  372. end)
  373. function mid(a,b,c)
  374. return math.max(a,math.min(b,c or -a))
  375. end
  376. function bn(a)
  377. return a and 1 or 0
  378. end
  379. function gm(tar)
  380. local m = 0
  381. for i,v in pairs(tar:GetChildren()) do
  382. if v:IsA("BasePart") then
  383. m = m + v:GetMass()
  384. end
  385. m = m + gm(v)
  386. end
  387. return m
  388. end
  389. reqrotx = 0
  390. local grav = 196.2
  391. local con
  392. con = game:GetService("RunService").Stepped:connect(oc(function()
  393. --[[if not mod:IsDescendantOf(workspace) then
  394. pcall(function() kd:disconnect() end)
  395. pcall(function() ku:disconnect() end)
  396. bg:Destroy()
  397. bv:Destroy()
  398. con:disconnect()
  399. script:Destroy()
  400. return
  401. end]]
  402. local obvel = tor.CFrame:vectorToObjectSpace(tor.Velocity)
  403. local sspd, uspd,fspd = obvel.X,obvel.Y,obvel.Z
  404. if flying then
  405. local lfldir = fldir
  406. fldir = cam.CoordinateFrame:vectorToWorldSpace(Vector3.new(bn(keysdown.d)-bn(keysdown.a),0,bn(keysdown.s)-bn(keysdown.w))).unit
  407. local lmoving = moving
  408. moving = fldir.magnitude > .1
  409. if lmoving and not moving then
  410. idledir = lfldir*Vector3.new(1,0,1)
  411. descendtimer = tick()
  412. end
  413. local dbomb = fldir.Y < -.6 or (moving and keysdown["1"])
  414. if moving and keysdown["0"] and lmoving then
  415. fldir = (Vector3.new(lfldir.X,math.min(fldir.Y,lfldir.Y+.01)-.1,lfldir.Z)+(fldir*Vector3.new(1,0,1))*.05).unit
  416. end
  417. local down = tor.CFrame:vectorToWorldSpace(Vector3.new(0,-1,0))
  418. local descending = (not moving and keysdown["q"] and not keysdown[" "])
  419. cf = ccomplerp(cf,CFrame.new(tor.Position,tor.Position+(not moving and idledir or fldir)),keysdown["0"] and .02 or .07)
  420. local gdown = not dbomb and cf.lookVector.Y < -.2 and tor.Velocity.unit.Y < .05
  421. hum.PlatformStand = true
  422. bg.maxTorque = Vector3.new(1,1,1)*9e5
  423. local rotvel = CFrame.new(Vector3.new(),tor.Velocity):toObjectSpace(CFrame.new(Vector3.new(),fldir)).lookVector
  424. bg.cframe = cf * CFrame.Angles(not moving and -.1 or -math.pi/2+.2,moving and mid(-2.5,rotvel.X/1.5) + reqrotx or 0,0)
  425. reqrotx = reqrotx - reqrotx/10
  426. bv.maxForce = Vector3.new(1,1,1)*9e4*.5
  427. local anioff =(bn(keysdown[" "])-bn(keysdown["q"]))/2
  428. local ani = tickwave(1.5-anioff,1)
  429. bv.velocity = bv.velocity:Lerp(Vector3.new(0,bn(not moving)*-ani*15+(descending and math.min(20,tick()-descendtimer)*-8 or bn(keysdown[" "])-bn(keysdown["q"]))*15,0)+vel,.6)
  430. vel = moving and cf.lookVector*flspd or Vector3.new()
  431. flspd = math.min(120,lerp(flspd,moving and (fldir.Y<0 and flspd+(-fldir.Y)*grav/60 or math.max(50,flspd-fldir.Y*grav/300)) or 60,.4))
  432. setwings(moving and (gdown and outlow or dbomb and divebomb) or (descending and veryhigh or flap1),15)
  433. for i=1,4 do
  434. --CFrame.Angles(-.5+bn(i==3)*2.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1)
  435. rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-.5+bn(i==3)*.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1) or descending and CFrame.Angles(.3,0,0) or CFrame.Angles((i*.1+1.5)*ani,ani*-.5,1*ani)),descending and .8 or .2)
  436. lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-(-.5+bn(i==3)*.4+bn(i==4)*.5),-(.1+bn(i==2)*.5-bn(i==3)*1.1),bn(i==3)*.1) or descending and CFrame.Angles(-.3,0,0) or CFrame.Angles(-(i*.1+1.5)*ani,ani*.5,1*ani)),descending and .8 or .2)
  437. end
  438. local hit,ray = workspace:FindPartOnRayWithIgnoreList(Ray.new(tor.Position,Vector3.new(0,-3.5+math.min(0,bv.velocity.y)/30,0)),{char})
  439. if hit and down.Y < -.85 and tick()-flystart > 1 then
  440. flying = false
  441. hum.PlatformStand = false
  442. tor.Velocity = Vector3.new()
  443. end
  444. else
  445. bg.maxTorque = Vector3.new()
  446. bv.maxForce = Vector3.new()
  447. local ani = tickwave(walking and .8 or 4.5,1)
  448. setwings(idle,10)
  449. local x,y,z = fspd/160,uspd/700,sspd/900
  450. for i=1,4 do
  451. rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * CFrame.Angles(ani*.1 + -mid(-.1,x),0 + -mid(-.1,y) + bn(i==2)*.6,ani*.02 + -mid(-.1,z)),.2)
  452. lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * CFrame.Angles(ani*-.05 + mid(-.1,x),0 + mid(-.1,y) + -bn(i==2)*.6,ani*.02 + mid(-.1,z)),.2)
  453. end
  454. if keypressed[" "] and not flying and (tick()-jumptime > .05 and (tick()-jumptime < 3 or hum.Jump)) then
  455. vel = Vector3.new(0,50,0)
  456. bv.velocity = vel
  457. idledir = cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)
  458. cf = tor.CFrame * CFrame.Angles(-.01,0,0)
  459. tor.CFrame = cf
  460. bg.cframe = cf
  461. flystart = tick()
  462. flying = true
  463. end
  464. end
  465. keypressed = {}
  466. end))
  467.  
  468. end fly()
  469. end)
  470.  
  471.  
  472. TextButton_2.Parent = Frame
  473. TextButton_2.BackgroundColor3 = Color3.new(1, 1, 0)
  474. TextButton_2.Position = UDim2.new(0, 3, 0, 109)
  475. TextButton_2.Size = UDim2.new(0, 200, 0, 50)
  476. TextButton_2.Font = Enum.Font.Garamond
  477. TextButton_2.FontSize = Enum.FontSize.Size32
  478. TextButton_2.Text = "DarkBlade"
  479. TextButton_2.TextSize = 30
  480. TextButton_2.TextWrapped = true
  481.  
  482. TextButton_2.MouseButton1Down:connect(function()
  483. script.Parent = nil
  484. ply = game:GetService("Players").LocalPlayer
  485. local char = ply.Character
  486. local torso = char.Torso
  487. local ls = torso["Left Shoulder"]
  488. local rs = torso["Right Shoulder"]
  489. local neck = torso.Neck
  490. local larm = char["Left Arm"]
  491. local rarm = char["Right Arm"]
  492. suita = false
  493. rw = Instance.new("Weld")
  494. script.Parent = nil
  495. attacking = false
  496. holding = false
  497. ndam = 1
  498. dam = ndam
  499. damage = 1
  500. nmind,nmaxd = 20,40
  501. mind,maxd = nmind,nmaxd
  502. wt = 0.3
  503. function sd(a,b)
  504. mind,maxd = a,b
  505. if a == nil and b == nil then
  506. mind,maxd = nmind,nmaxd
  507. end
  508. end
  509. bm = Instance.new("FileMesh")
  510. bm.MeshId = "http://www.roblox.com/asset/?id=20329976"
  511. rm = Instance.new("FileMesh")
  512. rm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  513. g = Instance.new("BodyGyro",nil)
  514. g.maxTorque = Vector3.new(4e+005,4e+005,4e+005)
  515. g.P = 20e+003
  516. g.cframe = char.Head.CFrame
  517. local function damage(hit)
  518. if attacking == true then
  519. if hit.Parent ~= char then
  520. for i,v in pairs(hit.Parent:GetChildren()) do
  521. if v:IsA("Humanoid") then
  522. if v:FindFirstChild("Value") == nil then
  523. damage = math.random(mind,maxd)
  524. v.Health = v.Health-damage
  525. showdam(v.Torso,damage)
  526. game:GetService("Debris"):AddItem(Instance.new("BoolValue",v),wt)
  527. end
  528. end
  529. end
  530. end
  531. end
  532. end
  533. local function damage2(hit,a,b,c)
  534. if hit.Parent ~= char then
  535. for i,v in pairs(hit.Parent:GetChildren()) do
  536. if v:IsA("Humanoid") then
  537. if v:FindFirstChild("Value") == nil then
  538. damage = math.random(a,b)
  539. v.Health = v.Health-damage
  540. showdam(v.Torso,damage)
  541. game:GetService("Debris"):AddItem(Instance.new("BoolValue",v),c)
  542. end
  543. end
  544. end
  545. end
  546. end
  547. function showdam(tar,a)
  548. bbg = Instance.new("BillboardGui",tar)
  549. bbg.Adornee = tar
  550. bbg.StudsOffset = Vector3.new(0,4.5,0)
  551. bbg.Size = UDim2.new(0,100,0,50)
  552. il = Instance.new("ImageLabel",bbg)
  553. il.Size = UDim2.new(1,0,1,0)
  554. il.Image = "http://www.roblox.com/asset/?id=31884718"
  555. il.BackgroundTransparency = 1
  556. box = Instance.new("TextLabel",bbg)
  557. box.BackgroundTransparency = 1
  558. box.Size = UDim2.new(1,0,1,0)
  559. box.FontSize = 9
  560. box.Text = tostring(a)
  561. box.TextColor3 = Color3.new(1,0,0)
  562. box.ZIndex = 5
  563. game:GetService("Debris"):AddItem(bbg,wt)
  564. end
  565. function ss(pitch,sound)
  566. local SlashSound = Instance.new("Sound")
  567. if sound == nil then
  568. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  569. SlashSound:Play()
  570. else SlashSound.SoundId = sound
  571. end
  572. SlashSound.Parent = m
  573. SlashSound.Volume = .7
  574. SlashSound.Pitch = pitch
  575. SlashSound.PlayOnRemove = true
  576. coroutine.resume(coroutine.create(function()
  577. wait(0)
  578. SlashSound.Parent = nil
  579. end))
  580. end
  581. function lock(a)
  582. if a == 1 then
  583. rw.Parent = torso
  584. rw.Part0 = rs.Part0
  585. rw.Part1 = rs.Part1
  586. rw.C0 = rs.C0
  587. rw.C1 = rs.C1
  588. rs.Parent = nil
  589. elseif a == 0 then
  590. rs.Parent = torso
  591. rw.Parent = nil
  592. end
  593. end
  594. script.Parent = nil
  595. m = Instance.new("Model",char)
  596. hdl = Instance.new("Part",m)
  597. hdl.TopSurface,hdl.BottomSurface = 0,0
  598. hdl.formFactor = "Custom"
  599. hdl.Size = Vector3.new(0.3,2,0.1)
  600. hdl.Color = Color3.new(0,0,1)
  601. p1 = hdl:Clone()
  602. p1.Parent = m
  603. p1.Size = Vector3.new(2,6,0.1)
  604. p1.Color = Color3.new(0,0,0)
  605. p1.Name = "p1"
  606. p2 = Instance.new("WedgePart",m)
  607. p2.TopSurface,hdl.BottomSurface = 0,0
  608. p2.formFactor = "Custom"
  609. p2.Size = Vector3.new(0.1,2,2)
  610. p2.Color = p1.Color
  611. p2.Name = "p2"
  612. w = Instance.new("Weld",m)
  613. w.Part0,w.Part1 = p1,hdl
  614. w.C1 = CFrame.new(0,hdl.Size.y/2+p1.Size.y/2-0.05,0)
  615. w = Instance.new("Weld",m)
  616. w.Part0,w.Part1 = p2,p1
  617. w.C1 = CFrame.new(0,p1.Size.y/2+p2.Size.y/2-0.05,0) * CFrame.Angles(0,math.pi/2,0)
  618. f = Instance.new("Fire",p1)
  619. f.Size = 10
  620. f.Color = Color3.new(0,0,1)
  621. f.SecondaryColor = Color3.new(0.5,0.5,0.5)
  622. p1.Touched:connect(damage) p2.Touched:connect(damage)
  623. Instance.new("CylinderMesh",hdl)
  624. hpos = CFrame.new(0,-larm.Size.y/2,0) * CFrame.Angles(-math.pi/2,-math.pi/2,0)
  625. tpos = CFrame.new(0,0,torso.Size.z/2) * CFrame.Angles(0,0,math.pi/4)
  626. spos = CFrame.new(0,-larm.Size.y/2-hdl.Size.y/2+0.5,0) * CFrame.Angles(0,0,-math.pi)
  627. hw = Instance.new("Weld",hdl)
  628. hw.Part0 = hdl
  629. hw.Part1 = torso
  630. hw.C1 = tpos
  631. function ang(x,y,z)
  632. return CFrame.Angles(math.rad(x)*s,math.rad(y)*s,math.rad(z)*s)
  633. end
  634. s = 20
  635. function wield(a)
  636. if a == 1 then
  637. for i = 1,170,s do
  638. wait()
  639. rw.C0 = rw.C0 * ang(0,0,1)
  640. end
  641. hw.Part1,hw.C1 = rarm,hpos
  642. for i = 1,170/2,s do
  643. wait()
  644. rw.C0 = rw.C0 * ang(0,0,-1)
  645. end
  646. elseif a == 0 then
  647. for i = 1,170/2,s do
  648. wait()
  649. rw.C0 = rw.C0 * ang(0,0,1)
  650. end
  651. hw.Part1,hw.C1 = torso,tpos
  652. for i = 1,170,s do
  653. wait()
  654. rw.C0 = rw.C0 * ang(0,0,-1)
  655. end
  656. end
  657. end
  658. h = Instance.new("HopperBin",ply.Backpack)
  659. h.Name = "Sode No konayuki"
  660. tim = 0
  661. function gui(a)
  662. if a == 1 then
  663. g = Instance.new("ScreenGui",ply.PlayerGui)
  664. g.Name = "Charging"
  665. gu = ply.PlayerGui:FindFirstChild("Charging")
  666. lab = Instance.new("TextLabel",g)
  667. lab.Size = UDim2.new(0.05,0,0.05)
  668. lab.Position = UDim2.new(0,0,0.5,0)
  669. lab.BackgroundTransparency = 0.3
  670. lab.BackgroundColor = BrickColor.new("Royal purple")
  671. lab.Name = "label"
  672. elseif a == 2 then
  673. tim = tim+0.1
  674. gu:FindFirstChild("label").Text = tim
  675. elseif a == 3 then
  676. gu:Remove()
  677. end
  678. end
  679. function att()
  680. attacking = true
  681. r = 3
  682. for i = 1,60,s do
  683. wait()
  684. rw.C0 = rw.C0 * ang(0,0,-1)
  685. end
  686. gui(1)
  687. holding = true
  688. while holding == true do wait(0.2) gui(2) end
  689. gui(3)
  690. for i = 1,360,20 do
  691. local c = Instance.new("Part",m)
  692. c.TopSurface = 0
  693. c.BottomSurface = 0
  694. c.FormFactor = "Custom"
  695. c.Size = Vector3.new(0.5,0.5,0.5)
  696. c.Transparency = 0.5
  697. c.BrickColor = BrickColor.new("Bright red")
  698. Instance.new("Sparkles",c)
  699. cc = (p2.CFrame * CFrame.new(0,p2.Size.y/2,0)).p
  700. c.CFrame = CFrame.new(cc) + Vector3.new(math.cos(math.rad(i))*r,0,math.sin(math.rad(i))*r)
  701. c.CFrame = CFrame.new(c.Position,cc)
  702. Instance.new("SpecialMesh",c).MeshType = 3
  703. b = Instance.new("BodyVelocity",c)
  704. b.maxForce = Vector3.new() * math.huge
  705. b.velocity = c.CFrame.lookVector * -100
  706. delay(tim,function()
  707. e = Instance.new("Explosion",Workspace)
  708. e.BlastPressure = 0
  709. e.Position = c.Position
  710. e.Hit:connect(function(hit) damage2(hit,30,40,0.035) end)
  711. c:Remove()
  712. end)
  713. end
  714. for i = 1,60,s do
  715. wait()
  716. rw.C0 = rw.C0 * ang(0,0,1)
  717. end
  718. attacking = false
  719. tim = 0
  720. end
  721. function att2(tar,pos)
  722. o = 3
  723. base = Instance.new("CFrameValue",nil)
  724. base.Value = torso.CFrame
  725. if tar ~= nil then
  726. local mag = (base.Value.p-pos).magnitude
  727. local unit = (base.Value.p-pos).unit
  728. for i = 1,mag*2,o do
  729. wait()
  730. local c = Instance.new("Part",m)
  731. c.TopSurface = 0
  732. c.BottomSurface = 0
  733. c.formFactor = "Custom"
  734. c.Anchored = true
  735. c.Size = Vector3.new(0.5,0.5,0.5)
  736. c.Transparency = 0.5
  737. c.BrickColor = BrickColor.new("Navy blue")
  738. c.Touched:connect(function(hit) damage2(hit,10,20,0.2) end)
  739. c.CFrame = base.Value - unit*i*c.Size.z
  740. Instance.new("Fire",c).Color = Color3.new(1,0,0)
  741. game:GetService("Debris"):AddItem(c,0.5)
  742. end
  743. end
  744. end
  745. function demon()
  746. holding = true
  747. m2 = Instance.new("Model",char)
  748. mp = Instance.new("Part")
  749. mp.TopSurface = 0
  750. mp.BottomSurface = 0
  751. mp.formFactor = "Custom"
  752. mp.Transparency = 1
  753. mp.CanCollide = false
  754. --CLAWS--
  755. cl1 = mp:Clone()
  756. cl1.Parent = m2
  757. cl1.Size = Vector3.new(larm.Size.x,larm.Size.z,2.5)
  758. cl1.Color = Color3.new(1,0,0)
  759. mesh = Instance.new("FileMesh",cl1)
  760. mesh.MeshId = "http://www.roblox.com/asset/?id=10681506"
  761. cl2 = cl1:Clone()
  762. cl2.Parent = m2
  763. w = Instance.new("Weld",m2)
  764. w.Part0,w.Part1 = cl1,rarm
  765. w.C1 = CFrame.new(0,-rarm.Size.y/2-cl1.Size.y/2,0) * CFrame.Angles(math.pi/2,0,0)
  766. w = Instance.new("Weld",m2)
  767. w.Part0,w.Part1 = cl2,larm
  768. w.C1 = CFrame.new(0,-rarm.Size.y/2-cl1.Size.y/2,0) * CFrame.Angles(math.pi/2,0,math.pi)
  769. -------------
  770. ----WINGS-----
  771. wing = mp:Clone()
  772. wing.Parent = m2
  773. wing.Size = Vector3.new(3,1,0.3)
  774. wing.Color = Color3.new(0,0,0)
  775. mesh = Instance.new("FileMesh",wing)
  776. mesh.MeshId = "http://www.roblox.com/asset/?id=19367744"
  777. w = Instance.new("Weld",m2)
  778. w.Part0,w.Part1 = wing,torso
  779. w.C1 = CFrame.new(0,torso.Size.y/4,torso.Size.z*1.2)
  780. --------------------
  781. for i = 1,0,-0.05 do
  782. wait()
  783. for _,v in pairs(m2:GetChildren()) do
  784. if v:IsA("BasePart") then
  785. v.Transparency = i
  786. end
  787. end
  788. end
  789. local speed = Instance.new("NumberValue",nil)
  790. speed.Value = char.Humanoid.WalkSpeed
  791. char.Humanoid.WalkSpeed = 100
  792. while holding == true do
  793. for i = 0,0.5,0.05 do
  794. wait()
  795. for _,v in pairs(m2:GetChildren()) do
  796. if v:IsA("BasePart") then
  797. v.Transparency = i
  798. end
  799. end
  800. end
  801. for _,v in pairs(char:GetChildren()) do
  802. if v:IsA("Humanoid") then v.Health = v.Health + 5
  803. end
  804. end
  805. for i = 0.5,0,-0.05 do
  806. wait()
  807. for _,v in pairs(m2:GetChildren()) do
  808. if v:IsA("BasePart") then
  809. v.Transparency = i
  810. end
  811. end
  812. end
  813. end
  814. char.Humanoid.WalkSpeed = speed.Value
  815. for i = 0,1,0.05 do
  816. wait()
  817. for _,v in pairs(m2:GetChildren()) do
  818. if v:IsA("BasePart") then
  819. v.Transparency = i
  820. end
  821. end
  822. end
  823. m2:Remove()
  824. end
  825. function effect1(mode,pos,size,speed)
  826. local co = Instance.new("Part",m)
  827. co.TopSurface = 0
  828. co.BottomSurface = 0
  829. co.CFrame = pos
  830. co.formFactor = "Custom"
  831. co.Size = Vector3.new(0.1,0.1,0.1)
  832. co.CanCollide = false
  833. co.Color = Color3.new(0,0,1)
  834. local CL = CFrame.new(co.Position)
  835. w = Instance.new("Weld",mode)
  836. w.Part0 = co
  837. w.Part1 = mode
  838. w.C0 = co.CFrame:inverse() * CL
  839. w.C1 = co.CFrame:inverse() * CL
  840. local mesh = Instance.new("SpecialMesh",co)
  841. mesh.MeshType = 3
  842. for i = 1,size,speed do
  843. wait()
  844. mesh.Scale = Vector3.new(i,i,i)
  845. co.Transparency = i/size
  846. end
  847. co:Remove()
  848. end
  849. function att3()
  850. attacking = true
  851. sd(30,50)
  852. for i = 1,40,s do
  853. wait()
  854. rw.C0 = rw.C0 * ang(0,1,0)
  855. end
  856. for i = 1,90,s do
  857. wait()
  858. rw.C0 = rw.C0 * ang(0,0,-1)
  859. end
  860. tip = p2.CFrame * CFrame.new(0,p2.Size.y/2,0)
  861. effect1(hdl,tip,40,1)
  862. char.archivable = true
  863. holding = true
  864. for i = 1,8 do
  865. wait()
  866. torso.CFrame = torso.CFrame + torso.CFrame.lookVector * 5
  867. local cl = char:Clone()
  868. cl.Parent = Workspace
  869. cl.Torso.CFrame = torso.CFrame - torso.CFrame.lookVector * 3
  870. e = Instance.new("Explosion",cl.Torso)
  871. e.BlastPressure = 0
  872. e.Position = cl.Torso.Position
  873. e.Hit:connect(function(hit) damage2(hit,mind,maxd,0.1) end)
  874. for _,v in pairs(cl.Model:GetChildren()) do
  875. if v:IsA("BasePart") then v.Touched:connect(damage)
  876. end
  877. end
  878. for i,v in pairs(cl:GetChildren()) do
  879. if v.className == "Part" then
  880. v.Transparency = 0.5
  881. v.Anchored = true
  882. v.Touched:connect(damage)
  883. v.Color = Color3.new(1,1,1)
  884. elseif v.className ~= "Part" and v.className ~= "Model" then v:Remove()
  885. elseif v.Name == "Torso" then v["RightShoulder"],v["LeftShoulder"].Name = "lol"
  886. elseif v.Name == "Head" then for _,o in pairs(v:GetChildren()) do if v.className == "Sound" then v:Remove() end end
  887. end
  888. end
  889. delay(0.7,function()
  890. for i = 0.5,1,0.05 do
  891. wait()
  892. for _,v in pairs(cl:GetChildren()) do
  893. if v:IsA("BasePart") then
  894. v.Transparency = i
  895. end
  896. end
  897. end
  898. cl:Remove()
  899. end)
  900. end
  901. char.archivable = false
  902. for i = 1,130,s do
  903. wait()
  904. rw.C0 = rw.C0 * ang(0,0,1)
  905. end
  906. for i = 1,130-90,s do
  907. wait()
  908. rw.C0 = rw.C0 * ang(0,0,-1)
  909. end
  910. for i = 1,40,s do
  911. wait()
  912. rw.C0 = rw.C0 * ang(0,-1,0)
  913. end
  914. sd()
  915. attacking = false
  916. end
  917. function suicide()
  918. s = 10
  919. for i = 1,60,s do
  920. wait()
  921. rw.C0 = rw.C0 * ang(-1,0,0)
  922. end
  923. hw:Remove()
  924. delay(0.3,function()
  925. for i = 0,1,0.1 do
  926. wait()
  927. for _,v in pairs(m:GetChildren()) do
  928. if v:IsA("BasePart") then
  929. v.Transparency = i
  930. end
  931. end
  932. end
  933. m:Remove()
  934. end)
  935. wait(0.5)
  936. for i = 1,60,s do
  937. wait()
  938. rw.C0 = rw.C0 * ang(1,0,0)
  939. end
  940. for i = 1,80,s do
  941. wait()
  942. rw.C0 = rw.C0 * ang(0,0,-1)
  943. end
  944. for i = 1,80,s do
  945. wait()
  946. rw.C0 = rw.C0 * ang(-1,0,0)
  947. end
  948. e = Instance.new("Explosion",Workspace)
  949. e.BlastRadius = 100
  950. e.Position = (rarm.CFrame * CFrame.new(0,-rarm.Size.y/2,0)).p
  951. end
  952. function slash()
  953. attacking = true
  954. for i = 1,90,s do
  955. wait()
  956. rw.C0 = rw.C0 * ang(0,0,1)
  957. end
  958. for i = 1,180,s do
  959. wait()
  960. rw.C0 = rw.C0 * ang(0,0,-1)
  961. end
  962. for i = 1,80,s do
  963. wait()
  964. rw.C0 = rw.C0 * ang(0,0,1)
  965. end
  966. attacking = false
  967. end
  968. function kd(key,mouse)
  969. if key == "x" then m:Remove() h:Remove() lock(0)
  970. end
  971. if attacking == false then
  972. if key == "f" then att()
  973. elseif key == "r" then att2(mouse.Target,mouse.hit.p)
  974. elseif key == "e" then demon()
  975. elseif key == "c" then att3()
  976. elseif key == "q" then suicide()
  977. end
  978. end
  979. end
  980. keylist = {"f","e"}
  981. function select(mouse)
  982. lock(1)
  983. wield(1)
  984. mouse.KeyUp:connect(function(key) for i,v in pairs(keylist) do if key == v then holding = false end end end)
  985. mouse.KeyDown:connect(function(key) kd(key,mouse) end)
  986. mouse.Button1Down:connect(function() if attacking == false then slash() end end)
  987. end
  988. h.Selected:connect(select)
  989. h.Deselected:connect(function() wield(0) lock(0) end)
  990.  
  991. end)
  992.  
  993.  
  994. TextButton_3.Parent = Frame
  995. TextButton_3.BackgroundColor3 = Color3.new(0, 1, 0)
  996. TextButton_3.Position = UDim2.new(0, 3, 0, 162)
  997. TextButton_3.Size = UDim2.new(0, 200, 0, 50)
  998. TextButton_3.Font = Enum.Font.Garamond
  999. TextButton_3.FontSize = Enum.FontSize.Size32
  1000. TextButton_3.Text = "Acid Gun"
  1001. TextButton_3.TextSize = 30
  1002.  
  1003. TextButton_3.MouseButton1Down:connect(function()
  1004. --Made by 112isaiah
  1005. --NAMES THAT START WITH A NUMBER WILL NOT WORK!
  1006. --Script is not local
  1007. --JUST CHANGE ASALTYSKID TO YOUR USERNAME
  1008.  
  1009. Player = game:GetService("Players").harryboo1977
  1010. Character = Player.Character
  1011. PlayerGui = Player.PlayerGui
  1012. Backpack = Player.Backpack
  1013. Torso = Character.Torso
  1014. Head = Character.Head
  1015. LeftArm = Character["Left Arm"]
  1016. LeftLeg = Character["Left Leg"]
  1017. RightArm = Character["Right Arm"]
  1018. RightLeg = Character["Right Leg"]
  1019. LS = Torso["Left Shoulder"]
  1020. LH = Torso["Left Hip"]
  1021. RS = Torso["Right Shoulder"]
  1022. RH = Torso["Right Hip"]
  1023. ModelName = "Weapon"
  1024. attack = false
  1025. attacktype = 1
  1026. Hitdeb = 0
  1027. Neck = Torso.Neck
  1028. local neckcf0 = Neck.C0
  1029. ----------------------------
  1030. --Customize
  1031. Ammo = 10000
  1032. --if (string.match(Player.Unlocks.Value,"RasAlgethi Ammo+") ~= nil) then
  1033. MaxAmmo = 10000000
  1034. --else
  1035. --MaxAmmo = 10000000
  1036. --end
  1037. mindamage = 12
  1038. maxdamage = 30
  1039. crtmaxdamage = 39
  1040. omindamage = mindamage
  1041. omaxdamage = maxdamage
  1042. ocrtmaxdamage = crtmaxdamage
  1043. crtrate = 100/5
  1044. --100%/critpercentage
  1045. oblkbrkr = 0
  1046. blockbreaker = oblkbrkr
  1047. spread = 2
  1048. spread = spread*100
  1049. Ammoregen = 20
  1050. --if (string.match(Player.Unlocks.Value,"RasAlgethi Range+") ~= nil) then
  1051. range = 700
  1052. --else
  1053. --range = 15000
  1054. --end
  1055. rangepower = 50
  1056. CurrentAmmo = "Normal"
  1057. handlecolor = BrickColor.new("Dark gray")
  1058. bcolor = BrickColor.new("Pastel yellow")
  1059. gemcolor = BrickColor.new("Black")
  1060. ammotrail = BrickColor.new("Pastel brown")
  1061. ToolName = "Ras Algethi"
  1062. ---------------------------------------------------------------------------------------------------------------------------------------
  1063. if Character:findFirstChild("EquippedVal",true) ~= nil then
  1064. Character:findFirstChild("EquippedVal",true).Parent = nil
  1065. end
  1066. ev = Instance.new("BoolValue",Character)
  1067. ev.Name = "EquippedVal"
  1068. ev.Value = false
  1069. if Character:findFirstChild("Block",true) ~= nil then
  1070. Character:findFirstChild("Block",true).Parent = nil
  1071. end
  1072. --player
  1073. player = nil
  1074. --welds
  1075. RW, LW , RWL, LWL = Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld"), Instance.new("Weld")
  1076. --what anim
  1077. anim = "none"
  1078. --other var
  1079. player = Player
  1080. ch = Character
  1081. --save shoulders
  1082. AoETrue = {}
  1083. RSH, LSH , RHL, LHL = ch.Torso["Right Shoulder"], ch.Torso["Left Shoulder"] , ch.Torso["Right Hip"] , ch.Torso["Left Hip"]
  1084. function RWFunc()
  1085. RW.Part1 = ch["Right Arm"]
  1086. RSH.Part1 = nil
  1087. end
  1088. function LWFunc()
  1089. LW.Part1 = ch["Left Arm"]
  1090. LSH.Part1 = nil
  1091. end
  1092. function RWLFunc()
  1093. RWL.Part1 = ch["Right Leg"]
  1094. RHL.Part1 = nil
  1095. ch["Right Leg"].Name = "RightLeg"
  1096. RightLeg.CanCollide = false
  1097. end
  1098. function LWLFunc()
  1099. LWL.Part1 = ch["Left Leg"]
  1100. LHL.Part1 = nil
  1101. ch["Left Leg"].Name = "LeftLeg"
  1102. LeftLeg.CanCollide = true
  1103. end
  1104. function RWLRem()
  1105. RightLeg.Name = "Right Leg"
  1106. RWL.Part1 = nil
  1107. RHL.Part1 = ch["Right Leg"]
  1108. RightLeg.CanCollide = false
  1109. end
  1110. function LWLRem()
  1111. LeftLeg.Name = "Left Leg"
  1112. LWL.Part1 = nil
  1113. LHL.Part1 = ch["Left Leg"]
  1114. LeftLeg.CanCollide = false
  1115. end
  1116. function RWRem()
  1117. RW.Part1 = nil
  1118. RSH.Part1 = ch["Right Arm"]
  1119. end
  1120. function LWRem()
  1121. LW.Part1 = nil
  1122. LSH.Part1 = ch["Left Arm"]
  1123. end
  1124. if Character:findFirstChild(ModelName,true) ~= nil then
  1125. Character:findFirstChild(ModelName,true).Parent = nil
  1126. RHL.Part1 = ch["Right Leg"]
  1127. LHL.Part1 = ch["Left Leg"]
  1128. RSH.Part1 = ch["Right Arm"]
  1129. LSH.Part1 = ch["Left Arm"]
  1130. end
  1131. local swordholder = Instance.new("Model")
  1132. swordholder.Name = ModelName
  1133. swordholder.Parent = Character
  1134. --derp
  1135. RW.Part0 = ch.Torso
  1136. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  1137. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  1138. RW.Parent = swordholder
  1139. --
  1140. LW.Part0 = ch.Torso
  1141. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1142. LW.C1 = CFrame.new(0, 0.5, 0)
  1143. LW.Parent = swordholder
  1144. --
  1145. RWL.Part0 = ch.Torso
  1146. RWL.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(0, 0, 0)
  1147. RWL.C1 = CFrame.new(0.5, 1, 0)
  1148. RWL.Parent = swordholder
  1149. --
  1150. LWL.Part0 = ch.Torso
  1151. LWL.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(0, 0, 0)
  1152. LWL.C1 = CFrame.new(-0.5, 1, 0)
  1153. LWL.Parent = swordholder
  1154. local msh1 = Instance.new("CylinderMesh")
  1155. msh1.Scale = Vector3.new(1,1,1)
  1156. local msh2 = Instance.new("BlockMesh")
  1157. msh2.Scale = Vector3.new(1,1,1)
  1158. local msh3 = Instance.new("CylinderMesh")
  1159. msh3.Scale = Vector3.new(1,1,1)
  1160. local msh4 = Instance.new("CylinderMesh")
  1161. msh4.Scale = Vector3.new(1,1,1)
  1162. local msh5 = Instance.new("CylinderMesh")
  1163. msh5.Scale = Vector3.new(1,1,1)
  1164. local msh6 = Instance.new("BlockMesh")
  1165. msh6.Scale = Vector3.new(1,1,1)
  1166. local torsc = false
  1167. for i,z in pairs(Character:GetChildren()) do
  1168. if z.className == "CharacterMesh" then
  1169. if z.BodyPart == Enum.BodyPart.Torso then
  1170. torsc = true
  1171. end
  1172. end
  1173. end
  1174. if torsc then
  1175. msh7 = Instance.new("SpecialMesh")
  1176. msh7.MeshId = "http://www.roblox.com/asset/?id=3270017"
  1177. msh7.Scale = Vector3.new(2.01,1,1.01)
  1178. msh7.Scale = Vector3.new(2.01,1,1.01)
  1179. else
  1180. msh7 = Instance.new("BlockMesh")
  1181. msh7.Scale = Vector3.new(2.01,0.1,1.01)
  1182. end
  1183. local msh8 = Instance.new("SpecialMesh")
  1184. msh8.MeshId = "http://www.roblox.com/asset/?id=3270017"
  1185. msh8.Scale = Vector3.new(0.5,0.5,7)
  1186. msh8.Scale = Vector3.new(0.5,0.5,7)
  1187. local msh9 = Instance.new("BlockMesh")
  1188. msh9.Scale = Vector3.new(1,1,1)
  1189. local prt1 = Instance.new("Part")
  1190. prt1.formFactor = 3
  1191. prt1.CanCollide = false
  1192. prt1.Name = "Handle"
  1193. prt1.Locked = true
  1194. prt1.Size = Vector3.new(0.3,1,0.3)
  1195. prt1.Parent = swordholder
  1196. msh1.Parent = prt1
  1197. prt1.BrickColor = handlecolor
  1198. local prt2 = Instance.new("Part")
  1199. prt2.formFactor = 3
  1200. prt2.CanCollide = false
  1201. prt2.Name = "Handle2"
  1202. prt2.Locked = true
  1203. prt2.Size = Vector3.new(0.5,0.2,1.5)
  1204. prt2.Parent = swordholder
  1205. msh2.Parent = prt2
  1206. prt2.BrickColor = handlecolor
  1207. local prt3 = Instance.new("Part")
  1208. prt3.formFactor = 3
  1209. prt3.CanCollide = false
  1210. prt3.Name = "Handle3"
  1211. prt3.Locked = true
  1212. prt3.Size = Vector3.new(0.7,1.2,0.7)
  1213. prt3.Parent = swordholder
  1214. msh3.Parent = prt3
  1215. prt3.BrickColor = bcolor
  1216. local prt4 = Instance.new("Part")
  1217. prt4.formFactor = 3
  1218. prt4.CanCollide = false
  1219. prt4.Name = "BackBarrel"
  1220. prt4.Locked = true
  1221. prt4.Size = Vector3.new(0.5,1.2,0.5)
  1222. prt4.Parent = swordholder
  1223. msh4.Parent = prt4
  1224. prt4.BrickColor = handlecolor
  1225. local prt5 = Instance.new("Part")
  1226. prt5.formFactor = 3
  1227. prt5.CanCollide = false
  1228. prt5.Name = "Barrel"
  1229. prt5.Locked = true
  1230. prt5.Size = Vector3.new(0.4,2.5,0.4)
  1231. prt5.Parent = swordholder
  1232. msh5.Parent = prt5
  1233. prt5.BrickColor = handlecolor
  1234. local prt6 = Instance.new("Part")
  1235. prt6.formFactor = 3
  1236. prt6.CanCollide = false
  1237. prt6.Name = "BarrelHandle"
  1238. prt6.Locked = true
  1239. prt6.Size = Vector3.new(0.3,1,0.3)
  1240. prt6.Parent = swordholder
  1241. msh6.Parent = prt6
  1242. prt6.BrickColor = handlecolor
  1243. local prt7 = Instance.new("Part")
  1244. prt7.formFactor = 3
  1245. prt7.CanCollide = false
  1246. prt7.Name = "HolsterStrap"
  1247. prt7.Locked = true
  1248. prt7.Size = Vector3.new(1,1,1)
  1249. prt7.Parent = swordholder
  1250. msh7.Parent = prt7
  1251. prt7.BrickColor = handlecolor
  1252. local prt8 = Instance.new("Part")
  1253. prt8.formFactor = 3
  1254. prt8.CanCollide = false
  1255. prt8.Name = "Holster"
  1256. prt8.Locked = true
  1257. prt8.Size = Vector3.new(1,1,1)
  1258. prt8.Parent = swordholder
  1259. msh8.Parent = prt8
  1260. prt8.BrickColor = handlecolor
  1261. local prt9 = Instance.new("Part")
  1262. prt9.formFactor = 3
  1263. prt9.CanCollide = false
  1264. prt9.Name = "AmmoHolster"
  1265. prt9.Locked = true
  1266. prt9.Size = Vector3.new(0.2,1,0.7)
  1267. prt9.Parent = swordholder
  1268. msh9.Parent = prt9
  1269. prt9.BrickColor = handlecolor
  1270. local w1 = Instance.new("Weld")
  1271. w1.Parent = prt1
  1272. w1.Part0 = prt1
  1273. local w2 = Instance.new("Weld")
  1274. w2.Parent = prt2
  1275. w2.Part0 = prt2
  1276. w2.Part1 = prt1
  1277. w2.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  1278. w2.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 0.6,0.5)
  1279. local w3 = Instance.new("Weld")
  1280. w3.Parent = prt3
  1281. w3.Part0 = prt3
  1282. w3.Part1 = prt2
  1283. w3.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  1284. w3.C0 = CFrame.Angles(math.rad(90+45), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1285. local w4 = Instance.new("Weld")
  1286. w4.Parent = prt4
  1287. w4.Part0 = prt4
  1288. w4.Part1 = prt2
  1289. w4.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  1290. w4.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,0.5)
  1291. local w5 = Instance.new("Weld")
  1292. w5.Parent = prt5
  1293. w5.Part0 = prt5
  1294. w5.Part1 = prt3
  1295. w5.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  1296. w5.C0 = CFrame.Angles(math.rad(0), 0, 0) * CFrame.new(0, 1.5,0)
  1297. local w6 = Instance.new("Weld")
  1298. w6.Parent = prt6
  1299. w6.Part0 = prt6
  1300. w6.Part1 = prt3
  1301. w6.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  1302. w6.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 1.5,-0.5)
  1303. local w7 = Instance.new("Weld")
  1304. w7.Parent = prt7
  1305. w7.Part0 = prt7
  1306. w7.Part1 = Torso
  1307. w7.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  1308. if torsc then
  1309. w7.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 1,0)
  1310. else
  1311. w7.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(0, 1,0)
  1312. end
  1313. local w8 = Instance.new("Weld")
  1314. w8.Parent = prt8
  1315. w8.Part0 = prt8
  1316. w8.Part1 = Torso
  1317. w8.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  1318. w8.C0 = CFrame.Angles(math.rad(45), 0, 0) * CFrame.new(-1.1, 1-0.25,0)
  1319. local w9 = Instance.new("Weld")
  1320. w9.Parent = prt9
  1321. w9.Part0 = prt9
  1322. w9.Part1 = Torso
  1323. w9.C1 = CFrame.new(0, 0,0) * CFrame.Angles(0, 0, 0)
  1324. w9.C0 = CFrame.Angles(math.rad(45), 0, 0) * CFrame.new(1, 0.75,-0.5)
  1325. local RAP = Instance.new("Part")
  1326. RAP.formFactor = 0
  1327. RAP.CanCollide = false
  1328. RAP.Name = "RAPart"
  1329. RAP.Locked = true
  1330. RAP.Size = Vector3.new(1,1,1)
  1331. RAP.Parent = swordholder
  1332. RAP.Transparency = 1
  1333. local w = Instance.new("Weld")
  1334. w.Parent = RAP
  1335. w.Part0 = RAP
  1336. w.Part1 = RightArm
  1337. w.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0)
  1338. w.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), 0, 0) * CFrame.new(0, 1, 0)
  1339. function unequipweld()
  1340. w1.Part1 = Torso
  1341. w1.C1 = CFrame.fromEulerAnglesXYZ(0, math.rad(0), math.rad(0)) * CFrame.new(0, 0,0)
  1342. w1.C0 = CFrame.fromEulerAnglesXYZ(math.rad(180),math.rad(-0), math.rad(0)) * CFrame.new(-1.15, 1, -0.6)
  1343. end
  1344. unequipweld()
  1345. function equipweld()
  1346. w1.Part0 = prt1
  1347. w1.Part1 = RAP
  1348. w1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) * CFrame.new(0, 0,0)
  1349. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1350. end
  1351. function ss(parent,p) --Slash
  1352. local SlashSound = Instance.new("Sound")
  1353. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  1354. SlashSound.Parent = parent
  1355. SlashSound.Volume = .7
  1356. SlashSound.Pitch = p
  1357. SlashSound.PlayOnRemove = true
  1358. coroutine.resume(coroutine.create(function()
  1359. wait()
  1360. SlashSound.Parent = nil
  1361. end))
  1362. end
  1363. function uss(parent,p) --unsheath
  1364. local SlashSound = Instance.new("Sound")
  1365. SlashSound.SoundId = "rbxasset://sounds\\unsheath.wav"
  1366. SlashSound.Parent = parent
  1367. SlashSound.Volume = .7
  1368. SlashSound.Pitch = p
  1369. SlashSound.PlayOnRemove = true
  1370. coroutine.resume(coroutine.create(function()
  1371. wait()
  1372. SlashSound.Parent = nil
  1373. end))
  1374. end
  1375. function cs(parent,p) --Magic Charge
  1376. local SlashSound = Instance.new("Sound")
  1377. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2101137"
  1378. SlashSound.Parent = parent
  1379. SlashSound.Parent = parent
  1380. SlashSound.Volume = .7
  1381. SlashSound.Pitch = p
  1382. SlashSound.PlayOnRemove = true
  1383. coroutine.resume(coroutine.create(function()
  1384. wait()
  1385. SlashSound.Parent = nil
  1386. end))
  1387. end
  1388. function ls(parent,p) --Lazer Sound
  1389. local SlashSound = Instance.new("Sound")
  1390. SlashSound.SoundId = "http://www.roblox.com/asset?id=1369158"
  1391. SlashSound.Parent = parent
  1392. SlashSound.Parent = parent
  1393. SlashSound.Volume = .7
  1394. SlashSound.Pitch = p
  1395. SlashSound.PlayOnRemove = true
  1396. coroutine.resume(coroutine.create(function()
  1397. wait()
  1398. SlashSound.Parent = nil
  1399. end))
  1400. end
  1401. function ts(parent,p)
  1402. local SlashSound = Instance.new("Sound")
  1403. SlashSound.SoundId = "http://www.roblox.com/asset/?id=12222030"
  1404. SlashSound.Parent = parent
  1405. SlashSound.Parent = parent
  1406. SlashSound.Volume = .7
  1407. SlashSound.Pitch = p
  1408. SlashSound.PlayOnRemove = true
  1409. coroutine.resume(coroutine.create(function()
  1410. wait()
  1411. SlashSound.Parent = nil
  1412. end))
  1413. end
  1414. function fs(parent,p) --Fire Sound
  1415. local SlashSound = Instance.new("Sound")
  1416. SlashSound.SoundId = "http://www.roblox.com/asset/?id=31758982"
  1417. SlashSound.Parent = parent
  1418. SlashSound.Parent = parent
  1419. SlashSound.Volume = .7
  1420. SlashSound.Pitch = p
  1421. SlashSound.PlayOnRemove = true
  1422. coroutine.resume(coroutine.create(function()
  1423. wait()
  1424. SlashSound.Parent = nil
  1425. end))
  1426. end
  1427. function ms(parent,p) --Metal Cling Sound
  1428. local SlashSound = Instance.new("Sound")
  1429. SlashSound.SoundId = "rbxasset://sounds\\metal.ogg"
  1430. SlashSound.Parent = parent
  1431. SlashSound.Volume = 5
  1432. SlashSound.Pitch = p
  1433. SlashSound.PlayOnRemove = true
  1434. coroutine.resume(coroutine.create(function()
  1435. wait()
  1436. SlashSound.Parent = nil
  1437. end))
  1438. end
  1439. function bs(parent,p) --Berserk Sound
  1440. local SlashSound = Instance.new("Sound")
  1441. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2676305"
  1442. SlashSound.Parent = parent
  1443. SlashSound.Parent = parent
  1444. SlashSound.Volume = 1
  1445. SlashSound.Pitch = p
  1446. SlashSound.PlayOnRemove = true
  1447. coroutine.resume(coroutine.create(function()
  1448. wait()
  1449. SlashSound.Parent = nil
  1450. end))
  1451. end
  1452. function hs(parent,p) --Ammo Hit Sound
  1453. ms(parent,p)
  1454. end
  1455. function as(parent,p) --Gun Shoot Sound
  1456. local SlashSound = Instance.new("Sound")
  1457. SlashSound.SoundId = "http://roblox.com/asset/?id=10209257"
  1458. SlashSound.Parent = parent
  1459. SlashSound.Volume = 0.5
  1460. SlashSound.Pitch = p
  1461. SlashSound.PlayOnRemove = true
  1462. coroutine.resume(coroutine.create(function()
  1463. wait()
  1464. SlashSound.Parent = nil
  1465. end))
  1466. end
  1467. function ars(parent,p) --Gun Reload Sound
  1468. local SlashSound = Instance.new("Sound")
  1469. SlashSound.SoundId = "http://roblox.com/asset/?id=10209869"
  1470. SlashSound.Parent = parent
  1471. SlashSound.Parent = parent
  1472. SlashSound.Volume = 1
  1473. SlashSound.Pitch = p
  1474. SlashSound.PlayOnRemove = true
  1475. coroutine.resume(coroutine.create(function()
  1476. wait()
  1477. SlashSound.Parent = nil
  1478. end))
  1479. end
  1480. --
  1481. --
  1482. function returndmg()
  1483. mindamage = omindamage
  1484. maxdamage = omaxdamage
  1485. crtmaxdamage = ocrtmaxdamage
  1486. end
  1487. function subdmg(sub)
  1488. mindamage = omindamage - sub
  1489. maxdamage = omaxdamage - sub
  1490. crtmaxdamage = ocrtmaxdamage - sub
  1491. end
  1492. function prcntdmg(sub)
  1493. mindamage = math.floor(omindamage - (omindamage*(sub/100)))
  1494. maxdamage = math.floor(omaxdamage - (omaxdamage*(sub/100)))
  1495. crtmaxdamage = math.floor(ocrtmaxdamage - (ocrtmaxdamage*(sub/100)))
  1496. end
  1497. function tagHumanoid(humanoid, player)
  1498. local creator_tag = Instance.new("ObjectValue")
  1499. creator_tag.Value = player
  1500. creator_tag.Name = "creator"
  1501. creator_tag.Parent = humanoid
  1502. end
  1503. function untagHumanoid(humanoid)
  1504. if humanoid ~= nil then
  1505. local tag = humanoid:findFirstChild("creator")
  1506. if tag ~= nil then
  1507. tag.Parent = nil
  1508. end
  1509. end
  1510. end
  1511. local function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1512. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1513. end
  1514. function hideanim()
  1515. attack = true
  1516. ars(Head,0.85)
  1517. for i = 0.25 ,1 ,0.25 do
  1518. wait()
  1519. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1520. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  1521. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25+10*i))
  1522. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1523. w3.C0 = CFrame.Angles(math.rad(90+25*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1524. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5*i),0,math.rad(0))
  1525. end
  1526. for i = 0.1 ,1 ,0.1 do
  1527. wait()
  1528. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1529. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  1530. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(35+10*i))
  1531. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1532. w3.C0 = CFrame.Angles(math.rad(115+20*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1533. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5-5*i),0,math.rad(0))
  1534. end
  1535. for i = 0.1 ,1 ,0.1 do
  1536. wait()
  1537. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90-130*i),math.rad(0),math.rad(-60+60*i))
  1538. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1539. 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))
  1540. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1541. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1542. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10+40*i),0,math.rad(-30*i))
  1543. end
  1544. unequipweld()
  1545. for i = 0.1 ,1 ,0.1 do
  1546. wait()
  1547. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(-20+20*i),math.rad(0),math.rad(0))
  1548. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(0), 0, 0)
  1549. 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))
  1550. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1551. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1552. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30-30*i),0,math.rad(-30+30*i))
  1553. end
  1554. Neck.C0 = neckcf0
  1555. RWRem()
  1556. LWRem()
  1557. attack = false
  1558. end
  1559. function equipanim()
  1560. attack = true
  1561. RWFunc()
  1562. w3.C0 = CFrame.Angles(math.rad(135), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1563. for i = 0.1 ,1 ,0.1 do
  1564. wait()
  1565. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(-20*i),math.rad(0),math.rad(0))
  1566. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1567. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  1568. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1569. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30*i),0,math.rad(-30*i))
  1570. end
  1571. equipweld()
  1572. ars(Head,1)
  1573. for i = 0.1 ,1 ,0.1 do
  1574. wait()
  1575. RW.C0 = CFrame.new(1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(-20+130*i),math.rad(0),math.rad(0))
  1576. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1577. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  1578. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1579. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(30-35*i),0,math.rad(-30))
  1580. end
  1581. LWFunc()
  1582. for i = 0.1 ,1 ,0.1 do
  1583. wait()
  1584. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(110-20*i),math.rad(0),math.rad(-60*i))
  1585. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  1586. LW.C0 = CFrame.new(-1.5, 0.5, -0.5*i) * CFrame.Angles(math.rad(40*i),math.rad(0),math.rad(25*i))
  1587. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1588. w3.C0 = CFrame.Angles(math.rad(135-45*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1589. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+5*i),0,math.rad(-30+30*i))
  1590. end
  1591. Neck.C0 = neckcf0
  1592. attack = false
  1593. end
  1594. function faketors()
  1595. local T = Instance.new("Part")
  1596. T.formFactor = 0
  1597. T.CanCollide = false
  1598. T.Name = "FakeTorso"
  1599. T.Locked = true
  1600. T.Size = Torso.Size
  1601. T.Parent = swordholder
  1602. T.Transparency = 1
  1603. T.BrickColor = Torso.BrickColor
  1604. for i,z in pairs(Character:GetChildren()) do
  1605. if z.className == "CharacterMesh" then
  1606. if z.BodyPart == Enum.BodyPart.Torso then
  1607. local SM = Instance.new("SpecialMesh",T)
  1608. SM.MeshId = "http://www.roblox.com/asset/?id=" .. z.MeshId
  1609. if z.BaseTextureId ~= 0 then
  1610. SM.TextureId = z.BaseTextureId
  1611. elseif z.OverlayTextureId ~= 0 then
  1612. SM.TextureId = z.OverlayTextureId
  1613. else
  1614. SM.TextureId = ""
  1615. end
  1616. end
  1617. end
  1618. end
  1619. local wt = Instance.new("Weld")
  1620. wt.Parent = T
  1621. wt.Part0 = T
  1622. wt.Part1 = Torso
  1623. RW.Part0 = T
  1624. LW.Part0 = T
  1625. T.Transparency = 0
  1626. Torso.Transparency = 1
  1627. RHL.Part0 = T
  1628. LHL.Part0 = T
  1629. return wt,T
  1630. end
  1631. if (script.Parent.className ~= "HopperBin") then
  1632. Tool = Instance.new("HopperBin")
  1633. Tool.Parent = Backpack
  1634. Tool.Name = ToolName
  1635. script.Parent = Tool
  1636. end
  1637. Bin = script.Parent
  1638. function damagesplat(dmg,hit,crit,blocked)
  1639. local mo = Instance.new("Model")
  1640. mo.Name = dmg
  1641. local pa = Instance.new("Part",mo)
  1642. pa.formFactor = 3
  1643. pa.Size = Vector3.new(0.8,0.3,0.8)
  1644. if crit then
  1645. pa.BrickColor = BrickColor.new("Bright yellow")
  1646. elseif not crit then
  1647. pa.BrickColor = BrickColor.new("Bright red")
  1648. end
  1649. if blocked then pa.BrickColor = BrickColor.new("Bright blue") end
  1650. pa.CFrame = CFrame.new(hit.Position) * CFrame.new(0, 3, 0)
  1651. pa.Name = "Head"
  1652. local hah = Instance.new("Humanoid")
  1653. hah.Parent = mo
  1654. hah.MaxHealth = 0
  1655. hah.Health = 0
  1656. local bp = Instance.new("BodyPosition")
  1657. bp.P = 14000
  1658. bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1659. bp.position = hit.Position + Vector3.new(0, 5, 0)
  1660. coroutine.resume(coroutine.create(function()
  1661. wait()
  1662. mo.Parent = workspace
  1663. bp.Parent = pa
  1664. wait(1.4)
  1665. mo:remove()
  1666. end))
  1667. return pa
  1668. end
  1669. function damage(hum,dmg,critornot)
  1670. local pa = damagesplat(dmg,hum.Torso,critornot)
  1671. hum:TakeDamage(dmg)
  1672. coroutine.resume(coroutine.create(function()
  1673. tagHumanoid(hum,Player)
  1674. wait(1)
  1675. untagHumanoid(hum)
  1676. end))
  1677. return pa
  1678. end
  1679. function AddAmmo(add)
  1680. Ammo = Ammo + add
  1681. if Ammo > MaxAmmo then
  1682. Ammo = MaxAmmo
  1683. end
  1684. end
  1685. function ADmg(humm,hit,pos)
  1686. if CurrentAmmo == "Normal" then
  1687. if humm.Parent:findFirstChild("Block") ~= nil then
  1688. if humm.Parent.Block.Value then
  1689. damagesplat(0,humm.Torso,false,true)
  1690. return
  1691. end
  1692. end
  1693. prcntdmg(0)
  1694. if critrandomizer ~= 1 then
  1695. local rndmdamage = math.random(mindamage,maxdamage)
  1696. damage(humm,rndmdamage,false)
  1697. elseif critrandomizer == 1 then
  1698. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1699. damage(humm,rndmdamage,true)
  1700. end
  1701. elseif CurrentAmmo == "Poison" then
  1702. if humm.Parent:findFirstChild("Block") ~= nil then
  1703. if humm.Parent.Block.Value then
  1704. damagesplat(0,humm.Torso,false,true)
  1705. return
  1706. end
  1707. end
  1708. prcntdmg(25)
  1709. if critrandomizer ~= 1 then
  1710. local rndmdamage = math.random(mindamage,maxdamage)
  1711. damage(humm,rndmdamage,false)
  1712. elseif critrandomizer == 1 then
  1713. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1714. damage(humm,rndmdamage,true)
  1715. end
  1716. if math.random(1,5) == 1 then
  1717. local poisoncount = math.random(2,10)
  1718. coroutine.resume(coroutine.create(function()
  1719. repeat
  1720. wait(1.5)
  1721. poisoncount = poisoncount - 1
  1722. local rndmdamage = math.floor(math.random(1,5)/2)
  1723. local pa = damage(humm,rndmdamage,false)
  1724. pa.BrickColor = BrickColor.new("Alder")
  1725. until poisoncount <= 0
  1726. end))
  1727. end
  1728. elseif CurrentAmmo == "Knockback" then
  1729. if humm.Parent:findFirstChild("Block") ~= nil then
  1730. if humm.Parent.Block.Value then
  1731. damagesplat(0,humm.Torso,false,true)
  1732. return
  1733. end
  1734. end
  1735. prcntdmg(25)
  1736. if critrandomizer ~= 1 then
  1737. local rndmdamage = math.random(mindamage,maxdamage)
  1738. damage(humm,rndmdamage,false)
  1739. elseif critrandomizer == 1 then
  1740. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1741. damage(humm,rndmdamage,true)
  1742. end
  1743. local vel = Instance.new("BodyVelocity",humm.Torso)
  1744. vel.maxForce = Vector3.new(1,1,1) * math.huge
  1745. vel.P = vel.P * 5
  1746. vel.velocity = Vector3.new(0,1,0) + CFrame.new(Torso.Position,humm.Torso.Position).lookVector * 10
  1747. coroutine.resume(coroutine.create(function()
  1748. wait() wait() wait() wait()
  1749. vel.Parent=nil
  1750. end))
  1751. returndmg()
  1752. end
  1753. end
  1754. function OT(hit) --Normal Damage
  1755. if Hitdeb == 1 then return end
  1756. if hit.Parent == nil then return end
  1757. local hum = hit.Parent:findFirstChild("Humanoid") if hum ~= nil and hum ~= Character.Humanoid then
  1758. if hum.Health <= 0 then return end
  1759. if hit.Parent:findFirstChild("Block") ~= nil then
  1760. if hit.Parent.Block.Value then
  1761. damagesplat(0,hum.Torso,false,true)
  1762. Hitdeb = 1
  1763. if hit.Parent.Block:findFirstChild("BlockPower") ~= nil then
  1764. if hit.Parent.Block.BlockPower.Value <= 1 then
  1765. hit.Parent.Block.Value = false
  1766. elseif hit.Parent.Block.BlockPower.Value > 1 then
  1767. local critrandomizer = math.random(crtrate)
  1768. if critrandomizer ~= 1 then
  1769. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker
  1770. elseif critrandomizer == 1 then
  1771. hit.Parent.Block.BlockPower.Value = hit.Parent.Block.BlockPower.Value - blockbreaker + 2
  1772. end
  1773. end
  1774. end
  1775. return end end
  1776. local critrandomizer = math.random(crtrate)
  1777. if critrandomizer ~= 1 then
  1778. local rndmdamage = math.random(mindamage,maxdamage)
  1779. damage(hum,rndmdamage,false)
  1780. elseif critrandomizer == 1 then
  1781. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1782. damage(hum,rndmdamage,true)
  1783. end
  1784. Hitdeb = 1
  1785. end
  1786. end
  1787. function AoE(p,magnitude)
  1788. local c = game.Workspace:GetChildren();
  1789. for i = 1, #c do
  1790. local hum = c[i]:findFirstChild("Humanoid")
  1791. if hum ~= nil and hum.Health ~= 0 then
  1792. local head = c[i]:findFirstChild("Head");
  1793. if head ~= nil then
  1794. local mag = (head.Position - p).magnitude;
  1795. if mag <= magnitude and c[i].Name ~= Character.Name then
  1796. local foundd = false
  1797. for ii = 1 , #AoETrue do
  1798. if AoETrue[ii] == c[i].Name then
  1799. foundd = true
  1800. end
  1801. end
  1802. if foundd then
  1803. end
  1804. --
  1805. if not foundd then
  1806. local critrandomizer = math.random(crtrate)
  1807. if critrandomizer ~= 1 then
  1808. local rndmdamage = math.random(mindamage,maxdamage)
  1809. damage(hum,rndmdamage,false)
  1810. elseif critrandomizer == 1 then
  1811. local rndmdamage = math.random(maxdamage,crtmaxdamage)
  1812. damage(hum,rndmdamage,true)
  1813. end
  1814. table.insert(AoETrue,c[i].Name)
  1815. end
  1816. end
  1817. end
  1818. end
  1819. end
  1820. for ii = 1 , #AoETrue do
  1821. table.remove(AoETrue,#AoETrue)
  1822. end
  1823. end
  1824. --
  1825. --
  1826. function effect(Color,Ref,LP,P1)
  1827. local effectsmsh = Instance.new("BlockMesh")
  1828. effectsmsh.Scale = Vector3.new(1,1,1)
  1829. effectsmsh.Name = "Mesh"
  1830. local effectsg = Instance.new("Part")
  1831. effectsg.formFactor = 3
  1832. effectsg.CanCollide = false
  1833. effectsg.Name = "Eff"
  1834. effectsg.Locked = true
  1835. effectsg.Anchored = true
  1836. effectsg.Size = Vector3.new(0.2,1,0.2)
  1837. effectsg.Parent = swordholder
  1838. effectsmsh.Parent = effectsg
  1839. effectsg.BrickColor = BrickColor.new(Color)
  1840. effectsg.Reflectance = Ref
  1841. local point1 = P1
  1842. local mg = (LP.p - point1.p).magnitude
  1843. effectsg.Size = Vector3.new(0.2,mg,0.2)
  1844. effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  1845. coroutine.resume(coroutine.create(function()
  1846. for i = 0 , 1 , 0.1 do
  1847. wait()
  1848. effectsg.Transparency = 1*i
  1849. effectsmsh.Scale = Vector3.new(1-1*i,1,1-1*i)
  1850. end
  1851. wait()
  1852. effectsg.Parent = nil
  1853. end))
  1854. end
  1855. --
  1856. con = nil
  1857. function dmgcnnct()
  1858. if con ~= nil then
  1859. con:disconnect()
  1860. Hitdeb = 0
  1861. end
  1862. con = prt11.Touched:connect(OT)
  1863. end
  1864. function dmgdc()
  1865. if con ~= nil then
  1866. con:disconnect()
  1867. Hitdeb = 0
  1868. end
  1869. end
  1870. function rptddmg(value,des,inc)
  1871. coroutine.resume(coroutine.create(function()
  1872. repeat
  1873. wait(inc)
  1874. Hitdeb = 0
  1875. until value == des
  1876. end))
  1877. end
  1878. function atktype(s,e)
  1879. coroutine.resume(coroutine.create(function ()
  1880. attacktype = e
  1881. wait(0.25)
  1882. attacktype = s
  1883. end))
  1884. end
  1885. function shoottrail(mouse)
  1886. local p1 = (prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p
  1887. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread)) / 100) * (p1-mouse.Hit.p).magnitude/100
  1888. local dir = CFrame.new((p1+mouse.Hit.p)/2,mouse.Hit.p+spreadvector)
  1889. local hit,pos = rayCast(p1,dir.lookVector,10,Character)
  1890. local rangepos = range
  1891. local function drawtrail(From,To)
  1892. local effectsmsh = Instance.new("CylinderMesh")
  1893. effectsmsh.Scale = Vector3.new(1,1,1)
  1894. effectsmsh.Name = "Mesh"
  1895. local effectsg = Instance.new("Part")
  1896. effectsg.formFactor = 3
  1897. effectsg.CanCollide = false
  1898. effectsg.Name = "Eff"
  1899. effectsg.Locked = true
  1900. effectsg.Anchored = true
  1901. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  1902. effectsg.Parent = swordholder
  1903. effectsmsh.Parent = effectsg
  1904. effectsg.BrickColor = ammotrail
  1905. effectsg.Reflectance = 0.25
  1906. local LP = From
  1907. local point1 = To
  1908. local mg = (LP - point1).magnitude
  1909. effectsmsh.Scale = Vector3.new(1,mg*5,1)
  1910. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1911. coroutine.resume(coroutine.create(function()
  1912. for i = 0 , 1 , 0.1 do
  1913. wait()
  1914. effectsg.Transparency = 1*i
  1915. effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i)
  1916. end
  1917. effectsg.Parent = nil
  1918. end))
  1919. end
  1920. local newpos = p1
  1921. local inc = rangepower
  1922. repeat
  1923. wait()
  1924. rangepos = rangepos - 10
  1925. dir = dir * CFrame.Angles(math.rad(-0.1),0,0)
  1926. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1927. drawtrail(newpos,pos)
  1928. newpos = newpos + (dir.lookVector * inc)
  1929. if inc >= 20 then
  1930. inc = inc - 10
  1931. end
  1932. if hit ~= nil then
  1933. rangepos = 0
  1934. end
  1935. until rangepos <= 0
  1936. if hit ~= nil then
  1937. hs(Head,1)
  1938. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1939. hum = hit.Parent.Humanoid
  1940. ADmg(hum,hit,pos)
  1941. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1942. hum = hit.Parent.Parent.Humanoid
  1943. ADmg(hum,hit,pos)
  1944. end
  1945. end
  1946. end
  1947. function Ready(mouse)
  1948. if Ammo <= 0 then Reload() return end
  1949. attack = true
  1950. local wt,t = faketors()
  1951. w7.Part1 = t
  1952. w8.Part1 = t
  1953. w9.Part1 = t
  1954. Character.Humanoid.WalkSpeed = 5
  1955. for i = 0.2 , 1 , 0.2 do
  1956. wait()
  1957. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1958. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  1959. 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))
  1960. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1961. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1962. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1963. wt.C0 = CFrame.Angles(0, math.rad(50*i), 0)
  1964. end
  1965. for i = 0.2 , 1 , 0.2 do
  1966. wait()
  1967. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  1968. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  1969. 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))
  1970. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  1971. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  1972. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  1973. wt.C0 = CFrame.Angles(0, math.rad(50+10*i), 0)
  1974. end
  1975. wait() wait()
  1976. repeat
  1977. wait()
  1978. as(Head,1)
  1979. coroutine.resume(coroutine.create(function()
  1980. for z = 1 ,2 do
  1981. coroutine.resume(coroutine.create(function()
  1982. local meshb1 = Instance.new("BlockMesh")
  1983. meshb1.Scale = Vector3.new(1,1,1)
  1984. local shellb1 = Instance.new("Part")
  1985. meshb1.Parent = shellb1
  1986. shellb1.Anchored = true
  1987. shellb1.formFactor = 3
  1988. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  1989. 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)
  1990. shellb1.Parent = swordholder
  1991. shellb1.Transparency = 0
  1992. if math.random(1,2) == 1 then
  1993. shellb1.BrickColor = BrickColor.new("Bright red")
  1994. else
  1995. shellb1.BrickColor = BrickColor.new("Bright orange")
  1996. end
  1997. shellb1.CanCollide = false
  1998. local incre = math.random(0,60)/100
  1999. for i = 0 , 1 , 0.1 do
  2000. wait()
  2001. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  2002. shellb1.Transparency = 1*i
  2003. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  2004. end
  2005. shellb1.Parent=nil
  2006. end))
  2007. end
  2008. shoottrail(mouse)
  2009. end))
  2010. Ammo = Ammo - 1
  2011. for i = 0.5 , 1 , 0.5 do
  2012. wait()
  2013. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2014. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5*i), 0, 0)
  2015. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(95+5*i),math.rad(0),math.rad(25))
  2016. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2017. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2018. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2019. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  2020. end
  2021. for i = 0.5 , 1 , 0.5 do
  2022. wait()
  2023. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2024. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5+5*i), 0, 0)
  2025. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(100-5*i),math.rad(0),math.rad(25))
  2026. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2027. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2028. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2029. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  2030. end
  2031. until not keyhold or Ammo <= 0
  2032. for i = 0.2 , 1 , 0.2 do
  2033. wait()
  2034. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2035. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15*i), 0, 0)
  2036. LW.C0 = CFrame.new(-1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(95-25*i),math.rad(0),math.rad(25))
  2037. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2038. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2039. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2040. wt.C0 = CFrame.Angles(0, math.rad(60-60*i), 0)
  2041. end
  2042. w7.Part1 = Torso
  2043. w8.Part1 = Torso
  2044. w9.Part1 = Torso
  2045. RW.Part0 = Torso
  2046. LW.Part0 = Torso
  2047. Torso.Transparency = 0
  2048. RHL.Part0 = Torso
  2049. LHL.Part0 = Torso
  2050. t.Parent = nil
  2051. Character.Humanoid.WalkSpeed = 14
  2052. for i = 0.2 , 1 , 0.2 do
  2053. wait()
  2054. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2055. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15+10*i), 0, 0)
  2056. 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))
  2057. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2058. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2059. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2060. end
  2061. wait(0.25)
  2062. attack = false
  2063. end
  2064. function Reload()
  2065. attack = true
  2066. ars(Head,0.75)
  2067. for i = 0.1 , 1 , 0.1 do
  2068. wait()
  2069. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60+20*i))
  2070. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-45*i), 0, 0)
  2071. 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))
  2072. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2073. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2074. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10*i),0,math.rad(-20*i))
  2075. end
  2076. for i = 0.2 , 1 , 0.2 do
  2077. wait()
  2078. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-40))
  2079. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-20+20*i), 0, 0)
  2080. LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(-20+40*i),math.rad(0),math.rad(10-10*i))
  2081. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2082. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2083. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-10+20*i),0,math.rad(-20))
  2084. end
  2085. for i = 0.2 , 1 , 0.2 do
  2086. wait()
  2087. 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))
  2088. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(45*i), 0, 0)
  2089. 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))
  2090. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2091. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2092. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(10+10*i),0,math.rad(-20+10*i))
  2093. end
  2094. AddAmmo(Ammoregen)
  2095. for i = 0.2 , 1 , 0.2 do
  2096. wait()
  2097. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-45))
  2098. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(45+5*i), 0, 0)
  2099. LW.C0 = CFrame.new(-1, 0.5, -0.5) * CFrame.Angles(math.rad(100-10*i),math.rad(0),math.rad(45))
  2100. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2101. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2102. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(20+5*i),0,math.rad(-10+5*i))
  2103. end
  2104. for i = 0.1 , 1 , 0.1 do
  2105. wait()
  2106. 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))
  2107. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(50-25*i), 0, 0)
  2108. 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))
  2109. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2110. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2111. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(25-25*i),0,math.rad(-5+5*i))
  2112. end
  2113. Neck.C0 = neckcf0
  2114. attack = false
  2115. end
  2116. function NormalAmmo()
  2117. attack = true
  2118. for i = 0.1 , 1 , 0.1 do
  2119. wait()
  2120. RW.C0 = CFrame.new(1.5-0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2121. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2122. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60*i),math.rad(0),math.rad(25+20*i))
  2123. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2124. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2125. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5*i),0,0)
  2126. end
  2127. ars(Head,1)
  2128. for i = 0.2 , 1 , 0.2 do
  2129. wait()
  2130. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2131. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2132. LW.C0 = CFrame.new(-1.5+0.25*i, 0.5, -0.5) * CFrame.Angles(math.rad(100),math.rad(0),math.rad(45))
  2133. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2134. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2135. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-2.5*i),0,0)
  2136. end
  2137. for i = 0.1 , 1 , 0.2 do
  2138. wait()
  2139. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2140. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2141. LW.C0 = CFrame.new(-1.25-0.25*i, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(100+20*i),math.rad(0),math.rad(45))
  2142. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2143. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2144. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(2.5+2.5*i),0,0)
  2145. end
  2146. for i = 0.1 , 1 , 0.2 do
  2147. wait()
  2148. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2149. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10*i), 0, 0)
  2150. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(120-45*i),math.rad(0),math.rad(45))
  2151. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2152. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2153. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5),0,0)
  2154. end
  2155. for i = 0.1 , 1 , 0.1 do
  2156. wait()
  2157. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2158. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  2159. LW.C0 = CFrame.new(-1.5, 0.5+0.25*i, -0.5) * CFrame.Angles(math.rad(75+60*i),math.rad(0),math.rad(45))
  2160. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2161. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2162. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-10*i),0,0)
  2163. end
  2164. for i = 0.2 , 1 , 0.1 do
  2165. wait()
  2166. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2167. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  2168. LW.C0 = CFrame.new(-1.5, 0.75, -0.5) * CFrame.Angles(math.rad(135-20*i),math.rad(0),math.rad(45))
  2169. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2170. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2171. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+2.5*i),0,0)
  2172. end
  2173. CurrentAmmo = "Normal"
  2174. ammotrail = BrickColor.new("White")
  2175. ars(Head,2)
  2176. for i = 0.2 , 1 , 0.1 do
  2177. wait()
  2178. 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(-60))
  2179. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15-15*i), 0, 0)
  2180. LW.C0 = CFrame.new(-1.5, 0.75-0.25*i, -0.5) * CFrame.Angles(math.rad(115-75*i),math.rad(0),math.rad(45-20*i))
  2181. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2182. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2183. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-2.5+2.5*i),0,0)
  2184. end
  2185. for i = 0.2 , 1 , 0.1 do
  2186. wait()
  2187. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2188. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  2189. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  2190. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2191. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2192. end
  2193. attack = false
  2194. end
  2195. function PoisonAmmo()
  2196. attack = true
  2197. for i = 0.1 , 1 , 0.1 do
  2198. wait()
  2199. RW.C0 = CFrame.new(1.5-0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2200. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2201. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60*i),math.rad(0),math.rad(25+20*i))
  2202. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2203. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2204. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5*i),0,0)
  2205. end
  2206. ars(Head,1)
  2207. for i = 0.2 , 1 , 0.2 do
  2208. wait()
  2209. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2210. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2211. LW.C0 = CFrame.new(-1.5+0.25*i, 0.5, -0.5) * CFrame.Angles(math.rad(100),math.rad(0),math.rad(45))
  2212. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2213. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2214. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-2.5*i),0,0)
  2215. end
  2216. for i = 0.1 , 1 , 0.2 do
  2217. wait()
  2218. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2219. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2220. LW.C0 = CFrame.new(-1.25-0.25*i, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(100+20*i),math.rad(0),math.rad(45))
  2221. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2222. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2223. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(2.5+2.5*i),0,0)
  2224. end
  2225. for i = 0.1 , 1 , 0.2 do
  2226. wait()
  2227. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2228. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10*i), 0, 0)
  2229. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(120-45*i),math.rad(0),math.rad(45))
  2230. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2231. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2232. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5),0,0)
  2233. end
  2234. for i = 0.1 , 1 , 0.1 do
  2235. wait()
  2236. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2237. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  2238. LW.C0 = CFrame.new(-1.5, 0.5+0.25*i, -0.5) * CFrame.Angles(math.rad(75+60*i),math.rad(0),math.rad(45))
  2239. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2240. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2241. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-10*i),0,0)
  2242. end
  2243. for i = 0.2 , 1 , 0.1 do
  2244. wait()
  2245. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2246. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  2247. LW.C0 = CFrame.new(-1.5, 0.75, -0.5) * CFrame.Angles(math.rad(135-20*i),math.rad(0),math.rad(45))
  2248. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2249. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2250. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+2.5*i),0,0)
  2251. end
  2252. CurrentAmmo = "Poison"
  2253. ammotrail = BrickColor.new("Bright violet")
  2254. ars(Head,2)
  2255. for i = 0.2 , 1 , 0.1 do
  2256. wait()
  2257. 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(-60))
  2258. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15-15*i), 0, 0)
  2259. LW.C0 = CFrame.new(-1.5, 0.75-0.25*i, -0.5) * CFrame.Angles(math.rad(115-75*i),math.rad(0),math.rad(45-20*i))
  2260. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2261. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2262. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-2.5+2.5*i),0,0)
  2263. end
  2264. for i = 0.2 , 1 , 0.1 do
  2265. wait()
  2266. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2267. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  2268. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  2269. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2270. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2271. end
  2272. attack = false
  2273. coroutine.resume(coroutine.create(function()
  2274. repeat
  2275. wait(0.25+0.75*math.random())
  2276. if Ammo ~= 0 then
  2277. local meshb1 = Instance.new("SpecialMesh")
  2278. meshb1.Scale = Vector3.new(1,1,1)
  2279. meshb1.MeshType = "Sphere"
  2280. local shellb1 = Instance.new("Part")
  2281. meshb1.Parent = shellb1
  2282. shellb1.Anchored = true
  2283. shellb1.formFactor = 3
  2284. shellb1.Size = Vector3.new(0.3,0.3,0.3)
  2285. shellb1.CFrame = CFrame.new((prt5.CFrame * CFrame.new(0,-prt5.Size.y/2,0)).p)
  2286. shellb1.Parent = swordholder
  2287. shellb1.Transparency = 0
  2288. shellb1.BrickColor = BrickColor.new("Alder")
  2289. shellb1.CanCollide = false
  2290. for i = 0 , 1 , 0.1 do
  2291. wait()
  2292. shellb1.CFrame = shellb1.CFrame + Vector3.new(0,-0.15,0)
  2293. shellb1.Transparency = 1*i
  2294. meshb1.Scale = Vector3.new(1,1+3*i,1)
  2295. end
  2296. shellb1.Parent=nil
  2297. end
  2298. until CurrentAmmo ~= "Poison"
  2299. end))
  2300. end
  2301. function KBAmmo()
  2302. attack = true
  2303. for i = 0.1 , 1 , 0.1 do
  2304. wait()
  2305. RW.C0 = CFrame.new(1.5-0.5*i, 0.5, -0.5*i) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2306. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2307. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40+60*i),math.rad(0),math.rad(25+20*i))
  2308. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2309. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2310. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5*i),0,0)
  2311. end
  2312. ars(Head,1)
  2313. for i = 0.2 , 1 , 0.2 do
  2314. wait()
  2315. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2316. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2317. LW.C0 = CFrame.new(-1.5+0.25*i, 0.5, -0.5) * CFrame.Angles(math.rad(100),math.rad(0),math.rad(45))
  2318. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2319. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2320. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-2.5*i),0,0)
  2321. end
  2322. for i = 0.1 , 1 , 0.2 do
  2323. wait()
  2324. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2325. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2326. LW.C0 = CFrame.new(-1.25-0.25*i, 0.5, -0.5+0.25*i) * CFrame.Angles(math.rad(100+20*i),math.rad(0),math.rad(45))
  2327. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2328. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2329. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(2.5+2.5*i),0,0)
  2330. end
  2331. for i = 0.1 , 1 , 0.2 do
  2332. wait()
  2333. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2334. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-10*i), 0, 0)
  2335. LW.C0 = CFrame.new(-1.5, 0.5, -0.25-0.25*i) * CFrame.Angles(math.rad(120-45*i),math.rad(0),math.rad(45))
  2336. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2337. w3.C0 = CFrame.Angles(math.rad(90+90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2338. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5),0,0)
  2339. end
  2340. for i = 0.1 , 1 , 0.1 do
  2341. wait()
  2342. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2343. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  2344. LW.C0 = CFrame.new(-1.5, 0.5+0.25*i, -0.5) * CFrame.Angles(math.rad(75+60*i),math.rad(0),math.rad(45))
  2345. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2346. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2347. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(5-10*i),0,0)
  2348. end
  2349. for i = 0.2 , 1 , 0.1 do
  2350. wait()
  2351. RW.C0 = CFrame.new(1, 0.5, -0.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2352. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15), 0, 0)
  2353. LW.C0 = CFrame.new(-1.5, 0.75, -0.5) * CFrame.Angles(math.rad(135-20*i),math.rad(0),math.rad(45))
  2354. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2355. w3.C0 = CFrame.Angles(math.rad(180), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2356. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-5+2.5*i),0,0)
  2357. end
  2358. CurrentAmmo = "Knockback"
  2359. ammotrail = BrickColor.new("Black")
  2360. ars(Head,2)
  2361. for i = 0.2 , 1 , 0.1 do
  2362. wait()
  2363. 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(-60))
  2364. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15-15*i), 0, 0)
  2365. LW.C0 = CFrame.new(-1.5, 0.75-0.25*i, -0.5) * CFrame.Angles(math.rad(115-75*i),math.rad(0),math.rad(45-20*i))
  2366. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2367. w3.C0 = CFrame.Angles(math.rad(180-90*i), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2368. Neck.C0 = neckcf0 * CFrame.Angles(math.rad(-2.5+2.5*i),0,0)
  2369. end
  2370. for i = 0.2 , 1 , 0.1 do
  2371. wait()
  2372. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2373. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25*i), 0, 0)
  2374. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  2375. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2376. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2377. end
  2378. attack = false
  2379. end
  2380. function AimedReady(mouse)
  2381. if Ammo <= 0 then Reload() return end
  2382. attack = true
  2383. local wt,t = faketors()
  2384. w7.Part1 = t
  2385. w8.Part1 = t
  2386. w9.Part1 = t
  2387. Character.Humanoid.WalkSpeed = 5
  2388. for i = 0.2 , 1 , 0.2 do
  2389. wait()
  2390. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2391. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25-15*i), 0, 0)
  2392. 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))
  2393. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2394. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2395. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2396. wt.C0 = CFrame.Angles(0, math.rad(50*i), 0)
  2397. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20*i),0)
  2398. end
  2399. for i = 0.2 , 1 , 0.2 do
  2400. wait()
  2401. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2402. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(10-10*i), 0, 0)
  2403. 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))
  2404. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2405. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2406. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2407. wt.C0 = CFrame.Angles(0, math.rad(50+10*i), 0)
  2408. end
  2409. wait() wait()
  2410. local orispread = spread
  2411. spread = 0
  2412. repeat
  2413. wait(0.15)
  2414. as(Head,1)
  2415. coroutine.resume(coroutine.create(function()
  2416. for z = 1 ,2 do
  2417. coroutine.resume(coroutine.create(function()
  2418. local meshb1 = Instance.new("BlockMesh")
  2419. meshb1.Scale = Vector3.new(1,1,1)
  2420. local shellb1 = Instance.new("Part")
  2421. meshb1.Parent = shellb1
  2422. shellb1.Anchored = true
  2423. shellb1.formFactor = 3
  2424. shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100)
  2425. 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)
  2426. shellb1.Parent = swordholder
  2427. shellb1.Transparency = 0
  2428. if math.random(1,2) == 1 then
  2429. shellb1.BrickColor = BrickColor.new("Bright red")
  2430. else
  2431. shellb1.BrickColor = BrickColor.new("Bright orange")
  2432. end
  2433. shellb1.CanCollide = false
  2434. local incre = math.random(0,60)/100
  2435. for i = 0 , 1 , 0.1 do
  2436. wait()
  2437. shellb1.CFrame = shellb1.CFrame + Torso.CFrame.lookVector*incre
  2438. shellb1.Transparency = 1*i
  2439. meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i)
  2440. end
  2441. shellb1.Parent=nil
  2442. end))
  2443. end
  2444. shoottrail(mouse)
  2445. end))
  2446. Ammo = Ammo - 1
  2447. for i = 0.5 , 1 , 0.5 do
  2448. wait()
  2449. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2450. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5*i), 0, 0)
  2451. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(95+5*i),math.rad(0),math.rad(25))
  2452. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2453. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2454. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2455. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  2456. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20+5*i),0)
  2457. end
  2458. for i = 0.5 , 1 , 0.5 do
  2459. wait()
  2460. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2461. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(-5+5*i), 0, 0)
  2462. LW.C0 = CFrame.new(-1.5, 0.5, -0) * CFrame.Angles(math.rad(100-5*i),math.rad(0),math.rad(25))
  2463. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2464. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2465. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2466. wt.C0 = CFrame.Angles(0, math.rad(60), 0)
  2467. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-15-5*i),0)
  2468. end
  2469. until not buttonhold or Ammo <= 0
  2470. spread = orispread
  2471. for i = 0.2 , 1 , 0.2 do
  2472. wait()
  2473. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2474. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15*i), 0, 0)
  2475. LW.C0 = CFrame.new(-1.5, 0.5, -0.25*i) * CFrame.Angles(math.rad(95-25*i),math.rad(0),math.rad(25))
  2476. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2477. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2478. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2479. wt.C0 = CFrame.Angles(0, math.rad(60-60*i), 0)
  2480. Neck.C0 = neckcf0 * CFrame.Angles(0,math.rad(-20+20*i),0)
  2481. end
  2482. w7.Part1 = Torso
  2483. w8.Part1 = Torso
  2484. w9.Part1 = Torso
  2485. RW.Part0 = Torso
  2486. LW.Part0 = Torso
  2487. Torso.Transparency = 0
  2488. RHL.Part0 = Torso
  2489. LHL.Part0 = Torso
  2490. t.Parent = nil
  2491. Character.Humanoid.WalkSpeed = 14
  2492. for i = 0.2 , 1 , 0.2 do
  2493. wait()
  2494. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2495. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(15+10*i), 0, 0)
  2496. 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))
  2497. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2498. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2499. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2500. end
  2501. wait(0.25)
  2502. attack = false
  2503. end
  2504. function returnwelds()
  2505. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-60))
  2506. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(25), 0, 0)
  2507. LW.C0 = CFrame.new(-1.5, 0.5, -0.5) * CFrame.Angles(math.rad(40),math.rad(0),math.rad(25))
  2508. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  2509. w3.C0 = CFrame.Angles(math.rad(90), 0, 0) * CFrame.new(0, 0.25,-0.5)
  2510. w1.C0 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, 0)
  2511. RWL.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(0, 0, 0)
  2512. RWL.C1 = CFrame.new(0.5, 1, 0)
  2513. LWL.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(0, 0, 0)
  2514. LWL.C1 = CFrame.new(-0.5, 1, 0)
  2515. Neck.C0 = neckcf0
  2516. end
  2517. keyhold = false
  2518. function ob1d(mouse)
  2519. hold = true
  2520. if attack then return end
  2521. keyhold = true
  2522. Ready(mouse)
  2523. end
  2524. function ob1u(mouse)
  2525. keyhold = false
  2526. end
  2527. buttonhold = false
  2528. function key(key,mouse)
  2529. if attack then return end
  2530. if key == "f" then
  2531. Reload()
  2532. end
  2533. if key == "q" then
  2534. buttonhold = true
  2535. AimedReady(mouse)
  2536. end
  2537. if key == "e" then
  2538. NormalAmmo()
  2539. end
  2540. if key == "r" then --and (string.match(Player.Unlocks.Value,"Poison Ammo") ~= nil) then
  2541. PoisonAmmo()
  2542. end
  2543. if key == "t" then --and (string.match(Player.Unlocks.Value,"Knockback ammo") ~= nil) then
  2544. KBAmmo()
  2545. end
  2546. end
  2547. function key2(key)
  2548. if key == "f" or key == "q" then
  2549. buttonhold = false
  2550. end
  2551. end
  2552. function s(mouse)
  2553. repeat wait() until not attack
  2554. repeat wait() until not ev.Value
  2555. mouse.Button1Down:connect(function() ob1d(mouse) end)
  2556. mouse.Button1Up:connect(function() ob1u(mouse) end)
  2557. mouse.KeyDown:connect(function(ke) key(ke,mouse) end)
  2558. mouse.KeyUp:connect(key2)
  2559. equipanim()
  2560. ev.Value = true
  2561. end
  2562. function ds(mouse)
  2563. keyhold = false
  2564. repeat wait() until not attack
  2565. repeat wait() until ev.Value
  2566. hideanim()
  2567. wait(0.1)
  2568. ev.Value = false
  2569. end
  2570. Bin.Selected:connect(s)
  2571. Bin.Deselected:connect(ds)
  2572. if PlayerGui:findFirstChild("AmmoMeter") ~= nil then
  2573. PlayerGui:findFirstChild("AmmoMeter").Parent = nil
  2574. end
  2575. coroutine.resume(coroutine.create(function()
  2576. local SG = Instance.new("ScreenGui",PlayerGui)
  2577. SG.Name = "AmmoMeter"
  2578. local frame = Instance.new("Frame",SG)
  2579. frame.Size = UDim2.new(0.2,0,0.1,0)
  2580. frame.Position = UDim2.new(0.5-0.1,0,0.05,0)
  2581. frame.BackgroundColor3 = BrickColor.new("Brown").Color
  2582. local Ammotext = Instance.new("TextLabel",frame)
  2583. Ammotext.Size = UDim2.new(1,0,0.35,0)
  2584. Ammotext.BackgroundTransparency = 1
  2585. Ammotext.Text = "Ammo"
  2586. Ammotext.FontSize = "Size18"
  2587. Ammotext.TextColor3 = BrickColor.new("White").Color
  2588. local backing = Instance.new("ImageLabel",frame)
  2589. backing.Size = UDim2.new(0.8,0,0.45,0)
  2590. backing.Image = "http://www.roblox.com/asset/?id=48965808"
  2591. backing.Position = UDim2.new(0.1,0,0.45,0)
  2592. backing.Position = UDim2.new(0.1,0,0.45,0)
  2593. backing.BackgroundColor3 = BrickColor.new("Black").Color
  2594. local img = Instance.new("ImageLabel",backing)
  2595. img.Size = UDim2.new(1,0,1,0)
  2596. img.Image = "http://www.roblox.com/asset/?id=48965808"
  2597. img.Position = UDim2.new(0,0,0,0)
  2598. img.Position = UDim2.new(0,0,0,0)
  2599. img.BackgroundColor3 = BrickColor.new("Brown").Color
  2600. local percent = Instance.new("TextLabel",backing)
  2601. percent.Size = UDim2.new(1,0,1,0)
  2602. percent.BackgroundTransparency = 1
  2603. percent.TextColor3 = BrickColor.new("White").Color
  2604. percent.Text = Ammo.."/".. MaxAmmo
  2605. percent.FontSize = "Size18"
  2606. local currentam = Instance.new("TextLabel",frame)
  2607. currentam.Size = UDim2.new(0.5,0,0.25,0)
  2608. currentam.Position = UDim2.new(0,0,1,0)
  2609. currentam.BackgroundTransparency = 0
  2610. currentam.BackgroundColor3 = BrickColor.new("Brown").Color
  2611. currentam.TextColor3 = BrickColor.new("White").Color
  2612. currentam.Text = CurrentAmmo
  2613. currentam.FontSize = "Size18"
  2614. repeat
  2615. wait()
  2616. pcall(function()
  2617. img.Size = UDim2.new(1*(Ammo/MaxAmmo),0,1,0)
  2618. percent.Text = Ammo.."/".. MaxAmmo
  2619. currentam.Text = CurrentAmmo
  2620. end)
  2621. until SG.Parent == nil
  2622. end))
  2623. Character.Humanoid.WalkSpeed = 50
  2624. end)
  2625.  
  2626.  
  2627. TextButton_4.Parent = Frame
  2628. TextButton_4.BackgroundColor3 = Color3.new(1, 0.333333, 0)
  2629. TextButton_4.Position = UDim2.new(0, 0, 0, 213)
  2630. TextButton_4.Size = UDim2.new(0, 200, 0, 43)
  2631. TextButton_4.Font = Enum.Font.Garamond
  2632. TextButton_4.FontSize = Enum.FontSize.Size32
  2633. TextButton_4.Text = "Epic Pistol"
  2634. TextButton_4.TextSize = 30
  2635.  
  2636. TextButton_4.MouseButton1Down:connect(function()
  2637. --[[
  2638. FN Five-SeveN Handgun. Developed by Fabrique National Herstal as a counterpart sidearm for
  2639. the FN P90. Uses the PDW 5.7x28mm round, which can still, when fired from a pistol, approach
  2640. rifle speeds.
  2641. --]]
  2642.  
  2643.  
  2644. if script == nil then return end
  2645.  
  2646.  
  2647. Player = game.Players.LocalPlayer
  2648. Char = Player.Character
  2649. animate = Char:findFirstChild("Animate")
  2650. if animate then
  2651. animate:Destroy()
  2652. Name = "Five SeveN"
  2653. MC = BrickColor.new("Really black")
  2654. GC = BrickColor.new("Really black")
  2655. SC = BrickColor.new("Really red")
  2656. Spread = 90000
  2657. MR = 0.01
  2658. MagSize = 20
  2659. Chamber = 1
  2660. canHit = false
  2661. melee = true
  2662. selected = false
  2663. canDual = true
  2664. dual = true
  2665. Button1Down = false
  2666. damage = 35
  2667. canFire = true
  2668. canFire2 = false
  2669. readyTime = 0.1
  2670. automatic = false
  2671. burst = false
  2672. burstCount = 0
  2673. burstCountMax = 3
  2674. canSilence = true
  2675. silenced = false
  2676. canZoom = false
  2677. zoom = false
  2678. switchToSingle = false
  2679. switchToBurst = false
  2680. switchToAutomatic = false
  2681.  
  2682.  
  2683. ammoGui = Instance.new("ScreenGui")
  2684. ammoGui.Name = Name
  2685. local frame = Instance.new("Frame")
  2686. frame.Name = "Frame"
  2687. frame.Size = UDim2.new(0, 165, 0, 60)
  2688. frame.Position = UDim2.new(0, 0, 1, -400)
  2689. frame.BackgroundColor3 = Color3.new(1, 1, 1)
  2690. frame.BorderColor3 = Color3.new(0, 0, 0)
  2691. frame.Parent = ammoGui
  2692. local label = Instance.new("TextLabel")
  2693. label.Name = "Weapon"
  2694. label.Text = "Weapon: " ..Name
  2695. label.Size = UDim2.new(1, 0, 0, 20)
  2696. label.Position = UDim2.new(0, 0, 0, 0)
  2697. label.BackgroundColor3 = Color3.new(1, 0, 0)
  2698. label.BorderColor3 = Color3.new(0, 0, 0)
  2699. label.Parent = frame
  2700. local label = Instance.new("TextLabel")
  2701. label.Name = "MagazinePrefix"
  2702. label.Text = " Magazine:"
  2703. label.TextXAlignment = "Left"
  2704. label.Size = UDim2.new(1, 0, 0, 20)
  2705. label.Position = UDim2.new(0, 0, 0, 20)
  2706. label.BackgroundColor3 = Color3.new(1, 1, 1)
  2707. label.BorderColor3 = Color3.new(0, 0, 0)
  2708. label.Parent = frame
  2709. local label = Instance.new("TextLabel")
  2710. label.Name = "Magazine"
  2711. label.Text = "0/0"
  2712. label.TextXAlignment = "Right"
  2713. label.Size = UDim2.new(1, 0, 0, 20)
  2714. label.Position = UDim2.new(0, -10, 0, 20)
  2715. label.BackgroundTransparency = 1
  2716. label.BorderSizePixel = 0
  2717. label.Parent = frame
  2718. local label = Instance.new("TextLabel")
  2719. label.Name = "AmmoPrefix"
  2720. label.Text = " 5.7x28mm:"
  2721. label.TextXAlignment = "Left"
  2722. label.Size = UDim2.new(1, 0, 0, 20)
  2723. label.Position = UDim2.new(0, 0, 0, 40)
  2724. label.BackgroundColor3 = Color3.new(1, 1, 1)
  2725. label.BorderColor3 = Color3.new(0, 0, 0)
  2726. label.Parent = frame
  2727. local label = Instance.new("TextLabel")
  2728. label.Name = "Ammo"
  2729. label.Text = "0/0"
  2730. label.TextXAlignment = "Right"
  2731. label.Size = UDim2.new(1, 0, 0, 20)
  2732. label.Position = UDim2.new(0, -10, 0, 40)
  2733. label.BackgroundTransparency = 1
  2734. label.BorderSizePixel = 0
  2735. label.Parent = frame
  2736.  
  2737.  
  2738. function updateGui()
  2739. if selected == false then return end
  2740. if Player:FindFirstChild("PlayerGui") == nil then Instance.new("PlayerGui").Parent = Player end
  2741. if Player.PlayerGui:FindFirstChild(Name) == nil then
  2742. ammoGui:Clone().Parent = Player.PlayerGui
  2743. end
  2744. Player.PlayerGui[Name].Frame.Magazine.Text = tostring(magazine.Value).. "/" ..tostring(magazineMax.Value)
  2745. Player.PlayerGui[Name].Frame.Ammo.Text = tostring(ammo.Value).. "/" ..tostring(ammoMax.Value)
  2746. end
  2747.  
  2748.  
  2749. function makeParts(format)
  2750. local model = Instance.new("Model")
  2751. model.Name = Name
  2752. local pm2 = Instance.new("Part")
  2753. pm2.Name = "WeldPoint"
  2754. pm2.formFactor = "Symmetric"
  2755. pm2.Size = Vector3.new(1, 1, 1)
  2756. pm2.BrickColor = MC
  2757. pm2.Reflectance = MR
  2758. pm2.CanCollide = false
  2759. pm2.Transparency = 1
  2760. pm2.Locked = true
  2761. pm2.TopSurface = 0
  2762. pm2.BottomSurface = 0
  2763. pm2.Parent = model
  2764. local m = Instance.new("SpecialMesh")
  2765. m.MeshType = "Brick"
  2766. m.Scale = Vector3.new(0.3, 0.8, 0.4)
  2767. m.Parent = pm2
  2768. if format ~= nil then
  2769. local w = Instance.new("Weld")
  2770. w.Part0 = pm2
  2771. if format == "RightHand" then
  2772. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  2773. w.C0 = CFrame.new(0, 0.9, 0.68)
  2774. w.C1 = CFrame.new()
  2775. elseif format == "LeftHand" then
  2776. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  2777. w.C0 = CFrame.new(0, 0.9, 0.68)
  2778. w.C1 = CFrame.new()
  2779. model.Name = Name.. " (Left)"
  2780. elseif format == "RightHolster" then
  2781. w.Part1 = Player.Character:FindFirstChild("Right Leg")
  2782. w.C0 = CFrame.new(-0.65, -0.25, 0) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0)
  2783. w.C1 = CFrame.new()
  2784. model.Name = Name.. " (Holstered)"
  2785. elseif format == "LeftHolster" then
  2786. w.Part1 = Player.Character:FindFirstChild("Left Leg")
  2787. w.C0 = CFrame.new(0.65, -0.25, 0) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0)
  2788. w.C1 = CFrame.new()
  2789. model.Name = Name.. " (Holstered, Left)"
  2790. end
  2791. w.Parent = pm2
  2792. model.Parent = Player.Character
  2793. end
  2794. local pm = Instance.new("Part")
  2795. pm.Name = "Handle"
  2796. pm.formFactor = "Symmetric"
  2797. pm.Size = Vector3.new(1, 1, 1)
  2798. pm.CanCollide = false
  2799. pm.Transparency = 1
  2800. pm.Locked = true
  2801. pm.TopSurface = 0
  2802. pm.BottomSurface = 0
  2803. pm.Parent = model
  2804. local w = Instance.new("Weld")
  2805. w.Part0 = pm
  2806. w.Part1 = pm2
  2807. w.C0 = CFrame.new()
  2808. w.C1 = CFrame.new()
  2809. w.Parent = pm
  2810. local s = Instance.new("Sound")
  2811. s.Name = "Melee"
  2812. s.SoundId = "rbxasset://sounds/swordslash.wav"
  2813. s.Volume = 1
  2814. s.Pitch = 2
  2815. s.Looped = false
  2816. s.Parent = pm
  2817. local s = Instance.new("Sound")
  2818. s.Name = "Impact"
  2819. s.SoundId = "http://www.roblox.com/Asset/?id=46153268"
  2820. s.Volume = 0.5
  2821. s.Pitch = 1
  2822. s.Looped = false
  2823. s.Parent = pm
  2824. local s = Instance.new("Sound")
  2825. s.Name = "Fire"
  2826. s.SoundId = "http://www.roblox.com/Asset/?id=10209842"
  2827. s.Volume = 1
  2828. s.Pitch = 3
  2829. s.Looped = false
  2830. s.Parent = pm
  2831. local s = Instance.new("Sound")
  2832. s.Name = "Fire2"
  2833. s.SoundId = "http://roblox.com/asset/?id=2691586"
  2834. s.Volume = 1
  2835. s.Pitch = 3
  2836. s.Looped = false
  2837. s.Parent = pm
  2838. local s = Instance.new("Sound")
  2839. s.Name = "Reload"
  2840. s.SoundId = "http://www.roblox.com/Asset/?id=10209636"
  2841. s.Volume = 1
  2842. s.Pitch = 3
  2843. s.Looped = false
  2844. s.Parent = pm
  2845. local s = Instance.new("Sound")
  2846. s.Name = "Empty"
  2847. s.SoundId = "http://www.roblox.com/asset/?id=2697295"
  2848. s.Volume = 1
  2849. s.Pitch = 5
  2850. s.Looped = false
  2851. s.Parent = pm
  2852. local s = Instance.new("Sound")
  2853. s.Name = "Lock"
  2854. s.SoundId = "http://www.roblox.com/Asset/?id=10209845"
  2855. s.Volume = 1
  2856. s.Pitch = 3
  2857. s.Looped = false
  2858. s.Parent = pm
  2859. local s = Instance.new("Sound")
  2860. s.Name = "Release"
  2861. s.SoundId = "http://www.roblox.com/Asset/?id=10209813"
  2862. s.Volume = 1
  2863. s.Pitch = 4
  2864. s.Looped = false
  2865. s.Parent = pm
  2866. local s = Instance.new("Sound")
  2867. s.Name = "Switch"
  2868. s.SoundId = "http://www.roblox.com/asset/?id=2697295"
  2869. s.Volume = 1
  2870. s.Pitch = 10
  2871. s.Looped = false
  2872. s.Parent = pm
  2873. local p = Instance.new("Part")
  2874. p.Name = "ShellOut"
  2875. p.formFactor = "Symmetric"
  2876. p.Size = Vector3.new(1, 1, 1)
  2877. p.Transparency = 1
  2878. p.Locked = true
  2879. p.CanCollide = false
  2880. p.TopSurface = 0
  2881. p.BottomSurface = 0
  2882. p.Parent = model
  2883. local w = Instance.new("Weld")
  2884. w.Part0 = p
  2885. w.Part1 = pm
  2886. w.C0 = CFrame.new(0.5, 0, 0.5) * CFrame.fromEulerAnglesXYZ(0, math.rad(45), 0)
  2887. w.C1 = CFrame.new()
  2888. w.Parent = p
  2889. local p = Instance.new("Part")
  2890. p.Name = "Grip"
  2891. p.formFactor = "Symmetric"
  2892. p.Size = Vector3.new(1, 1, 1)
  2893. p.BrickColor = GC
  2894. p.Reflectance = MR
  2895. p.CanCollide = false
  2896. p.Locked = true
  2897. p.TopSurface = 0
  2898. p.BottomSurface = 0
  2899. p.Parent = model
  2900. local m = Instance.new("SpecialMesh")
  2901. m.MeshType = "Brick"
  2902. m.Scale = Vector3.new(0.261, 0.42, 0.7)
  2903. m.Parent = p
  2904. local w = Instance.new("Weld")
  2905. w.Part0 = p
  2906. w.Part1 = pm
  2907. w.C0 = CFrame.new(0, -0.022, -0.4) * CFrame.fromEulerAnglesXYZ(math.rad(15), 0, 0)
  2908. w.C1 = CFrame.new()
  2909. w.Parent = p
  2910. local p = Instance.new("Part")
  2911. p.Name = "Magazine"
  2912. p.formFactor = "Symmetric"
  2913. p.Size = Vector3.new(1, 1, 1)
  2914. p.BrickColor = MC
  2915. p.Reflectance = MR
  2916. p.CanCollide = false
  2917. p.Locked = true
  2918. p.TopSurface = 0
  2919. p.BottomSurface = 0
  2920. p.Parent = model
  2921. local m = Instance.new("SpecialMesh")
  2922. m.MeshType = "Brick"
  2923. m.Scale = Vector3.new(0.24, 0.38, 0.74)
  2924. m.Parent = p
  2925. local w = Instance.new("Weld")
  2926. w.Part0 = p
  2927. w.Part1 = pm
  2928. w.C0 = CFrame.new(0, -0.02, -0.42) * CFrame.fromEulerAnglesXYZ(math.rad(15), 0, 0)
  2929. w.C1 = CFrame.new()
  2930. w.Parent = p
  2931. local p = Instance.new("Part")
  2932. p.Name = "Rail"
  2933. p.CanCollide = false
  2934. p.formFactor = "Symmetric"
  2935. p.Size = Vector3.new(1, 1, 1)
  2936. p.BrickColor = GC
  2937. p.Reflectance = MR
  2938. p.Locked = true
  2939. p.TopSurface = 0
  2940. p.BottomSurface = 0
  2941. p.Parent = model
  2942. local m = Instance.new("BlockMesh")
  2943. m.Scale = Vector3.new(0.15, 0.05, 0.1)
  2944. m.Parent = p
  2945. local w = Instance.new("Weld")
  2946. w.Part0 = p
  2947. w.Part1 = pm
  2948. w.C0 = CFrame.new(0, 0.55, -0.08)
  2949. w.C1 = CFrame.new()
  2950. w.Parent = p
  2951. local p = Instance.new("Part")
  2952. p.Name = "Rail"
  2953. p.CanCollide = false
  2954. p.formFactor = "Symmetric"
  2955. p.Size = Vector3.new(1, 1, 1)
  2956. p.BrickColor = GC
  2957. p.Reflectance = MR
  2958. p.Locked = true
  2959. p.TopSurface = 0
  2960. p.BottomSurface = 0
  2961. p.Parent = model
  2962. local m = Instance.new("BlockMesh")
  2963. m.Scale = Vector3.new(0.15, 0.05, 0.1)
  2964. m.Parent = p
  2965. local w = Instance.new("Weld")
  2966. w.Part0 = p
  2967. w.Part1 = pm
  2968. w.C0 = CFrame.new(0, 0.65, -0.08)
  2969. w.C1 = CFrame.new()
  2970. w.Parent = p
  2971. local p = Instance.new("Part")
  2972. p.Name = "Rail"
  2973. p.CanCollide = false
  2974. p.formFactor = "Symmetric"
  2975. p.Size = Vector3.new(1, 1, 1)
  2976. p.BrickColor = GC
  2977. p.Reflectance = MR
  2978. p.Locked = true
  2979. p.TopSurface = 0
  2980. p.BottomSurface = 0
  2981. p.Parent = model
  2982. local m = Instance.new("BlockMesh")
  2983. m.Scale = Vector3.new(0.15, 0.05, 0.1)
  2984. m.Parent = p
  2985. local w = Instance.new("Weld")
  2986. w.Part0 = p
  2987. w.Part1 = pm
  2988. w.C0 = CFrame.new(0, 0.75, -0.08)
  2989. w.C1 = CFrame.new()
  2990. w.Parent = p
  2991. local p = Instance.new("Part")
  2992. p.Name = "Trigger"
  2993. p.formFactor = "Symmetric"
  2994. p.Size = Vector3.new(1, 1, 1)
  2995. p.BrickColor = BrickColor.new("Really red")
  2996. p.Reflectance = MR
  2997. p.CanCollide = false
  2998. p.Locked = true
  2999. p.TopSurface = 0
  3000. p.BottomSurface = 0
  3001. p.Parent = model
  3002. local m = Instance.new("BlockMesh")
  3003. m.Scale = Vector3.new(0.1, 0.4, 0.16)
  3004. m.Parent = p
  3005. local w = Instance.new("Weld")
  3006. w.Part0 = p
  3007. w.Part1 = pm
  3008. w.C0 = CFrame.new(0, 0.06, -0.25)
  3009. w.C1 = CFrame.new()
  3010. w.Parent = p
  3011. local p = Instance.new("Part")
  3012. p.Name = "TriggerGuard"
  3013. p.formFactor = "Symmetric"
  3014. p.Size = Vector3.new(1, 1, 1)
  3015. p.BrickColor = GC
  3016. p.CanCollide = false
  3017. p.Locked = true
  3018. p.TopSurface = 0
  3019. p.BottomSurface = 0
  3020. p.Parent = model
  3021. local m = Instance.new("SpecialMesh")
  3022. m.MeshType = "FileMesh"
  3023. m.MeshId = "http://www.roblox.com/asset/?id=3270017"
  3024. m.Scale = Vector3.new(0.34, 0.34, 0.8)
  3025. m.Parent = p
  3026. local w = Instance.new("Weld")
  3027. w.Part0 = p
  3028. w.Part1 = pm
  3029. w.C0 = CFrame.new(-0.25, 0.18, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3030. w.C1 = CFrame.new()
  3031. w.Parent = p
  3032. local p = Instance.new("Part")
  3033. p.Name = "Base"
  3034. p.CanCollide = false
  3035. p.formFactor = "Symmetric"
  3036. p.Size = Vector3.new(1, 1, 1)
  3037. p.BrickColor = GC
  3038. p.Reflectance = MR
  3039. p.Locked = true
  3040. p.TopSurface = 0
  3041. p.BottomSurface = 0
  3042. p.Parent = model
  3043. local m = Instance.new("SpecialMesh")
  3044. m.MeshType = "Brick"
  3045. m.Scale = Vector3.new(0.261, 0.9, 0.248)
  3046. m.Parent = p
  3047. local w = Instance.new("Weld")
  3048. w.Part0 = p
  3049. w.Part1 = pm
  3050. w.C0 = CFrame.new(0, 0.045, -0.066)
  3051. w.C1 = CFrame.new()
  3052. w.Parent = p
  3053. local p = Instance.new("Part")
  3054. p.Name = "Base"
  3055. p.CanCollide = false
  3056. p.formFactor = "Symmetric"
  3057. p.Size = Vector3.new(1, 1, 1)
  3058. p.BrickColor = GC
  3059. p.Reflectance = MR
  3060. p.Locked = true
  3061. p.TopSurface = 0
  3062. p.BottomSurface = 0
  3063. p.Parent = model
  3064. local m = Instance.new("SpecialMesh")
  3065. m.MeshType = "Brick"
  3066. m.Scale = Vector3.new(0.221, 0.5, 0.15)
  3067. m.Parent = p
  3068. local w = Instance.new("Weld")
  3069. w.Part0 = p
  3070. w.Part1 = pm
  3071. w.C0 = CFrame.new(0, 0.6, -0.04)
  3072. w.C1 = CFrame.new()
  3073. w.Parent = p
  3074. local ps = Instance.new("Part")
  3075. ps.Name = "Slide"
  3076. ps.CanCollide = false
  3077. ps.formFactor = "Symmetric"
  3078. ps.Size = Vector3.new(1, 1, 1)
  3079. ps.BrickColor = MC
  3080. ps.Reflectance = MR
  3081. ps.Locked = true
  3082. ps.TopSurface = 0
  3083. ps.BottomSurface = 0
  3084. ps.Parent = model
  3085. local m = Instance.new("SpecialMesh")
  3086. m.MeshType = "Brick"
  3087. m.Name = "Mesh"
  3088. m.Scale = Vector3.new(0.26, 0.2, 0.24)
  3089. m.Offset = Vector3.new(0, 0, 0.2)
  3090. m.Parent = ps
  3091. local w = Instance.new("Weld")
  3092. w.Part0 = ps
  3093. w.Part1 = pm
  3094. if magazine.Value ~= 0 then
  3095. w.C0 = CFrame.new(0, 0.4, 0.06)
  3096. else
  3097. w.C0 = CFrame.new(0, 0.1, 0.06)
  3098. end
  3099. w.C1 = CFrame.new()
  3100. w.Parent = ps
  3101. local p = Instance.new("Part")
  3102. p.Name = "SlideBottom"
  3103. p.CanCollide = false
  3104. p.formFactor = "Symmetric"
  3105. p.Size = Vector3.new(1, 1, 1)
  3106. p.BrickColor = MC
  3107. p.Reflectance = MR
  3108. p.Locked = true
  3109. p.TopSurface = 0
  3110. p.BottomSurface = 0
  3111. p.Parent = model
  3112. local m = Instance.new("SpecialMesh")
  3113. m.MeshType = "Brick"
  3114. m.Name = "Mesh"
  3115. m.Scale = Vector3.new(0.26, 0.9, 0.16)
  3116. m.Parent = p
  3117. local w = Instance.new("Weld")
  3118. w.Part0 = p
  3119. w.Part1 = ps
  3120. w.C0 = CFrame.new(0, -0.35, -0.06)
  3121. w.C1 = CFrame.new()
  3122. w.Parent = p
  3123. local p = Instance.new("Part")
  3124. p.Name = "GuideBottom"
  3125. p.CanCollide = false
  3126. p.formFactor = "Symmetric"
  3127. p.Size = Vector3.new(1, 1, 1)
  3128. p.BrickColor = MC
  3129. p.Reflectance = MR
  3130. p.Locked = true
  3131. p.TopSurface = 0
  3132. p.BottomSurface = 0
  3133. p.Parent = model
  3134. local m = Instance.new("SpecialMesh")
  3135. m.MeshType = "Brick"
  3136. m.Name = "Mesh"
  3137. m.Scale = Vector3.new(0.22, 0.5, 0.22)
  3138. m.Parent = p
  3139. local w = Instance.new("Weld")
  3140. w.Part0 = p
  3141. w.Part1 = ps
  3142. w.C0 = CFrame.new(0, 0.2, -0.04)
  3143. w.C1 = CFrame.new()
  3144. w.Parent = p
  3145. local p = Instance.new("Part")
  3146. p.Name = "Guide"
  3147. p.CanCollide = false
  3148. p.formFactor = "Symmetric"
  3149. p.Size = Vector3.new(1, 1, 1)
  3150. p.BrickColor = MC
  3151. p.Reflectance = MR
  3152. p.Locked = true
  3153. p.TopSurface = 0
  3154. p.BottomSurface = 0
  3155. p.Parent = model
  3156. local m = Instance.new("SpecialMesh")
  3157. m.MeshType = "Brick"
  3158. m.Name = "Mesh"
  3159. m.Scale = Vector3.new(0.22, 0.5, 0.22)
  3160. m.Parent = p
  3161. local w = Instance.new("Weld")
  3162. w.Part0 = p
  3163. w.Part1 = ps
  3164. w.C0 = CFrame.new(0, 0.2, 0.01)
  3165. w.C1 = CFrame.new()
  3166. w.Parent = p
  3167. local p = Instance.new("Part")
  3168. p.Name = "Slide1"
  3169. p.CanCollide = false
  3170. p.formFactor = "Symmetric"
  3171. p.Size = Vector3.new(1, 1, 1)
  3172. p.BrickColor = MC
  3173. p.Reflectance = MR
  3174. p.Locked = true
  3175. p.TopSurface = 0
  3176. p.BottomSurface = 0
  3177. p.Parent = model
  3178. local m = Instance.new("SpecialMesh")
  3179. m.MeshType = "Brick"
  3180. m.Name = "Mesh"
  3181. m.Scale = Vector3.new(0.13, 0.6, 0.24)
  3182. m.Parent = p
  3183. local w = Instance.new("Weld")
  3184. w.Part0 = p
  3185. w.Part1 = ps
  3186. w.C0 = CFrame.new(0.065, -0.2, 0)
  3187. w.C1 = CFrame.new()
  3188. w.Parent = p
  3189. local p = Instance.new("Part")
  3190. p.Name = "Slide2"
  3191. p.CanCollide = false
  3192. p.formFactor = "Symmetric"
  3193. p.Size = Vector3.new(1, 1, 1)
  3194. p.BrickColor = MC
  3195. p.Reflectance = MR
  3196. p.Locked = true
  3197. p.TopSurface = 0
  3198. p.BottomSurface = 0
  3199. p.Parent = model
  3200. local m = Instance.new("SpecialMesh")
  3201. m.MeshType = "Brick"
  3202. m.Name = "Mesh"
  3203. m.Scale = Vector3.new(0.26, 0.6, 0.12)
  3204. m.Parent = p
  3205. local w = Instance.new("Weld")
  3206. w.Part0 = p
  3207. w.Part1 = ps
  3208. w.C0 = CFrame.new(0, -0.2, -0.03)
  3209. w.C1 = CFrame.new()
  3210. w.Parent = p
  3211. local p = Instance.new("Part")
  3212. p.Name = "Slide3"
  3213. p.CanCollide = false
  3214. p.formFactor = "Symmetric"
  3215. p.Size = Vector3.new(1, 1, 1)
  3216. p.BrickColor = MC
  3217. p.Reflectance = MR
  3218. p.Locked = true
  3219. p.TopSurface = 0
  3220. p.BottomSurface = 0
  3221. p.Parent = model
  3222. local m = Instance.new("SpecialMesh")
  3223. m.MeshType = "Brick"
  3224. m.Name = "Mesh"
  3225. m.Scale = Vector3.new(0.26, 0.45, 0.24)
  3226. m.Parent = p
  3227. local w = Instance.new("Weld")
  3228. w.Part0 = p
  3229. w.Part1 = ps
  3230. w.C0 = CFrame.new(0, -0.58, 0)
  3231. w.C1 = CFrame.new()
  3232. w.Parent = p
  3233. local p = Instance.new("Part")
  3234. p.Name = "Slide3"
  3235. p.CanCollide = false
  3236. p.formFactor = "Symmetric"
  3237. p.Size = Vector3.new(1, 1, 1)
  3238. p.BrickColor = MC
  3239. p.Reflectance = MR
  3240. p.Locked = true
  3241. p.TopSurface = 0
  3242. p.BottomSurface = 0
  3243. p.Parent = model
  3244. local m = Instance.new("SpecialMesh")
  3245. m.MeshType = "Brick"
  3246. m.Name = "Mesh"
  3247. m.Scale = Vector3.new(0.33, 0.18, 0.22)
  3248. m.Parent = p
  3249. local w = Instance.new("Weld")
  3250. w.Part0 = p
  3251. w.Part1 = ps
  3252. w.C0 = CFrame.new(0, -0.64, -0.01)
  3253. w.C1 = CFrame.new()
  3254. w.Parent = p
  3255. local p = Instance.new("Part")
  3256. p.Name = "Shell"
  3257. p.formFactor = "Custom"
  3258. p.Size = Vector3.new(0.2, 0.26, 0.2)
  3259. p.BrickColor = BrickColor.new("New Yeller")
  3260. if magazine.Value ~= 0 then
  3261. p.Transparency = 0
  3262. else
  3263. p.Transparency = 1
  3264. end
  3265. p.Reflectance = 0
  3266. p.CanCollide = false
  3267. p.Locked = true
  3268. p.TopSurface = 0
  3269. p.BottomSurface = 0
  3270. p.Parent = model
  3271. local m = Instance.new("CylinderMesh")
  3272. m.Scale = Vector3.new(0.4, 1, 0.4)
  3273. m.Parent = p
  3274. local w = Instance.new("Weld")
  3275. w.Part0 = p
  3276. w.Part1 = pm
  3277. w.C0 = CFrame.new(0, -0.07, 0.07)
  3278. w.C1 = CFrame.new()
  3279. w.Parent = p
  3280. local p = Instance.new("Part")
  3281. p.Name = "RearSight"
  3282. p.CanCollide = false
  3283. p.formFactor = "Symmetric"
  3284. p.Size = Vector3.new(1, 1, 1)
  3285. p.BrickColor = MC
  3286. p.Reflectance = MR
  3287. p.Locked = true
  3288. p.TopSurface = 0
  3289. p.BottomSurface = 0
  3290. p.Parent = model
  3291. local m = Instance.new("BlockMesh")
  3292. m.Name = "Mesh"
  3293. m.Scale = Vector3.new(0.08, 0.08, 0.08)
  3294. m.Parent = p
  3295. local w = Instance.new("Weld")
  3296. w.Part0 = p
  3297. w.Part1 = ps
  3298. w.C0 = CFrame.new(0.07, -0.7, 0.12)
  3299. w.C1 = CFrame.new()
  3300. w.Parent = p
  3301. local p = Instance.new("Part")
  3302. p.Name = "RearSight"
  3303. p.CanCollide = false
  3304. p.formFactor = "Symmetric"
  3305. p.Size = Vector3.new(1, 1, 1)
  3306. p.BrickColor = SC
  3307. p.Reflectance = MR
  3308. p.Locked = true
  3309. p.TopSurface = 0
  3310. p.BottomSurface = 0
  3311. p.Parent = model
  3312. local m = Instance.new("CylinderMesh")
  3313. m.Name = "Mesh"
  3314. m.Scale = Vector3.new(0.04, 0.084, 0.04)
  3315. m.Parent = p
  3316. local w = Instance.new("Weld")
  3317. w.Part0 = p
  3318. w.Part1 = ps
  3319. w.C0 = CFrame.new(0.07, -0.705, 0.12)
  3320. w.C1 = CFrame.new()
  3321. w.Parent = p
  3322. local p = Instance.new("Part")
  3323. p.Name = "RearSight"
  3324. p.CanCollide = false
  3325. p.formFactor = "Symmetric"
  3326. p.Size = Vector3.new(1, 1, 1)
  3327. p.BrickColor = SC
  3328. p.Reflectance = MR
  3329. p.Locked = true
  3330. p.TopSurface = 0
  3331. p.BottomSurface = 0
  3332. p.Parent = model
  3333. local m = Instance.new("CylinderMesh")
  3334. m.Name = "Mesh"
  3335. m.Scale = Vector3.new(0.04, 0.084, 0.04)
  3336. m.Parent = p
  3337. local w = Instance.new("Weld")
  3338. w.Part0 = p
  3339. w.Part1 = ps
  3340. w.C0 = CFrame.new(-0.07, -0.705, 0.12)
  3341. w.C1 = CFrame.new()
  3342. w.Parent = p
  3343. local p = Instance.new("Part")
  3344. p.Name = "RearSight"
  3345. p.CanCollide = false
  3346. p.formFactor = "Symmetric"
  3347. p.Size = Vector3.new(1, 1, 1)
  3348. p.BrickColor = MC
  3349. p.Reflectance = MR
  3350. p.Locked = true
  3351. p.TopSurface = 0
  3352. p.BottomSurface = 0
  3353. p.Parent = model
  3354. local m = Instance.new("BlockMesh")
  3355. m.Name = "Mesh"
  3356. m.Scale = Vector3.new(0.08, 0.08, 0.08)
  3357. m.Parent = p
  3358. local w = Instance.new("Weld")
  3359. w.Part0 = p
  3360. w.Part1 = ps
  3361. w.C0 = CFrame.new(-0.07, -0.7, 0.12)
  3362. w.C1 = CFrame.new()
  3363. w.Parent = p
  3364. local p = Instance.new("Part")
  3365. p.Name = "FrontSight"
  3366. p.CanCollide = false
  3367. p.formFactor = "Symmetric"
  3368. p.Size = Vector3.new(1, 1, 1)
  3369. p.BrickColor = MC
  3370. p.Reflectance = MR
  3371. p.Locked = true
  3372. p.TopSurface = 0
  3373. p.BottomSurface = 0
  3374. p.Parent = model
  3375. local m = Instance.new("BlockMesh")
  3376. m.Name = "Mesh"
  3377. m.Scale = Vector3.new(0.08, 0.08, 0.08)
  3378. m.Parent = p
  3379. local w = Instance.new("Weld")
  3380. w.Part0 = p
  3381. w.Part1 = ps
  3382. w.C0 = CFrame.new(0, 0.35, 0.12)
  3383. w.C1 = CFrame.new()
  3384. w.Parent = p
  3385. local p = Instance.new("Part")
  3386. p.Name = "FrontSight"
  3387. p.CanCollide = false
  3388. p.formFactor = "Symmetric"
  3389. p.Size = Vector3.new(1, 1, 1)
  3390. p.BrickColor = SC
  3391. p.Reflectance = MR
  3392. p.Locked = true
  3393. p.TopSurface = 0
  3394. p.BottomSurface = 0
  3395. p.Parent = model
  3396. local m = Instance.new("CylinderMesh")
  3397. m.Scale = Vector3.new(0.04, 0.084, 0.04)
  3398. m.Parent = p
  3399. local w = Instance.new("Weld")
  3400. w.Part0 = p
  3401. w.Part1 = ps
  3402. w.C0 = CFrame.new(0, 0.346, 0.12)
  3403. w.C1 = CFrame.new()
  3404. w.Parent = p
  3405. local p = Instance.new("Part")
  3406. p.Name = "Hole"
  3407. p.formFactor = "Symmetric"
  3408. p.Size = Vector3.new(1, 1, 1)
  3409. p.BrickColor = BrickColor.new("Really black")
  3410. p.Reflectance = 0
  3411. p.CanCollide = false
  3412. p.Locked = true
  3413. p.TopSurface = 0
  3414. p.BottomSurface = 0
  3415. p.Parent = model
  3416. local m = Instance.new("CylinderMesh")
  3417. m.Scale = Vector3.new(0.09, 0.901, 0.09)
  3418. m.Offset = Vector3.new(0, 0.34, 0)
  3419. m.Parent = p
  3420. local w = Instance.new("Weld")
  3421. w.Part0 = p
  3422. w.Part1 = pm
  3423. w.C0 = CFrame.new(0, 0.75, 0.07)
  3424. w.C1 = CFrame.new()
  3425. w.Parent = p
  3426. local p = Instance.new("Part")
  3427. if silenced == false then
  3428. p.Name = "Muzzle"
  3429. else
  3430. p.Name = "Muzzle 2"
  3431. end
  3432. p.formFactor = "Symmetric"
  3433. p.Size = Vector3.new(1, 1, 1)
  3434. p.BrickColor = BrickColor.new("Really red")
  3435. p.Reflectance = 0.06
  3436. p.CanCollide = false
  3437. p.Locked = true
  3438. p.TopSurface = 0
  3439. p.BottomSurface = 0
  3440. p.Parent = model
  3441. local m = Instance.new("CylinderMesh")
  3442. m.Scale = Vector3.new(0.11, 0.9, 0.11)
  3443. m.Offset = Vector3.new(0, 0.34, 0)
  3444. m.Parent = p
  3445. local w = Instance.new("Weld")
  3446. w.Part0 = p
  3447. w.Part1 = pm
  3448. w.C0 = CFrame.new(0, 0.75, 0.07)
  3449. w.C1 = CFrame.new()
  3450. w.Parent = p
  3451. local s = Instance.new("Smoke")
  3452. s.Enabled = false
  3453. s.Name = "Smoke"
  3454. s.RiseVelocity = -5
  3455. s.Opacity = 0.3
  3456. s.Color = Color3.new(75 / 225, 75 / 225, 75 / 225)
  3457. s.Size = 1
  3458. s.Parent = p
  3459. local f = Instance.new("Fire")
  3460. f.Enabled = false
  3461. f.Name = "Fire"
  3462. f.Heat = -35
  3463. f.Size = 1
  3464. f.Parent = p
  3465. p.Touched:connect(function(hit) onTouched(hit, p, "pistol") end)
  3466. local p = Instance.new("Part")
  3467. if silenced == false then
  3468. p.Name = "Silencer"
  3469. p.Transparency = 1
  3470. else
  3471. p.Name = "Muzzle"
  3472. p.Transparency = 0
  3473. end
  3474. p.formFactor = "Symmetric"
  3475. p.Size = Vector3.new(1, 1, 1)
  3476. p.BrickColor = BrickColor.new("Really black")
  3477. p.Reflectance = 0
  3478. p.CanCollide = false
  3479. p.Locked = true
  3480. p.TopSurface = 0
  3481. p.BottomSurface = 0
  3482. p.Parent = model
  3483. local m = Instance.new("CylinderMesh")
  3484. m.Scale = Vector3.new(0.2, 0.8, 0.2)
  3485. m.Parent = p
  3486. local w = Instance.new("Weld")
  3487. w.Part0 = p
  3488. w.Part1 = pm
  3489. w.C0 = CFrame.new(0, 1.26, 0.07)
  3490. w.C1 = CFrame.new()
  3491. w.Parent = p
  3492. local p = Instance.new("Part")
  3493. p.Name = "Silencer1"
  3494. if silenced == false then
  3495. p.Transparency = 1
  3496. else
  3497. p.Transparency = 0
  3498. end
  3499. p.formFactor = "Symmetric"
  3500. p.Size = Vector3.new(1, 1, 1)
  3501. p.BrickColor = BrickColor.new("Really red")
  3502. p.Reflectance = 0
  3503. p.CanCollide = false
  3504. p.Locked = true
  3505. p.TopSurface = 0
  3506. p.BottomSurface = 0
  3507. p.Parent = model
  3508. local m = Instance.new("CylinderMesh")
  3509. m.Scale = Vector3.new(0.21, 0.6, 0.21)
  3510. m.Parent = p
  3511. local w = Instance.new("Weld")
  3512. w.Part0 = p
  3513. w.Part1 = pm
  3514. w.C0 = CFrame.new(0, 1.26, 0.07)
  3515. w.C1 = CFrame.new()
  3516. w.Parent = p
  3517. return model
  3518. end
  3519.  
  3520.  
  3521. function removeParts(format)
  3522. if format == "RightHand" then
  3523. pcall(function() Player.Character[Name]:Remove() end)
  3524. elseif format == "LeftHand" then
  3525. pcall(function() Player.Character[Name.. " (Left)"]:Remove() end)
  3526. elseif format == "RightHolster" then
  3527. pcall(function() Player.Character[Name.. " (Holstered)"]:Remove() end)
  3528. elseif format == "LeftHolster" then
  3529. pcall(function() Player.Character[Name.. " (Holstered, Left)"]:Remove() end)
  3530. end
  3531. end
  3532.  
  3533.  
  3534. function onTouched(hit, source, format)
  3535. if format == "pistol" then
  3536. if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent ~= Player.Character then
  3537. tagHumanoid(hit.Parent.Humanoid)
  3538. if canHit == true and melee == true then
  3539. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 50
  3540. Player.Character[Name].Handle.Impact:Play()
  3541. hit.Parent.Humanoid.Sit = true
  3542. melee = false
  3543. wait(0.8)
  3544. melee = true
  3545. end
  3546. delay(3, function() untagHumanoid(hit.Parent.Humanoid) end)
  3547. end
  3548. end
  3549. end
  3550.  
  3551.  
  3552. function SetAngle(Joint, Angle, Character)
  3553. if Character == nil then return false end
  3554. local Joints = {
  3555. Character.Torso:FindFirstChild("Right Shoulder 2"),
  3556. Character.Torso:FindFirstChild("Left Shoulder 2"),
  3557. Character.Torso:FindFirstChild("Right Hip 2"),
  3558. Character.Torso:FindFirstChild("Left Hip 2")
  3559. }
  3560. if Joints[Joint] == nil then return false end
  3561. if Joint == 1 or Joint == 3 then
  3562. Joints[Joint].DesiredAngle = Angle
  3563. end
  3564. if Joint == 2 or Joint == 4 then
  3565. Joints[Joint].DesiredAngle = -Angle
  3566. end
  3567. end
  3568.  
  3569.  
  3570. function ForceAngle(Joint, Angle, Character)
  3571. if Character == nil then return false end
  3572. local Joints = {
  3573. Character.Torso:FindFirstChild("Right Shoulder 2"),
  3574. Character.Torso:FindFirstChild("Left Shoulder 2"),
  3575. Character.Torso:FindFirstChild("Right Hip 2"),
  3576. Character.Torso:FindFirstChild("Left Hip 2")
  3577. }
  3578. if Joints[Joint] == nil then return false end
  3579. if Joint == 1 or Joint == 3 then
  3580. Joints[Joint].DesiredAngle = Angle
  3581. Joints[Joint].CurrentAngle = Angle
  3582. end
  3583. if Joint == 2 or Joint == 4 then
  3584. Joints[Joint].DesiredAngle = -Angle
  3585. Joints[Joint].CurrentAngle = -Angle
  3586. end
  3587. end
  3588.  
  3589.  
  3590. function SetSpeed(Joint, Speed, Character)
  3591. if Character == nil then return false end
  3592. local Joints = {
  3593. Character.Torso:FindFirstChild("Right Shoulder 2"),
  3594. Character.Torso:FindFirstChild("Left Shoulder 2"),
  3595. Character.Torso:FindFirstChild("Right Hip 2"),
  3596. Character.Torso:FindFirstChild("Left Hip 2")
  3597. }
  3598. if Joints[Joint] == nil then return false end
  3599. Joints[Joint].MaxVelocity = Speed
  3600. end
  3601.  
  3602.  
  3603. function DisableLimb(Limb, Character)
  3604. if Character == nil then return false end
  3605. if Character:FindFirstChild("Torso") == nil then return false end
  3606. local Joints = {
  3607. Character.Torso:FindFirstChild("Right Shoulder"),
  3608. Character.Torso:FindFirstChild("Left Shoulder"),
  3609. Character.Torso:FindFirstChild("Right Hip"),
  3610. Character.Torso:FindFirstChild("Left Hip")
  3611. }
  3612. local Limbs = {
  3613. Character:FindFirstChild("Right Arm"),
  3614. Character:FindFirstChild("Left Arm"),
  3615. Character:FindFirstChild("Right Leg"),
  3616. Character:FindFirstChild("Left Leg")
  3617. }
  3618. if Joints[Limb] == nil then return false end
  3619. if Limbs[Limb] == nil then return false end
  3620. local Joint = Instance.new("Motor")
  3621. Joint.Parent = Character.Torso
  3622. Joint.Part0 = Character.Torso
  3623. Joint.Part1 = Limbs[Limb]
  3624. if Limb == 1 then
  3625. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3626. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3627. Joint.Name = "Right Shoulder 2"
  3628. elseif Limb == 2 then
  3629. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  3630. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  3631. Joint.Name = "Left Shoulder 2"
  3632. elseif Limb == 3 then
  3633. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3634. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3635. Joint.Name = "Right Hip 2"
  3636. elseif Limb == 4 then
  3637. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  3638. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  3639. Joint.Name = "Left Hip 2"
  3640. end
  3641. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  3642. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  3643. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  3644. Joints[Limb]:Remove()
  3645. end
  3646.  
  3647.  
  3648. function ResetLimbCFrame(Limb, Character)
  3649. if Character == nil then return false end
  3650. if Character.Parent == nil then return false end
  3651. if Character:FindFirstChild("Torso") == nil then return false end
  3652. local Joints = {
  3653. Character.Torso:FindFirstChild("Right Shoulder 2"),
  3654. Character.Torso:FindFirstChild("Left Shoulder 2"),
  3655. Character.Torso:FindFirstChild("Right Hip 2"),
  3656. Character.Torso:FindFirstChild("Left Hip 2")
  3657. }
  3658. local Limbs = {
  3659. Character:FindFirstChild("Right Arm"),
  3660. Character:FindFirstChild("Left Arm"),
  3661. Character:FindFirstChild("Right Leg"),
  3662. Character:FindFirstChild("Left Leg")
  3663. }
  3664. if Joints[Limb] == nil then return false end
  3665. if Limbs[Limb] == nil then return false end
  3666. if Limb == 1 then
  3667. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3668. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3669. elseif Limb == 2 then
  3670. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  3671. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  3672. elseif Limb == 3 then
  3673. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3674. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3675. elseif Limb == 4 then
  3676. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  3677. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  3678. end
  3679. end
  3680.  
  3681.  
  3682. function EnableLimb(Limb, Character)
  3683. if Character == nil then return false end
  3684. if Character:FindFirstChild("Torso") == nil then return false end
  3685. local Joints = {
  3686. Character.Torso:FindFirstChild("Right Shoulder 2"),
  3687. Character.Torso:FindFirstChild("Left Shoulder 2"),
  3688. Character.Torso:FindFirstChild("Right Hip 2"),
  3689. Character.Torso:FindFirstChild("Left Hip 2")
  3690. }
  3691. local Limbs = {
  3692. Character:FindFirstChild("Right Arm"),
  3693. Character:FindFirstChild("Left Arm"),
  3694. Character:FindFirstChild("Right Leg"),
  3695. Character:FindFirstChild("Left Leg")
  3696. }
  3697. if Joints[Limb] == nil then return false end
  3698. if Limbs[Limb] == nil then return false end
  3699. if Limb == 1 then
  3700. Joints[Limb].Name = "Right Shoulder"
  3701. elseif Limb == 2 then
  3702. Joints[Limb].Name = "Left Shoulder"
  3703. elseif Limb == 3 then
  3704. Joints[Limb].Name = "Right Hip"
  3705. elseif Limb == 4 then
  3706. Joints[Limb].Name = "Left Hip"
  3707. end
  3708. Animate = Character:FindFirstChild("Animate")
  3709. if Animate == nil then return false end
  3710. Animate = Animate:Clone()
  3711. Character.Animate:Remove()
  3712. Animate.Parent = Character
  3713. end
  3714.  
  3715.  
  3716. function playAnimation(format, mouse)
  3717. if format == "equip" then
  3718. Player.Character[Name.. " (Holstered)"].Handle.Weld:Remove()
  3719. local w = Instance.new("Weld")
  3720. w.Part0 = Player.Character[Name.. " (Holstered)"].Handle
  3721. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  3722. w.C0 = CFrame.new(0, 1.2, 0.7)
  3723. w.C1 = CFrame.new()
  3724. w.Parent = Player.Character[Name.. " (Holstered)"].Handle
  3725. for i = 0.01, 1, 0.1 do
  3726. if Player.Character:FindFirstChild("Torso") ~= nil then
  3727. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3728. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3729. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new((-0.55 * i) + (1.5 * (1 - i)), 0.75 * i, 0.35 * i) * CFrame.fromEulerAnglesXYZ(math.rad(315 + ((1 - i) * 50)), 0, math.rad(-90) * i)
  3730. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3731. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new((-1 * i) + (-1.5 * (1 - i)), 0.5 * i, 0.6 * i) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), math.rad(-5 * i), 0)
  3732. wait()
  3733. else return false end
  3734. else return false end
  3735. end
  3736. return playAnimation("hold")
  3737. end
  3738. if format == "rightEquip" then
  3739. Player.Character[Name.. " (Holstered)"].Handle.Weld:Remove()
  3740. local w = Instance.new("Weld")
  3741. w.Part0 = Player.Character[Name.. " (Holstered)"].Handle
  3742. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  3743. w.C0 = CFrame.new(0, 1.2, 0.7)
  3744. w.C1 = CFrame.new()
  3745. w.Parent = Player.Character[Name.. " (Holstered)"].Handle
  3746. for i = 0.01, 1, 0.1 do
  3747. if Player.Character:FindFirstChild("Torso") ~= nil then
  3748. if Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3749. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3750. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new((-1 * i) + (-1.5 * (1 - i)), 0.5 * i, 0.6 * i) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), math.rad(-5 * i), 0)
  3751. wait()
  3752. else return false end
  3753. else return false end
  3754. end
  3755. return playAnimation("rightHold")
  3756. end
  3757. if format == "leftEquip" then
  3758. Player.Character[Name.. " (Holstered, Left)"].Handle.Weld:Remove()
  3759. local w = Instance.new("Weld")
  3760. w.Part0 = Player.Character[Name.. " (Holstered, Left)"].Handle
  3761. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  3762. w.C0 = CFrame.new(0, 1.2, 0.7)
  3763. w.C1 = CFrame.new()
  3764. w.Parent = Player.Character[Name.. " (Holstered, Left)"].Handle
  3765. for i = 0.01, 1, 0.1 do
  3766. if Player.Character:FindFirstChild("Torso") ~= nil then
  3767. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  3768. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3769. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new((1 * i) + (1.5 * (1 - i)), 0.5 * i, 0.6 * i) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), math.rad(5 * i), 0)
  3770. wait()
  3771. else return false end
  3772. else return false end
  3773. end
  3774. return playAnimation("leftHold")
  3775. end
  3776. if format == "unequip" then
  3777. for i = 1, 0.01, -0.1 do
  3778. if Player.Character:FindFirstChild("Torso") ~= nil then
  3779. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3780. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3781. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new((-0.55 * i) + (1.5 * (1 - i)), 0.75 * i, 0.35 * i) * CFrame.fromEulerAnglesXYZ(math.rad(315 + ((1 - i) * 50)), 0, math.rad(-90) * i)
  3782. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3783. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new((-1 * i) + (-1.5 * (1 - i)), 0.5 * i, 0.6 * i) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), math.rad(-5 * i), 0)
  3784. wait()
  3785. else return false end
  3786. else return false end
  3787. end
  3788. return true
  3789. end
  3790. if format == "leftUnequip" then
  3791. for i = 1, 0.01, -0.1 do
  3792. if Player.Character:FindFirstChild("Torso") ~= nil then
  3793. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  3794. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3795. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new((1 * i) + (1.5 * (1 - i)), 0.5 * i, 0.6 * i) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), math.rad(5 * i), 0)
  3796. wait()
  3797. else return false end
  3798. else return false end
  3799. end
  3800. return true
  3801. end
  3802. if format == "rightUnequip" then
  3803. for i = 1, 0.01, -0.1 do
  3804. if Player.Character:FindFirstChild("Torso") ~= nil then
  3805. if Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3806. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3807. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new((-1 * i) + (-1.5 * (1 - i)), 0.5 * i, 0.6 * i) * CFrame.fromEulerAnglesXYZ(math.rad(-90 * i), math.rad(-5 * i), 0)
  3808. wait()
  3809. else return false end
  3810. else return false end
  3811. end
  3812. return true
  3813. end
  3814. if format == "hold" then
  3815. if Player.Character:FindFirstChild("Torso") ~= nil then
  3816. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3817. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3818. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.55, 0.75, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(315), 0, math.rad(-90))
  3819. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3820. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), 0)
  3821. else return false end
  3822. else return false end
  3823. end
  3824. if format == "rightHold" then
  3825. if Player.Character:FindFirstChild("Torso") ~= nil then
  3826. if Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3827. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3828. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.72, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), math.rad(-5))
  3829. else return false end
  3830. else return false end
  3831. end
  3832. if format == "leftHold" then
  3833. if Player.Character:FindFirstChild("Torso") ~= nil then
  3834. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil then
  3835. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3836. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0.72, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(5), math.rad(5))
  3837. else return false end
  3838. else return false end
  3839. end
  3840. if format == "reload" then
  3841. coroutine.wrap(function()
  3842. Player.Character[Name].WeldPoint.Weld.C0 = CFrame.new(0, 0.7, 0.68)
  3843. for i = 0, 30, 15 do
  3844. pcall(function() Player.Character[Name].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(-i), 0, 0) end)
  3845. wait()
  3846. end
  3847. pcall(function() Player.Character[Name].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(-30), 0, 0) end)
  3848. end)()
  3849. Player.Character[Name].Handle.Empty:Play()
  3850. for i = 0, 25, 7.5 do
  3851. if Player.Character:FindFirstChild("Torso") ~= nil then
  3852. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3853. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3854. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1, 0.5 + (i * 0.025), 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(5 + (i * 0.8)), 0)
  3855. wait()
  3856. else return false end
  3857. else return false end
  3858. end
  3859. Player.Character[Name].Handle.Release:Play()
  3860. Player.Character[Name].Shell.Transparency = 1
  3861. Player.Character[Name].Magazine.Transparency = 1
  3862. CamShake(15, 50000)
  3863. local magazineDrop = Player.Character[Name].Magazine:Clone()
  3864. magazineDrop.Transparency = 0
  3865. magazineDrop.Parent = game:GetService("Workspace")
  3866. coroutine.resume(coroutine.create(function(part) wait(4.5) for i = 0, 1, 0.1 do part.Transparency = i wait() end part:Remove() end), magazineDrop)
  3867. delay(0.1, function() magazineDrop.CanCollide = true end)
  3868. Player.Character[Name].Handle.Reload:Play()
  3869. local magazineNew = Player.Character[Name].Magazine:Clone()
  3870. magazineNew.Name = "New Magazine"
  3871. magazineNew.Transparency = 0
  3872. magazineNew.Parent = Player.Character[Name]
  3873. local w = Instance.new("Weld")
  3874. w.Part0 = magazineNew
  3875. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  3876. w.C0 = CFrame.new(0, 1.1, 0)
  3877. w.C1 = CFrame.new() * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  3878. w.Parent = magazineNew
  3879. for i = 25, 0, -5 do
  3880. if Player.Character:FindFirstChild("Torso") ~= nil then
  3881. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3882. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3883. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.55 + (i / 50), 0.75 - (i / 50), 0.35 + (i / 22.5)) * CFrame.fromEulerAnglesXYZ(math.rad(315 - (i * 2)), math.rad(-i * 3.5), math.rad(-90))
  3884. wait()
  3885. else return false end
  3886. else return false end
  3887. end
  3888. Player.Character[Name].Magazine.Transparency = 0
  3889. Player.Character[Name].Shell.Transparency = 0
  3890. Player.Character[Name]["New Magazine"]:Remove()
  3891. for i = 25, 0, -7.5 do
  3892. if Player.Character:FindFirstChild("Torso") ~= nil then
  3893. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3894. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3895. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1, 0.5 + (i * 0.025), 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(5 + (i * 0.8)), 0)
  3896. wait()
  3897. else return false end
  3898. else return false end
  3899. end
  3900. coroutine.wrap(function()
  3901. Player.Character[Name].WeldPoint.Weld.C0 = CFrame.new(0, 0.9, 0.68)
  3902. for i = 30, 0, -15 do
  3903. pcall(function() Player.Character[Name].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(-i), 0, 0) end)
  3904. wait()
  3905. end
  3906. pcall(function() Player.Character[Name].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(0), 0, 0) end)
  3907. end)()
  3908. for i = 0, 10, 5 do
  3909. if Player.Character:FindFirstChild("Torso") ~= nil then
  3910. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3911. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3912. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.55, 0.75, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(-i), math.rad(-90))
  3913. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3914. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + i), math.rad(-5), 0)
  3915. wait()
  3916. else return false end
  3917. else return false end
  3918. end
  3919. if magazine.Value == 0 then
  3920. wait(0.02)
  3921. Player.Character[Name].Handle.Lock.Pitch = 1.5
  3922. Player.Character[Name].Handle.Lock:Play()
  3923. Player.Character[Name].Slide.Weld.C0 = CFrame.new(0, 0.4, 0.06)
  3924. CamShake(1, 50000)
  3925. CamShake(1, -50000)
  3926. wait(0.02)
  3927. else end
  3928. for i = 10, 0, -5 do
  3929. if Player.Character:FindFirstChild("Torso") ~= nil then
  3930. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3931. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3932. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.55, 0.75, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(-i), math.rad(-90))
  3933. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3934. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + i), math.rad(-5), 0)
  3935. wait()
  3936. else return false end
  3937. else return false end
  3938. end
  3939. wait(0.04)
  3940. end
  3941. if format == "reloadDual" then
  3942. for i = 0, 25, 7.5 do
  3943. if Player.Character:FindFirstChild("Torso") ~= nil then
  3944. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3945. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3946. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(5), 0)
  3947. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3948. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), 0)
  3949. wait()
  3950. else return false end
  3951. else return false end
  3952. end
  3953. coroutine.wrap(function()
  3954. Player.Character[Name].WeldPoint.Weld.C0 = CFrame.new(0, 0.9, 1)
  3955. Player.Character[Name.. " (Left)"].WeldPoint.Weld.C0 = CFrame.new(0, 0.9, 1)
  3956. for i = 0, 360, 15 do
  3957. pcall(function() Player.Character[Name].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(-i), 0, 0) end)
  3958. pcall(function() Player.Character[Name.. " (Left)"].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(-i), 0, 0) end)
  3959. wait()
  3960. end
  3961. pcall(function() Player.Character[Name].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(-360), 0, 0) end)
  3962. pcall(function() Player.Character[Name.. " (Left)"].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(-360), 0, 0) end)
  3963. end)()
  3964. if magazine.Value == 0 then
  3965. Player.Character[Name].Shell.Transparency = 1
  3966. Player.Character[Name.. " (Left)"].Shell.Transparency = 1
  3967. Player.Character[Name].Slide.Weld.C0 = CFrame.new(0, 0.1, 0.06)
  3968. Player.Character[Name.. " (Left)"].Slide.Weld.C0 = CFrame.new(0, 0.1, 0.06)
  3969. else end
  3970. wait(0.1)
  3971. CamShake(1, 40000)
  3972. Player.Character[Name].Handle.Release:Play()
  3973. Player.Character[Name].Magazine.Transparency = 1
  3974. local magazineDrop = Player.Character[Name].Magazine:Clone()
  3975. magazineDrop.Transparency = 0
  3976. magazineDrop.Parent = game:GetService("Workspace")
  3977. coroutine.resume(coroutine.create(function(part) wait(4.5) for i = 0, 1, 0.1 do part.Transparency = i wait() end part:Remove() end), magazineDrop)
  3978. delay(0.1, function() magazineDrop.CanCollide = true end)
  3979. wait(math.random(0.1, 0.25))
  3980. Player.Character[Name].Handle.Release:Play()
  3981. Player.Character[Name.. " (Left)"].Magazine.Transparency = 1
  3982. local magazineDropDual = Player.Character[Name.. " (Left)"].Magazine:Clone()
  3983. magazineDropDual.Transparency = 0
  3984. magazineDropDual.Parent = game:GetService("Workspace")
  3985. coroutine.resume(coroutine.create(function(part) wait(4.5) for i = 0, 1, 0.1 do part.Transparency = i wait() end part:Remove() end), magazineDropDual)
  3986. delay(0.1, function() magazineDropDual.CanCollide = true end)
  3987. for i = 0, 25, 7.5 do
  3988. if Player.Character:FindFirstChild("Torso") ~= nil then
  3989. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  3990. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  3991. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(5), 0)
  3992. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  3993. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), 0)
  3994. wait()
  3995. else return false end
  3996. else return false end
  3997. end
  3998. local magazineNew = Player.Character[Name].Magazine:Clone()
  3999. magazineNew.Name = "New Magazine"
  4000. magazineNew.Transparency = 0
  4001. magazineNew.Parent = Player.Character[Name]
  4002. local w = Instance.new("Weld")
  4003. w.Part0 = magazineNew
  4004. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  4005. w.C0 = CFrame.new(0, 1.1, 0)
  4006. w.C1 = CFrame.new()
  4007. w.Parent = magazineNew
  4008. local magazineNewL = Player.Character[Name.. " (Left)"].Magazine:Clone()
  4009. magazineNewL.Name = "New Magazine L"
  4010. magazineNewL.Transparency = 0
  4011. magazineNewL.Parent = Player.Character[Name.. " (Left)"]
  4012. local w = Instance.new("Weld")
  4013. w.Part0 = magazineNewL
  4014. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  4015. w.C0 = CFrame.new(0, 1.1, 0)
  4016. w.C1 = CFrame.new()
  4017. w.Parent = magazineNewL
  4018. for i = 125, 0, -15 do
  4019. if Player.Character:FindFirstChild("Torso") ~= nil then
  4020. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4021. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  4022. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad((-90 - i) + 100), math.rad(5), 0)
  4023. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4024. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad((-90 - i) + 100), math.rad(-5), 0)
  4025. wait()
  4026. else return false end
  4027. else return false end
  4028. end
  4029. Player.Character[Name].Handle.Reload:Play()
  4030. Player.Character[Name].Magazine.Transparency = 0
  4031. Player.Character[Name].Shell.Transparency = 0
  4032. Player.Character[Name.. " (Left)"].Magazine.Transparency = 0
  4033. Player.Character[Name.. " (Left)"].Shell.Transparency = 0
  4034. Player.Character[Name]["New Magazine"]:Remove()
  4035. Player.Character[Name.. " (Left)"]["New Magazine L"]:Remove()
  4036. Player.Character[Name].WeldPoint.Weld.C0 = CFrame.new(0, 0.9, 0.68)
  4037. Player.Character[Name.. " (Left)"].WeldPoint.Weld.C0 = CFrame.new(0, 0.9, 0.68)
  4038. for i = 0, 125, 15 do
  4039. if Player.Character:FindFirstChild("Torso") ~= nil then
  4040. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4041. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  4042. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad((-90 - i) + 100), math.rad(5), 0)
  4043. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4044. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad((-90 - i) + 100), math.rad(-5), 0)
  4045. wait()
  4046. else return false end
  4047. else return false end
  4048. end
  4049. if magazine.Value == 0 then
  4050. Player.Character[Name].Handle.Lock.Pitch = 1.5
  4051. Player.Character[Name].Handle.Lock:Play()
  4052. Player.Character[Name].Slide.Weld.C0 = CFrame.new(0, 0.4, 0.06)
  4053. Player.Character[Name.. " (Left)"].Slide.Weld.C0 = CFrame.new(0, 0.4, 0.06)
  4054. CamShake(1, 30000)
  4055. CamShake(1, -30000)
  4056. else end
  4057. for i = 25, 0, -5 do
  4058. if Player.Character:FindFirstChild("Torso") ~= nil then
  4059. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4060. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  4061. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(5), 0)
  4062. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4063. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.7, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), 0)
  4064. wait()
  4065. else return false end
  4066. else return false end
  4067. end
  4068. playAnimation("rightHold")
  4069. playAnimation("leftHold")
  4070. return true
  4071. end
  4072. if format == "fire" then
  4073. Player.Character[Name].Slide.Weld.C0 = CFrame.new(0, 0.1, 0.06)
  4074. if Player.Character[Name]:FindFirstChild("Handle") ~= nil then
  4075. if silenced then
  4076. Player.Character[Name].Handle.Fire2.Volume = math.random(3, 8) / 10
  4077. Player.Character[Name].Handle.Fire2.Pitch = math.random(1.8, 2)
  4078. Player.Character[Name].Handle.Fire2:Play()
  4079. CamShake(15, 50000)
  4080. else
  4081. Player.Character[Name].Handle.Fire.Volume = math.random(8, 12) / 10
  4082. Player.Character[Name].Handle.Fire.Pitch = math.random(25, 35) / 20
  4083. Player.Character[Name].Handle.Fire:Play()
  4084. CamShake(15, 50000)
  4085. end
  4086. else return false end
  4087. if Player.Character[Name]:FindFirstChild("Muzzle") ~= nil then
  4088. if silenced == false then
  4089. coroutine.resume(coroutine.create(function() Player.Character[Name].Muzzle.Smoke.Enabled = true Player.Character[Name].Muzzle.Fire.Enabled = true wait(0.1) Player.Character[Name].Muzzle.Smoke.Enabled = false Player.Character[Name].Muzzle.Fire.Enabled = false end))
  4090. else end
  4091. else return false end
  4092. for i = 0, 10, 5 do
  4093. if Player.Character:FindFirstChild("Torso") ~= nil then
  4094. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4095. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  4096. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.55, 0.75, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(i), math.rad(-90))
  4097. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4098. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), 0)
  4099. wait()
  4100. else return false end
  4101. else return false end
  4102. end
  4103. makeShell(Player.Character[Name]:FindFirstChild("ShellOut"))
  4104. if magazine.Value ~= 0 then
  4105. Player.Character[Name].Slide.Weld.C0 = CFrame.new(0, 0.4, 0.06)
  4106. elseif magazine.Value == 0 then
  4107. Player.Character[Name].Handle.Lock.Pitch = 3
  4108. Player.Character[Name].Shell.Transparency = 1
  4109. Player.Character[Name].Handle.Lock:Play()
  4110. end
  4111. for i = 10, 0, -5 do
  4112. if Player.Character:FindFirstChild("Torso") ~= nil then
  4113. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4114. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  4115. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.55, 0.75, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(i), math.rad(-90))
  4116. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4117. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), 0)
  4118. wait()
  4119. else return false end
  4120. else return false end
  4121. end
  4122. end
  4123. if format == "rightFire" then
  4124. Player.Character[Name].Slide.Weld.C0 = CFrame.new(0, 0.1, 0.06)
  4125. if Player.Character[Name]:FindFirstChild("Handle") ~= nil then
  4126. if silenced then
  4127. Player.Character[Name].Handle.Fire2.Volume = math.random(3, 8) / 10
  4128. Player.Character[Name].Handle.Fire2.Pitch = math.random(1.8, 2)
  4129. Player.Character[Name].Handle.Fire2:Play()
  4130. CamShake(15, 50000)
  4131. else
  4132. Player.Character[Name].Handle.Fire.Volume = math.random(8, 12) / 10
  4133. Player.Character[Name].Handle.Fire.Pitch = math.random(25, 35) / 20
  4134. Player.Character[Name].Handle.Fire:Play()
  4135. CamShake(15, 50000)
  4136. end
  4137. else return false end
  4138. if Player.Character[Name]:FindFirstChild("Muzzle") ~= nil then
  4139. if silenced == false then
  4140. coroutine.resume(coroutine.create(function() Player.Character[Name].Muzzle.Smoke.Enabled = true Player.Character[Name].Muzzle.Fire.Enabled = true wait(0.1) Player.Character[Name].Muzzle.Smoke.Enabled = false Player.Character[Name].Muzzle.Fire.Enabled = false end))
  4141. else end
  4142. else return false end
  4143. for i = 0, 10, 5 do
  4144. if Player.Character:FindFirstChild("Torso") ~= nil then
  4145. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4146. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4147. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.72, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), math.rad(-5))
  4148. wait()
  4149. else return false end
  4150. else return false end
  4151. end
  4152. makeShell(Player.Character[Name]:FindFirstChild("ShellOut"))
  4153. if magazine.Value ~= 0 then
  4154. Player.Character[Name].Slide.Weld.C0 = CFrame.new(0, 0.4, 0.06)
  4155. elseif magazine.Value == 0 then
  4156. Player.Character[Name].Handle.Lock.Pitch = 3
  4157. Player.Character[Name].Handle.Lock:Play()
  4158. Player.Character[Name].Shell.Transparency = 1
  4159. Player.Character[Name.. " (Left)"].Shell.Transparency = 1
  4160. Player.Character[Name.. " (Left)"].Slide.Weld.C0 = CFrame.new(0, 0.1, 0.06)
  4161. end
  4162. for i = 10, 0, -5 do
  4163. if Player.Character:FindFirstChild("Torso") ~= nil then
  4164. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4165. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4166. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-0.72, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(-5), math.rad(-5))
  4167. wait()
  4168. else return false end
  4169. else return false end
  4170. end
  4171. end
  4172. if format == "leftFire" then
  4173. Player.Character[Name.. " (Left)"].Slide.Weld.C0 = CFrame.new(0, 0.1, 0.06)
  4174. if Player.Character[Name.. " (Left)"]:FindFirstChild("Handle") ~= nil then
  4175. if silenced then
  4176. Player.Character[Name.. " (Left)"].Handle.Fire2.Volume = math.random(3, 8) / 10
  4177. Player.Character[Name.. " (Left)"].Handle.Fire2.Pitch = math.random(1.8, 2)
  4178. Player.Character[Name.. " (Left)"].Handle.Fire2:Play()
  4179. CamShake(15, 50000)
  4180. else
  4181. Player.Character[Name.. " (Left)"].Handle.Fire.Volume = math.random(8, 12) / 10
  4182. Player.Character[Name.. " (Left)"].Handle.Fire.Pitch = math.random(25, 35) / 20
  4183. Player.Character[Name.. " (Left)"].Handle.Fire:Play()
  4184. CamShake(15, 50000)
  4185. end
  4186. end
  4187. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") ~= nil then
  4188. if silenced == false then
  4189. coroutine.resume(coroutine.create(function() Player.Character[Name.. " (Left)"].Muzzle.Smoke.Enabled = true Player.Character[Name.. " (Left)"].Muzzle.Fire.Enabled = true wait(0.1) Player.Character[Name.. " (Left)"].Muzzle.Smoke.Enabled = false Player.Character[Name.. " (Left)"].Muzzle.Fire.Enabled = false end))
  4190. else end
  4191. end
  4192. for i = 0, 10, 5 do
  4193. if Player.Character:FindFirstChild("Torso") ~= nil then
  4194. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4195. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  4196. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0.72, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(5), math.rad(5))
  4197. wait()
  4198. else return false end
  4199. else return false end
  4200. end
  4201. makeShell(Player.Character[Name.. " (Left)"]:FindFirstChild("ShellOut"))
  4202. if magazine.Value ~= 0 then
  4203. Player.Character[Name.. " (Left)"].Slide.Weld.C0 = CFrame.new(0, 0.4, 0.06)
  4204. elseif magazine.Value == 0 then
  4205. Player.Character[Name].Handle.Lock.Pitch = 3
  4206. Player.Character[Name].Handle.Lock:Play()
  4207. Player.Character[Name].Shell.Transparency = 1
  4208. Player.Character[Name.. " (Left)"].Shell.Transparency = 1
  4209. Player.Character[Name].Slide.Weld.C0 = CFrame.new(0, 0.1, 0.06)
  4210. end
  4211. for i = 10, 0, -5 do
  4212. if Player.Character:FindFirstChild("Torso") ~= nil then
  4213. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4214. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  4215. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0.72, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - i), math.rad(5), math.rad(5))
  4216. wait()
  4217. else return false end
  4218. else return false end
  4219. end
  4220. end
  4221. if format == "whip" then
  4222. Player.Character[Name].Handle.Melee:Play()
  4223. for i = 0, 10, 5 do
  4224. if Player.Character:FindFirstChild("Torso") ~= nil then
  4225. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4226. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  4227. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.55, 0.75, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(-i * 2), math.rad(-90))
  4228. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4229. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1, 0.5, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5 - i * 3), 0)
  4230. wait()
  4231. else return false end
  4232. else return false end
  4233. end
  4234. wait(0.1)
  4235. for i = 0, 10, 5 do
  4236. if Player.Character:FindFirstChild("Torso") ~= nil then
  4237. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4238. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4239. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1 + i * 0.05, 0.5 + i * 0.05, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5 + i * 5), 0)
  4240. wait()
  4241. else return false end
  4242. else return false end
  4243. end
  4244. for i = 10, 0, -5 do
  4245. if Player.Character:FindFirstChild("Torso") ~= nil then
  4246. if Player.Character.Torso:FindFirstChild("Left Shoulder 2") ~= nil and Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
  4247. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new()
  4248. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(-1 + i * 0.05, 0.5 + i * 0.05, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5 + i * 5), 0)
  4249. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new()
  4250. Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(-0.55, 0.75, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(315), math.rad(-i * 2), math.rad(-90))
  4251. wait()
  4252. else return false end
  4253. else return false end
  4254. end
  4255. if dual ~= true then
  4256. playAnimation("hold")
  4257. return true
  4258. else
  4259. playAnimation("rightHold")
  4260. playAnimation("leftHold")
  4261. return true
  4262. end
  4263. end
  4264. return true
  4265. end
  4266.  
  4267.  
  4268. function CamShake(time, freq)
  4269. coroutine.resume(coroutine.create(function()
  4270. local cam = game:GetService("Workspace").CurrentCamera
  4271. local time = 10
  4272. local seed = Vector3.new(math.random(100, 200) / freq, math.random(100, 200) / freq, 0)
  4273. if math.random(1, 2) == 1 then seed = Vector3.new(-seed.x, seed.y, 0) end
  4274. if math.random(1, 2) == 1 then seed = Vector3.new(seed.x, -seed.y, 0) end
  4275. cam.CoordinateFrame = (CFrame.new(cam.Focus.p) * (cam.CoordinateFrame - cam.CoordinateFrame.p) * CFrame.fromEulerAnglesXYZ(seed.x * time, seed.y * time, 0)) * CFrame.new(0, 0, (cam.CoordinateFrame.p - cam.Focus.p).magnitude)
  4276. for i = 1, time do
  4277. cam.CoordinateFrame = (CFrame.new(cam.Focus.p) * (cam.CoordinateFrame - cam.CoordinateFrame.p) * CFrame.fromEulerAnglesXYZ(-seed.x, -seed.y, 0)) * CFrame.new(0, 0, (cam.CoordinateFrame.p - cam.Focus.p).magnitude)
  4278. wait()
  4279. end
  4280. end))
  4281. end
  4282.  
  4283.  
  4284. function makeShell(part)
  4285. if part == nil then return false end
  4286. local casing = Instance.new("Part")
  4287. casing.Name = "Shell"
  4288. casing.formFactor = "Custom"
  4289. casing.Size = Vector3.new(0.2, 0.26, 0.2)
  4290. casing.CFrame = CFrame.new(part.Position) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  4291. casing.BrickColor = BrickColor.new("New Yeller")
  4292. local mesh = Instance.new("CylinderMesh")
  4293. mesh.Scale = Vector3.new(0.4, 1, 0.4)
  4294. mesh.Parent = casing
  4295. casing.Parent = game:GetService("Workspace")
  4296. casing:BreakJoints()
  4297. casing.Velocity = (part.CFrame.lookVector * 50) + Vector3.new(0, 10, 0)
  4298. coroutine.resume(coroutine.create(function() wait(4.5) for i = 0, 1, 0.1 do casing.Transparency = i wait() end casing:Remove() end))
  4299. end
  4300.  
  4301.  
  4302. function Weld(x, y)
  4303. local weld = Instance.new("Weld")
  4304. weld.Part0 = x
  4305. weld.Part1 = y
  4306. CJ = CFrame.new(x.Position)
  4307. C0 = x.CFrame:inverse() * CJ
  4308. C1 = y.CFrame:inverse() * CJ
  4309. weld.C0 = C0
  4310. weld.C1 = C1
  4311. weld.Parent = x
  4312. end
  4313.  
  4314.  
  4315. function tagHumanoid(humanoid)
  4316. local tag = Instance.new("ObjectValue")
  4317. tag.Name = "creator"
  4318. tag.Value = Player
  4319. tag.Parent = humanoid
  4320. local tag = Instance.new("StringValue")
  4321. tag.Name = "creatorType1"
  4322. tag.Value = Name
  4323. tag.Parent = humanoid
  4324. local tag = Instance.new("StringValue")
  4325. tag.Name = "creatorType2"
  4326. tag.Value = "shot"
  4327. tag.Parent = humanoid
  4328. end
  4329.  
  4330.  
  4331. function untagHumanoid(humanoid)
  4332. if humanoid ~= nil then
  4333. local tag = humanoid:FindFirstChild("creator")
  4334. if tag ~= nil then
  4335. tag:Remove()
  4336. end
  4337. local tag = humanoid:FindFirstChild("creatorType1")
  4338. if tag ~= nil then
  4339. tag:Remove()
  4340. end
  4341. local tag = humanoid:FindFirstChild("creatorType2")
  4342. if tag ~= nil then
  4343. tag:Remove()
  4344. end
  4345. end
  4346. end
  4347.  
  4348.  
  4349. function fire(startPoint, endPoint, hit)
  4350. local trail = Instance.new("Part")
  4351. trail.Name = "Bullet Trail"
  4352. trail.BrickColor = BrickColor.new("Dark stone grey")
  4353. trail.TopSurface = 0
  4354. trail.BottomSurface = 0
  4355. trail.formFactor = 0
  4356. trail.Size = Vector3.new(1, 1, 1)
  4357. trail.Transparency = 0.5
  4358. trail.Anchored = true
  4359. trail.CanCollide = false
  4360. trail.CFrame = CFrame.new((startPoint + endPoint) / 2, endPoint)
  4361. trail.Parent = game:GetService("Workspace")
  4362. local mesh = Instance.new("SpecialMesh")
  4363. mesh.MeshType = "Brick"
  4364. mesh.Scale = Vector3.new(0.1, 0.1, (startPoint - endPoint).magnitude)
  4365. mesh.Parent = trail
  4366. coroutine.resume(coroutine.create(function(part) for i = 1, 10 do part.Mesh.Scale = Vector3.new(part.Mesh.Scale.x - 0.01, part.Mesh.Scale.y - 0.01, part.Mesh.Scale.z) wait() end part:Remove() end), trail)
  4367. if hit ~= nil then
  4368. if hit.Parent == nil then return end
  4369. if hit.Parent.ClassName == "Hat" then
  4370. if hit.Parent.Parent.Humanoid ~= nil then
  4371. hit.Parent.Parent.Humanoid:TakeDamage(damage * 5)
  4372. end
  4373. end
  4374. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  4375. tagHumanoid(hit.Parent.Humanoid)
  4376. if hit.Name == "Head" then
  4377. hit.Parent.Humanoid:TakeDamage(damage * 10)
  4378. elseif hit.Name == "Torso" then
  4379. hit.Parent.Humanoid:TakeDamage(damage * 2)
  4380. elseif hit.Name == "Left Leg" then
  4381. hit.Parent.Humanoid:TakeDamage(damage)
  4382. hit.Parent.Humanoid.Sit = true
  4383. elseif hit.Name == "Right Leg" then
  4384. hit.Parent.Humanoid:TakeDamage(damage)
  4385. hit.Parent.Humanoid.Sit = true
  4386. else
  4387. hit.Parent.Humanoid:TakeDamage(damage)
  4388. end
  4389. if math.random(1, 10) == 1 then
  4390. hit.Parent.Humanoid.Sit = true
  4391. end
  4392. delay(0.1, function() untagHumanoid(hit.Parent.Humanoid) end)
  4393. end
  4394. if hit.Anchored == false then
  4395. hit.Velocity = hit.Velocity + ((endPoint - startPoint).unit * (damage * 2))
  4396. end
  4397. end
  4398. end
  4399.  
  4400.  
  4401. function onButton1Down(mouse)
  4402. if selected == false then return end
  4403. if Player.Character:FindFirstChild(Name) ~= nil and Button1Down == false and canFire == true and (function() if dual == true then if Player.Character:FindFirstChild(Name.. " (Left)") ~= nil then return true else return false end else return true end end)() == true then
  4404. if Player.Character[Name]:FindFirstChild("Handle") == nil then return end
  4405. if Player.Character[Name]:FindFirstChild("Muzzle") == nil then return end
  4406. if dual == true then if Player.Character[Name.. " (Left)"]:FindFirstChild("Handle") == nil then return end end
  4407. if dual == true then if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end end
  4408. mouse.Icon = "http://www.roblox.com/asset/?id=59125642"
  4409. Button1Down = true
  4410. canFire = false
  4411. canFire2 = true
  4412. while canFire2 == true do
  4413. local humanoid = Player.Character:FindFirstChild("Humanoid")
  4414. if humanoid == nil then
  4415. canFire2 = false
  4416. break
  4417. end
  4418. if humanoid.Health <= 0 then
  4419. canFire2 = false
  4420. break
  4421. end
  4422. local fireLeft = false
  4423. if automatic == false and burst == false then
  4424. canFire2 = false
  4425. elseif automatic == false and burst == true then
  4426. if burstCount >= burstCountMax then
  4427. canFire2 = false
  4428. burstCount = 0
  4429. break
  4430. end
  4431. burstCount = burstCount + 1
  4432. elseif automatic == true and burst == false then
  4433. fireLeft = true
  4434. end
  4435. if magazine.Value > 0 then
  4436. magazine.Value = magazine.Value - 1
  4437. updateGui()
  4438. if silenced == true then
  4439. CamShake(1, Spread)
  4440. else end
  4441. fire(Player.Character[Name].Muzzle.Position, mouse.Hit.p, mouse.Target)
  4442. coroutine.resume(coroutine.create(function()
  4443. if dual == true then
  4444. playAnimation("rightFire")
  4445. elseif dual == false then
  4446. playAnimation("fire")
  4447. end
  4448. end))
  4449. if dual == true and magazine.Value ~= 0 then
  4450. magazine.Value = magazine.Value - 1
  4451. updateGui()
  4452. wait(math.random(0, 0.15))
  4453. fire(Player.Character[Name.. " (Left)"].Muzzle.Position, mouse.Hit.p, mouse.Target)
  4454. coroutine.resume(coroutine.create(function()
  4455. playAnimation("leftFire")
  4456. end))
  4457. end
  4458. else
  4459. Player.Character[Name].Handle.Empty:Play()
  4460. end
  4461. if fireLeft == true and dual == true and automatic == true then
  4462. if magazine.Value > 0 then
  4463. coroutine.resume(coroutine.create(function()
  4464. wait(readyTime / 2)
  4465. magazine.Value = magazine.Value - 1
  4466. updateGui()
  4467. fire(Player.Character[Name.. " (Left)"].Muzzle.Position, mouse.Hit.p, mouse.Target)
  4468. if silenced == true then
  4469. CamShake(1, Spread)
  4470. else end
  4471. playAnimation("leftFire")
  4472. end))
  4473. else
  4474. coroutine.resume(coroutine.create(function()
  4475. wait(readyTime / 2)
  4476. Player.Character[Name].Handle.Empty:Play()
  4477. end))
  4478. end
  4479. end
  4480. wait(readyTime)
  4481. end
  4482. if magazine.Value ~= 0 then
  4483. mouse.Icon = "http://www.roblox.com/asset/?id=59125633"
  4484. else end
  4485. canFire = true
  4486. end
  4487. end
  4488.  
  4489.  
  4490. function onButton1Up(mouse)
  4491. if selected == false then return end
  4492. Button1Down = false
  4493. canFire2 = false
  4494. burstCount = 0
  4495. while canFire == false do wait() end
  4496. if dual == true and automatic == false then
  4497. if Player.Character[Name.. " (Left)"]:FindFirstChild("Handle") == nil then return end
  4498. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end
  4499. mouse.Icon = "http://www.roblox.com/asset/?id=59125642"
  4500. canFire = false
  4501. canFire2 = true
  4502. while canFire2 == true do
  4503. local humanoid = Player.Character:FindFirstChild("Humanoid")
  4504. if humanoid == nil then
  4505. canFire2 = false
  4506. break
  4507. end
  4508. if humanoid.Health <= 0 then
  4509. canFire2 = false
  4510. break
  4511. end
  4512. if burst == false then
  4513. canFire2 = false
  4514. elseif burst == true then
  4515. if burstCount >= burstCountMax then
  4516. canFire2 = false
  4517. burstCount = 0
  4518. break
  4519. end
  4520. burstCount = burstCount + 1
  4521. end
  4522. if magazine.Value <= 0 then
  4523. Player.Character[Name].Handle.Empty:Play()
  4524. else end
  4525. end
  4526. if magazine.Value ~= 0 then
  4527. mouse.Icon = "http://www.roblox.com/asset/?id=59125633"
  4528. else end
  4529. canFire = true
  4530. end
  4531. end
  4532.  
  4533.  
  4534. function onKeyDown(key, mouse)
  4535. if selected == false then return end
  4536. key = key:lower()
  4537. if key == "q" and Button1Down == false and canFire == true then
  4538. if mouse.Target == nil then return end
  4539. if game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent) ~= nil then
  4540. if dual == true then onKeyDown("t", mouse) end
  4541. onDeselected(mouse)
  4542. removeParts("RightHolster")
  4543. script.Parent.Parent = game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent).Backpack
  4544. end
  4545. end
  4546. if key == "e" and Button1Down == false and canFire == true and canSilence == true then
  4547. if silenced then
  4548. silenced = false
  4549. Player.Character[Name].Handle.Lock.Pitch = 5
  4550. Player.Character[Name].Handle.Lock:Play()
  4551. if Player.Character:FindFirstChild(Name) == nil then return end
  4552. if Player.Character[Name]:FindFirstChild("Muzzle") == nil then return end
  4553. if Player.Character[Name]:FindFirstChild("Muzzle 2") == nil then return end
  4554. Player.Character[Name].Muzzle.Transparency = 1
  4555. Player.Character[Name].Silencer1.Transparency = 1
  4556. Player.Character[Name].Muzzle.Name = "Silencer"
  4557. Player.Character[Name]["Muzzle 2"].Name = "Muzzle"
  4558. if dual == true then
  4559. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end
  4560. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle 2") == nil then return end
  4561. Player.Character[Name.. " (Left)"].Muzzle.Transparency = 1
  4562. Player.Character[Name.. " (Left)"].Silencer1.Transparency = 1
  4563. Player.Character[Name.. " (Left)"].Muzzle.Name = "Silencer"
  4564. Player.Character[Name.. " (Left)"]["Muzzle 2"].Name = "Muzzle"
  4565. end
  4566. else
  4567. silenced = true
  4568. Player.Character[Name].Handle.Lock.Pitch = 5
  4569. Player.Character[Name].Handle.Lock:Play()
  4570. if Player.Character:FindFirstChild(Name) == nil then return end
  4571. if Player.Character[Name]:FindFirstChild("Silencer") == nil then return end
  4572. if Player.Character[Name]:FindFirstChild("Muzzle") == nil then return end
  4573. Player.Character[Name].Silencer.Transparency = 0
  4574. Player.Character[Name].Silencer1.Transparency = 0
  4575. Player.Character[Name].Muzzle.Name = "Muzzle 2"
  4576. Player.Character[Name].Silencer.Name = "Muzzle"
  4577. if dual == true then
  4578. if Player.Character[Name.. " (Left)"]:FindFirstChild("Silencer") == nil then return end
  4579. if Player.Character[Name.. " (Left)"]:FindFirstChild("Muzzle") == nil then return end
  4580. Player.Character[Name.. " (Left)"].Silencer.Transparency = 0
  4581. Player.Character[Name.. " (Left)"].Silencer1.Transparency = 0
  4582. Player.Character[Name.. " (Left)"].Muzzle.Name = "Muzzle 2"
  4583. Player.Character[Name.. " (Left)"].Silencer.Name = "Muzzle"
  4584. end
  4585. end
  4586. end
  4587. if key == "r" and Button1Down == false and canFire == true then
  4588. if ammo.Value > 0 and magazine.Value ~= magazineMax.Value + Chamber then
  4589. canFire = false
  4590. burstCount = 0
  4591. mouse.Icon = "http://www.roblox.com/asset/?id=59125642"
  4592. if magazine.Value > 0 then magazine.Value = Chamber end
  4593. updateGui()
  4594. if dual == true then
  4595. playAnimation("reloadDual")
  4596. elseif dual == false then
  4597. playAnimation("reload")
  4598. end
  4599. if ammo.Value - magazineMax.Value < 0 then
  4600. magazine.Value = ammo.Value
  4601. ammo.Value = 0
  4602. elseif ammo.Value - magazineMax.Value >= 0 then
  4603. ammo.Value = ammo.Value - magazineMax.Value
  4604. magazine.Value = magazine.Value + MagSize
  4605. end
  4606. updateGui()
  4607. mouse.Icon = "http://www.roblox.com/asset/?id=59125633"
  4608. canFire = true
  4609. end
  4610. end
  4611. if key == "t" and Button1Down == false and canFire == true and canDual == true then
  4612. canFire = false
  4613. if dual == false then
  4614. local weapon = nil
  4615. for _, p in pairs(Player.Backpack:GetChildren()) do
  4616. if p.Name == Name and p ~= script.Parent then weapon = p break end
  4617. end
  4618. if weapon ~= nil then
  4619. dual = true
  4620. Chamber = 2
  4621. MagSize = MagSize * 2
  4622. weapon.Name = "Dual"
  4623. weapon.Parent = script
  4624. removeParts("RightHand")
  4625. makeParts("RightHand")
  4626. removeParts("RightHolster")
  4627. makeParts("LeftHolster")
  4628. playAnimation("leftEquip")
  4629. removeParts("LeftHolster")
  4630. makeParts("LeftHand")
  4631. magazineMax.Value = math.ceil(magazineMax.Value * 2)
  4632. ammoMax.Value = math.ceil(ammoMax.Value * 2)
  4633. magazine.Value = magazine.Value + weapon.Magazine.Value
  4634. ammo.Value = ammo.Value + weapon.Ammo.Value
  4635. updateGui()
  4636. end
  4637. elseif dual == true then
  4638. local weapon = script:FindFirstChild("Dual")
  4639. if weapon ~= nil then
  4640. dual = false
  4641. Chamber = 1
  4642. MagSize = MagSize * 0.5
  4643. weapon.Name = Name
  4644. weapon.Parent = Player.Backpack
  4645. removeParts("RightHand")
  4646. makeParts("RightHand")
  4647. playAnimation("leftUnequip")
  4648. removeParts("LeftHand")
  4649. makeParts("RightHolster")
  4650. playAnimation("hold")
  4651. weapon.Magazine.Value = math.floor(magazine.Value / 2)
  4652. weapon.Ammo.Value = math.floor(ammo.Value / 2)
  4653. magazineMax.Value = math.ceil(magazineMax.Value / 2)
  4654. ammoMax.Value = math.ceil(ammoMax.Value / 2)
  4655. magazine.Value = math.ceil(magazine.Value / 2)
  4656. ammo.Value = math.ceil(ammo.Value / 2)
  4657. updateGui()
  4658. end
  4659. end
  4660. canFire = true
  4661. end
  4662. if key == "y" and canZoom == true then
  4663. if zoom == false then
  4664. zoom = true
  4665. local pos = mouse.Hit.p
  4666. local target = mouse.Target
  4667. local cam = game:GetService("Workspace").CurrentCamera
  4668. focus = Instance.new("Part", workspace)
  4669. focus.Anchored = true
  4670. focus.CanCollide = false
  4671. focus.Transparency = 1
  4672. focus.TopSurface = 0
  4673. focus.BottomSurface = 0
  4674. focus.formFactor = "Plate"
  4675. focus.Size = Vector3.new(0, 0, 0)
  4676. focus.CFrame = CFrame.new(pos) * (CFrame.new(Player.Character.Torso.CFrame.p, pos) - CFrame.new(Player.Character.Torso.CFrame.p, pos).p)
  4677. cam.CameraSubject = focus
  4678. cam.CameraType = "Attach"
  4679. while zoom == true and selected == true do
  4680. local set = false
  4681. if target ~= nil then
  4682. if target.Parent ~= nil then
  4683. if target.Anchored == false then
  4684. focus.CFrame = CFrame.new(target.CFrame.p) * (CFrame.new(Player.Character.Torso.CFrame.p, target.CFrame.p) - CFrame.new(Player.Character.Torso.CFrame.p, target.CFrame.p).p)
  4685. set = true
  4686. end
  4687. end
  4688. end
  4689. if set == false then
  4690. focus.CFrame = CFrame.new(pos) * (CFrame.new(Player.Character.Torso.CFrame.p, pos) - CFrame.new(Player.Character.Torso.CFrame.p, pos).p)
  4691. end
  4692. wait()
  4693. end
  4694. if focus ~= nil then focus:Remove() focus = nil end
  4695. local cam = game:GetService("Workspace").CurrentCamera
  4696. cam.CameraSubject = Player.Character:FindFirstChild("Humanoid")
  4697. cam.CameraType = "Custom"
  4698. else
  4699. zoom = false
  4700. end
  4701. end
  4702. if key == "u" and Button1Down == false and canFire == true then
  4703. if automatic == false and burst == false then
  4704. if switchToBurst == true then
  4705. burst = true
  4706. local m = Instance.new("Message", Player)
  4707. m.Text = "Burst"
  4708. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  4709. delay(2.5, function() m:Remove() end)
  4710. elseif switchToAutomatic == true then
  4711. automatic = true
  4712. local m = Instance.new("Message", Player)
  4713. m.Text = "Automatic"
  4714. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  4715. delay(2.5, function() m:Remove() end)
  4716. end
  4717. elseif automatic == false and burst == true then
  4718. if switchToAutomatic == true then
  4719. automatic = true
  4720. burst = false
  4721. local m = Instance.new("Message", Player)
  4722. m.Text = "Automatic"
  4723. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  4724. delay(2.5, function() m:Remove() end)
  4725. elseif switchToSingle == true then
  4726. burst = false
  4727. local m = Instance.new("Message", Player)
  4728. m.Text = "Single"
  4729. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  4730. delay(2.5, function() m:Remove() end)
  4731. end
  4732. elseif automatic == true and burst == false then
  4733. if switchToSingle == true then
  4734. automatic = false
  4735. local m = Instance.new("Message", Player)
  4736. m.Text = "Single"
  4737. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  4738. delay(2.5, function() m:Remove() end)
  4739. elseif switchToBurst == true then
  4740. automatic = false
  4741. burst = true
  4742. local m = Instance.new("Message", Player)
  4743. m.Text = "Burst"
  4744. pcall(function() Player.Character[Name].Handle.Switch:Play() end)
  4745. delay(2.5, function() m:Remove() end)
  4746. end
  4747. end
  4748. end
  4749. if key == "f" and canFire == true then
  4750. canFire = false
  4751. canHit = true
  4752. playAnimation("whip")
  4753. canHit = false
  4754. wait(1)
  4755. canFire = true
  4756. end
  4757. end
  4758.  
  4759.  
  4760. function onSelected(mouse)
  4761. if selected == true then return end
  4762. selected = true
  4763. canFire = false
  4764. mouse.Icon = "http://www.roblox.com/asset/?id=59125642"
  4765. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  4766. if Player.Character.WeaponActivated.Value == nil then break end
  4767. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  4768. wait()
  4769. end
  4770. updateGui()
  4771. local weapon = Instance.new("ObjectValue")
  4772. weapon.Name = "WeaponActivated"
  4773. weapon.Value = script.Parent
  4774. weapon.Parent = Player.Character
  4775. DisableLimb(1, Player.Character)
  4776. DisableLimb(2, Player.Character)
  4777. ForceAngle(1, 0, Player.Character)
  4778. ForceAngle(2, 0, Player.Character)
  4779. if dual == true then
  4780. coroutine.resume(coroutine.create(function() playAnimation("leftEquip") end))
  4781. playAnimation("rightEquip")
  4782. removeParts("LeftHolster")
  4783. makeParts("LeftHand")
  4784. else
  4785. playAnimation("equip")
  4786. end
  4787. removeParts("RightHolster")
  4788. makeParts("RightHand")
  4789. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  4790. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  4791. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  4792. mouse.Icon = "http://www.roblox.com/asset/?id=59125633"
  4793. canFire = true
  4794. end
  4795.  
  4796.  
  4797. function onDeselected(mouse)
  4798. if selected == false then return end
  4799. Button1Down = false
  4800. while canFire == false do
  4801. wait()
  4802. end
  4803. selected = false
  4804. if dual == true then
  4805. if math.random(1, 2) == 1 then
  4806. coroutine.resume(coroutine.create(function() playAnimation("leftUnequip") end))
  4807. wait(math.random(1, 10) / 10)
  4808. playAnimation("rightUnequip")
  4809. else
  4810. coroutine.resume(coroutine.create(function() playAnimation("rightUnequip") end))
  4811. wait(math.random(1, 10) / 10)
  4812. playAnimation("leftUnequip")
  4813. end
  4814. removeParts("LeftHand")
  4815. makeParts("LeftHolster")
  4816. else
  4817. playAnimation("unequip")
  4818. end
  4819. removeParts("RightHand")
  4820. makeParts("RightHolster")
  4821. ForceAngle(1, 0, Player.Character)
  4822. ForceAngle(2, 0, Player.Character)
  4823. ResetLimbCFrame(1, Player.Character)
  4824. ResetLimbCFrame(2, Player.Character)
  4825. EnableLimb(1, Player.Character)
  4826. EnableLimb(2, Player.Character)
  4827. if Player.PlayerGui:FindFirstChild(Name) ~= nil then Player.PlayerGui[Name]:Remove() end
  4828. if Player.Character:FindFirstChild("WeaponActivated") ~= nil then
  4829. if Player.Character.WeaponActivated.Value == script.Parent then
  4830. Player.Character.WeaponActivated:Remove()
  4831. end
  4832. end
  4833. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  4834. if Player.Character.WeaponActivated.Value == nil then break end
  4835. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  4836. wait()
  4837. end
  4838. end
  4839.  
  4840.  
  4841. if script.Parent.ClassName ~= "HopperBin" then
  4842. if Player == nil then print("Error: Player not found!") return end
  4843. Tool = Instance.new("HopperBin")
  4844. Tool.Name = Name
  4845. Tool.Parent = Player.Backpack
  4846. script.Name = "Main"
  4847. script.Parent = Tool
  4848. end wait() if script.Parent.ClassName == "HopperBin" then
  4849. while script.Parent.Parent.ClassName ~= "Backpack" do
  4850. wait()
  4851. end
  4852. if script.Parent:FindFirstChild("MagazineMax") == nil then
  4853. magazineMax = Instance.new("NumberValue")
  4854. magazineMax.Name = "MagazineMax"
  4855. magazineMax.Value = 20
  4856. magazineMax.Parent = script.Parent
  4857. else
  4858. magazineMax = script.Parent.MagazineMax
  4859. end
  4860. if script.Parent:FindFirstChild("Magazine") == nil then
  4861. magazine = Instance.new("NumberValue")
  4862. magazine.Name = "Magazine"
  4863. magazine.Value = 0
  4864. magazine.Parent = script.Parent
  4865. else
  4866. magazine = script.Parent.Magazine
  4867. end
  4868. if script.Parent:FindFirstChild("AmmoMax") == nil then
  4869. ammoMax = Instance.new("NumberValue")
  4870. ammoMax.Name = "AmmoMax"
  4871. ammoMax.Value = 4957438947673894
  4872. ammoMax.Parent = script.Parent
  4873. else
  4874. ammoMax = script.Parent.AmmoMax
  4875. end
  4876. if script.Parent:FindFirstChild("Ammo") == nil then
  4877. ammo = Instance.new("NumberValue")
  4878. ammo.Name = "Ammo"
  4879. ammo.Value = script.Parent.AmmoMax.Value
  4880. ammo.Parent = script.Parent
  4881. else
  4882. ammo = script.Parent.Ammo
  4883. end
  4884. Player = script.Parent.Parent.Parent
  4885. makeParts("RightHolster")
  4886. script.Parent.Selected:connect(onSelected)
  4887. script.Parent.Deselected:connect(onDeselected)
  4888. end
  4889. end
  4890. end)
  4891.  
  4892.  
  4893. TextBox.Parent = Frame
  4894. TextBox.BackgroundColor3 = Color3.new(1, 1, 0.498039)
  4895. TextBox.Position = UDim2.new(0, 6, 0, 258)
  4896. TextBox.Size = UDim2.new(0, 200, 0, 50)
  4897. TextBox.Font = Enum.Font.Garamond
  4898. TextBox.FontSize = Enum.FontSize.Size24
  4899. TextBox.Text = "Exploit Gui By Harryboo1977"
  4900. TextBox.TextSize = 19
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement