Advertisement
firebudgy

Untitled

Jun 6th, 2018
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 94.15 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Part1 = Instance.new("Part")
  21. BlockMesh2 = Instance.new("BlockMesh")
  22. Sound3 = Instance.new("Sound")
  23. Sound4 = Instance.new("Sound")
  24. Sound5 = Instance.new("Sound")
  25. Sound6 = Instance.new("Sound")
  26. Part7 = Instance.new("Part")
  27. Configuration8 = Instance.new("Configuration")
  28. IntValue9 = Instance.new("IntValue")
  29. BoolValue10 = Instance.new("BoolValue")
  30. NumberValue11 = Instance.new("NumberValue")
  31. NumberValue12 = Instance.new("NumberValue")
  32. Vector3Value13 = Instance.new("Vector3Value")
  33. Script14 = Instance.new("Script")
  34. LocalScript15 = Instance.new("LocalScript")
  35. ScreenGui16 = Instance.new("ScreenGui")
  36. Frame17 = Instance.new("Frame")
  37. Frame18 = Instance.new("Frame")
  38. Frame19 = Instance.new("Frame")
  39. Frame20 = Instance.new("Frame")
  40. ImageLabel21 = Instance.new("ImageLabel")
  41. ScreenGui22 = Instance.new("ScreenGui")
  42. Frame23 = Instance.new("Frame")
  43. TextLabel24 = Instance.new("TextLabel")
  44. TextLabel25 = Instance.new("TextLabel")
  45. Frame26 = Instance.new("Frame")
  46. Frame27 = Instance.new("Frame")
  47. Frame28 = Instance.new("Frame")
  48. ImageLabel29 = Instance.new("ImageLabel")
  49. TextLabel30 = Instance.new("TextLabel")
  50. Part31 = Instance.new("Part")
  51. SpotLight32 = Instance.new("SpotLight")
  52. Part33 = Instance.new("Part")
  53. SpotLight34 = Instance.new("SpotLight")
  54. ParticleEmitter35 = Instance.new("ParticleEmitter")
  55. Tool36 = Instance.new("Tool")
  56. Part37 = Instance.new("Part")
  57. CylinderMesh38 = Instance.new("CylinderMesh")
  58. Part39 = Instance.new("Part")
  59. SpecialMesh40 = Instance.new("SpecialMesh")
  60. SpotLight41 = Instance.new("SpotLight")
  61. Part42 = Instance.new("Part")
  62. BlockMesh43 = Instance.new("BlockMesh")
  63. Sound44 = Instance.new("Sound")
  64. Sound45 = Instance.new("Sound")
  65. Sound46 = Instance.new("Sound")
  66. Sound47 = Instance.new("Sound")
  67. Part48 = Instance.new("Part")
  68. BlockMesh49 = Instance.new("BlockMesh")
  69. Part50 = Instance.new("Part")
  70. Part51 = Instance.new("Part")
  71. SpotLight52 = Instance.new("SpotLight")
  72. ParticleEmitter53 = Instance.new("ParticleEmitter")
  73. Configuration54 = Instance.new("Configuration")
  74. IntValue55 = Instance.new("IntValue")
  75. BoolValue56 = Instance.new("BoolValue")
  76. NumberValue57 = Instance.new("NumberValue")
  77. NumberValue58 = Instance.new("NumberValue")
  78. Part59 = Instance.new("Part")
  79. Script60 = Instance.new("Script")
  80. Part61 = Instance.new("Part")
  81. SpecialMesh62 = Instance.new("SpecialMesh")
  82. Vector3Value63 = Instance.new("Vector3Value")
  83. Script64 = Instance.new("Script")
  84. LocalScript65 = Instance.new("LocalScript")
  85. ScreenGui66 = Instance.new("ScreenGui")
  86. Frame67 = Instance.new("Frame")
  87. Frame68 = Instance.new("Frame")
  88. Frame69 = Instance.new("Frame")
  89. Frame70 = Instance.new("Frame")
  90. ImageLabel71 = Instance.new("ImageLabel")
  91. ScreenGui72 = Instance.new("ScreenGui")
  92. Frame73 = Instance.new("Frame")
  93. TextLabel74 = Instance.new("TextLabel")
  94. TextLabel75 = Instance.new("TextLabel")
  95. Frame76 = Instance.new("Frame")
  96. Frame77 = Instance.new("Frame")
  97. Frame78 = Instance.new("Frame")
  98. ImageLabel79 = Instance.new("ImageLabel")
  99. TextLabel80 = Instance.new("TextLabel")
  100. Tool0.Name = "Crossbow"
  101. Tool0.Parent = mas
  102. Part1.Name = "Handle"
  103. Part1.Parent = Tool0
  104. Part1.BrickColor = BrickColor.new("Bright yellow")
  105. Part1.Transparency = 1
  106. Part1.Rotation = Vector3.new(-0.00999999978, 21.4099998, 0)
  107. Part1.CanCollide = false
  108. Part1.FormFactor = Enum.FormFactor.Custom
  109. Part1.Size = Vector3.new(0.300000012, 0.200000003, 0.200000003)
  110. Part1.CFrame = CFrame.new(72.9331665, 171.982391, 255.557465, 0.930995226, 1.29800374e-05, 0.365022629, -4.6991594e-05, 1, 8.42889422e-05, -0.365022629, -9.56257572e-05, 0.930995226)
  111. Part1.Color = Color3.new(0.960784, 0.803922, 0.188235)
  112. Part1.Position = Vector3.new(72.9331665, 171.982391, 255.557465)
  113. Part1.Orientation = Vector3.new(0, 21.4099998, 0)
  114. Part1.Color = Color3.new(0.960784, 0.803922, 0.188235)
  115. BlockMesh2.Parent = Part1
  116. BlockMesh2.Scale = Vector3.new(0.925926268, 0.0370371528, 0.62962985)
  117. BlockMesh2.Scale = Vector3.new(0.925926268, 0.0370371528, 0.62962985)
  118. Sound3.Name = "Fire"
  119. Sound3.Parent = Part1
  120. Sound3.Pitch = 1.2000000476837
  121. Sound3.SoundId = "rbxassetid://162117430"
  122. Sound4.Name = "EmptyMag"
  123. Sound4.Parent = Part1
  124. Sound4.Pitch = 0.80000001192093
  125. Sound4.SoundId = "rbxassetid://159385334"
  126. Sound5.Name = "Reload"
  127. Sound5.Parent = Part1
  128. Sound5.Pitch = 1.2000000476837
  129. Sound5.SoundId = "http://www.roblox.com/asset/?id=2697432"
  130. Sound6.Name = "FlashSound"
  131. Sound6.Parent = Part1
  132. Sound6.Pitch = 100
  133. Sound6.SoundId = "http://www.roblox.com/asset/?id=274924676"
  134. Part7.Name = "Flashlight"
  135. Part7.Parent = Tool0
  136. Part7.CanCollide = false
  137. Part7.Size = Vector3.new(0.0500000007, 0.0500000007, 0.149999976)
  138. Part7.CFrame = CFrame.new(72.8948975, 172.431854, 252.964951, 1, 2.16004992e-12, 0, 2.26307861e-12, 1, 1.78260962e-10, 0, 1.78260962e-10, 1)
  139. Part7.Position = Vector3.new(72.8948975, 172.431854, 252.964951)
  140. Configuration8.Name = "Conditions"
  141. Configuration8.Parent = Tool0
  142. IntValue9.Name = "Ammo"
  143. IntValue9.Parent = Configuration8
  144. IntValue9.Value = 30
  145. BoolValue10.Name = "CanFire"
  146. BoolValue10.Parent = Configuration8
  147. BoolValue10.Value = true
  148. NumberValue11.Name = "MaxRecoil"
  149. NumberValue11.Parent = Configuration8
  150. NumberValue11.Value = 100
  151. NumberValue12.Name = "Recoil"
  152. NumberValue12.Parent = Configuration8
  153. Vector3Value13.Name = "SurfacePos"
  154. Vector3Value13.Parent = Tool0
  155. Vector3Value13.Value = Vector3.new(2, 3, 3)
  156. Script14.Name = "qPerfectionWeld"
  157. Script14.Parent = Tool0
  158. table.insert(cors,sandbox(Script14,function()
  159. -- Created by Quenty (@Quenty, follow me on twitter).
  160. -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
  161. -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
  162.  
  163. --[[ INSTRUCTIONS
  164. - Place in the model
  165. - Make sure model is anchored
  166. - That's it. It will weld the model and all children.
  167.  
  168. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  169. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  170. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  171. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  172. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  173. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  174. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  175. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  176.  
  177. This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
  178. ]]
  179.  
  180. --[[ DOCUMENTATION
  181. - Will work in tools. If ran more than once it will not create more than one weld. This is especially useful for tools that are dropped and then picked up again.
  182. - Will work in PBS servers
  183. - Will work as long as it starts out with the part anchored
  184. - Stores the relative CFrame as a CFrame value
  185. - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
  186. - Utilizes a recursive algorith to find all parts in the model
  187. - Will reweld on script reparent if the script is initially parented to a tool.
  188. - Welds as fast as possible
  189. ]]
  190.  
  191. -- qPerfectionWeld.lua
  192. -- Created 10/6/2014
  193. -- Author: Quenty
  194. -- Version 1.0.3
  195.  
  196. -- Updated 10/14/2014 - Updated to 1.0.1
  197. --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
  198.  
  199. -- Updated 10/14/2014 - Updated to 1.0.2
  200. --- Fixed bug fix.
  201.  
  202. -- Updated 10/14/2014 - Updated to 1.0.3
  203. --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
  204.  
  205. local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
  206.  
  207.  
  208. local function CallOnChildren(Instance, FunctionToCall)
  209. -- Calls a function on each of the children of a certain object, using recursion.
  210.  
  211. FunctionToCall(Instance)
  212.  
  213. for _, Child in next, Instance:GetChildren() do
  214. CallOnChildren(Child, FunctionToCall)
  215. end
  216. end
  217.  
  218. local function GetNearestParent(Instance, ClassName)
  219. -- Returns the nearest parent of a certain class, or returns nil
  220.  
  221. local Ancestor = Instance
  222. repeat
  223. Ancestor = Ancestor.Parent
  224. if Ancestor == nil then
  225. return nil
  226. end
  227. until Ancestor:IsA(ClassName)
  228.  
  229. return Ancestor
  230. end
  231.  
  232. local function GetBricks(StartInstance)
  233. local List = {}
  234.  
  235. -- if StartInstance:IsA("BasePart") then
  236. -- List[#List+1] = StartInstance
  237. -- end
  238.  
  239. CallOnChildren(StartInstance, function(Item)
  240. if Item:IsA("BasePart") then
  241. List[#List+1] = Item;
  242. end
  243. end)
  244.  
  245. return List
  246. end
  247.  
  248. local function Modify(Instance, Values)
  249. -- Modifies an Instance by using a table.
  250.  
  251. assert(type(Values) == "table", "Values is not a table");
  252.  
  253. for Index, Value in next, Values do
  254. if type(Index) == "number" then
  255. Value.Parent = Instance
  256. else
  257. Instance[Index] = Value
  258. end
  259. end
  260. return Instance
  261. end
  262.  
  263. local function Make(ClassType, Properties)
  264. -- Using a syntax hack to create a nice way to Make new items.
  265.  
  266. return Modify(Instance.new(ClassType), Properties)
  267. end
  268.  
  269. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  270. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  271.  
  272. local function HasWheelJoint(Part)
  273. for _, SurfaceName in pairs(Surfaces) do
  274. for _, HingSurfaceName in pairs(HingSurfaces) do
  275. if Part[SurfaceName].Name == HingSurfaceName then
  276. return true
  277. end
  278. end
  279. end
  280.  
  281. return false
  282. end
  283.  
  284. local function ShouldBreakJoints(Part)
  285. --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  286. -- definitely some edge cases.
  287.  
  288. if NEVER_BREAK_JOINTS then
  289. return false
  290. end
  291.  
  292. if HasWheelJoint(Part) then
  293. return false
  294. end
  295.  
  296. local Connected = Part:GetConnectedParts()
  297.  
  298. if #Connected == 1 then
  299. return false
  300. end
  301.  
  302. for _, Item in pairs(Connected) do
  303. if HasWheelJoint(Item) then
  304. return false
  305. elseif not Item:IsDescendantOf(script.Parent) then
  306. return false
  307. end
  308. end
  309.  
  310. return true
  311. end
  312.  
  313. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  314. --- Weld's 2 parts together
  315. -- @param Part0 The first part
  316. -- @param Part1 The second part (Dependent part most of the time).
  317. -- @param [JointType] The type of joint. Defaults to weld.
  318. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
  319. -- @return The weld created.
  320.  
  321. JointType = JointType or "Weld"
  322. local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  323.  
  324. local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  325. Modify(NewWeld, {
  326. Name = "qCFrameWeldThingy";
  327. Part0 = Part0;
  328. Part1 = Part1;
  329. C0 = CFrame.new();--Part0.CFrame:inverse();
  330. C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  331. Parent = Part1;
  332. })
  333.  
  334. if not RelativeValue then
  335. RelativeValue = Make("CFrameValue", {
  336. Parent = Part1;
  337. Name = "qRelativeCFrameWeldValue";
  338. Archivable = true;
  339. Value = NewWeld.C1;
  340. })
  341. end
  342.  
  343. return NewWeld
  344. end
  345.  
  346. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  347. -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
  348. -- @param MainPart The part to weld the model to (can be in the model).
  349. -- @param [JointType] The type of joint. Defaults to weld.
  350. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
  351.  
  352. for _, Part in pairs(Parts) do
  353. if ShouldBreakJoints(Part) then
  354. Part:BreakJoints()
  355. end
  356. end
  357.  
  358. for _, Part in pairs(Parts) do
  359. if Part ~= MainPart then
  360. WeldTogether(MainPart, Part, JointType, MainPart)
  361. end
  362. end
  363.  
  364. if not DoNotUnanchor then
  365. for _, Part in pairs(Parts) do
  366. Part.Anchored = false
  367. end
  368. MainPart.Anchored = false
  369. end
  370. end
  371.  
  372. local function PerfectionWeld()
  373. local Tool = GetNearestParent(script, "Tool")
  374.  
  375. local Parts = GetBricks(script.Parent)
  376. local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
  377.  
  378. if PrimaryPart then
  379. WeldParts(Parts, PrimaryPart, "Weld", false)
  380. else
  381. warn("qWeld - Unable to weld part")
  382. end
  383.  
  384. return Tool
  385. end
  386.  
  387. local Tool = PerfectionWeld()
  388.  
  389.  
  390. if Tool and script.ClassName == "Script" then
  391. --- Don't bother with local scripts
  392.  
  393. script.Parent.AncestryChanged:connect(function()
  394. PerfectionWeld()
  395. end)
  396. end
  397.  
  398. -- Created by Quenty (@Quenty, follow me on twitter).
  399.  
  400. end))
  401. LocalScript15.Name = "GunCore"
  402. LocalScript15.Parent = Tool0
  403. table.insert(cors,sandbox(LocalScript15,function()
  404. --[[.
  405. ____ _____ _ ____ _____ ____
  406. | _ \| ____| / \ | _ \| ____| _ \
  407. | |_) | _| / _ \ | |_) | _| | |_) |
  408. | _ <| |___ / ___ \| __/| |___| _ <
  409. |_| \_\_____/_/ \_\_| |_____|_| \_\
  410. ___ _ _ ____ _ _ ____ _____ ____ ___ _____ ____
  411. |_ _| \ | | _ \| | | / ___|_ _| _ \|_ _| ____/ ___|
  412. | || \| | | | | | | \___ \ | | | |_) || || _| \___ \
  413. | || |\ | |_| | |_| |___) || | | _ < | || |___ ___) |
  414. |___|_| \_|____/ \___/|____/ |_| |_| \_\___|_____|____/
  415.  
  416. ]] --(Teh)
  417. -- In partnership by ReaperIndustries, by CrakTheRaven and Revenus/HopeofRome
  418. -- not really this was made by Pragmatist but i like to take credit for things too xD
  419.  
  420. local tool, player = script.Parent, game:GetService("Players").LocalPlayer
  421.  
  422. -- CONFIGURATION --
  423. WeaponName = "Crossbow"; -- Weapon Name that shows up on the GUI text.
  424. BulletSpread = 0.05; -- Number of studs the bullet is offset (0 = no spread).
  425. WeaponType = "Semi"; -- "Auto" / "Semi"
  426. BulletColor = BrickColor.new("Bright orange"); -- BrickColor of the bullet.
  427. BulletTransparency = 100 -- Transparency of the bullet.
  428. BulletOrigin = tool:WaitForChild("Barrel"); -- What the bullet will shoot from.
  429. HitDamage = 100; -- How much damage the gun does.
  430. ObjectMultiplier = .3; -- Have an object you want to destroy? Object must have value of "Health"
  431. Cursor = "rbxasset://textures\\GunCursor.png"; -- Cursor that shows when the gun is equipped.
  432. HitSoundId = "rbxassetid://131864673"; -- Id of the HitSound
  433. HitSoundVolume = .7; -- Volume of the HitSound (make 0 if you don't want players to hear)
  434. MaxAmmo = 4; -- Maximum ammo per clip.
  435. FireRate = 4; -- Time between each shot.
  436. MeshType = "Block"; -- What kind of bullet you want shooting out of the gun (Block/Cylinder)
  437. Recoil = script.Parent.Conditions.Recoil.Value -- Value that determines reticle spacing
  438. MaxRecoil = script.Parent.Conditions.MaxRecoil.Value -- Maximum allowance for reticle parting
  439. TrueRecoil = script.Parent.Conditions.Recoil -- Spahgetti Coding variable, just to shorten things later
  440.  
  441. -- Please don't touch anything below unless you know what you're doing! Thanks :)
  442. local Handle = tool:WaitForChild("Handle")
  443. local Barrel = tool:WaitForChild("Barrel")
  444. local Flashlight = tool:WaitForChild("Flashlight")
  445. local FakeLight = tool:WaitForChild("Light")
  446. local Conditions = tool:WaitForChild("Conditions")
  447. local AmmoCount = Conditions:WaitForChild("Ammo")
  448. local CanFire = Conditions:WaitForChild("CanFire")
  449.  
  450. local Teams, ReplicatedStorage, UserInputService, RunService, Debris, Create = game:GetService("Teams"), game:GetService("ReplicatedStorage"), game:GetService("UserInputService"), game:GetService("RunService"), game:GetService("Debris"), LoadLibrary("RbxUtility").Create
  451. local Camera, PlayerGui, Backpack = workspace.CurrentCamera, player:WaitForChild("PlayerGui"), player:WaitForChild("Backpack")
  452. local BulletDump = workspace:WaitForChild("BulletDump") -- Required
  453. local ToolReplicator = ReplicatedStorage:WaitForChild("ToolReplicator") -- Required
  454. local HitSound = player.Backpack:FindFirstChild("HitSound") or Create("Sound"){Name = "HitSound", Pitch = 0.8, SoundId = HitSoundId, Volume = HitSoundVolume, Parent = player.Backpack}
  455. local FireSound, ReloadSound, EmptyMagSound,FlashSound = Handle:FindFirstChild("Fire"), Handle:FindFirstChild("Reload"), Handle:FindFirstChild("EmptyMag"), Handle:FindFirstChild("FlashSound")
  456. local Equipped, Reloading, Firing, MouseDown, Holster = false, false, false, false, false
  457.  
  458. local ArmCFrames = {
  459. Left = CFrame.new(-0.232401475, 0.731157064, 1.02414107, 0.103974499, 0.97441268, -0.199301302, -0.473240495, 0.22472018, 0.851790786, 0.87477237, 0.00575334439, 0.484494328),
  460. Right = CFrame.new(-1.00000823, -0.100011915, 0.200000018, 0.866025448, 5.32910745e-014, -0.499999881, 0.499999881, -4.37115588e-008, 0.866025448, -2.18557332e-008, -0.999999881, -3.78553544e-008)
  461. }
  462.  
  463. local HolsterCFrames = {
  464. Left = CFrame.new(-0.586823761, 0.480985105, 0.906768203, -0.0642859489, 0.782161772, -0.619750977, -0.431978822, 0.538023889, 0.723826647, 0.899590433, 0.314251065, 0.303290009),
  465. Right = CFrame.new(-0.973636985, -0.650349975, 0.0138454549, 0.696540296, 0.00785090867, -0.717475176, 0.682276845, 0.302280575, 0.665676713, 0.222104996, -0.95318675, 0.205194116)
  466. }
  467.  
  468. local ReloadSequence = {
  469. {Time = 0.4, Left = CFrame.new(-0.209011436, 0.76324892, 0.78975606, -0.282254279, 0.907642782, 0.310671985, -0.493101478, -0.415047199, 0.76458323, 0.822911561, 0.0626139268, 0.564708829), Right = CFrame.new(-0.55685395, 0.463526368, 0.53752619, 0.954750538, -0.271960884, -0.120368935, 0.071148172, -0.184115022, 0.980326295, -0.288772106, -0.944531083, -0.156434402)},
  470. {Time = 0.6, Left = CFrame.new(-0.325837493, 0.707264721, 0.802219033, -0.2016415, 0.961395979, 0.187239349, -0.545462966, -0.269001901, 0.79379344, 0.81351763, 0.0579295866, 0.578647852), Right = CFrame.new(-0.736077189, 0.532853663, 0.507766426, 0.942081809, -0.258100748, -0.214163035, 0.11451336, -0.35264346, 0.928724527, -0.315227658, -0.899459004, -0.302662909)},
  471. {Time = 0.7, Left = CFrame.new(-0.495625108, 0.81194824, 0.587404788, -0.48886016, 0.869798005, 0.0668373406, -0.435639948, -0.309788495, 0.845132411, 0.755800009, 0.384034574, 0.53036195), Right = CFrame.new(-0.833003342, 0.573787272, 0.232965112, 0.942081809, -0.216990575, -0.255728126, 0.11451336, -0.50855732, 0.85337919, -0.315227658, -0.83323729, -0.45425418)},
  472. {Time = 0.8, Left = CFrame.new(-0.495624006, 0.672275305, 0.883890748, -0.488860488, 0.869798422, 0.0668372884, -0.722871542, -0.446785659, 0.52710402, 0.488336921, 0.209365755, 0.847167552), Right = CFrame.new(-0.898164988, 0.582640946, -0.0121643245, 0.938896179, -0.190729454, -0.286524475, 0.103399783, -0.63769573, 0.76331681, -0.328302413, -0.74630177, -0.57900846)},
  473. {Time = 0.9, Left = CFrame.new(-0.373379707, 0.768625379, 0.494097263, -0.313948035, 0.946735382, -0.0716073662, -0.406596929, -0.0659107566, 0.911226451, 0.857971728, 0.315193295, 0.405632436), Right = CFrame.new(-0.932295918, 0.531932712, 0.158023566, 0.917598903, -0.210251763, -0.337352186, 0.159367502, -0.582896173, 0.796764791, -0.364162415, -0.784873366, -0.501357317)},
  474. {Time = 1.1, Left = CFrame.new(-0.649042845, 0.6334849, 0.524738669, -0.338284612, 0.867902994, -0.363741338, -0.509759367, 0.155902475, 0.846073508, 0.791017711, 0.47163415, 0.389682144), Right = CFrame.new(-0.787839651, 0.494286418, 0.505542278, 0.917598903, -0.280750751, -0.281409532, 0.159367502, -0.388723493, 0.907466888, -0.364162415, -0.877537966, -0.311949492)},
  475. {Time = 1.2, Left = CFrame.new(-0.765217423, 0.393802643, 0.583889008, -0.262994021, 0.845609963, -0.464519083, -0.55953896, 0.258544832, 0.787445486, 0.785971105, 0.467010081, 0.405155957), Right = CFrame.new(-0.965098858, 0.319458991, 0.614931285, 0.957236052, -0.105651543, -0.269326746, 0.242726684, -0.213278487, 0.946359336, -0.15742588, -0.971261859, -0.178513214)},
  476. {Time = 1.4, Left = CFrame.new(-0.388958633, 0.387100548, 1.23408377, 0.198175311, 0.970845222, -0.134855196, -0.738777578, 0.238368183, 0.630387425, 0.644153416, -0.0252991598, 0.764476895), Right = CFrame.new(-0.850272775, -9.7155571e-006, 0.720583975, 0.957235992, -0.209575221, -0.199442521, 0.242726728, 0.206652865, 0.947828233, -0.157425791, -0.95570457, 0.248685315)},
  477. {Time = 1.6, Left = CFrame.new(-0.307948738, 0.580714345, 0.879842877, 0.0535680652, 0.998491168, -0.0120923854, -0.691506028, 0.0458293781, 0.720915675, 0.720381916, -0.0302561019, 0.692917407), Right = CFrame.new(-0.942968845, 0.159364432, 0.402672172, 0.957235992, -0.155100465, -0.244219035, 0.242726728, -0.0287858695, 0.969667554, -0.157425791, -0.987478495, 0.0100925863)},
  478. {Time = 1.8, Left = ArmCFrames.Left, Right = ArmCFrames.Right},
  479. }
  480.  
  481. local LightSequence = {
  482. {Time = 0.2, Left = CFrame.new(-0.209011436, 0.76324892, 0.78975606, -0.282254279, 0.907642782, 0.310671985, -0.493101478, -0.415047199, 0.76458323, 0.822911561, 0.0626139268, 0.564708829)},
  483. {Time = 0.4, Left = ArmCFrames.Left, Right = ArmCFrames.Right},
  484. }
  485.  
  486.  
  487. local CoreBullet = Create("Part"){
  488. Name = "Bullet";
  489. BrickColor = BulletColor;
  490. Material = Enum.Material.Neon;
  491. FormFactor = Enum.FormFactor.Custom;
  492. Size = Vector3.new(1, 1, 1);
  493. Transparency = 0.7;
  494. Anchored = true;
  495. CanCollide = false;
  496. Locked = true;
  497.  
  498. Create(MeshType == "Block" and "BlockMesh" or MeshType == "Cylinder" and "CylinderMesh" or "BlockMesh"){
  499. Name = "Mesh",
  500. Scale = Vector3.new(0.15, 0.15, 1)
  501. }
  502. }
  503.  
  504. local CoreBullet2 = Create("Part"){
  505. Name = "ShowBullet";
  506. BrickColor = BulletColor;
  507. Material = Enum.Material.SmoothPlastic;
  508. FormFactor = Enum.FormFactor.Custom;
  509. Size = Vector3.new(1, 1, 1);
  510. Transparency = 0.5;
  511. Anchored = true;
  512. CanCollide = false;
  513. Locked = true;
  514.  
  515. Create(MeshType == "Block" and "BlockMesh" or MeshType == "Cylinder" and "CylinderMesh" or "BlockMesh"){
  516. Name = "Mesh",
  517. Scale = Vector3.new(0.1, 0.1, 1)
  518. }
  519. }
  520. AmmoCount.Value = MaxAmmo
  521. repeat wait(0.03) until player.Character
  522. repeat wait(0.03) until #player.Character:GetChildren() > 10
  523.  
  524. function TweenWeld(arm, newCFrame, seconds)
  525. local torso = player.Character:FindFirstChild("Torso")
  526. local weld = arm == "Left" and torso:FindFirstChild("LeftArmWeld") or arm == "Right" and torso:FindFirstChild("RightArmWeld")
  527. if weld then
  528. local startCF, endCF = weld.C1, newCFrame
  529. local startPos, startRot = startCF.p, Vector3.new(startCF:toEulerAnglesXYZ())
  530. local endPos, endRot = endCF.p, Vector3.new(endCF:toEulerAnglesXYZ())
  531. local diffPos, diffRot = (endPos - startPos), (endRot - startRot)
  532. local new
  533. for i = 0, 1, 1/seconds/30 do
  534. if not weld or not Equipped then break end
  535. new = CFrame.new(startPos+diffPos * i) * CFrame.Angles(startRot.X+diffRot.X * i, startRot.Y+diffRot.Y * i, startRot.Z+diffRot.Z * i)
  536. weld.C1 = new
  537. wait()
  538. end
  539. weld.C1 = endCF
  540. end
  541. end
  542.  
  543. function WeldArms(c1,lArm,rArm)
  544. local prop = c1 and "C1" or "C0"
  545. local char = player.Character
  546. local torso = char:WaitForChild("Torso")
  547. local lShoulder,rShoulder = torso:FindFirstChild("Left Shoulder"),torso:FindFirstChild("Right Shoulder")
  548. if lArm and lShoulder then
  549. lShoulder.Part1 = nil
  550. Create("Weld"){
  551. Name = "LeftArmWeld",
  552. [prop] = lArm,
  553. Part0 = torso,
  554. Part1 = char:FindFirstChild("Left Arm"),
  555. Parent = torso
  556. }
  557. elseif lShoulder and torso:FindFirstChild("LeftArmWeld") then
  558. torso["LeftArmWeld"]:Remove()
  559. lShoulder.Part1 = char:FindFirstChild("Left Arm")
  560. end
  561. if rArm and rShoulder then
  562. rShoulder.Part1 = nil
  563. Create("Weld"){
  564. Name = "RightArmWeld",
  565. [prop] = rArm,
  566. Part0 = torso,
  567. Part1 = char:FindFirstChild("Right Arm"),
  568. Parent = torso
  569. }
  570. elseif rShoulder and torso:FindFirstChild("RightArmWeld") then
  571. torso["RightArmWeld"]:Remove()
  572. rShoulder.Part1 = char:FindFirstChild("Right Arm")
  573. end
  574. end
  575.  
  576. function PseudoArms(bool)
  577. if not type(bool) == "boolean" then print("not a boolean parameter") return end
  578.  
  579. local function destroy()
  580. if Camera:FindFirstChild("FakeArms") then
  581. Camera:FindFirstChild("FakeArms"):Destroy()
  582. end
  583. end
  584.  
  585. local function create()
  586. destroy()
  587.  
  588. local ArmsModel = Create("Model"){
  589. Name = "FakeArms",
  590. Parent = Camera,
  591.  
  592. Create("Humanoid"){Name = "_"},
  593. }
  594. local FakeShirt = player.Character:FindFirstChild("Shirt")
  595. if FakeShirt then FakeShirt:Clone().Parent = ArmsModel end
  596. local FakeLeftArm = player.Character:FindFirstChild("Left Arm"):Clone()
  597. FakeLeftArm.Size = Vector3.new(0.9, 2, 0.9)
  598. FakeLeftArm.Parent = ArmsModel
  599. local FakeRightArm = player.Character:FindFirstChild("Right Arm"):Clone()
  600. FakeRightArm.Size = Vector3.new(0.9, 2, 0.9)
  601. FakeRightArm.Parent = ArmsModel
  602.  
  603. Create("Weld"){
  604. Parent = ArmsModel,
  605. Name = "FakeLeftShoulder",
  606. Part0 = player.Character["Left Arm"],
  607. Part1 = FakeLeftArm
  608. }
  609. Create("Weld"){
  610. Parent = ArmsModel,
  611. Name = "FakeRightShoulder",
  612. Part0 = player.Character["Right Arm"],
  613. Part1 = FakeRightArm
  614. }
  615. end
  616.  
  617. if bool then
  618. create()
  619. else
  620. destroy()
  621. end
  622. end
  623.  
  624. function Light(bool,rate)
  625. if not type(bool) == "boolean" then print("not a boolean parameter") return end
  626. Barrel.Flash.Rate = rate
  627. Barrel.Light.Enabled = bool
  628.  
  629. end
  630.  
  631. function GetGUI()
  632. local result = PlayerGui:FindFirstChild("CrusaderGui")
  633.  
  634. if result then
  635. return result
  636. end
  637. end
  638.  
  639. function UpdateGUI()
  640. local Gui = GetGUI()
  641. Gui.Weapon.WeaponName.Text = WeaponName
  642. Gui.Weapon.Ammo.Text = AmmoCount.Value
  643. Gui.Weapon.FiringMode.Text = "Firing mode: "..WeaponType
  644. end
  645.  
  646. function GetHumanoid(target)
  647. local humanoid
  648.  
  649. humanoid = target.Parent:FindFirstChild("Humanoid")
  650. if not humanoid and target.Parent.Parent ~= nil then
  651. humanoid = target.Parent.Parent:FindFirstChild("Humanoid")
  652. end
  653.  
  654. return humanoid
  655. end
  656.  
  657. function IsADefender(me, victim)
  658. if me.TeamColor == victim.TeamColor then
  659. return true
  660. end
  661.  
  662. return false
  663. end
  664.  
  665. function DrawLaser(init, at)
  666. local length = (at-init).magnitude
  667. local origin = CFrame.new(init, at)
  668.  
  669. local Laser1 = CoreBullet:Clone()
  670. Laser1.CFrame = origin * CFrame.new(0, 0, -length/2) * CFrame.Angles(math.rad(90), 0, 0)
  671. Laser1.Mesh.Scale = Vector3.new(Laser1.Mesh.Scale.x, length, Laser1.Mesh.Scale.x)
  672. Laser1.Parent = BulletDump
  673.  
  674. Debris:AddItem(Laser1, 0.03)
  675.  
  676. local Laser2 = CoreBullet2:Clone()
  677. Laser2.CFrame = origin * CFrame.new(0, 0, -length/2) * CFrame.Angles(math.rad(90), 0, 0)
  678. Laser2.Mesh.Scale = Vector3.new(Laser1.Mesh.Scale.x*.5, length, Laser1.Mesh.Scale.x*.5)
  679. Laser2.Parent = BulletDump
  680.  
  681. Debris:AddItem(Laser2, 0.03)
  682. end
  683.  
  684. function CreateRaycast(root, last, ignore)
  685. local direction = (last - root).unit
  686. local ray = Ray.new(root, direction * 999)
  687. local hit, at, surface = workspace:FindPartOnRayWithIgnoreList(ray, ignore)
  688. tool.SurfacePos.Value = surface
  689. if hit and hit.Name == "Ray" then
  690. hit, at, surface = CreateRaycast(at, direction * 999, ignore)
  691. end
  692.  
  693. return hit, at, surface
  694.  
  695. end
  696.  
  697.  
  698. function CreateEffect(position, part)
  699.  
  700. local dot = game.ReplicatedStorage.dot:Clone()
  701. dot.Parent = workspace.BulletDump
  702. dot.CFrame = position
  703.  
  704.  
  705. if not part.Parent:FindFirstChild("Humanoid")and part.Parent:IsA("Tool") == false and part.Parent:IsA("Hat") == false then
  706. if part.Material == Enum.Material.Plastic or part.Material == Enum.Material.SmoothPlastic then
  707. ToolReplicator:FireServer("ChangePlasticEffect", dot)
  708. elseif part.Material == Enum.Material.Grass then --print("Grass") -- grass
  709. ToolReplicator:FireServer("ChangeGrassEffect", dot)
  710. elseif part.Material == Enum.Material.Wood then --print("Wood") -- wood
  711. ToolReplicator:FireServer("ChangeWoodEffect", dot)
  712. elseif part.Material == Enum.Material.Metal then-- print("Metal") -- metal
  713. ToolReplicator:FireServer("ChangeMetalEffect", dot)
  714. end
  715. elseif part.Parent:FindFirstChild("Humanoid") or part.Parent:IsA("Hat") then
  716. ToolReplicator:FireServer("ChangeBloodEffect",dot)
  717.  
  718. elseif part.Parent:IsA("Tool") then
  719. ToolReplicator:FireServer("ChangeMetalEffect", dot)
  720. end
  721.  
  722. local rel = tool.SurfacePos.Value -- Calculating the face
  723. if (math.abs(rel.Z) > math.abs(rel.Y) and math.abs(rel.Z) > math.abs(rel.X)) then
  724. if (rel.Z > 0) then
  725. dot.Effect.EmissionDirection = "Back"
  726. dot.Dust.EmissionDirection = "Back"
  727. else
  728. dot.Effect.EmissionDirection = "Front"
  729. dot.Dust.EmissionDirection = "Front"
  730. end
  731. elseif (math.abs(rel.Y) > math.abs(rel.Z) and math.abs(rel.Y) > math.abs(rel.X)) then
  732. if (rel.Y > 0) then
  733. dot.Effect.EmissionDirection = "Top"
  734. dot.Dust.EmissionDirection = "Top"
  735. else
  736. dot.Effect.EmissionDirection = "Bottom"
  737. dot.Dust.EmissionDirection = "Bottom"
  738. end
  739. elseif (math.abs(rel.X) > math.abs(rel.Z) and math.abs(rel.X) > math.abs(rel.Y)) then
  740. if (rel.X > 0) then
  741. dot.Effect.EmissionDirection = "Right"
  742. dot.Dust.EmissionDirection = "Right"
  743. else
  744. dot.Effect.EmissionDirection = "Left"
  745. dot.Dust.EmissionDirection = "Left"
  746. end
  747. end
  748. Debris:AddItem(dot, 0.3)
  749. end
  750.  
  751.  
  752. function FireLaser(mouse, count)
  753. local aimPos = mouse.hit.p
  754. local bulletOrigin = BulletOrigin.Position
  755. local distance = (bulletOrigin - aimPos).magnitude
  756. if Recoil < MaxRecoil then -- revenus spahgetti scripting confirmed
  757. Recoil = Recoil + 5
  758. ReticleUpdate(mouse)
  759. end
  760. for i = 1, count do
  761. local aimWithSpread = Vector3.new((aimPos.x)+(math.random(-(BulletSpread/10)*distance,(BulletSpread/10)*distance)),(aimPos.y)+(math.random(-(BulletSpread/10)*distance,(BulletSpread/10)*distance)),(aimPos.z)+(math.random(-(BulletSpread/10)*distance,(BulletSpread/10)*distance)))
  762. local collision, collisionPos = CreateRaycast(player.Character.Head.Position, aimWithSpread, { player.Character, Camera, workspace.BulletDump, workspace.ServerScriptService})
  763. DrawLaser(bulletOrigin, collisionPos)
  764. if collision then
  765. CreateEffect(CFrame.new(collisionPos), collision)
  766. local humanoid = GetHumanoid(collision)
  767. if humanoid and humanoid:IsA("Humanoid") and game.Players:FindFirstChild(humanoid.Parent.Name) then
  768. local target = game.Players:FindFirstChild(humanoid.Parent.Name)
  769. if target and (not IsADefender(player, target) or target.Neutral) then
  770. ToolReplicator:FireServer("DamageHumanoid", humanoid, HitDamage)
  771. -- local Gui = GetGUI()
  772. player.PlayerGui.MouseGUI.Hit.Visible = true
  773. HitSound:Play()
  774. delay(0.1, function() player.PlayerGui.MouseGUI.Hit.Visible = false end)
  775. end
  776. elseif collision and collision.Parent.Parent.Name == "DestroyableObjects" then
  777. ToolReplicator:FireServer("DamageObject", collision, HitDamage)
  778.  
  779. elseif collision and collision.Name == "Glass" then
  780. ToolReplicator:FireServer("DestroyWindows",collision)
  781. end
  782. end
  783. end
  784. end
  785.  
  786. function FireBullet(mouse)
  787. CanFire.Value = false
  788. Barrel.Light.Angle = math.random(75, 200)
  789. Light(true,50)
  790. FireLaser(mouse, 1)
  791. FireSound:Play()
  792. AmmoCount.Value = AmmoCount.Value - 1
  793. wait(FireRate)
  794. CanFire.Value = true
  795. end
  796.  
  797. function ReloadAnimation()
  798. local Animation = ReloadSequence
  799. for index, keyframe in next, Animation do
  800. for limb, cframe in next, keyframe do
  801. if limb ~= "Time" then
  802. spawn(function()
  803. local prevKeyframe = Animation[index - 1]
  804. local waitTime = prevKeyframe and prevKeyframe.Time or 0
  805. wait(waitTime)
  806. if not Equipped then return end
  807. TweenWeld(limb, cframe, keyframe.Time - waitTime)
  808. end)
  809. end
  810. end
  811. end
  812.  
  813. wait(Animation[#Animation].Time)
  814. end
  815.  
  816. function LightAnimation()
  817. local Animation = LightSequence
  818. for index, keyframe in next, Animation do
  819. for limb, cframe in next, keyframe do
  820. if limb ~= "Time" then
  821. spawn(function()
  822. local prevKeyframe = Animation[index - 1]
  823. local waitTime = prevKeyframe and prevKeyframe.Time or 0
  824. wait(waitTime)
  825. if not Equipped then return end
  826. TweenWeld(limb, cframe, keyframe.Time - waitTime)
  827. end)
  828. end
  829. end
  830. end
  831. wait(Animation[#Animation].Time)
  832. end
  833. function Reload()
  834. if AmmoCount.Value == MaxAmmo then return end
  835. EmptyMagSound:Play()
  836. Reloading = true
  837. Light(false,0)
  838. ReloadSound:Play()
  839. local Gui = GetGUI()
  840. spawn(function()
  841. for i = 0, 0.5, 0.05 do
  842. wait(0)
  843. pcall(function()
  844. Gui.Weapon.Logo.ImageTransparency = i
  845. end)
  846. end
  847. end)
  848. Gui.Weapon.Ammo.Text = "REL"
  849. ReloadAnimation()
  850. spawn(function()
  851. for i = 0.5, 0, -0.05 do
  852. wait(0)
  853. pcall(function()
  854. Gui.Weapon.Logo.ImageTransparency = i
  855. end)
  856. end
  857. end)
  858. if not Reloading then return end
  859. AmmoCount.Value = MaxAmmo
  860. Reloading = false
  861. end
  862.  
  863. function ForceProperWelds()
  864. coroutine.wrap(TweenWeld)("Left", ArmCFrames.Left, 0.1)
  865. coroutine.wrap(TweenWeld)("Right", ArmCFrames.Right, 0.1)
  866. end
  867.  
  868. function KeyPressed(mouse, key)
  869. key = key:lower()
  870.  
  871. if key == "r" and not Reloading and Equipped then
  872. Reload()
  873. elseif key == "e" and Equipped then
  874. LightAnimation()
  875. FlashSound:Play()
  876. Flashlight.Light.Enabled = not Flashlight.Light.Enabled
  877. if FakeLight.Material == Enum.Material.Neon then FakeLight.Material = Enum.Material.SmoothPlastic else
  878. FakeLight.Material = Enum.Material.Neon
  879. end
  880. elseif key == "f" and not Reloading and not Firing and Equipped then
  881. if not Holster then
  882. Holster = true
  883. coroutine.wrap(TweenWeld)("Left", HolsterCFrames.Left, 0.1)
  884. coroutine.wrap(TweenWeld)("Right", HolsterCFrames.Right, 0.1)
  885. player.Character.Humanoid.WalkSpeed = 24
  886. else
  887. Holster = false
  888. ForceProperWelds()
  889. player.Character.Humanoid.WalkSpeed = 16
  890. end
  891. elseif key == "v" and not Reloading and not Firing and Equipped then
  892. local Gui = GetGUI()
  893. LightAnimation()
  894. FlashSound:Play()
  895. if WeaponType == "Auto" then
  896. WeaponType = "Semi"
  897. Gui.Weapon.FiringMode.Text = "Firing mode: "..WeaponType
  898. HitDamage = HitDamage + 2
  899. else
  900. WeaponType = "Auto"
  901. Gui.Weapon.FiringMode.Text = "Firing mode: "..WeaponType
  902. HitDamage = HitDamage - 2
  903. end
  904.  
  905. end
  906. end
  907.  
  908. function InitiateFire(mouse)
  909. if Reloading or Firing or not MouseDown or not CanFire.Value or (player.Character.Humanoid and player.Character.Humanoid.Health <= 0) then return end
  910. Firing = true
  911. if WeaponType == "Auto" then
  912. while MouseDown and Equipped and AmmoCount.Value > 0 and CanFire.Value and Firing and not Reloading and (player.Character.Humanoid and player.Character.Humanoid.Health > 0) do
  913. FireBullet(mouse)
  914. end
  915. elseif WeaponType == "Semi" then
  916. if Equipped and not Reloading then
  917. FireBullet(mouse)
  918. end
  919. end
  920. if AmmoCount.Value <= 0 then
  921. Reload()
  922. end
  923. Firing = false
  924. Light(false,0)
  925. end
  926.  
  927. function Mouse1Down(mouse)
  928. if player.Character.Humanoid.Health <= 0 or not Equipped then return end
  929. if not Firing and not MouseDown and not Reloading and player.Character.Humanoid.Health > 0 and CanFire.Value then
  930. MouseDown = true
  931. player.Character.Humanoid.WalkSpeed = 16
  932. if Holster then
  933. Holster = false
  934. ForceProperWelds()
  935. end
  936. if AmmoCount.Value <= 0 then
  937. Reload()
  938. end
  939. InitiateFire(mouse)
  940. end
  941. end
  942.  
  943. function Mouse1Up(mouse)
  944. MouseDown = false
  945. Light(false,0)
  946. end
  947.  
  948. function ReticleUpdate(mouse)
  949. MouseGUI = player.PlayerGui.MouseGUI -- mouse gui important!!!!!!
  950. MouseGUI.MouseUp.BackgroundColor3 = BrickColor.White().Color
  951. MouseGUI.MouseDown.BackgroundColor3 = BrickColor.White().Color
  952. MouseGUI.MouseLeft.BackgroundColor3 = BrickColor.White().Color
  953. MouseGUI.MouseRight.BackgroundColor3 = BrickColor.White().Color
  954. MouseGUI.MouseUp.Position = UDim2.new(0, mouse.X-2, 0, mouse.Y-30-Recoil)
  955. MouseGUI.MouseDown.Position = UDim2.new(0, mouse.X-2, 0, mouse.Y+5+Recoil)
  956. MouseGUI.MouseLeft.Position = UDim2.new(0, mouse.X-30-Recoil, 0, mouse.Y-2)
  957. MouseGUI.MouseRight.Position = UDim2.new(0, mouse.X+5+Recoil, 0, mouse.Y-2)
  958. MouseGUI.Hit.Position = UDim2.new(0, mouse.X-32, 0, mouse.Y-32)
  959. end
  960.  
  961.  
  962.  
  963. player.Character:WaitForChild("Humanoid").Died:connect(function()
  964. if PlayerGui:FindFirstChild("CrusaderGui") then
  965. PlayerGui.CrusaderGui:Destroy()
  966. end
  967. if Camera:FindFirstChild("FakeArms") then
  968. Camera:FindFirstChild("FakeArms"):Destroy()
  969. end
  970. end)
  971.  
  972.  
  973. tool.Equipped:connect(function(mouse)
  974. local GUI = script.MouseGUI:clone()
  975. GUI.Parent = player.PlayerGui
  976. TrueRecoil.Changed:connect(function()
  977. ReticleUpdate()
  978. end)
  979. mouse.Icon = "http://www.roblox.com/asset/?id=35446049"
  980. local newCrusGui
  981. if script:FindFirstChild("CrusaderGui") then
  982. newCrusGui = script.CrusaderGui:Clone()
  983. newCrusGui.Parent = PlayerGui
  984. newCrusGui:FindFirstChild("Weapon"):TweenPosition(UDim2.new(0.8, 0,0.8, 0), "Out", "Quad", .7, true)
  985. end
  986. Equipped = true
  987. WeldArms("C1", ArmCFrames.Left, ArmCFrames.Right)
  988. mouse.Button1Down:connect(function() Mouse1Down(mouse) end)
  989. mouse.Button1Up:connect(function() Mouse1Up(mouse) end)
  990. mouse.KeyDown:connect(function(key) KeyPressed(mouse, key) end)
  991. mouse.Move:connect(function()
  992. ReticleUpdate(mouse)
  993. if newCrusGui then
  994. local mTarget = mouse.Target
  995. if mTarget and mTarget.Parent then
  996. local humanoid = GetHumanoid(mTarget)
  997. if humanoid and humanoid:IsA("Humanoid") and game.Players:FindFirstChild(humanoid.Parent.Name) then
  998. local target = game.Players:FindFirstChild(humanoid.Parent.Name)
  999. if target and (not IsADefender(player, target) or target.Neutral) then --enemy
  1000. MouseGUI.MouseUp.BackgroundColor3 = BrickColor.Red().Color
  1001. MouseGUI.MouseDown.BackgroundColor3 = BrickColor.Red().Color
  1002. MouseGUI.MouseLeft.BackgroundColor3 = BrickColor.Red().Color
  1003. MouseGUI.MouseRight.BackgroundColor3 = BrickColor.Red().Color
  1004. elseif target and (IsADefender(player, target) and not target.Neutral) then --ally
  1005. MouseGUI.MouseUp.BackgroundColor3 = BrickColor.Green().Color
  1006. MouseGUI.MouseDown.BackgroundColor3 = BrickColor.Green().Color
  1007. MouseGUI.MouseLeft.BackgroundColor3 = BrickColor.Green().Color
  1008. MouseGUI.MouseRight.BackgroundColor3 = BrickColor.Green().Color
  1009. end
  1010. else --neutral
  1011. MouseGUI.MouseUp.BackgroundColor3 = BrickColor.White().Color
  1012. MouseGUI.MouseDown.BackgroundColor3 = BrickColor.White().Color
  1013. MouseGUI.MouseLeft.BackgroundColor3 = BrickColor.White().Color
  1014. MouseGUI.MouseRight.BackgroundColor3 = BrickColor.White().Color
  1015. end
  1016. end
  1017. end
  1018. end)
  1019. AmmoCount.Changed:connect(function()
  1020. UpdateGUI()
  1021. end)
  1022.  
  1023. local pMouse = player:GetMouse()
  1024. PseudoArms(true)
  1025. UpdateGUI()
  1026. player.Character.Humanoid.WalkSpeed = 16
  1027. while Equipped do
  1028. if MouseDown == false and (Recoil > 0) then
  1029. Recoil = Recoil - 1.25
  1030. ReticleUpdate(mouse)
  1031. end
  1032. wait(0.0125)
  1033. end
  1034. end)
  1035.  
  1036. tool.Unequipped:connect(function()
  1037. if PlayerGui:FindFirstChild("CrusaderGui") then
  1038. PlayerGui.CrusaderGui:Destroy()
  1039. end
  1040. local reviscool = player.PlayerGui:GetChildren()
  1041. for i=1, #reviscool do
  1042. if (reviscool[i].Name == "MouseGUI") then
  1043. reviscool[i]:remove()
  1044. end
  1045. end
  1046. UserInputService.MouseIconEnabled = true
  1047. Equipped = false
  1048. Firing = false
  1049. MouseDown = false
  1050. Reloading = false
  1051. Holster = false
  1052. Light(false,0)
  1053. WeldArms("")
  1054. PseudoArms(false)
  1055. Flashlight.Light.Enabled = false
  1056. end)
  1057. end))
  1058. ScreenGui16.Name = "MouseGUI"
  1059. ScreenGui16.Parent = LocalScript15
  1060. Frame17.Name = "MouseDown"
  1061. Frame17.Parent = ScreenGui16
  1062. Frame17.Size = UDim2.new(0, 4, 0, 25)
  1063. Frame17.Position = UDim2.new(0, 0, 0, 50)
  1064. Frame17.BackgroundColor3 = Color3.new(1, 1, 1)
  1065. Frame17.BorderColor3 = Color3.new(0, 0, 0)
  1066. Frame18.Name = "MouseLeft"
  1067. Frame18.Parent = ScreenGui16
  1068. Frame18.Size = UDim2.new(0, 25, 0, 4)
  1069. Frame18.BackgroundColor3 = Color3.new(1, 1, 1)
  1070. Frame18.BorderColor3 = Color3.new(0, 0, 0)
  1071. Frame19.Name = "MouseRight"
  1072. Frame19.Parent = ScreenGui16
  1073. Frame19.Size = UDim2.new(0, 25, 0, 4)
  1074. Frame19.BackgroundColor3 = Color3.new(1, 1, 1)
  1075. Frame19.BorderColor3 = Color3.new(0, 0, 0)
  1076. Frame20.Name = "MouseUp"
  1077. Frame20.Parent = ScreenGui16
  1078. Frame20.Size = UDim2.new(0, 4, 0, 25)
  1079. Frame20.BackgroundColor3 = Color3.new(1, 1, 1)
  1080. Frame20.BorderColor3 = Color3.new(0, 0, 0)
  1081. ImageLabel21.Name = "Hit"
  1082. ImageLabel21.Parent = ScreenGui16
  1083. ImageLabel21.Transparency = 1
  1084. ImageLabel21.Size = UDim2.new(0, 64, 0, 64)
  1085. ImageLabel21.Visible = false
  1086. ImageLabel21.BackgroundColor3 = Color3.new(0, 0, 0)
  1087. ImageLabel21.BackgroundTransparency = 1
  1088. ImageLabel21.BorderColor3 = Color3.new(0, 0, 0)
  1089. ImageLabel21.BorderSizePixel = 0
  1090. ImageLabel21.Image = "http://www.roblox.com/asset/?id=84799964"
  1091. ScreenGui22.Name = "CrusaderGui"
  1092. ScreenGui22.Parent = LocalScript15
  1093. Frame23.Name = "Weapon"
  1094. Frame23.Parent = ScreenGui22
  1095. Frame23.Transparency = 1
  1096. Frame23.Size = UDim2.new(0, 160, 0, 4)
  1097. Frame23.Position = UDim2.new(0.800000012, 0, 2, 0)
  1098. Frame23.BackgroundColor3 = Color3.new(1, 1, 1)
  1099. Frame23.BackgroundTransparency = 1
  1100. Frame23.BorderSizePixel = 0
  1101. TextLabel24.Name = "Ammo"
  1102. TextLabel24.Parent = Frame23
  1103. TextLabel24.Text = "0"
  1104. TextLabel24.Position = UDim2.new(0, 120, 0, -2)
  1105. TextLabel24.BackgroundColor3 = Color3.new(1, 1, 1)
  1106. TextLabel24.BorderSizePixel = 0
  1107. TextLabel24.Font = Enum.Font.SourceSansBold
  1108. TextLabel24.FontSize = Enum.FontSize.Size36
  1109. TextLabel24.TextColor3 = Color3.new(1, 1, 1)
  1110. TextLabel24.TextStrokeTransparency = 0.80000001192093
  1111. TextLabel24.TextXAlignment = Enum.TextXAlignment.Left
  1112. TextLabel24.TextYAlignment = Enum.TextYAlignment.Top
  1113. TextLabel25.Name = "WeaponName"
  1114. TextLabel25.Parent = Frame23
  1115. TextLabel25.Text = "WeaponName"
  1116. TextLabel25.Position = UDim2.new(0, 4, 1, 0)
  1117. TextLabel25.BackgroundColor3 = Color3.new(1, 1, 1)
  1118. TextLabel25.BorderSizePixel = 0
  1119. TextLabel25.Font = Enum.Font.SourceSans
  1120. TextLabel25.FontSize = Enum.FontSize.Size18
  1121. TextLabel25.TextColor3 = Color3.new(1, 1, 1)
  1122. TextLabel25.TextStrokeTransparency = 0.80000001192093
  1123. TextLabel25.TextXAlignment = Enum.TextXAlignment.Left
  1124. TextLabel25.TextYAlignment = Enum.TextYAlignment.Top
  1125. Frame26.Name = "_"
  1126. Frame26.Parent = Frame23
  1127. Frame26.Transparency = 0.5
  1128. Frame26.Size = UDim2.new(1, 0, 1, 0)
  1129. Frame26.Position = UDim2.new(0, 0, 0, -5)
  1130. Frame26.BackgroundColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  1131. Frame26.BackgroundTransparency = 0.5
  1132. Frame26.BorderSizePixel = 0
  1133. Frame27.Name = "Border"
  1134. Frame27.Parent = Frame26
  1135. Frame27.Transparency = 0.5
  1136. Frame27.Size = UDim2.new(1, 0, 0, 2)
  1137. Frame27.Position = UDim2.new(0, 0, 0, -2)
  1138. Frame27.BackgroundColor3 = Color3.new(0, 1, 0.85098)
  1139. Frame27.BackgroundTransparency = 0.5
  1140. Frame27.BorderSizePixel = 0
  1141. Frame28.Name = "Border"
  1142. Frame28.Parent = Frame26
  1143. Frame28.Transparency = 0.5
  1144. Frame28.Size = UDim2.new(1, 0, 0, 2)
  1145. Frame28.Position = UDim2.new(0, 0, 1, 0)
  1146. Frame28.BackgroundColor3 = Color3.new(0, 1, 0.886275)
  1147. Frame28.BackgroundTransparency = 0.5
  1148. Frame28.BorderSizePixel = 0
  1149. ImageLabel29.Name = "Logo"
  1150. ImageLabel29.Parent = Frame23
  1151. ImageLabel29.Transparency = 1
  1152. ImageLabel29.Size = UDim2.new(0, 100, 0, 100)
  1153. ImageLabel29.Position = UDim2.new(0.5, -50, 0, -110)
  1154. ImageLabel29.BackgroundColor3 = Color3.new(1, 1, 1)
  1155. ImageLabel29.BackgroundTransparency = 1
  1156. ImageLabel29.BorderSizePixel = 0
  1157. ImageLabel29.ImageColor3 = Color3.new(0, 0, 0)
  1158. TextLabel30.Name = "FiringMode"
  1159. TextLabel30.Parent = Frame23
  1160. TextLabel30.Text = "Firing Mode: Semi"
  1161. TextLabel30.Position = UDim2.new(0, 4, 10, 0)
  1162. TextLabel30.BackgroundColor3 = Color3.new(1, 1, 1)
  1163. TextLabel30.BorderSizePixel = 0
  1164. TextLabel30.Font = Enum.Font.SourceSansBold
  1165. TextLabel30.FontSize = Enum.FontSize.Size18
  1166. TextLabel30.TextColor3 = Color3.new(1, 1, 1)
  1167. TextLabel30.TextStrokeTransparency = 0.80000001192093
  1168. TextLabel30.TextTransparency = 1
  1169. TextLabel30.TextXAlignment = Enum.TextXAlignment.Left
  1170. TextLabel30.TextYAlignment = Enum.TextYAlignment.Top
  1171. Part31.Name = "Light"
  1172. Part31.Parent = Tool0
  1173. Part31.CanCollide = false
  1174. Part31.Size = Vector3.new(0.0500000007, 0.0500000007, 0.149999976)
  1175. Part31.CFrame = CFrame.new(72.8948975, 172.431854, 252.964951, 1, 2.16004992e-12, 0, 2.26307861e-12, 1, 1.78260962e-10, 0, 1.78260962e-10, 1)
  1176. Part31.Position = Vector3.new(72.8948975, 172.431854, 252.964951)
  1177. SpotLight32.Name = "Light"
  1178. SpotLight32.Parent = Part31
  1179. SpotLight32.Color = Color3.new(0, 0.952941, 1)
  1180. SpotLight32.Enabled = false
  1181. SpotLight32.Brightness = 2
  1182. SpotLight32.Range = 13
  1183. SpotLight32.Shadows = true
  1184. SpotLight32.Angle = 180
  1185. SpotLight32.Face = Enum.NormalId.Top
  1186. SpotLight32.Color = Color3.new(0, 0.952941, 1)
  1187. Part33.Name = "Barrel"
  1188. Part33.Parent = Tool0
  1189. Part33.CanCollide = false
  1190. Part33.Size = Vector3.new(0.0500000007, 0.0500000007, 0.149999976)
  1191. Part33.CFrame = CFrame.new(72.8948975, 172.431854, 252.964951, 1, 2.16004992e-12, 0, 2.26307861e-12, 1, 1.78260962e-10, 0, 1.78260962e-10, 1)
  1192. Part33.Position = Vector3.new(72.8948975, 172.431854, 252.964951)
  1193. SpotLight34.Name = "Light"
  1194. SpotLight34.Parent = Part33
  1195. SpotLight34.Color = Color3.new(0, 0.952941, 1)
  1196. SpotLight34.Enabled = false
  1197. SpotLight34.Brightness = 2
  1198. SpotLight34.Range = 13
  1199. SpotLight34.Shadows = true
  1200. SpotLight34.Angle = 180
  1201. SpotLight34.Face = Enum.NormalId.Top
  1202. SpotLight34.Color = Color3.new(0, 0.952941, 1)
  1203. ParticleEmitter35.Name = "Flash"
  1204. ParticleEmitter35.Parent = Part33
  1205. ParticleEmitter35.Size = NumberSequence.new(0.30000001192093,0.30000001192093)
  1206. ParticleEmitter35.Color = ColorSequence.new(Color3.new(0, 0.678431, 0.690196),Color3.new(0, 0.678431, 0.690196))
  1207. ParticleEmitter35.LightEmission = 234
  1208. ParticleEmitter35.Texture = "http://www.roblox.com/asset/?id=68683102"
  1209. ParticleEmitter35.Lifetime = NumberRange.new(0.30000001192093, 0.30000001192093)
  1210. ParticleEmitter35.Rate = 0
  1211. ParticleEmitter35.Speed = NumberRange.new(0, 0)
  1212. ParticleEmitter35.VelocitySpread = 50
  1213. ParticleEmitter35.Color = ColorSequence.new(Color3.new(0, 0.678431, 0.690196),Color3.new(0, 0.678431, 0.690196))
  1214. Tool36.Name = "Gravity Gun"
  1215. Tool36.Parent = mas
  1216. Part37.Name = "Light"
  1217. Part37.Parent = Tool36
  1218. Part37.Material = Enum.Material.SmoothPlastic
  1219. Part37.BrickColor = BrickColor.new("Wheat")
  1220. Part37.Transparency = 1
  1221. Part37.Rotation = Vector3.new(-89.9899979, -0.00999999978, 1.46999991)
  1222. Part37.CanCollide = false
  1223. Part37.FormFactor = Enum.FormFactor.Custom
  1224. Part37.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1225. Part37.CFrame = CFrame.new(73.5449829, 171.561371, 253.914093, 0.99967134, -0.0256340783, -0.000127324325, 0.000131124631, 0.00014657047, 1, -0.0256340597, -0.9996714, 0.000149883897)
  1226. Part37.BottomSurface = Enum.SurfaceType.Smooth
  1227. Part37.TopSurface = Enum.SurfaceType.Smooth
  1228. Part37.Color = Color3.new(0.945098, 0.905882, 0.780392)
  1229. Part37.Position = Vector3.new(73.5449829, 171.561371, 253.914093)
  1230. Part37.Orientation = Vector3.new(-90, 1.46999991, 0)
  1231. Part37.Color = Color3.new(0.945098, 0.905882, 0.780392)
  1232. CylinderMesh38.Parent = Part37
  1233. CylinderMesh38.Scale = Vector3.new(0.594444454, 0.05185185, 0.629629552)
  1234. CylinderMesh38.Scale = Vector3.new(0.594444454, 0.05185185, 0.629629552)
  1235. Part39.Name = "Flashlight"
  1236. Part39.Parent = Tool36
  1237. Part39.Material = Enum.Material.SmoothPlastic
  1238. Part39.BrickColor = BrickColor.new("Dark stone grey")
  1239. Part39.Transparency = 1
  1240. Part39.Rotation = Vector3.new(0.0299999993, 1.49000001, -179.959991)
  1241. Part39.CanCollide = false
  1242. Part39.FormFactor = Enum.FormFactor.Custom
  1243. Part39.Size = Vector3.new(0.200000003, 0.2074074, 0.200000003)
  1244. Part39.CFrame = CFrame.new(73.5509644, 171.564972, 254.100647, -0.999662638, 0.000633242249, 0.0259669926, -0.000648298883, -0.999999642, -0.000571423909, 0.0259666219, -0.000588065828, 0.999662578)
  1245. Part39.BottomSurface = Enum.SurfaceType.Smooth
  1246. Part39.TopSurface = Enum.SurfaceType.Smooth
  1247. Part39.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1248. Part39.Position = Vector3.new(73.5509644, 171.564972, 254.100647)
  1249. Part39.Orientation = Vector3.new(0.0299999993, 1.49000001, -179.959991)
  1250. Part39.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1251. SpecialMesh40.Parent = Part39
  1252. SpecialMesh40.MeshId = "http://www.roblox.com/asset/?id=115955313"
  1253. SpecialMesh40.Scale = Vector3.new(0.185185179, 0.185185179, 0.185185179)
  1254. SpecialMesh40.VertexColor = Vector3.new(125, 125, 125)
  1255. SpecialMesh40.MeshType = Enum.MeshType.FileMesh
  1256. SpecialMesh40.Scale = Vector3.new(0.185185179, 0.185185179, 0.185185179)
  1257. SpotLight41.Name = "Light"
  1258. SpotLight41.Parent = Part39
  1259. SpotLight41.Enabled = false
  1260. SpotLight41.Brightness = 200
  1261. SpotLight41.Range = 20
  1262. SpotLight41.Shadows = true
  1263. SpotLight41.Angle = 60
  1264. Part42.Name = "Handle"
  1265. Part42.Parent = Tool36
  1266. Part42.BrickColor = BrickColor.new("Bright yellow")
  1267. Part42.Transparency = 1
  1268. Part42.Rotation = Vector3.new(0, 21.4099998, 0)
  1269. Part42.CanCollide = false
  1270. Part42.FormFactor = Enum.FormFactor.Custom
  1271. Part42.Size = Vector3.new(0.300000012, 0.200000003, 0.200000003)
  1272. Part42.CFrame = CFrame.new(73.3031616, 171.193665, 256.127441, 0.930995226, 2.43172035e-05, 0.365022629, -3.56544297e-05, 1, 2.43173708e-05, -0.365022629, -3.56541896e-05, 0.930995226)
  1273. Part42.Color = Color3.new(0.960784, 0.803922, 0.188235)
  1274. Part42.Position = Vector3.new(73.3031616, 171.193665, 256.127441)
  1275. Part42.Orientation = Vector3.new(0, 21.4099998, 0)
  1276. Part42.Color = Color3.new(0.960784, 0.803922, 0.188235)
  1277. BlockMesh43.Parent = Part42
  1278. BlockMesh43.Scale = Vector3.new(0.925926268, 0.0370371528, 0.62962985)
  1279. BlockMesh43.Scale = Vector3.new(0.925926268, 0.0370371528, 0.62962985)
  1280. Sound44.Name = "Fire"
  1281. Sound44.Parent = Part42
  1282. Sound44.Pitch = 2
  1283. Sound44.SoundId = "rbxassetid://501798753"
  1284. Sound45.Name = "EmptyMag"
  1285. Sound45.Parent = Part42
  1286. Sound45.Pitch = 0.80000001192093
  1287. Sound45.SoundId = "rbxassetid://159385334"
  1288. Sound46.Name = "Reload"
  1289. Sound46.Parent = Part42
  1290. Sound46.Pitch = 1.2000000476837
  1291. Sound46.SoundId = "http://www.roblox.com/asset/?id=2697432"
  1292. Sound47.Name = "FlashSound"
  1293. Sound47.Parent = Part42
  1294. Sound47.Pitch = 100
  1295. Sound47.SoundId = "http://www.roblox.com/asset/?id=274924676"
  1296. Part48.Name = "Trigger"
  1297. Part48.Parent = Tool36
  1298. Part48.BrickColor = BrickColor.new("Dusty Rose")
  1299. Part48.Transparency = 1
  1300. Part48.Rotation = Vector3.new(179.759995, -88.7599945, -0.219999999)
  1301. Part48.Velocity = Vector3.new(1.40129846e-45, 0, 1.40129846e-45)
  1302. Part48.CanCollide = false
  1303. Part48.FormFactor = Enum.FormFactor.Custom
  1304. Part48.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  1305. Part48.CFrame = CFrame.new(73.5487671, 171.301575, 255.85202, 0.0216009524, 8.30429344e-05, -0.999766648, -0.000301155, -1, -8.95690609e-05, -0.999766588, 0.000303019129, -0.0216009282)
  1306. Part48.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  1307. Part48.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  1308. Part48.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  1309. Part48.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  1310. Part48.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  1311. Part48.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  1312. Part48.Color = Color3.new(0.639216, 0.294118, 0.294118)
  1313. Part48.Position = Vector3.new(73.5487671, 171.301575, 255.85202)
  1314. Part48.Orientation = Vector3.new(0.00999999978, -91.2399979, -179.979996)
  1315. Part48.Color = Color3.new(0.639216, 0.294118, 0.294118)
  1316. BlockMesh49.Parent = Part48
  1317. BlockMesh49.Scale = Vector3.new(0.799999952, 0.599999964, 0.799999952)
  1318. BlockMesh49.Scale = Vector3.new(0.799999952, 0.599999964, 0.799999952)
  1319. Part50.Name = "Mag"
  1320. Part50.Parent = Tool36
  1321. Part50.Material = Enum.Material.SmoothPlastic
  1322. Part50.BrickColor = BrickColor.new("Mid gray")
  1323. Part50.Reflectance = 0.30000001192093
  1324. Part50.Transparency = 1
  1325. Part50.Rotation = Vector3.new(0, -88.5099945, 180)
  1326. Part50.CanCollide = false
  1327. Part50.FormFactor = Enum.FormFactor.Custom
  1328. Part50.Size = Vector3.new(0.249999985, 0.200000003, 0.200000003)
  1329. Part50.CFrame = CFrame.new(73.5408325, 171.322449, 254.849274, -0.0259207282, -1.67640951e-06, -0.999663949, 0.00012946222, -1, -1.679913e-06, -0.999664009, -0.000129462613, 0.0259207282)
  1330. Part50.BottomSurface = Enum.SurfaceType.Smooth
  1331. Part50.TopSurface = Enum.SurfaceType.Smooth
  1332. Part50.Color = Color3.new(0.803922, 0.803922, 0.803922)
  1333. Part50.Position = Vector3.new(73.5408325, 171.322449, 254.849274)
  1334. Part50.Orientation = Vector3.new(0, -88.5099945, 179.98999)
  1335. Part50.Color = Color3.new(0.803922, 0.803922, 0.803922)
  1336. Part51.Name = "Barrel"
  1337. Part51.Parent = Tool36
  1338. Part51.Material = Enum.Material.SmoothPlastic
  1339. Part51.BrickColor = BrickColor.new("Dark stone grey")
  1340. Part51.Rotation = Vector3.new(0.560000002, -88.5800018, 90.5699997)
  1341. Part51.CanCollide = false
  1342. Part51.FormFactor = Enum.FormFactor.Custom
  1343. Part51.Size = Vector3.new(0.200000003, 0.200000003, 0.232538849)
  1344. Part51.CFrame = CFrame.new(73.9038696, 171.456696, 254.052673, -0.000246524782, -0.0247177798, -0.999694586, 1.00000012, -0.000186324294, -0.000241875648, -0.000180065457, -0.999694645, 0.0247176904)
  1345. Part51.BottomSurface = Enum.SurfaceType.Smooth
  1346. Part51.TopSurface = Enum.SurfaceType.Smooth
  1347. Part51.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1348. Part51.Position = Vector3.new(73.9038696, 171.456696, 254.052673)
  1349. Part51.Orientation = Vector3.new(0.00999999978, -88.5800018, 90.0099945)
  1350. Part51.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1351. SpotLight52.Name = "Light"
  1352. SpotLight52.Parent = Part51
  1353. SpotLight52.Color = Color3.new(1, 1, 0)
  1354. SpotLight52.Enabled = false
  1355. SpotLight52.Brightness = 2
  1356. SpotLight52.Range = 13
  1357. SpotLight52.Shadows = true
  1358. SpotLight52.Angle = 180
  1359. SpotLight52.Face = Enum.NormalId.Top
  1360. SpotLight52.Color = Color3.new(1, 1, 0)
  1361. ParticleEmitter53.Name = "Flash"
  1362. ParticleEmitter53.Parent = Part51
  1363. ParticleEmitter53.Size = NumberSequence.new(0.30000001192093,0.30000001192093)
  1364. ParticleEmitter53.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0))
  1365. ParticleEmitter53.LightEmission = 234
  1366. ParticleEmitter53.Texture = "http://www.roblox.com/asset/?id=68683102"
  1367. ParticleEmitter53.Lifetime = NumberRange.new(0.30000001192093, 0.30000001192093)
  1368. ParticleEmitter53.Rate = 0
  1369. ParticleEmitter53.Speed = NumberRange.new(0, 0)
  1370. ParticleEmitter53.VelocitySpread = 50
  1371. ParticleEmitter53.Color = ColorSequence.new(Color3.new(1, 1, 0.498039),Color3.new(1, 1, 0))
  1372. Configuration54.Name = "Conditions"
  1373. Configuration54.Parent = Tool36
  1374. IntValue55.Name = "Ammo"
  1375. IntValue55.Parent = Configuration54
  1376. IntValue55.Value = 30
  1377. BoolValue56.Name = "CanFire"
  1378. BoolValue56.Parent = Configuration54
  1379. BoolValue56.Value = true
  1380. NumberValue57.Name = "MaxRecoil"
  1381. NumberValue57.Parent = Configuration54
  1382. NumberValue57.Value = 100
  1383. NumberValue58.Name = "Recoil"
  1384. NumberValue58.Parent = Configuration54
  1385. Part59.Parent = Tool36
  1386. Part59.Material = Enum.Material.Neon
  1387. Part59.BrickColor = BrickColor.new("Bright orange")
  1388. Part59.Transparency = 0.5
  1389. Part59.Rotation = Vector3.new(-179.98999, -75, -179.98999)
  1390. Part59.CanCollide = false
  1391. Part59.Shape = Enum.PartType.Cylinder
  1392. Part59.Size = Vector3.new(1.20000005, 0.649999976, 2)
  1393. Part59.CFrame = CFrame.new(73.7000122, 171.475952, 254.700012, -0.258856148, 4.27887353e-05, -0.965915978, 5.63494723e-06, 1, 4.27885097e-05, 0.965915978, 5.63354115e-06, -0.258856148)
  1394. Part59.Color = Color3.new(0.854902, 0.521569, 0.254902)
  1395. Part59.Position = Vector3.new(73.7000122, 171.475952, 254.700012)
  1396. Part59.Orientation = Vector3.new(0, -105, 0)
  1397. Part59.Color = Color3.new(0.854902, 0.521569, 0.254902)
  1398. Script60.Name = "Glow Script"
  1399. Script60.Parent = Part59
  1400. Script60.Disabled = true
  1401. Part61.Name = "Shoot"
  1402. Part61.Parent = Tool36
  1403. Part61.Material = Enum.Material.Neon
  1404. Part61.BrickColor = BrickColor.new("Br. yellowish orange")
  1405. Part61.Reflectance = 0.30000001192093
  1406. Part61.Transparency = 1
  1407. Part61.Rotation = Vector3.new(106, -45, -90.0099945)
  1408. Part61.CanCollide = false
  1409. Part61.FormFactor = Enum.FormFactor.Custom
  1410. Part61.Size = Vector3.new(1, 1, 1)
  1411. Part61.CFrame = CFrame.new(73.7999878, 171.529968, 254.100006, -6.7233399e-05, 0.70712465, -0.707088947, 0.275642842, -0.679683387, -0.679743886, -0.96126014, -0.194949687, -0.194868132)
  1412. Part61.BottomSurface = Enum.SurfaceType.Smooth
  1413. Part61.TopSurface = Enum.SurfaceType.Smooth
  1414. Part61.Color = Color3.new(0.886275, 0.607843, 0.25098)
  1415. Part61.Position = Vector3.new(73.7999878, 171.529968, 254.100006)
  1416. Part61.Orientation = Vector3.new(42.8199997, -105.409996, 157.929993)
  1417. Part61.Color = Color3.new(0.886275, 0.607843, 0.25098)
  1418. SpecialMesh62.Parent = Part61
  1419. SpecialMesh62.MeshId = "http://www.roblox.com/asset/?id=1031410"
  1420. SpecialMesh62.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
  1421. SpecialMesh62.MeshType = Enum.MeshType.FileMesh
  1422. SpecialMesh62.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
  1423. Vector3Value63.Name = "SurfacePos"
  1424. Vector3Value63.Parent = Tool36
  1425. Vector3Value63.Value = Vector3.new(2, 3, 3)
  1426. Script64.Name = "qPerfectionWeld"
  1427. Script64.Parent = Tool36
  1428. table.insert(cors,sandbox(Script64,function()
  1429. -- Created by Quenty (@Quenty, follow me on twitter).
  1430. -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
  1431. -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
  1432.  
  1433. --[[ INSTRUCTIONS
  1434. - Place in the model
  1435. - Make sure model is anchored
  1436. - That's it. It will weld the model and all children.
  1437.  
  1438. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  1439. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  1440. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  1441. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  1442. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  1443. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  1444. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  1445. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  1446.  
  1447. This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
  1448. ]]
  1449.  
  1450. --[[ DOCUMENTATION
  1451. - Will work in tools. If ran more than once it will not create more than one weld. This is especially useful for tools that are dropped and then picked up again.
  1452. - Will work in PBS servers
  1453. - Will work as long as it starts out with the part anchored
  1454. - Stores the relative CFrame as a CFrame value
  1455. - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
  1456. - Utilizes a recursive algorith to find all parts in the model
  1457. - Will reweld on script reparent if the script is initially parented to a tool.
  1458. - Welds as fast as possible
  1459. ]]
  1460.  
  1461. -- qPerfectionWeld.lua
  1462. -- Created 10/6/2014
  1463. -- Author: Quenty
  1464. -- Version 1.0.3
  1465.  
  1466. -- Updated 10/14/2014 - Updated to 1.0.1
  1467. --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
  1468.  
  1469. -- Updated 10/14/2014 - Updated to 1.0.2
  1470. --- Fixed bug fix.
  1471.  
  1472. -- Updated 10/14/2014 - Updated to 1.0.3
  1473. --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
  1474.  
  1475. local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
  1476.  
  1477.  
  1478. local function CallOnChildren(Instance, FunctionToCall)
  1479. -- Calls a function on each of the children of a certain object, using recursion.
  1480.  
  1481. FunctionToCall(Instance)
  1482.  
  1483. for _, Child in next, Instance:GetChildren() do
  1484. CallOnChildren(Child, FunctionToCall)
  1485. end
  1486. end
  1487.  
  1488. local function GetNearestParent(Instance, ClassName)
  1489. -- Returns the nearest parent of a certain class, or returns nil
  1490.  
  1491. local Ancestor = Instance
  1492. repeat
  1493. Ancestor = Ancestor.Parent
  1494. if Ancestor == nil then
  1495. return nil
  1496. end
  1497. until Ancestor:IsA(ClassName)
  1498.  
  1499. return Ancestor
  1500. end
  1501.  
  1502. local function GetBricks(StartInstance)
  1503. local List = {}
  1504.  
  1505. -- if StartInstance:IsA("BasePart") then
  1506. -- List[#List+1] = StartInstance
  1507. -- end
  1508.  
  1509. CallOnChildren(StartInstance, function(Item)
  1510. if Item:IsA("BasePart") then
  1511. List[#List+1] = Item;
  1512. end
  1513. end)
  1514.  
  1515. return List
  1516. end
  1517.  
  1518. local function Modify(Instance, Values)
  1519. -- Modifies an Instance by using a table.
  1520.  
  1521. assert(type(Values) == "table", "Values is not a table");
  1522.  
  1523. for Index, Value in next, Values do
  1524. if type(Index) == "number" then
  1525. Value.Parent = Instance
  1526. else
  1527. Instance[Index] = Value
  1528. end
  1529. end
  1530. return Instance
  1531. end
  1532.  
  1533. local function Make(ClassType, Properties)
  1534. -- Using a syntax hack to create a nice way to Make new items.
  1535.  
  1536. return Modify(Instance.new(ClassType), Properties)
  1537. end
  1538.  
  1539. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  1540. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  1541.  
  1542. local function HasWheelJoint(Part)
  1543. for _, SurfaceName in pairs(Surfaces) do
  1544. for _, HingSurfaceName in pairs(HingSurfaces) do
  1545. if Part[SurfaceName].Name == HingSurfaceName then
  1546. return true
  1547. end
  1548. end
  1549. end
  1550.  
  1551. return false
  1552. end
  1553.  
  1554. local function ShouldBreakJoints(Part)
  1555. --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  1556. -- definitely some edge cases.
  1557.  
  1558. if NEVER_BREAK_JOINTS then
  1559. return false
  1560. end
  1561.  
  1562. if HasWheelJoint(Part) then
  1563. return false
  1564. end
  1565.  
  1566. local Connected = Part:GetConnectedParts()
  1567.  
  1568. if #Connected == 1 then
  1569. return false
  1570. end
  1571.  
  1572. for _, Item in pairs(Connected) do
  1573. if HasWheelJoint(Item) then
  1574. return false
  1575. elseif not Item:IsDescendantOf(script.Parent) then
  1576. return false
  1577. end
  1578. end
  1579.  
  1580. return true
  1581. end
  1582.  
  1583. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  1584. --- Weld's 2 parts together
  1585. -- @param Part0 The first part
  1586. -- @param Part1 The second part (Dependent part most of the time).
  1587. -- @param [JointType] The type of joint. Defaults to weld.
  1588. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
  1589. -- @return The weld created.
  1590.  
  1591. JointType = JointType or "Weld"
  1592. local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  1593.  
  1594. local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  1595. Modify(NewWeld, {
  1596. Name = "qCFrameWeldThingy";
  1597. Part0 = Part0;
  1598. Part1 = Part1;
  1599. C0 = CFrame.new();--Part0.CFrame:inverse();
  1600. C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  1601. Parent = Part1;
  1602. })
  1603.  
  1604. if not RelativeValue then
  1605. RelativeValue = Make("CFrameValue", {
  1606. Parent = Part1;
  1607. Name = "qRelativeCFrameWeldValue";
  1608. Archivable = true;
  1609. Value = NewWeld.C1;
  1610. })
  1611. end
  1612.  
  1613. return NewWeld
  1614. end
  1615.  
  1616. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  1617. -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
  1618. -- @param MainPart The part to weld the model to (can be in the model).
  1619. -- @param [JointType] The type of joint. Defaults to weld.
  1620. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
  1621.  
  1622. for _, Part in pairs(Parts) do
  1623. if ShouldBreakJoints(Part) then
  1624. Part:BreakJoints()
  1625. end
  1626. end
  1627.  
  1628. for _, Part in pairs(Parts) do
  1629. if Part ~= MainPart then
  1630. WeldTogether(MainPart, Part, JointType, MainPart)
  1631. end
  1632. end
  1633.  
  1634. if not DoNotUnanchor then
  1635. for _, Part in pairs(Parts) do
  1636. Part.Anchored = false
  1637. end
  1638. MainPart.Anchored = false
  1639. end
  1640. end
  1641.  
  1642. local function PerfectionWeld()
  1643. local Tool = GetNearestParent(script, "Tool")
  1644.  
  1645. local Parts = GetBricks(script.Parent)
  1646. local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
  1647.  
  1648. if PrimaryPart then
  1649. WeldParts(Parts, PrimaryPart, "Weld", false)
  1650. else
  1651. warn("qWeld - Unable to weld part")
  1652. end
  1653.  
  1654. return Tool
  1655. end
  1656.  
  1657. local Tool = PerfectionWeld()
  1658.  
  1659.  
  1660. if Tool and script.ClassName == "Script" then
  1661. --- Don't bother with local scripts
  1662.  
  1663. script.Parent.AncestryChanged:connect(function()
  1664. PerfectionWeld()
  1665. end)
  1666. end
  1667.  
  1668. -- Created by Quenty (@Quenty, follow me on twitter).
  1669.  
  1670. end))
  1671. LocalScript65.Name = "GunCore"
  1672. LocalScript65.Parent = Tool36
  1673. table.insert(cors,sandbox(LocalScript65,function()
  1674. --[[.
  1675. ____ _____ _ ____ _____ ____
  1676. | _ \| ____| / \ | _ \| ____| _ \
  1677. | |_) | _| / _ \ | |_) | _| | |_) |
  1678. | _ <| |___ / ___ \| __/| |___| _ <
  1679. |_| \_\_____/_/ \_\_| |_____|_| \_\
  1680. ___ _ _ ____ _ _ ____ _____ ____ ___ _____ ____
  1681. |_ _| \ | | _ \| | | / ___|_ _| _ \|_ _| ____/ ___|
  1682. | || \| | | | | | | \___ \ | | | |_) || || _| \___ \
  1683. | || |\ | |_| | |_| |___) || | | _ < | || |___ ___) |
  1684. |___|_| \_|____/ \___/|____/ |_| |_| \_\___|_____|____/
  1685.  
  1686. ]] --(Teh)
  1687. -- In partnership by ReaperIndustries, by CrakTheRaven and Revenus/HopeofRome
  1688. -- not really this was made by Pragmatist but i like to take credit for things too xD
  1689.  
  1690. local tool, player = script.Parent, game:GetService("Players").LocalPlayer
  1691.  
  1692. -- CONFIGURATION --
  1693. WeaponName = "Gravity Gun"; -- Weapon Name that shows up on the GUI text.
  1694. BulletSpread = 1.1; -- Number of studs the bullet is offset (0 = no spread).
  1695. WeaponType = "Auto"; -- "Auto" / "Semi"
  1696. BulletColor = BrickColor.new("Bright orange"); -- BrickColor of the bullet.
  1697. BulletTransparency = 100 -- Transparency of the bullet.
  1698. BulletOrigin = tool:WaitForChild("Barrel"); -- What the bullet will shoot from.
  1699. HitDamage = 17; -- How much damage the gun does.
  1700. ObjectMultiplier = .3; -- Have an object you want to destroy? Object must have value of "Health"
  1701. Cursor = "rbxasset://textures\\GunCursor.png"; -- Cursor that shows when the gun is equipped.
  1702. HitSoundId = "rbxassetid://131864673"; -- Id of the HitSound
  1703. HitSoundVolume = .7; -- Volume of the HitSound (make 0 if you don't want players to hear)
  1704. MaxAmmo = 100; -- Maximum ammo per clip.
  1705. FireRate = 0.00000001; -- Time between each shot.
  1706. MeshType = "Block"; -- What kind of bullet you want shooting out of the gun (Block/Cylinder)
  1707. Recoil = script.Parent.Conditions.Recoil.Value -- Value that determines reticle spacing
  1708. MaxRecoil = script.Parent.Conditions.MaxRecoil.Value -- Maximum allowance for reticle parting
  1709. TrueRecoil = script.Parent.Conditions.Recoil -- Spahgetti Coding variable, just to shorten things later
  1710.  
  1711. -- Please don't touch anything below unless you know what you're doing! Thanks :)
  1712. local Handle = tool:WaitForChild("Handle")
  1713. local Barrel = tool:WaitForChild("Barrel")
  1714. local Flashlight = tool:WaitForChild("Flashlight")
  1715. local FakeLight = tool:WaitForChild("Light")
  1716. local Conditions = tool:WaitForChild("Conditions")
  1717. local AmmoCount = Conditions:WaitForChild("Ammo")
  1718. local CanFire = Conditions:WaitForChild("CanFire")
  1719.  
  1720. local Teams, ReplicatedStorage, UserInputService, RunService, Debris, Create = game:GetService("Teams"), game:GetService("ReplicatedStorage"), game:GetService("UserInputService"), game:GetService("RunService"), game:GetService("Debris"), LoadLibrary("RbxUtility").Create
  1721. local Camera, PlayerGui, Backpack = workspace.CurrentCamera, player:WaitForChild("PlayerGui"), player:WaitForChild("Backpack")
  1722. local BulletDump = workspace:WaitForChild("BulletDump") -- Required
  1723. local ToolReplicator = ReplicatedStorage:WaitForChild("ToolReplicator") -- Required
  1724. local HitSound = player.Backpack:FindFirstChild("HitSound") or Create("Sound"){Name = "HitSound", Pitch = 0.8, SoundId = HitSoundId, Volume = HitSoundVolume, Parent = player.Backpack}
  1725. local FireSound, ReloadSound, EmptyMagSound,FlashSound = Handle:FindFirstChild("Fire"), Handle:FindFirstChild("Reload"), Handle:FindFirstChild("EmptyMag"), Handle:FindFirstChild("FlashSound")
  1726. local Equipped, Reloading, Firing, MouseDown, Holster = false, false, false, false, false
  1727.  
  1728. local ArmCFrames = {
  1729. Left = CFrame.new(-0.232401475, 0.731157064, 1.02414107, 0.103974499, 0.97441268, -0.199301302, -0.473240495, 0.22472018, 0.851790786, 0.87477237, 0.00575334439, 0.484494328),
  1730. Right = CFrame.new(-1.00000823, -0.100011915, 0.200000018, 0.866025448, 5.32910745e-014, -0.499999881, 0.499999881, -4.37115588e-008, 0.866025448, -2.18557332e-008, -0.999999881, -3.78553544e-008)
  1731. }
  1732.  
  1733. local HolsterCFrames = {
  1734. Left = CFrame.new(-0.586823761, 0.480985105, 0.906768203, -0.0642859489, 0.782161772, -0.619750977, -0.431978822, 0.538023889, 0.723826647, 0.899590433, 0.314251065, 0.303290009),
  1735. Right = CFrame.new(-0.973636985, -0.650349975, 0.0138454549, 0.696540296, 0.00785090867, -0.717475176, 0.682276845, 0.302280575, 0.665676713, 0.222104996, -0.95318675, 0.205194116)
  1736. }
  1737.  
  1738. local ReloadSequence = {
  1739. {Time = 0.4, Left = CFrame.new(-0.209011436, 0.76324892, 0.78975606, -0.282254279, 0.907642782, 0.310671985, -0.493101478, -0.415047199, 0.76458323, 0.822911561, 0.0626139268, 0.564708829), Right = CFrame.new(-0.55685395, 0.463526368, 0.53752619, 0.954750538, -0.271960884, -0.120368935, 0.071148172, -0.184115022, 0.980326295, -0.288772106, -0.944531083, -0.156434402)},
  1740. {Time = 0.6, Left = CFrame.new(-0.325837493, 0.707264721, 0.802219033, -0.2016415, 0.961395979, 0.187239349, -0.545462966, -0.269001901, 0.79379344, 0.81351763, 0.0579295866, 0.578647852), Right = CFrame.new(-0.736077189, 0.532853663, 0.507766426, 0.942081809, -0.258100748, -0.214163035, 0.11451336, -0.35264346, 0.928724527, -0.315227658, -0.899459004, -0.302662909)},
  1741. {Time = 0.7, Left = CFrame.new(-0.495625108, 0.81194824, 0.587404788, -0.48886016, 0.869798005, 0.0668373406, -0.435639948, -0.309788495, 0.845132411, 0.755800009, 0.384034574, 0.53036195), Right = CFrame.new(-0.833003342, 0.573787272, 0.232965112, 0.942081809, -0.216990575, -0.255728126, 0.11451336, -0.50855732, 0.85337919, -0.315227658, -0.83323729, -0.45425418)},
  1742. {Time = 0.8, Left = CFrame.new(-0.495624006, 0.672275305, 0.883890748, -0.488860488, 0.869798422, 0.0668372884, -0.722871542, -0.446785659, 0.52710402, 0.488336921, 0.209365755, 0.847167552), Right = CFrame.new(-0.898164988, 0.582640946, -0.0121643245, 0.938896179, -0.190729454, -0.286524475, 0.103399783, -0.63769573, 0.76331681, -0.328302413, -0.74630177, -0.57900846)},
  1743. {Time = 0.9, Left = CFrame.new(-0.373379707, 0.768625379, 0.494097263, -0.313948035, 0.946735382, -0.0716073662, -0.406596929, -0.0659107566, 0.911226451, 0.857971728, 0.315193295, 0.405632436), Right = CFrame.new(-0.932295918, 0.531932712, 0.158023566, 0.917598903, -0.210251763, -0.337352186, 0.159367502, -0.582896173, 0.796764791, -0.364162415, -0.784873366, -0.501357317)},
  1744. {Time = 1.1, Left = CFrame.new(-0.649042845, 0.6334849, 0.524738669, -0.338284612, 0.867902994, -0.363741338, -0.509759367, 0.155902475, 0.846073508, 0.791017711, 0.47163415, 0.389682144), Right = CFrame.new(-0.787839651, 0.494286418, 0.505542278, 0.917598903, -0.280750751, -0.281409532, 0.159367502, -0.388723493, 0.907466888, -0.364162415, -0.877537966, -0.311949492)},
  1745. {Time = 1.2, Left = CFrame.new(-0.765217423, 0.393802643, 0.583889008, -0.262994021, 0.845609963, -0.464519083, -0.55953896, 0.258544832, 0.787445486, 0.785971105, 0.467010081, 0.405155957), Right = CFrame.new(-0.965098858, 0.319458991, 0.614931285, 0.957236052, -0.105651543, -0.269326746, 0.242726684, -0.213278487, 0.946359336, -0.15742588, -0.971261859, -0.178513214)},
  1746. {Time = 1.4, Left = CFrame.new(-0.388958633, 0.387100548, 1.23408377, 0.198175311, 0.970845222, -0.134855196, -0.738777578, 0.238368183, 0.630387425, 0.644153416, -0.0252991598, 0.764476895), Right = CFrame.new(-0.850272775, -9.7155571e-006, 0.720583975, 0.957235992, -0.209575221, -0.199442521, 0.242726728, 0.206652865, 0.947828233, -0.157425791, -0.95570457, 0.248685315)},
  1747. {Time = 1.6, Left = CFrame.new(-0.307948738, 0.580714345, 0.879842877, 0.0535680652, 0.998491168, -0.0120923854, -0.691506028, 0.0458293781, 0.720915675, 0.720381916, -0.0302561019, 0.692917407), Right = CFrame.new(-0.942968845, 0.159364432, 0.402672172, 0.957235992, -0.155100465, -0.244219035, 0.242726728, -0.0287858695, 0.969667554, -0.157425791, -0.987478495, 0.0100925863)},
  1748. {Time = 1.8, Left = ArmCFrames.Left, Right = ArmCFrames.Right},
  1749. }
  1750.  
  1751. local LightSequence = {
  1752. {Time = 0.2, Left = CFrame.new(-0.209011436, 0.76324892, 0.78975606, -0.282254279, 0.907642782, 0.310671985, -0.493101478, -0.415047199, 0.76458323, 0.822911561, 0.0626139268, 0.564708829)},
  1753. {Time = 0.4, Left = ArmCFrames.Left, Right = ArmCFrames.Right},
  1754. }
  1755.  
  1756.  
  1757. local CoreBullet = Create("Part"){
  1758. Name = "Bullet";
  1759. BrickColor = BulletColor;
  1760. Material = Enum.Material.Neon;
  1761. FormFactor = Enum.FormFactor.Custom;
  1762. Size = Vector3.new(1, 1, 1);
  1763. Transparency = 0.7;
  1764. Anchored = true;
  1765. CanCollide = false;
  1766. Locked = true;
  1767.  
  1768. Create(MeshType == "Block" and "BlockMesh" or MeshType == "Cylinder" and "CylinderMesh" or "BlockMesh"){
  1769. Name = "Mesh",
  1770. Scale = Vector3.new(0.15, 0.15, 1)
  1771. }
  1772. }
  1773.  
  1774. local CoreBullet2 = Create("Part"){
  1775. Name = "ShowBullet";
  1776. BrickColor = BulletColor;
  1777. Material = Enum.Material.SmoothPlastic;
  1778. FormFactor = Enum.FormFactor.Custom;
  1779. Size = Vector3.new(1, 1, 1);
  1780. Transparency = 0.5;
  1781. Anchored = true;
  1782. CanCollide = false;
  1783. Locked = true;
  1784.  
  1785. Create(MeshType == "Block" and "BlockMesh" or MeshType == "Cylinder" and "CylinderMesh" or "BlockMesh"){
  1786. Name = "Mesh",
  1787. Scale = Vector3.new(0.1, 0.1, 1)
  1788. }
  1789. }
  1790. AmmoCount.Value = MaxAmmo
  1791. repeat wait(0.03) until player.Character
  1792. repeat wait(0.03) until #player.Character:GetChildren() > 10
  1793.  
  1794. function TweenWeld(arm, newCFrame, seconds)
  1795. local torso = player.Character:FindFirstChild("Torso")
  1796. local weld = arm == "Left" and torso:FindFirstChild("LeftArmWeld") or arm == "Right" and torso:FindFirstChild("RightArmWeld")
  1797. if weld then
  1798. local startCF, endCF = weld.C1, newCFrame
  1799. local startPos, startRot = startCF.p, Vector3.new(startCF:toEulerAnglesXYZ())
  1800. local endPos, endRot = endCF.p, Vector3.new(endCF:toEulerAnglesXYZ())
  1801. local diffPos, diffRot = (endPos - startPos), (endRot - startRot)
  1802. local new
  1803. for i = 0, 1, 1/seconds/30 do
  1804. if not weld or not Equipped then break end
  1805. new = CFrame.new(startPos+diffPos * i) * CFrame.Angles(startRot.X+diffRot.X * i, startRot.Y+diffRot.Y * i, startRot.Z+diffRot.Z * i)
  1806. weld.C1 = new
  1807. wait()
  1808. end
  1809. weld.C1 = endCF
  1810. end
  1811. end
  1812.  
  1813. function WeldArms(c1,lArm,rArm)
  1814. local prop = c1 and "C1" or "C0"
  1815. local char = player.Character
  1816. local torso = char:WaitForChild("Torso")
  1817. local lShoulder,rShoulder = torso:FindFirstChild("Left Shoulder"),torso:FindFirstChild("Right Shoulder")
  1818. if lArm and lShoulder then
  1819. lShoulder.Part1 = nil
  1820. Create("Weld"){
  1821. Name = "LeftArmWeld",
  1822. [prop] = lArm,
  1823. Part0 = torso,
  1824. Part1 = char:FindFirstChild("Left Arm"),
  1825. Parent = torso
  1826. }
  1827. elseif lShoulder and torso:FindFirstChild("LeftArmWeld") then
  1828. torso["LeftArmWeld"]:Remove()
  1829. lShoulder.Part1 = char:FindFirstChild("Left Arm")
  1830. end
  1831. if rArm and rShoulder then
  1832. rShoulder.Part1 = nil
  1833. Create("Weld"){
  1834. Name = "RightArmWeld",
  1835. [prop] = rArm,
  1836. Part0 = torso,
  1837. Part1 = char:FindFirstChild("Right Arm"),
  1838. Parent = torso
  1839. }
  1840. elseif rShoulder and torso:FindFirstChild("RightArmWeld") then
  1841. torso["RightArmWeld"]:Remove()
  1842. rShoulder.Part1 = char:FindFirstChild("Right Arm")
  1843. end
  1844. end
  1845.  
  1846. function PseudoArms(bool)
  1847. if not type(bool) == "boolean" then print("not a boolean parameter") return end
  1848.  
  1849. local function destroy()
  1850. if Camera:FindFirstChild("FakeArms") then
  1851. Camera:FindFirstChild("FakeArms"):Destroy()
  1852. end
  1853. end
  1854.  
  1855. local function create()
  1856. destroy()
  1857.  
  1858. local ArmsModel = Create("Model"){
  1859. Name = "FakeArms",
  1860. Parent = Camera,
  1861.  
  1862. Create("Humanoid"){Name = "_"},
  1863. }
  1864. local FakeShirt = player.Character:FindFirstChild("Shirt")
  1865. if FakeShirt then FakeShirt:Clone().Parent = ArmsModel end
  1866. local FakeLeftArm = player.Character:FindFirstChild("Left Arm"):Clone()
  1867. FakeLeftArm.Size = Vector3.new(0.9, 2, 0.9)
  1868. FakeLeftArm.Parent = ArmsModel
  1869. local FakeRightArm = player.Character:FindFirstChild("Right Arm"):Clone()
  1870. FakeRightArm.Size = Vector3.new(0.9, 2, 0.9)
  1871. FakeRightArm.Parent = ArmsModel
  1872.  
  1873. Create("Weld"){
  1874. Parent = ArmsModel,
  1875. Name = "FakeLeftShoulder",
  1876. Part0 = player.Character["Left Arm"],
  1877. Part1 = FakeLeftArm
  1878. }
  1879. Create("Weld"){
  1880. Parent = ArmsModel,
  1881. Name = "FakeRightShoulder",
  1882. Part0 = player.Character["Right Arm"],
  1883. Part1 = FakeRightArm
  1884. }
  1885. end
  1886.  
  1887. if bool then
  1888. create()
  1889. else
  1890. destroy()
  1891. end
  1892. end
  1893.  
  1894. function Light(bool,rate)
  1895. if not type(bool) == "boolean" then print("not a boolean parameter") return end
  1896. Barrel.Flash.Rate = rate
  1897. Barrel.Light.Enabled = bool
  1898.  
  1899. end
  1900.  
  1901. function GetGUI()
  1902. local result = PlayerGui:FindFirstChild("CrusaderGui")
  1903.  
  1904. if result then
  1905. return result
  1906. end
  1907. end
  1908.  
  1909. function UpdateGUI()
  1910. local Gui = GetGUI()
  1911. Gui.Weapon.WeaponName.Text = WeaponName
  1912. Gui.Weapon.Ammo.Text = AmmoCount.Value
  1913. Gui.Weapon.FiringMode.Text = "Firing mode: "..WeaponType
  1914. end
  1915.  
  1916. function GetHumanoid(target)
  1917. local humanoid
  1918.  
  1919. humanoid = target.Parent:FindFirstChild("Humanoid")
  1920. if not humanoid and target.Parent.Parent ~= nil then
  1921. humanoid = target.Parent.Parent:FindFirstChild("Humanoid")
  1922. end
  1923.  
  1924. return humanoid
  1925. end
  1926.  
  1927. function IsADefender(me, victim)
  1928. if me.TeamColor == victim.TeamColor then
  1929. return true
  1930. end
  1931.  
  1932. return false
  1933. end
  1934.  
  1935. function DrawLaser(init, at)
  1936. local length = (at-init).magnitude
  1937. local origin = CFrame.new(init, at)
  1938.  
  1939. local Laser1 = CoreBullet:Clone()
  1940. Laser1.CFrame = origin * CFrame.new(0, 0, -length/2) * CFrame.Angles(math.rad(90), 0, 0)
  1941. Laser1.Mesh.Scale = Vector3.new(Laser1.Mesh.Scale.x, length, Laser1.Mesh.Scale.x)
  1942. Laser1.Parent = BulletDump
  1943.  
  1944. Debris:AddItem(Laser1, 0.03)
  1945.  
  1946. local Laser2 = CoreBullet2:Clone()
  1947. Laser2.CFrame = origin * CFrame.new(0, 0, -length/2) * CFrame.Angles(math.rad(90), 0, 0)
  1948. Laser2.Mesh.Scale = Vector3.new(Laser1.Mesh.Scale.x*.5, length, Laser1.Mesh.Scale.x*.5)
  1949. Laser2.Parent = BulletDump
  1950.  
  1951. Debris:AddItem(Laser2, 0.03)
  1952. end
  1953.  
  1954. function CreateRaycast(root, last, ignore)
  1955. local direction = (last - root).unit
  1956. local ray = Ray.new(root, direction * 999)
  1957. local hit, at, surface = workspace:FindPartOnRayWithIgnoreList(ray, ignore)
  1958. tool.SurfacePos.Value = surface
  1959. if hit and hit.Name == "Ray" then
  1960. hit, at, surface = CreateRaycast(at, direction * 999, ignore)
  1961. end
  1962.  
  1963. return hit, at, surface
  1964.  
  1965. end
  1966.  
  1967.  
  1968. function CreateEffect(position, part)
  1969.  
  1970. local dot = game.ReplicatedStorage.dot:Clone()
  1971. dot.Parent = workspace.BulletDump
  1972. dot.CFrame = position
  1973.  
  1974.  
  1975. if not part.Parent:FindFirstChild("Humanoid")and part.Parent:IsA("Tool") == false and part.Parent:IsA("Hat") == false then
  1976. if part.Material == Enum.Material.Plastic or part.Material == Enum.Material.SmoothPlastic then
  1977. ToolReplicator:FireServer("ChangePlasticEffect", dot)
  1978. elseif part.Material == Enum.Material.Grass then --print("Grass") -- grass
  1979. ToolReplicator:FireServer("ChangeGrassEffect", dot)
  1980. elseif part.Material == Enum.Material.Wood then --print("Wood") -- wood
  1981. ToolReplicator:FireServer("ChangeWoodEffect", dot)
  1982. elseif part.Material == Enum.Material.Metal then-- print("Metal") -- metal
  1983. ToolReplicator:FireServer("ChangeMetalEffect", dot)
  1984. end
  1985. elseif part.Parent:FindFirstChild("Humanoid") or part.Parent:IsA("Hat") then
  1986. ToolReplicator:FireServer("ChangeBloodEffect",dot)
  1987.  
  1988. elseif part.Parent:IsA("Tool") then
  1989. ToolReplicator:FireServer("ChangeMetalEffect", dot)
  1990. end
  1991.  
  1992. local rel = tool.SurfacePos.Value -- Calculating the face
  1993. if (math.abs(rel.Z) > math.abs(rel.Y) and math.abs(rel.Z) > math.abs(rel.X)) then
  1994. if (rel.Z > 0) then
  1995. dot.Effect.EmissionDirection = "Back"
  1996. dot.Dust.EmissionDirection = "Back"
  1997. else
  1998. dot.Effect.EmissionDirection = "Front"
  1999. dot.Dust.EmissionDirection = "Front"
  2000. end
  2001. elseif (math.abs(rel.Y) > math.abs(rel.Z) and math.abs(rel.Y) > math.abs(rel.X)) then
  2002. if (rel.Y > 0) then
  2003. dot.Effect.EmissionDirection = "Top"
  2004. dot.Dust.EmissionDirection = "Top"
  2005. else
  2006. dot.Effect.EmissionDirection = "Bottom"
  2007. dot.Dust.EmissionDirection = "Bottom"
  2008. end
  2009. elseif (math.abs(rel.X) > math.abs(rel.Z) and math.abs(rel.X) > math.abs(rel.Y)) then
  2010. if (rel.X > 0) then
  2011. dot.Effect.EmissionDirection = "Right"
  2012. dot.Dust.EmissionDirection = "Right"
  2013. else
  2014. dot.Effect.EmissionDirection = "Left"
  2015. dot.Dust.EmissionDirection = "Left"
  2016. end
  2017. end
  2018. Debris:AddItem(dot, 0.3)
  2019. end
  2020.  
  2021.  
  2022. function FireLaser(mouse, count)
  2023. local aimPos = mouse.hit.p
  2024. local bulletOrigin = BulletOrigin.Position
  2025. local distance = (bulletOrigin - aimPos).magnitude
  2026. if Recoil < MaxRecoil then -- revenus spahgetti scripting confirmed
  2027. Recoil = Recoil + 5
  2028. ReticleUpdate(mouse)
  2029. end
  2030. for i = 1, count do
  2031. local aimWithSpread = Vector3.new((aimPos.x)+(math.random(-(BulletSpread/10)*distance,(BulletSpread/10)*distance)),(aimPos.y)+(math.random(-(BulletSpread/10)*distance,(BulletSpread/10)*distance)),(aimPos.z)+(math.random(-(BulletSpread/10)*distance,(BulletSpread/10)*distance)))
  2032. local collision, collisionPos = CreateRaycast(player.Character.Head.Position, aimWithSpread, { player.Character, Camera, workspace.BulletDump, workspace.ServerScriptService})
  2033. DrawLaser(bulletOrigin, collisionPos)
  2034. if collision then
  2035. CreateEffect(CFrame.new(collisionPos), collision)
  2036. local humanoid = GetHumanoid(collision)
  2037. if humanoid and humanoid:IsA("Humanoid") and game.Players:FindFirstChild(humanoid.Parent.Name) then
  2038. local target = game.Players:FindFirstChild(humanoid.Parent.Name)
  2039. if target and (not IsADefender(player, target) or target.Neutral) then
  2040. ToolReplicator:FireServer("DamageHumanoid", humanoid, HitDamage)
  2041. -- local Gui = GetGUI()
  2042. player.PlayerGui.MouseGUI.Hit.Visible = true
  2043. HitSound:Play()
  2044. delay(0.1, function() player.PlayerGui.MouseGUI.Hit.Visible = false end)
  2045. end
  2046. elseif collision and collision.Parent.Parent.Name == "DestroyableObjects" then
  2047. ToolReplicator:FireServer("DamageObject", collision, HitDamage)
  2048.  
  2049. elseif collision and collision.Name == "Glass" then
  2050. ToolReplicator:FireServer("DestroyWindows",collision)
  2051. end
  2052. end
  2053. end
  2054. end
  2055.  
  2056. function FireBullet(mouse)
  2057. CanFire.Value = false
  2058. Barrel.Light.Angle = math.random(75, 200)
  2059. Light(true,50)
  2060. FireLaser(mouse, 1)
  2061. FireSound:Play()
  2062. AmmoCount.Value = AmmoCount.Value - 1
  2063. wait(FireRate)
  2064. CanFire.Value = true
  2065. end
  2066.  
  2067. function ReloadAnimation()
  2068. local Animation = ReloadSequence
  2069. for index, keyframe in next, Animation do
  2070. for limb, cframe in next, keyframe do
  2071. if limb ~= "Time" then
  2072. spawn(function()
  2073. local prevKeyframe = Animation[index - 1]
  2074. local waitTime = prevKeyframe and prevKeyframe.Time or 0
  2075. wait(waitTime)
  2076. if not Equipped then return end
  2077. TweenWeld(limb, cframe, keyframe.Time - waitTime)
  2078. end)
  2079. end
  2080. end
  2081. end
  2082.  
  2083. wait(Animation[#Animation].Time)
  2084. end
  2085.  
  2086. function LightAnimation()
  2087. local Animation = LightSequence
  2088. for index, keyframe in next, Animation do
  2089. for limb, cframe in next, keyframe do
  2090. if limb ~= "Time" then
  2091. spawn(function()
  2092. local prevKeyframe = Animation[index - 1]
  2093. local waitTime = prevKeyframe and prevKeyframe.Time or 0
  2094. wait(waitTime)
  2095. if not Equipped then return end
  2096. TweenWeld(limb, cframe, keyframe.Time - waitTime)
  2097. end)
  2098. end
  2099. end
  2100. end
  2101. wait(Animation[#Animation].Time)
  2102. end
  2103. function Reload()
  2104. if AmmoCount.Value == MaxAmmo then return end
  2105. EmptyMagSound:Play()
  2106. Reloading = true
  2107. Light(false,0)
  2108. ReloadSound:Play()
  2109. local Gui = GetGUI()
  2110. spawn(function()
  2111. for i = 0, 0.5, 0.05 do
  2112. wait(0)
  2113. pcall(function()
  2114. Gui.Weapon.Logo.ImageTransparency = i
  2115. end)
  2116. end
  2117. end)
  2118. Gui.Weapon.Ammo.Text = "REL"
  2119. ReloadAnimation()
  2120. spawn(function()
  2121. for i = 0.5, 0, -0.05 do
  2122. wait(0)
  2123. pcall(function()
  2124. Gui.Weapon.Logo.ImageTransparency = i
  2125. end)
  2126. end
  2127. end)
  2128. if not Reloading then return end
  2129. AmmoCount.Value = MaxAmmo
  2130. Reloading = false
  2131. end
  2132.  
  2133. function ForceProperWelds()
  2134. coroutine.wrap(TweenWeld)("Left", ArmCFrames.Left, 0.1)
  2135. coroutine.wrap(TweenWeld)("Right", ArmCFrames.Right, 0.1)
  2136. end
  2137.  
  2138. function KeyPressed(mouse, key)
  2139. key = key:lower()
  2140.  
  2141. if key == "r" and not Reloading and Equipped then
  2142. Reload()
  2143. elseif key == "e" and Equipped then
  2144. LightAnimation()
  2145. FlashSound:Play()
  2146. Flashlight.Light.Enabled = not Flashlight.Light.Enabled
  2147. if FakeLight.Material == Enum.Material.Neon then FakeLight.Material = Enum.Material.SmoothPlastic else
  2148. FakeLight.Material = Enum.Material.Neon
  2149. end
  2150. elseif key == "f" and not Reloading and not Firing and Equipped then
  2151. if not Holster then
  2152. Holster = true
  2153. coroutine.wrap(TweenWeld)("Left", HolsterCFrames.Left, 0.1)
  2154. coroutine.wrap(TweenWeld)("Right", HolsterCFrames.Right, 0.1)
  2155. player.Character.Humanoid.WalkSpeed = 24
  2156. else
  2157. Holster = false
  2158. ForceProperWelds()
  2159. player.Character.Humanoid.WalkSpeed = 16
  2160. end
  2161. elseif key == "v" and not Reloading and not Firing and Equipped then
  2162. local Gui = GetGUI()
  2163. LightAnimation()
  2164. FlashSound:Play()
  2165. if WeaponType == "Auto" then
  2166. WeaponType = "Semi"
  2167. Gui.Weapon.FiringMode.Text = "Firing mode: "..WeaponType
  2168. HitDamage = HitDamage + 2
  2169. else
  2170. WeaponType = "Auto"
  2171. Gui.Weapon.FiringMode.Text = "Firing mode: "..WeaponType
  2172. HitDamage = HitDamage - 2
  2173. end
  2174.  
  2175. end
  2176. end
  2177.  
  2178. function InitiateFire(mouse)
  2179. if Reloading or Firing or not MouseDown or not CanFire.Value or (player.Character.Humanoid and player.Character.Humanoid.Health <= 0) then return end
  2180. Firing = true
  2181. if WeaponType == "Auto" then
  2182. while MouseDown and Equipped and AmmoCount.Value > 0 and CanFire.Value and Firing and not Reloading and (player.Character.Humanoid and player.Character.Humanoid.Health > 0) do
  2183. FireBullet(mouse)
  2184. end
  2185. elseif WeaponType == "Semi" then
  2186. if Equipped and not Reloading then
  2187. FireBullet(mouse)
  2188. end
  2189. end
  2190. if AmmoCount.Value <= 0 then
  2191. Reload()
  2192. end
  2193. Firing = false
  2194. Light(false,0)
  2195. end
  2196.  
  2197. function Mouse1Down(mouse)
  2198. if player.Character.Humanoid.Health <= 0 or not Equipped then return end
  2199. if not Firing and not MouseDown and not Reloading and player.Character.Humanoid.Health > 0 and CanFire.Value then
  2200. MouseDown = true
  2201. player.Character.Humanoid.WalkSpeed = 16
  2202. if Holster then
  2203. Holster = false
  2204. ForceProperWelds()
  2205. end
  2206. if AmmoCount.Value <= 0 then
  2207. Reload()
  2208. end
  2209. InitiateFire(mouse)
  2210. end
  2211. end
  2212.  
  2213. function Mouse1Up(mouse)
  2214. MouseDown = false
  2215. Light(false,0)
  2216. end
  2217.  
  2218. function ReticleUpdate(mouse)
  2219. MouseGUI = player.PlayerGui.MouseGUI -- mouse gui important!!!!!!
  2220. MouseGUI.MouseUp.BackgroundColor3 = BrickColor.White().Color
  2221. MouseGUI.MouseDown.BackgroundColor3 = BrickColor.White().Color
  2222. MouseGUI.MouseLeft.BackgroundColor3 = BrickColor.White().Color
  2223. MouseGUI.MouseRight.BackgroundColor3 = BrickColor.White().Color
  2224. MouseGUI.MouseUp.Position = UDim2.new(0, mouse.X-2, 0, mouse.Y-30-Recoil)
  2225. MouseGUI.MouseDown.Position = UDim2.new(0, mouse.X-2, 0, mouse.Y+5+Recoil)
  2226. MouseGUI.MouseLeft.Position = UDim2.new(0, mouse.X-30-Recoil, 0, mouse.Y-2)
  2227. MouseGUI.MouseRight.Position = UDim2.new(0, mouse.X+5+Recoil, 0, mouse.Y-2)
  2228. MouseGUI.Hit.Position = UDim2.new(0, mouse.X-32, 0, mouse.Y-32)
  2229. end
  2230.  
  2231.  
  2232.  
  2233. player.Character:WaitForChild("Humanoid").Died:connect(function()
  2234. if PlayerGui:FindFirstChild("CrusaderGui") then
  2235. PlayerGui.CrusaderGui:Destroy()
  2236. end
  2237. if Camera:FindFirstChild("FakeArms") then
  2238. Camera:FindFirstChild("FakeArms"):Destroy()
  2239. end
  2240. end)
  2241.  
  2242.  
  2243. tool.Equipped:connect(function(mouse)
  2244. local GUI = script.MouseGUI:clone()
  2245. GUI.Parent = player.PlayerGui
  2246. TrueRecoil.Changed:connect(function()
  2247. ReticleUpdate()
  2248. end)
  2249. mouse.Icon = "http://www.roblox.com/asset/?id=35446049"
  2250. local newCrusGui
  2251. if script:FindFirstChild("CrusaderGui") then
  2252. newCrusGui = script.CrusaderGui:Clone()
  2253. newCrusGui.Parent = PlayerGui
  2254. newCrusGui:FindFirstChild("Weapon"):TweenPosition(UDim2.new(0.8, 0,0.8, 0), "Out", "Quad", .7, true)
  2255. end
  2256. Equipped = true
  2257. WeldArms("C1", ArmCFrames.Left, ArmCFrames.Right)
  2258. mouse.Button1Down:connect(function() Mouse1Down(mouse) end)
  2259. mouse.Button1Up:connect(function() Mouse1Up(mouse) end)
  2260. mouse.KeyDown:connect(function(key) KeyPressed(mouse, key) end)
  2261. mouse.Move:connect(function()
  2262. ReticleUpdate(mouse)
  2263. if newCrusGui then
  2264. local mTarget = mouse.Target
  2265. if mTarget and mTarget.Parent then
  2266. local humanoid = GetHumanoid(mTarget)
  2267. if humanoid and humanoid:IsA("Humanoid") and game.Players:FindFirstChild(humanoid.Parent.Name) then
  2268. local target = game.Players:FindFirstChild(humanoid.Parent.Name)
  2269. if target and (not IsADefender(player, target) or target.Neutral) then --enemy
  2270. MouseGUI.MouseUp.BackgroundColor3 = BrickColor.Red().Color
  2271. MouseGUI.MouseDown.BackgroundColor3 = BrickColor.Red().Color
  2272. MouseGUI.MouseLeft.BackgroundColor3 = BrickColor.Red().Color
  2273. MouseGUI.MouseRight.BackgroundColor3 = BrickColor.Red().Color
  2274. elseif target and (IsADefender(player, target) and not target.Neutral) then --ally
  2275. MouseGUI.MouseUp.BackgroundColor3 = BrickColor.Green().Color
  2276. MouseGUI.MouseDown.BackgroundColor3 = BrickColor.Green().Color
  2277. MouseGUI.MouseLeft.BackgroundColor3 = BrickColor.Green().Color
  2278. MouseGUI.MouseRight.BackgroundColor3 = BrickColor.Green().Color
  2279. end
  2280. else --neutral
  2281. MouseGUI.MouseUp.BackgroundColor3 = BrickColor.White().Color
  2282. MouseGUI.MouseDown.BackgroundColor3 = BrickColor.White().Color
  2283. MouseGUI.MouseLeft.BackgroundColor3 = BrickColor.White().Color
  2284. MouseGUI.MouseRight.BackgroundColor3 = BrickColor.White().Color
  2285. end
  2286. end
  2287. end
  2288. end)
  2289. AmmoCount.Changed:connect(function()
  2290. UpdateGUI()
  2291. end)
  2292.  
  2293. local pMouse = player:GetMouse()
  2294. PseudoArms(true)
  2295. UpdateGUI()
  2296. player.Character.Humanoid.WalkSpeed = 16
  2297. while Equipped do
  2298. if MouseDown == false and (Recoil > 0) then
  2299. Recoil = Recoil - 1.25
  2300. ReticleUpdate(mouse)
  2301. end
  2302. wait(0.0125)
  2303. end
  2304. end)
  2305.  
  2306. tool.Unequipped:connect(function()
  2307. if PlayerGui:FindFirstChild("CrusaderGui") then
  2308. PlayerGui.CrusaderGui:Destroy()
  2309. end
  2310. local reviscool = player.PlayerGui:GetChildren()
  2311. for i=1, #reviscool do
  2312. if (reviscool[i].Name == "MouseGUI") then
  2313. reviscool[i]:remove()
  2314. end
  2315. end
  2316. UserInputService.MouseIconEnabled = true
  2317. Equipped = false
  2318. Firing = false
  2319. MouseDown = false
  2320. Reloading = false
  2321. Holster = false
  2322. Light(false,0)
  2323. WeldArms("")
  2324. PseudoArms(false)
  2325. Flashlight.Light.Enabled = false
  2326. end)
  2327. end))
  2328. ScreenGui66.Name = "MouseGUI"
  2329. ScreenGui66.Parent = LocalScript65
  2330. Frame67.Name = "MouseDown"
  2331. Frame67.Parent = ScreenGui66
  2332. Frame67.Size = UDim2.new(0, 4, 0, 25)
  2333. Frame67.Position = UDim2.new(0, 0, 0, 50)
  2334. Frame67.BackgroundColor3 = Color3.new(1, 1, 1)
  2335. Frame67.BorderColor3 = Color3.new(0, 0, 0)
  2336. Frame68.Name = "MouseLeft"
  2337. Frame68.Parent = ScreenGui66
  2338. Frame68.Size = UDim2.new(0, 25, 0, 4)
  2339. Frame68.BackgroundColor3 = Color3.new(1, 1, 1)
  2340. Frame68.BorderColor3 = Color3.new(0, 0, 0)
  2341. Frame69.Name = "MouseRight"
  2342. Frame69.Parent = ScreenGui66
  2343. Frame69.Size = UDim2.new(0, 25, 0, 4)
  2344. Frame69.BackgroundColor3 = Color3.new(1, 1, 1)
  2345. Frame69.BorderColor3 = Color3.new(0, 0, 0)
  2346. Frame70.Name = "MouseUp"
  2347. Frame70.Parent = ScreenGui66
  2348. Frame70.Size = UDim2.new(0, 4, 0, 25)
  2349. Frame70.BackgroundColor3 = Color3.new(1, 1, 1)
  2350. Frame70.BorderColor3 = Color3.new(0, 0, 0)
  2351. ImageLabel71.Name = "Hit"
  2352. ImageLabel71.Parent = ScreenGui66
  2353. ImageLabel71.Transparency = 1
  2354. ImageLabel71.Size = UDim2.new(0, 64, 0, 64)
  2355. ImageLabel71.Visible = false
  2356. ImageLabel71.BackgroundColor3 = Color3.new(0, 0, 0)
  2357. ImageLabel71.BackgroundTransparency = 1
  2358. ImageLabel71.BorderColor3 = Color3.new(0, 0, 0)
  2359. ImageLabel71.BorderSizePixel = 0
  2360. ImageLabel71.Image = "http://www.roblox.com/asset/?id=84799964"
  2361. ScreenGui72.Name = "CrusaderGui"
  2362. ScreenGui72.Parent = LocalScript65
  2363. Frame73.Name = "Weapon"
  2364. Frame73.Parent = ScreenGui72
  2365. Frame73.Transparency = 1
  2366. Frame73.Size = UDim2.new(0, 160, 0, 4)
  2367. Frame73.Position = UDim2.new(0.800000012, 0, 2, 0)
  2368. Frame73.BackgroundColor3 = Color3.new(1, 1, 1)
  2369. Frame73.BackgroundTransparency = 1
  2370. Frame73.BorderSizePixel = 0
  2371. TextLabel74.Name = "Ammo"
  2372. TextLabel74.Parent = Frame73
  2373. TextLabel74.Text = "0"
  2374. TextLabel74.Position = UDim2.new(0, 120, 0, -2)
  2375. TextLabel74.BackgroundColor3 = Color3.new(1, 1, 1)
  2376. TextLabel74.BorderSizePixel = 0
  2377. TextLabel74.Font = Enum.Font.SourceSansBold
  2378. TextLabel74.FontSize = Enum.FontSize.Size36
  2379. TextLabel74.TextColor3 = Color3.new(1, 1, 1)
  2380. TextLabel74.TextStrokeTransparency = 0.80000001192093
  2381. TextLabel74.TextXAlignment = Enum.TextXAlignment.Left
  2382. TextLabel74.TextYAlignment = Enum.TextYAlignment.Top
  2383. TextLabel75.Name = "WeaponName"
  2384. TextLabel75.Parent = Frame73
  2385. TextLabel75.Text = "WeaponName"
  2386. TextLabel75.Position = UDim2.new(0, 4, 1, 0)
  2387. TextLabel75.BackgroundColor3 = Color3.new(1, 1, 1)
  2388. TextLabel75.BorderSizePixel = 0
  2389. TextLabel75.Font = Enum.Font.SourceSans
  2390. TextLabel75.FontSize = Enum.FontSize.Size18
  2391. TextLabel75.TextColor3 = Color3.new(1, 1, 1)
  2392. TextLabel75.TextStrokeTransparency = 0.80000001192093
  2393. TextLabel75.TextXAlignment = Enum.TextXAlignment.Left
  2394. TextLabel75.TextYAlignment = Enum.TextYAlignment.Top
  2395. Frame76.Name = "_"
  2396. Frame76.Parent = Frame73
  2397. Frame76.Transparency = 0.5
  2398. Frame76.Size = UDim2.new(1, 0, 1, 0)
  2399. Frame76.Position = UDim2.new(0, 0, 0, -5)
  2400. Frame76.BackgroundColor3 = Color3.new(0.0980392, 0.0980392, 0.0980392)
  2401. Frame76.BackgroundTransparency = 0.5
  2402. Frame76.BorderSizePixel = 0
  2403. Frame77.Name = "Border"
  2404. Frame77.Parent = Frame76
  2405. Frame77.Transparency = 0.5
  2406. Frame77.Size = UDim2.new(1, 0, 0, 2)
  2407. Frame77.Position = UDim2.new(0, 0, 0, -2)
  2408. Frame77.BackgroundColor3 = Color3.new(1, 0.666667, 0)
  2409. Frame77.BackgroundTransparency = 0.5
  2410. Frame77.BorderSizePixel = 0
  2411. Frame78.Name = "Border"
  2412. Frame78.Parent = Frame76
  2413. Frame78.Transparency = 0.5
  2414. Frame78.Size = UDim2.new(1, 0, 0, 2)
  2415. Frame78.Position = UDim2.new(0, 0, 1, 0)
  2416. Frame78.BackgroundColor3 = Color3.new(1, 0.666667, 0)
  2417. Frame78.BackgroundTransparency = 0.5
  2418. Frame78.BorderSizePixel = 0
  2419. ImageLabel79.Name = "Logo"
  2420. ImageLabel79.Parent = Frame73
  2421. ImageLabel79.Transparency = 1
  2422. ImageLabel79.Size = UDim2.new(0, 100, 0, 100)
  2423. ImageLabel79.Position = UDim2.new(0.5, -50, 0, -110)
  2424. ImageLabel79.BackgroundColor3 = Color3.new(1, 1, 1)
  2425. ImageLabel79.BackgroundTransparency = 1
  2426. ImageLabel79.BorderSizePixel = 0
  2427. ImageLabel79.ImageColor3 = Color3.new(0, 0, 0)
  2428. TextLabel80.Name = "FiringMode"
  2429. TextLabel80.Parent = Frame73
  2430. TextLabel80.Text = "Firing Mode: Semi"
  2431. TextLabel80.Position = UDim2.new(0, 4, 10, 0)
  2432. TextLabel80.BackgroundColor3 = Color3.new(1, 1, 1)
  2433. TextLabel80.BorderSizePixel = 0
  2434. TextLabel80.Font = Enum.Font.SourceSansBold
  2435. TextLabel80.FontSize = Enum.FontSize.Size18
  2436. TextLabel80.TextColor3 = Color3.new(1, 1, 1)
  2437. TextLabel80.TextStrokeTransparency = 0.80000001192093
  2438. TextLabel80.TextTransparency = 1
  2439. TextLabel80.TextXAlignment = Enum.TextXAlignment.Left
  2440. TextLabel80.TextYAlignment = Enum.TextYAlignment.Top
  2441. for i,v in pairs(mas:GetChildren()) do
  2442. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  2443. pcall(function() v:MakeJoints() end)
  2444. end
  2445. mas:Destroy()
  2446. for i,v in pairs(cors) do
  2447. spawn(function()
  2448. pcall(v)
  2449. end)
  2450. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement