Advertisement
Guest User

Untitled

a guest
Jun 29th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.18 KB | None | 0 0
  1. -- TGI Crusaders | Prag Edition | **NOT FILTERINGENABLED COMPATIBLE: CONTACT ME IF YOU WANT THIS CHANGED**
  2. -- This is a gift from me (Pragmatist) to The Grand Imperium and Tainteddark
  3. -- Sorry that it's only an individual script. I'd do a more efficient gun system but I figured you guys needed this fast
  4. -- Please only make edits to things if you know what you're doing, preferably under the "CONFIGURATION" comment
  5.  
  6. local tool, player = script.Parent, game:GetService("Players").LocalPlayer
  7.  
  8. -- CONFIGURATION --
  9. WeaponName = "Crusader"; -- Weapon Name that shows up on the GUI text.
  10. BulletSpread = 0.07; -- Number of studs the bullet is offset (0 = no spread).
  11. WeaponType = "Auto"; -- "Auto" / "Semi"
  12. BulletColor = BrickColor.new("Cool yellow"); -- BrickColor of the bullet.
  13. BulletTransparency = 0.35 -- Transparency of the bullet.
  14. BulletOrigin = tool:WaitForChild("Barrel"); -- What the bullet will shoot from.
  15. HitDamage = 17; -- How much damage the gun does.
  16. Cursor = "rbxasset://textures\\GunCursor.png"; -- Cursor that shows when the gun is equipped.
  17. HitSoundId = "rbxassetid://153779119"; -- Id of the HitSound
  18. HitSoundVolume = 1.3; -- Volume of the HitSound (make 0 if you don't want players to hear)
  19. MaxAmmo = 32; -- Maximum ammo per clip.
  20. FireRate = 0.11; -- Time between each shot.
  21. MeshType = "Cylinder"; -- What kind of bullet you want shooting out of the gun (Block/Cylinder).
  22.  
  23.  
  24. -- Please don't touch anything below unless you know what you're doing! Thanks :)
  25. local Handle = tool:WaitForChild("Handle")
  26. local Barrel = tool:WaitForChild("Barrel")
  27. local Flashlight = tool:WaitForChild("Flashlight")
  28. local Conditions = tool:WaitForChild("Conditions")
  29. local AmmoCount = Conditions:WaitForChild("Ammo")
  30. local CanFire = Conditions:WaitForChild("CanFire")
  31.  
  32. 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
  33. local Camera, PlayerGui, Backpack = workspace.CurrentCamera, player:WaitForChild("PlayerGui"), player:WaitForChild("Backpack")
  34. local BulletDump = workspace:WaitForChild("BulletDump") -- Required
  35. local ToolReplicator = ReplicatedStorage:WaitForChild("ToolReplicator") -- Required
  36. local HitSound = player.Backpack:FindFirstChild("HitSound") or Create("Sound"){Name = "HitSound", Pitch = 0.8, SoundId = HitSoundId, Volume = HitSoundVolume, Parent = player.Backpack}
  37. local FireSound, ReloadSound, EmptyMagSound = Handle:FindFirstChild("Fire"), Handle:FindFirstChild("Reload"), Handle:FindFirstChild("EmptyMag")
  38. local Equipped, Reloading, Firing, MouseDown, Holster = false, false, false, false, false
  39.  
  40. local ArmCFrames = {
  41. 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),
  42. 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)
  43. }
  44.  
  45. local HolsterCFrames = {
  46. 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),
  47. 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)
  48. }
  49.  
  50. local ReloadSequence = {
  51. {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)},
  52. {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)},
  53. {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)},
  54. {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)},
  55. {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)},
  56. {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)},
  57. {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)},
  58. {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)},
  59. {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)},
  60. {Time = 1.8, Left = ArmCFrames.Left, Right = ArmCFrames.Right},
  61. }
  62.  
  63. local CoreBullet = Create("Part"){
  64. Name = "Bullet";
  65. BrickColor = BulletColor;
  66. Material = Enum.Material.Granite;
  67. FormFactor = Enum.FormFactor.Custom;
  68. Size = Vector3.new(1, 1, 1);
  69. Transparency = 0.35;
  70. Anchored = true;
  71. CanCollide = false;
  72. Locked = true;
  73.  
  74. Create(MeshType == "Block" and "BlockMesh" or MeshType == "Cylinder" and "CylinderMesh" or "BlockMesh"){
  75. Name = "Mesh",
  76. Scale = Vector3.new(0.15, 0.15, 1)
  77. }
  78. }
  79.  
  80. AmmoCount.Value = MaxAmmo
  81. UserInputService.MouseIconEnabled = true
  82. repeat wait(0.03) until player.Character
  83. repeat wait(0.03) until #player.Character:GetChildren() > 10
  84.  
  85. function TweenWeld(arm, newCFrame, seconds)
  86. local torso = player.Character:FindFirstChild("Torso")
  87. local weld = arm == "Left" and torso:FindFirstChild("LeftArmWeld") or arm == "Right" and torso:FindFirstChild("RightArmWeld")
  88. if weld then
  89. local startCF, endCF = weld.C1, newCFrame
  90. local startPos, startRot = startCF.p, Vector3.new(startCF:toEulerAnglesXYZ())
  91. local endPos, endRot = endCF.p, Vector3.new(endCF:toEulerAnglesXYZ())
  92. local diffPos, diffRot = (endPos - startPos), (endRot - startRot)
  93. local new
  94. for i = 0, 1, 1/seconds/30 do
  95. if not weld or not Equipped then break end
  96. new = CFrame.new(startPos+diffPos * i) * CFrame.Angles(startRot.X+diffRot.X * i, startRot.Y+diffRot.Y * i, startRot.Z+diffRot.Z * i)
  97. weld.C1 = new
  98. wait()
  99. end
  100. weld.C1 = endCF
  101. end
  102. end
  103.  
  104. function WeldArms(c1,lArm,rArm)
  105. local prop = c1 and "C1" or "C0"
  106. local char = player.Character
  107. local torso = char:WaitForChild("Torso")
  108. local lShoulder,rShoulder = torso:FindFirstChild("Left Shoulder"),torso:FindFirstChild("Right Shoulder")
  109. if lArm and lShoulder then
  110. lShoulder.Part1 = nil
  111. Create("Weld"){
  112. Name = "LeftArmWeld",
  113. [prop] = lArm,
  114. Part0 = torso,
  115. Part1 = char:FindFirstChild("Left Arm"),
  116. Parent = torso
  117. }
  118. elseif lShoulder and torso:FindFirstChild("LeftArmWeld") then
  119. torso["LeftArmWeld"]:Remove()
  120. lShoulder.Part1 = char:FindFirstChild("Left Arm")
  121. end
  122. if rArm and rShoulder then
  123. rShoulder.Part1 = nil
  124. Create("Weld"){
  125. Name = "RightArmWeld",
  126. [prop] = rArm,
  127. Part0 = torso,
  128. Part1 = char:FindFirstChild("Right Arm"),
  129. Parent = torso
  130. }
  131. elseif rShoulder and torso:FindFirstChild("RightArmWeld") then
  132. torso["RightArmWeld"]:Remove()
  133. rShoulder.Part1 = char:FindFirstChild("Right Arm")
  134. end
  135. end
  136.  
  137. function PseudoArms(bool)
  138. if not type(bool) == "boolean" then print("not a boolean parameter") return end
  139.  
  140. local function destroy()
  141. if Camera:FindFirstChild("FakeArms") then
  142. Camera:FindFirstChild("FakeArms"):Destroy()
  143. end
  144. end
  145.  
  146. local function create()
  147. destroy()
  148.  
  149. local ArmsModel = Create("Model"){
  150. Name = "FakeArms",
  151. Parent = Camera,
  152.  
  153. Create("Humanoid"){Name = "_"},
  154. }
  155. local FakeShirt = player.Character:FindFirstChild("Shirt")
  156. if FakeShirt then FakeShirt:Clone().Parent = ArmsModel end
  157. local FakeLeftArm = player.Character:FindFirstChild("Left Arm"):Clone()
  158. FakeLeftArm.Size = Vector3.new(0.9, 2, 0.9)
  159. FakeLeftArm.Parent = ArmsModel
  160. local FakeRightArm = player.Character:FindFirstChild("Right Arm"):Clone()
  161. FakeRightArm.Size = Vector3.new(0.9, 2, 0.9)
  162. FakeRightArm.Parent = ArmsModel
  163.  
  164. Create("Weld"){
  165. Parent = ArmsModel,
  166. Name = "FakeLeftShoulder",
  167. Part0 = player.Character["Left Arm"],
  168. Part1 = FakeLeftArm
  169. }
  170. Create("Weld"){
  171. Parent = ArmsModel,
  172. Name = "FakeRightShoulder",
  173. Part0 = player.Character["Right Arm"],
  174. Part1 = FakeRightArm
  175. }
  176. end
  177.  
  178. if bool then
  179. create()
  180. else
  181. destroy()
  182. end
  183. end
  184.  
  185. function Light(bool)
  186. if not type(bool) == "boolean" then print("not a boolean parameter") return end
  187. Barrel.Flash.Enabled = bool
  188. Barrel.Light.Enabled = bool
  189. end
  190.  
  191. function GetGUI()
  192. local result = PlayerGui:FindFirstChild("CrusaderGui")
  193.  
  194. if result then
  195. return result
  196. end
  197. end
  198.  
  199. function UpdateGUI()
  200. local Gui = GetGUI()
  201. Gui.Weapon.WeaponName.Text = WeaponName
  202. Gui.Weapon.Ammo.Text = AmmoCount.Value
  203. end
  204.  
  205. function GetHumanoid(target)
  206. local humanoid
  207.  
  208. humanoid = target.Parent:FindFirstChild("Humanoid")
  209. if not humanoid and target.Parent.Parent ~= nil then
  210. humanoid = target.Parent.Parent:FindFirstChild("Humanoid")
  211. end
  212.  
  213. return humanoid
  214. end
  215.  
  216. function IsADefender(me, victim)
  217. if me.TeamColor == victim.TeamColor then
  218. return true
  219. elseif me.TeamColor == Teams:FindFirstChild("Arcadians").TeamColor and victim.TeamColor == Teams:FindFirstChild("Allies").TeamColor then
  220. return true
  221. elseif me.TeamColor == Teams:FindFirstChild("Allies").TeamColor and victim.TeamColor == Teams:FindFirstChild("Arcadians").TeamColor then
  222. return true
  223. end
  224.  
  225. return false
  226. end
  227.  
  228. function DrawLaser(init, at)
  229. local length = (at-init).magnitude
  230. local origin = CFrame.new(init, at)
  231.  
  232. local Laser1 = CoreBullet:Clone()
  233. Laser1.CFrame = origin * CFrame.new(0, 0, -length/2) * CFrame.Angles(math.rad(90), 0, 0)
  234. Laser1.Mesh.Scale = Vector3.new(Laser1.Mesh.Scale.x, length, Laser1.Mesh.Scale.x)
  235. Laser1.Parent = BulletDump
  236.  
  237. Debris:AddItem(Laser1, 0.03)
  238. end
  239.  
  240. function CreateRaycast(root, last, ignore)
  241. local direction = (last - root).unit
  242. local ray = Ray.new(root, direction * 999)
  243. local hit, at = workspace:FindPartOnRayWithIgnoreList(ray, ignore)
  244.  
  245. if hit and hit.Name == "Ray" then
  246. hit, at = CreateRaycast(at, direction * 999, ignore)
  247. end
  248.  
  249. return hit, at
  250. end
  251.  
  252. function FireLaser(mouse, count)
  253. local aimPos = mouse.hit.p
  254. local bulletOrigin = BulletOrigin.Position
  255. local distance = (bulletOrigin - aimPos).magnitude
  256.  
  257. for i = 1, count do
  258. 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)))
  259. local collision, collisionPos = CreateRaycast(player.Character.Head.Position, aimWithSpread, { player.Character, Camera })
  260. DrawLaser(bulletOrigin, collisionPos)
  261.  
  262. if collision then
  263. local humanoid = GetHumanoid(collision)
  264. if humanoid and humanoid:IsA("Humanoid") and game.Players:FindFirstChild(humanoid.Parent.Name) then
  265. local target = game.Players:FindFirstChild(humanoid.Parent.Name)
  266. if target and (not IsADefender(player, target) or target.Neutral) then
  267. ToolReplicator:FireServer("DamageHumanoid", humanoid, HitDamage)
  268. local Gui = GetGUI()
  269. Gui.MouseIcon.Hit.Visible = true
  270. HitSound:Play()
  271. delay(0.1, function() Gui.MouseIcon.Hit.Visible = false end)
  272. end
  273. end
  274. end
  275. end
  276. end
  277.  
  278. function FireBullet(mouse)
  279. CanFire.Value = false
  280. Barrel.Flash.Light.Rotation = math.random(1, 230)
  281. Barrel.Light.Angle = math.random(75, 200)
  282. Light(true)
  283. FireLaser(mouse, 1)
  284. FireSound:Play()
  285. AmmoCount.Value = AmmoCount.Value - 1
  286. wait(FireRate)
  287. CanFire.Value = true
  288. end
  289.  
  290. function ReloadAnimation()
  291. local Animation = ReloadSequence
  292. for index, keyframe in next, Animation do
  293. for limb, cframe in next, keyframe do
  294. if limb ~= "Time" then
  295. spawn(function()
  296. local prevKeyframe = Animation[index - 1]
  297. local waitTime = prevKeyframe and prevKeyframe.Time or 0
  298. wait(waitTime)
  299. if not Equipped then return end
  300. TweenWeld(limb, cframe, keyframe.Time - waitTime)
  301. end)
  302. end
  303. end
  304. end
  305.  
  306. wait(Animation[#Animation].Time)
  307. end
  308.  
  309. function Reload()
  310. if AmmoCount.Value == MaxAmmo then return end
  311. EmptyMagSound:Play()
  312. Reloading = true
  313. Light(false)
  314. ReloadSound:Play()
  315. local Gui = GetGUI()
  316. spawn(function()
  317. for i = 0, 0.5, 0.05 do
  318. wait(0)
  319. pcall(function()
  320. Gui.Weapon.Logo.ImageTransparency = i
  321. end)
  322. end
  323. end)
  324. Gui.Weapon.Ammo.Text = "REL"
  325. ReloadAnimation()
  326. spawn(function()
  327. for i = 0.5, 0, -0.05 do
  328. wait(0)
  329. pcall(function()
  330. Gui.Weapon.Logo.ImageTransparency = i
  331. end)
  332. end
  333. end)
  334. if not Reloading then return end
  335. AmmoCount.Value = MaxAmmo
  336. Reloading = false
  337. end
  338.  
  339. function ForceProperWelds()
  340. coroutine.wrap(TweenWeld)("Left", ArmCFrames.Left, 0.1)
  341. coroutine.wrap(TweenWeld)("Right", ArmCFrames.Right, 0.1)
  342. end
  343.  
  344. function KeyPressed(mouse, key)
  345. key = key:lower()
  346.  
  347. if key == "r" and not Reloading and Equipped then
  348. Reload()
  349. elseif key == "q" and Equipped then
  350. Flashlight.Light.Enabled = not Flashlight.Light.Enabled
  351. elseif key == "h" and not Reloading and not Firing and Equipped then
  352. if not Holster then
  353. Holster = true
  354. coroutine.wrap(TweenWeld)("Left", HolsterCFrames.Left, 0.1)
  355. coroutine.wrap(TweenWeld)("Right", HolsterCFrames.Right, 0.1)
  356. player.Character.Humanoid.WalkSpeed = 28
  357. else
  358. Holster = false
  359. ForceProperWelds()
  360. player.Character.Humanoid.WalkSpeed = 16
  361. end
  362. end
  363. end
  364.  
  365. function InitiateFire(mouse)
  366. if Reloading or Firing or not MouseDown or not CanFire.Value or (player.Character.Humanoid and player.Character.Humanoid.Health <= 0) then return end
  367. Firing = true
  368. if WeaponType == "Auto" then
  369. 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
  370. FireBullet(mouse)
  371. end
  372. elseif WeaponType == "Semi" then
  373. if Equipped and not Reloading then
  374. FireBullet(mouse)
  375. end
  376. end
  377. if AmmoCount.Value <= 0 then
  378. Reload()
  379. end
  380. Firing = false
  381. Light(false)
  382. end
  383.  
  384. function Mouse1Down(mouse)
  385. if player.Character.Humanoid.Health <= 0 or not Equipped then return end
  386. if not Firing and not MouseDown and not Reloading and player.Character.Humanoid.Health > 0 and CanFire.Value then
  387. MouseDown = true
  388. player.Character.Humanoid.WalkSpeed = 16
  389. if Holster then
  390. Holster = false
  391. ForceProperWelds()
  392. end
  393. if AmmoCount.Value <= 0 then
  394. Reload()
  395. end
  396. InitiateFire(mouse)
  397. end
  398. end
  399.  
  400. function Mouse1Up(mouse)
  401. MouseDown = false
  402. Light(false)
  403. end
  404.  
  405. player.Character:WaitForChild("Humanoid").Died:connect(function()
  406. UserInputService.MouseIconEnabled = true
  407. if PlayerGui:FindFirstChild("CrusaderGui") then
  408. PlayerGui.CrusaderGui:Destroy()
  409. end
  410. if Camera:FindFirstChild("FakeArms") then
  411. Camera:FindFirstChild("FakeArms"):Destroy()
  412. end
  413. end)
  414.  
  415. function ChangeFrameColors(Frame, Color)
  416. for i, v in next, Frame:GetChildren() do
  417. if v:IsA("Frame") then
  418. v.BackgroundColor3 = Color
  419. end
  420. end
  421. end
  422.  
  423. tool.Equipped:connect(function(mouse)
  424. UserInputService.MouseIconEnabled = false
  425. local newCrusGui
  426. if script:FindFirstChild("CrusaderGui") then
  427. newCrusGui = script.CrusaderGui:Clone()
  428. newCrusGui.Parent = PlayerGui
  429. end
  430. Equipped = true
  431. WeldArms("C1", ArmCFrames.Left, ArmCFrames.Right)
  432.  
  433. mouse.Button1Down:connect(function() Mouse1Down(mouse) end)
  434. mouse.Button1Up:connect(function() Mouse1Up(mouse) end)
  435. mouse.KeyDown:connect(function(key) KeyPressed(mouse, key) end)
  436. mouse.Move:connect(function()
  437. if newCrusGui then
  438. local mTarget = mouse.Target
  439. if mTarget and mTarget.Parent then
  440. local humanoid = GetHumanoid(mTarget)
  441. if humanoid and humanoid:IsA("Humanoid") and game.Players:FindFirstChild(humanoid.Parent.Name) then
  442. local target = game.Players:FindFirstChild(humanoid.Parent.Name)
  443. if target and (not IsADefender(player, target) or target.Neutral) then
  444. ChangeFrameColors(newCrusGui.MouseIcon.Icon, BrickColor.new("Bright red").Color)
  445. elseif target and (IsADefender(player, target) and not target.Neutral) then
  446. ChangeFrameColors(newCrusGui.MouseIcon.Icon, BrickColor.new("Lime green").Color)
  447. end
  448. else
  449. ChangeFrameColors(newCrusGui.MouseIcon.Icon, Color3.new(255/255, 255/255, 255/255))
  450. end
  451. end
  452. newCrusGui.MouseIcon.Position = UDim2.new(0, mouse.X - 35, 0, mouse.Y - 35)
  453. end
  454. end)
  455. AmmoCount.Changed:connect(function()
  456. UpdateGUI()
  457. end)
  458.  
  459. local pMouse = player:GetMouse()
  460. newCrusGui.MouseIcon.Position = UDim2.new(0, pMouse.X - 35, 0, pMouse.Y - 35)
  461. --PseudoArms(true)
  462. UpdateGUI()
  463. player.Character.Humanoid.WalkSpeed = 16
  464. end)
  465.  
  466. tool.Unequipped:connect(function()
  467. if PlayerGui:FindFirstChild("CrusaderGui") then
  468. PlayerGui.CrusaderGui:Destroy()
  469. end
  470. UserInputService.MouseIconEnabled = true
  471. Equipped = false
  472. Firing = false
  473. MouseDown = false
  474. Reloading = false
  475. Holster = false
  476. Light(false)
  477. WeldArms("")
  478. --PseudoArms(false)
  479. Flashlight.Light.Enabled = false
  480. player.Character.Humanoid.WalkSpeed = 16
  481. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement