Advertisement
Mediakiller7Cool

asdasfdagergwer

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