Advertisement
Baldeagle22

csaa

Oct 1st, 2018
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.18 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. SpecialMesh2 = Instance.new("SpecialMesh")
  22. PointLight3 = Instance.new("PointLight")
  23. PointLight4 = Instance.new("PointLight")
  24. SpotLight5 = Instance.new("SpotLight")
  25. Sound6 = Instance.new("Sound")
  26. Script7 = Instance.new("Script")
  27. Weld8 = Instance.new("Weld")
  28. Part9 = Instance.new("Part")
  29. SpecialMesh10 = Instance.new("SpecialMesh")
  30. Script11 = Instance.new("Script")
  31. LocalScript12 = Instance.new("LocalScript")
  32. RemoteEvent13 = Instance.new("RemoteEvent")
  33. RemoteEvent14 = Instance.new("RemoteEvent")
  34. Camera15 = Instance.new("Camera")
  35. Tool0.Name = "Historic "oof" gun"
  36. Tool0.Parent = mas
  37. Tool0.Grip = CFrame.new(0, -0.600000024, 0.5, 0.938404799, -0.0491797142, 0.342020124, -0.234404698, 0.636630058, 0.734681308, -0.253871709, -0.769599557, 0.585888743)
  38. Tool0.GripForward = Vector3.new(-0.342020124, -0.734681308, -0.585888743)
  39. Tool0.GripPos = Vector3.new(0, -0.600000024, 0.5)
  40. Tool0.GripRight = Vector3.new(0.938404799, -0.234404698, -0.253871709)
  41. Tool0.GripUp = Vector3.new(-0.0491797142, 0.636630058, -0.769599557)
  42. Tool0.ToolTip = "why do i have a feeling that this is already made?"
  43. Part1.Name = "Handle"
  44. Part1.Parent = Tool0
  45. Part1.CFrame = CFrame.new(49.8027382, 1.60120595, 36.4109879, -0.972802281, 0.141028538, -0.183758378, 0.215265334, 0.843363762, -0.492339998, 0.0855422541, -0.518505216, -0.85078609)
  46. Part1.Orientation = Vector3.new(29.4899998, -167.809998, 14.3199997)
  47. Part1.Position = Vector3.new(49.8027382, 1.60120595, 36.4109879)
  48. Part1.Rotation = Vector3.new(149.940002, -10.5900002, -171.75)
  49. Part1.Size = Vector3.new(0.540003419, 1.26000023, 4.10998917)
  50. Part1.Material = Enum.Material.Metal
  51. Part1.FormFactor = Enum.FormFactor.Custom
  52. Part1.formFactor = Enum.FormFactor.Custom
  53. SpecialMesh2.Parent = Part1
  54. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=116679805"
  55. SpecialMesh2.Scale = Vector3.new(0.899999976, 0.899999976, 0.899999976)
  56. SpecialMesh2.TextureId = "rbxassetid://1051348918"
  57. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  58. PointLight3.Name = "OrangeLight"
  59. PointLight3.Parent = Part1
  60. PointLight3.Color = Color3.new(0.886275, 0.505882, 0.121569)
  61. PointLight3.Enabled = false
  62. PointLight3.Range = 4
  63. PointLight3.Brightness = 4
  64. PointLight4.Name = "RedLight"
  65. PointLight4.Parent = Part1
  66. PointLight4.Color = Color3.new(1, 0, 0)
  67. PointLight4.Enabled = false
  68. PointLight4.Range = 4
  69. PointLight4.Brightness = 4
  70. SpotLight5.Parent = Part1
  71. SpotLight5.Color = Color3.new(1, 0, 0)
  72. SpotLight5.Enabled = false
  73. SpotLight5.Brightness = 8
  74. SpotLight5.Angle = 45
  75. Sound6.Name = "FireSound"
  76. Sound6.Parent = Part1
  77. Sound6.SoundId = "rbxassetid://12222242"
  78. Script7.Parent = Part1
  79. table.insert(cors,sandbox(Script7,function()
  80. ------------------------
  81. --[[UTIL Functions]]--
  82. ------------------------
  83. --Global functions used by all classes are wrapped in UTIL
  84. --deal with it.
  85. local UTIL = {}
  86. local GLib = require(206209239)
  87.  
  88. function UTIL.Class(tableIn,template)
  89. tableIn = tableIn or {}
  90. local mt = {
  91. __metatable = UTIL.DeepCopy(template);
  92. __index = UTIL.DeepCopy(template);
  93. }
  94. return setmetatable(tableIn, mt)
  95. end
  96. function UTIL.MakeClass(...)
  97. local arg = {...}
  98. assert(#arg>0, 'ERROR: class needs 1 argument or more')
  99. local members = arg[1]
  100. for i=2,#arg,1 do
  101. if type(arg[i])=='table' then
  102. for key,val in pairs(arg[i]) do
  103. if not members[key] then
  104. members[key] = val
  105. end
  106. end
  107. end
  108. end
  109. local function New(init)
  110. return UTIL.Class(init or {},members)
  111. end
  112. local function Copy(obj, ...)
  113. local newobj = obj:New(unpack(arg))
  114. for n,v in pairs(obj) do newobj[n] = v end
  115. return newobj
  116. end
  117. members.New = New
  118. members.Copy = Copy
  119. return mt
  120. end
  121.  
  122. function UTIL.DeepCopy(orig)
  123. local orig_type = type(orig)
  124. local copy
  125. if orig_type == 'table' then
  126. copy = {}
  127. for orig_key, orig_value in next, orig, nil do
  128. copy[UTIL.DeepCopy(orig_key)] = UTIL.DeepCopy(orig_value)
  129. end
  130. setmetatable(copy, UTIL.DeepCopy(getmetatable(orig)))
  131. else -- number, string, boolean, etc
  132. copy = orig
  133. end
  134. return copy
  135. end
  136.  
  137. function UTIL.Instantiate(guiType)
  138. return function(data)
  139. local obj = Instance.new(guiType)
  140. for k, v in pairs(data) do
  141. if type(k) == 'number' then
  142. v.Parent = obj
  143. else
  144. obj[k] = v
  145. end
  146. end
  147. return obj
  148. end
  149. end
  150.  
  151. function UTIL.RetroRegister(func,...)
  152. func()
  153. for _,i in ipairs({...}) do
  154. i:connect(func)
  155. end
  156. end
  157.  
  158. -- Waits for a new character to be added if the current one is invalid
  159. -- (Ensures that you don't have the old dead character after a respawn)
  160. function UTIL.WaitForValidCharacter(player)
  161. local character = player.Character
  162. if not character or not character.Parent or not character:FindFirstChild('Humanoid') or character.Humanoid.Health <= 0 then
  163. player.CharacterAdded:wait()
  164. wait(0) --NOTE: Necessary for server scripts executing on the same event
  165. character = player.Character
  166. end
  167. return character
  168. end
  169.  
  170.  
  171. -- Returns a character ancestor and its Humanoid, or nil
  172. function UTIL.FindCharacterAncestor(subject)
  173. if subject and subject ~= Workspace then
  174. local humanoid = subject:FindFirstChild('Humanoid')
  175. if humanoid then
  176. return subject, humanoid
  177. else
  178. return UTIL.FindCharacterAncestor(subject.Parent)
  179. end
  180. end
  181. return nil
  182. end
  183.  
  184. UTIL.AssetURL = 'http://www.roblox.com/asset/?id='
  185.  
  186.  
  187. UTIL.TouchEnabled = game:GetService("UserInputService").TouchEnabled
  188. do
  189. local suceeded,_ =pcall(function() game.Workspace.CurrentCamera:GetPanSpeed() end)
  190. UTIL.CanCheckPanSpeed = suceeded
  191. end
  192.  
  193.  
  194. local DebrisService = Game:GetService('Debris')
  195. local DebugPrintOffset = 0
  196. function UTIL.Dprint(...)
  197. local line = ''
  198. for _, segment in pairs({...}) do
  199. line = line .. (line and ' ' or '') .. tostring(segment)
  200. end
  201. local gui = Instance.new('ScreenGui')
  202. local label = Instance.new('TextLabel')
  203. label.Text = line
  204. label.Size = UDim2.new(0.25, 0, 0.05, 0)
  205. label.BackgroundTransparency = 0.5
  206. label.Position = UDim2.new(0, 0, 0, DebugPrintOffset)
  207. label.TextWrapped = true
  208. label.Parent = gui
  209. DebrisService:AddItem(gui, 30)
  210. gui.Parent = script.Parent
  211. DebugPrintOffset = (DebugPrintOffset <= 600) and DebugPrintOffset + 30 or 0
  212. end
  213. --
  214. --All Welding Related Utility functions should be put here
  215. --
  216. WeldUtil = {}
  217.  
  218.  
  219. do
  220.  
  221.  
  222. function WeldUtil:WeldBetween(a, b)
  223. local weld = Instance.new("Weld")
  224. weld.Part0 = a
  225. weld.Part1 = b
  226. weld.C0 = CFrame.new()
  227. weld.C1 = b.CFrame:inverse() * a.CFrame
  228. weld.Parent = a
  229. return weld
  230. end
  231.  
  232. function WeldUtil:PermaWeld(weld)
  233. local OriginalParent = weld.Parent
  234. weld.Changed:connect(function()
  235. Delay(0,function() weld.Parent = OriginalParent end)
  236. end)
  237. end
  238.  
  239. end
  240.  
  241. local InternalEvent =
  242. {
  243. Listeners = nil,
  244. }
  245. do
  246. UTIL.MakeClass(InternalEvent)
  247. function InternalEvent:Connect(func)
  248. if not self.Listeners then self.Listeners = {} end
  249. table.insert(self.Listeners,func)
  250. end
  251. function InternalEvent:Fire(...)
  252. if not self.Listeners then return end
  253. local args = {...}
  254. for _,i in ipairs(self.Listeners) do
  255. Spawn(function() i(unpack(args)) end)
  256. end
  257. end
  258. end
  259.  
  260. local PartProjectile =
  261. {
  262. Damage = 5, -- Base output damage per shot.
  263. Range = 250, -- Max distance that the weapon can fire.
  264. Speed = 1,--how many studs per second to move
  265. DirectionRay=nil,
  266. Part = nil,
  267. IsAlive = true,
  268. IgnoreList = {},
  269. }
  270. do
  271. UTIL.MakeClass(PartProjectile)
  272. function PartProjectile.New(base,ray)
  273. local init = nil
  274. --if base is a copy of this class, then copy over fields
  275. if type(base) == 'table' and base.Update then
  276. init = UTIL.DeepCopy(base)
  277. init.Part= base.Part:Clone()
  278. else
  279. init = UTIL.DeepCopy(PartProjectile)
  280. init.Part = base:Clone()
  281. end
  282. init.Part.CFrame = CFrame.new(ray.Origin,ray.Origin+ray.Direction)
  283. init.Part.Parent = game.Workspace
  284. init.DirectionRay = ray
  285. table.insert(init.IgnoreList,init.Part)
  286. return init
  287. end
  288.  
  289. function PartProjectile:Hit(part)
  290. local char,hum = UTIL.FindCharacterAncestor(part)
  291.  
  292. if hum and not GLib.IsTeammate(GLib.GetPlayerFromPart(script), GLib.GetPlayerFromPart(hum)) then
  293. GLib.TagHumanoid(GLib.GetPlayerFromPart(script), hum, 1)
  294. hum:TakeDamage(self.Damage)
  295. end
  296. self.IsAlive = false
  297. end
  298.  
  299. function PartProjectile:Update(dt)
  300. if not self.IsAlive then return end
  301. local oldPos = self.Part.CFrame
  302. self.Part.CFrame = oldPos+(self.DirectionRay.Direction*self.Speed*dt)
  303. if (self.Part.CFrame.p-self.DirectionRay.Origin).magnitude>self.Range then
  304. self.IsAlive = false
  305. end
  306. local obj = game.Workspace:FindPartOnRayWithIgnoreList( Ray.new(oldPos.p,self.DirectionRay.Direction*self.Speed*dt), self.IgnoreList,false )
  307. if obj then
  308. self:Hit(obj)
  309. end
  310.  
  311. end
  312.  
  313. function PartProjectile:Destroy()
  314. self.Part.Parent = nil
  315. end
  316.  
  317. end
  318.  
  319. --[[shooting Tool Class]]--
  320.  
  321. local ShootingTool =
  322. {
  323. FireRate = .5, -- How often the weapon can fire.
  324. Automatic = false, -- hold down to continue firing
  325. Spread = 0, -- The bigger the spread, the more inaccurate the shots will be.
  326. ClipSize = 50, -- Shots in a clip
  327. ReloadTime = 3, -- Time it takes to reload the tool.
  328. StartingClips = -1,
  329. BarrelPos = CFrame.new(0, 0, - 1.2), -- L, F, U
  330.  
  331. SourcePart = nil,
  332. TemplateProjectile = nil,
  333. Projectiles = {},
  334. IsFireing = false,
  335.  
  336. OnFire = nil,
  337. OnReload = nil,
  338.  
  339. BulletsLeft = 50,
  340.  
  341. LastReload = 0,
  342.  
  343. FireSound = nil,
  344.  
  345. }
  346. do
  347. UTIL.MakeClass(ShootingTool)
  348. function ShootingTool.New(nSource,nProjectile)
  349. local init= UTIL.DeepCopy(ShootingTool)
  350. init.SourcePart= nSource
  351. init.TemplateProjectile = nProjectile
  352. init.OnFire = InternalEvent.New()
  353. init.OnReload = InternalEvent.New()
  354. return init
  355. end
  356.  
  357. function ShootingTool:UpdateBullets(dt)
  358. for index,i in ipairs(self.Projectiles) do
  359. if i.IsAlive then
  360. i:Update(dt)
  361. else
  362. i:Destroy()
  363. table.remove(self.Projectiles, index)
  364. end
  365. end
  366. end
  367.  
  368. function ShootingTool:StartFireing()
  369. if tick()-self.LastReload<self.ReloadTime then return end
  370. while self.IsFireing do wait() end
  371. self.IsFireing = true
  372. repeat
  373. if tick()-self.LastReload>self.ReloadTime and Gun.MousePos then
  374. local startPos = self.SourcePart.CFrame:toWorldSpace(self.BarrelPos)
  375. local dir = (CFrame.Angles((math.random()-.5)*2*self.Spread,(math.random()-.5)*2*self.Spread,(math.random()-.5)*2*self.Spread)*CFrame.new((Gun.MousePos-startPos.p).unit)).p
  376. local nprojectile = PartProjectile.New(self.TemplateProjectile, Ray.new(startPos.p,dir))
  377.  
  378. table.insert(self.Projectiles,nprojectile)
  379. self.OnFire:Fire()
  380. if self.FireSound then
  381. self.FireSound:Play()
  382. end
  383. self.BulletsLeft = self.BulletsLeft -1
  384. end
  385. if self.BulletsLeft==0 then
  386. self.OnReload:Fire()
  387. self.BulletsLeft = self.ClipSize
  388. self.LastReload = tick()
  389. end
  390. wait(self.FireRate)
  391. until not self.IsFireing or not self.Automatic
  392. end
  393.  
  394. function ShootingTool:EndFireing()
  395. self.IsFireing=false
  396. end
  397.  
  398. end
  399. do
  400. local Handle = script.Parent
  401. local Tool = Handle.Parent
  402.  
  403. local BarrelClip = UTIL.Instantiate"Part"
  404. {
  405. Size = Vector3.new(0.2, 0.2, 0.32),
  406. UTIL.Instantiate'SpecialMesh'
  407. {
  408. TextureId = "http://www.roblox.com/asset/?id=116679995",
  409. MeshId = "http://www.roblox.com/asset/?id=116740155",
  410. Scale = Vector3.new(0.9, 0.9, 0.9),
  411. },
  412. CanCollide = false,
  413. Parent = Tool
  414. }
  415.  
  416. local BarrelWeld = UTIL.Instantiate"Weld"
  417. {
  418. C1 = CFrame.new(0.0183372498, 0.378660202, 0.237049103, 0.00777955074, 0.0069010579, 0.999946177, -0.0223222617, 0.999727845, -0.00672559161, -0.999720693, -0.0222686939, 0.00793197285),
  419. C0 = CFrame.new(0, 0, 0, 0.00777955074, 0.0069010579, 0.999946177, -0.0223222617, 0.999727845, -0.00672559161, -0.999720693, -0.0222686939, 0.00793197285),
  420. Part0 = Handle,
  421. Part1 = BarrelClip,
  422. Parent = Handle,
  423. }
  424. WeldUtil:PermaWeld(BarrelWeld)
  425.  
  426. local OrangeLight = Handle:WaitForChild('OrangeLight')
  427. local RedLight = Handle:WaitForChild('RedLight')
  428. local SpotLight = Handle:WaitForChild('SpotLight')
  429.  
  430.  
  431. local ShellMesh = UTIL.Instantiate"SpecialMesh"
  432. {
  433. MeshId = UTIL.AssetURL..94295100,--116680945,
  434. TextureId = UTIL.AssetURL..94287792,--116681256,
  435. Scale = Vector3.new(2.8,2.8,5),
  436. }
  437. local Projectile
  438. do
  439. local tpart = UTIL.Instantiate"Part"
  440. {
  441. Anchored = true,
  442. CanCollide = false,
  443. Size = Vector3.new(.2,.2,.6),
  444. ShellMesh:Clone(),
  445. }
  446. Projectile = PartProjectile.New(tpart,Ray.new())
  447. end
  448. table.insert(Projectile.IgnoreList,Handle)
  449.  
  450. Projectile.Speed = 200
  451. Gun = ShootingTool.New(Handle,Projectile)
  452. Gun.Automatic = true
  453. Gun.BarrelPos = CFrame.new(0, 0, - 3.1)
  454. Gun.FireRate = .05
  455. Gun.Spread = .1
  456. Gun.FireSound = Handle:WaitForChild('FireSound')
  457.  
  458. local HoldAniTrack
  459. local ReloadAniTrack
  460. Gun.OnFire:Connect(function()
  461. SpotLight.Enabled = true
  462. if(math.random()>.5) then
  463. OrangeLight.Enabled =true
  464. else
  465. RedLight.Enabled =true
  466. end
  467. wait(.05)
  468. SpotLight.Enabled = false
  469. OrangeLight.Enabled =false
  470. RedLight.Enabled =false
  471. end)
  472.  
  473. Gun.OnReload:Connect(function()
  474. local leftArm = script.Parent.Parent.Parent:FindFirstChild('Left Arm')
  475. if not leftArm then return end
  476. local reloadBarrel = BarrelClip:Clone()
  477. reloadBarrel.Parent = Tool
  478. local tweld=WeldUtil:WeldBetween(reloadBarrel,leftArm)
  479. BarrelClip.Transparency = 1
  480. if ReloadAniTrack then
  481. ReloadAniTrack:Play()
  482. end
  483. wait(3)
  484. reloadBarrel:Destroy()
  485. tweld:Destroy()
  486. BarrelClip.Transparency = 0
  487. end)
  488.  
  489. Tool.Equipped:connect(function()
  490.  
  491. local Character = script.Parent.Parent.Parent
  492. local Humanoid = Character:FindFirstChildOfClass("Humanoid")
  493. local HoldId = 116690317
  494. local ReloadId = 116695140
  495. if Humanoid then
  496. if Humanoid.RigType == Enum.HumanoidRigType.R15 then
  497. HoldId = 857035982
  498. ReloadId = 857036793
  499. end
  500. end
  501. local HoldAni = UTIL.Instantiate"Animation"
  502. {AnimationId = "http://www.roblox.com/Asset?ID="..HoldId}
  503. local ReloadAni = UTIL.Instantiate"Animation"
  504. {AnimationId = "http://www.roblox.com/Asset?ID="..ReloadId}
  505.  
  506. table.insert(Projectile.IgnoreList,Character)
  507. HoldAniTrack = Humanoid:LoadAnimation(HoldAni)
  508. ReloadAniTrack = Humanoid:LoadAnimation(ReloadAni)
  509. HoldAniTrack:Play()
  510. end)
  511. Tool.Unequipped:connect(function()
  512. if HoldAniTrack then
  513. HoldAniTrack:Stop()
  514. end
  515. end)
  516. spawn(function()
  517. while true do
  518. Gun:UpdateBullets(1/30)
  519. wait()
  520. end
  521. end)
  522.  
  523. end
  524.  
  525. local Tool = script.Parent.Parent
  526. Tool.Input.OnServerEvent:connect(function(client, action, ...)
  527. if client.Character == Tool.Parent then
  528. if action == 'Mouse1' then
  529. local down, pos = ...
  530.  
  531. if down and Gun then
  532. Gun:StartFireing()
  533. elseif not down and Gun then
  534. Gun:EndFireing()
  535. end
  536. elseif action == 'MouseMove' then
  537. local pos = ...
  538. if Gun then
  539. Gun.MousePos = pos
  540. end
  541. end
  542. end
  543. end)
  544. end))
  545. Weld8.Parent = Part1
  546. Weld8.C0 = CFrame.new(0.00955887139, -0.363420993, -0.235873759, 0.999949992, -0.00672620907, 0.00793286413, 0.00690177083, 0.999727488, -0.0222691298, -0.00777936727, 0.0223225057, 0.999724865)
  547. Weld8.Part0 = Part1
  548. Weld8.Part1 = Part9
  549. Weld8.part1 = Part9
  550. Part9.Name = "BarrelClip"
  551. Part9.Parent = Tool0
  552. Part9.CFrame = CFrame.new(49.7855301, 1.41289759, 36.8009186, -0.970350802, 0.14343144, -0.194565505, 0.224905372, 0.830695748, -0.50927788, 0.0885779485, -0.537930906, -0.838326752)
  553. Part9.Orientation = Vector3.new(30.6199989, -166.929993, 15.1499996)
  554. Part9.Position = Vector3.new(49.7855301, 1.41289759, 36.8009186)
  555. Part9.Rotation = Vector3.new(148.720001, -11.2199993, -171.589996)
  556. Part9.Size = Vector3.new(0.200000003, 0.200000003, 0.319990754)
  557. Part9.CanCollide = false
  558. Part9.Material = Enum.Material.Metal
  559. Part9.FormFactor = Enum.FormFactor.Custom
  560. Part9.formFactor = Enum.FormFactor.Custom
  561. SpecialMesh10.Parent = Part9
  562. SpecialMesh10.MeshId = "http://www.roblox.com/asset/?id=116740155"
  563. SpecialMesh10.Scale = Vector3.new(0.899999976, 0.899999976, 0.899999976)
  564. SpecialMesh10.TextureId = "rbxassetid://724704785"
  565. SpecialMesh10.MeshType = Enum.MeshType.FileMesh
  566. Script11.Parent = Part9
  567. table.insert(cors,sandbox(Script11,function()
  568. wait(.1)
  569. script.Parent:Destroy()
  570. wait(1)
  571. end))
  572. LocalScript12.Parent = Tool0
  573. table.insert(cors,sandbox(LocalScript12,function()
  574. local equipped = false
  575. local setIconCon
  576. local Players = game:GetService'Players'
  577.  
  578. local getCharacterFromPart = function(part)
  579. local current = part
  580. local character = nil
  581. local humanoid = nil
  582. while true do
  583. for i, child in next, current:GetChildren() do
  584. if child:IsA'Humanoid' then
  585. character = current
  586. humanoid = child
  587. break
  588. end
  589. end
  590.  
  591. if character then
  592. break
  593. else
  594. current = current.Parent
  595.  
  596. if not current or current == game then
  597. break
  598. end
  599. end
  600. end
  601.  
  602. return character, character and Players:GetPlayerFromCharacter(character), humanoid
  603. end
  604.  
  605. script.Parent.Equipped:connect(function(mouse)
  606. equipped = true
  607. mouse.Button1Down:connect(function() script.Parent.Input:FireServer('Mouse1', true, mouse.Hit.p, mouse.Target) end)
  608. mouse.Button1Up:connect(function() script.Parent.Input:FireServer('Mouse1', false, mouse.Hit.p) end)
  609. mouse.KeyDown:connect(function(key) script.Parent.Input:FireServer('Key', true, key) end)
  610. mouse.KeyUp:connect(function(key) script.Parent.Input:FireServer('Key', false, key) end)
  611.  
  612. setIconCon = script.Parent.SetIcon.OnClientEvent:connect(function(icon)
  613. mouse.Icon = icon
  614. end)
  615.  
  616. while equipped do
  617. script.Parent.Input:FireServer('MouseMove', mouse.Hit.p, mouse.Target)
  618. wait(1/20)
  619. end
  620. end)
  621. script.Parent.Unequipped:connect(function()
  622. equipped = false
  623.  
  624. if setIconCon then setIconCon:disconnect() end
  625. end)
  626. end))
  627. RemoteEvent13.Name = "Input"
  628. RemoteEvent13.Parent = Tool0
  629. RemoteEvent14.Name = "SetIcon"
  630. RemoteEvent14.Parent = Tool0
  631. Camera15.Name = "ThumbnailCamera"
  632. Camera15.Parent = Tool0
  633. Camera15.CFrame = CFrame.new(-3.21380234, 17.4844227, 22.9505825, 0.248690993, 0.0456203222, -0.967507958, -0, 0.998890221, 0.0471000671, 0.968582928, -0.0117133623, 0.248414993)
  634. Camera15.CoordinateFrame = CFrame.new(-3.21380234, 17.4844227, 22.9505825, 0.248690993, 0.0456203222, -0.967507958, -0, 0.998890221, 0.0471000671, 0.968582928, -0.0117133623, 0.248414993)
  635. Camera15.Focus = CFrame.new(-1.27878642, 17.3902225, 22.4537525, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  636. Camera15.focus = CFrame.new(-1.27878642, 17.3902225, 22.4537525, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  637. for i,v in pairs(mas:GetChildren()) do
  638. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  639. pcall(function() v:MakeJoints() end)
  640. end
  641. mas:Destroy()
  642. for i,v in pairs(cors) do
  643. spawn(function()
  644. pcall(v)
  645. end)
  646. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement